/* ========== 新闻详情页样式 ========== */

/* ========== 页面基础 ========== */
.news-detail-page {
    min-height: 100vh;
    background: #f5f7fb;
    padding-top: 0;
}

.news-detail-page .container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ========== 文章容器 ========== */
.article-container {
    background: #fff;
    padding: 40px 0 60px;
}

.article-main {
    max-width: 900px;
    margin: 0 auto;
}

/* ========== 文章头部 ========== */
.article-header {
    text-align: center;
    margin-bottom: 32px;
}

.article-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    color: #fff;
    border-radius: 4px;
    background: linear-gradient(135deg, #FE720A 0%, #ff9a4d 100%);
    margin-bottom: 16px;
}

.article-badge.company { background: linear-gradient(135deg, #1890ff 0%, #69c0ff 100%); }
.article-badge.industry { background: linear-gradient(135deg, #52c41a 0%, #95de64 100%); }
.article-badge.campus { background: linear-gradient(135deg, #722ed1 0%, #b37feb 100%); }
.article-badge.technology { background: linear-gradient(135deg, #fa8c16 0%, #ffc53d 100%); }

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 14px;
    color: #999;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 文章封面 ========== */
.article-cover {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f7fb;
}

.article-cover img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== 文章内容 ========== */
.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}

.article-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 32px 0 16px;
}

.article-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 24px 0 12px;
}

.article-content ul,
.article-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: #f5f7fb;
    border-left: 4px solid #FE720A;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.article-content code {
    padding: 2px 6px;
    background: #f0f0f0;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.article-content pre {
    margin: 20px 0;
    padding: 20px;
    background: #1e1e1e;
    border-radius: 8px;
    overflow-x: auto;
}

.article-content pre code {
    background: transparent;
    color: #d4d4d4;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.article-content a {
    color: #FE720A;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.article-content a:hover {
    border-bottom-color: #FE720A;
}

.loading-text {
    text-align: center;
    padding: 60px 0;
    color: #999;
}

/* ========== 文章标签 ========== */
.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.tag-label {
    font-size: 14px;
    color: #999;
}

.tag-item {
    padding: 6px 14px;
    font-size: 13px;
    color: #fff;
    background: linear-gradient(135deg, #FE720A 0%, #ff9a4d 100%);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background: linear-gradient(135deg, #e66609 0%, #f58a3d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(254, 114, 10, 0.3);
}

/* ========== 分享功能 ========== */
.article-share {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 24px;
    background: #f5f7fb;
    border-radius: 12px;
}

.share-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.wechat {
    background: #07c160;
    color: #fff;
}

.share-btn.weibo {
    background: #e6162d;
    color: #fff;
}

.share-btn.qq {
    background: #1296db;
    color: #fff;
}

.share-btn.copy {
    background: #666;
    color: #fff;
}

.share-btn.copied {
    background: #52c41a;
}

/* 分享提示弹窗 */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.share-modal.show {
    display: flex;
}

.share-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    font-weight: 600;
}

.share-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-body {
    padding: 24px;
    text-align: center;
}

.share-modal-body p {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.share-modal-qr {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
}

/* ========== 上一篇下一篇 ========== */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.article-prev,
.article-next {
    flex: 1;
    padding: 16px 20px;
    background: #f5f7fb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-prev:hover,
.article-next:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.article-prev {
    text-align: left;
}

.article-next {
    text-align: right;
}

.article-prev span:first-child,
.article-next span:first-child {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.article-nav-title {
    font-size: 14px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 返回列表 ========== */
.article-back {
    text-align: center;
    margin-top: 32px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 14px;
    color: #666;
    background: #f5f5f5;
    border-radius: 24px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #FE720A;
    color: #fff;
}

/* ========== 响应式适配 ========== */
@media screen and (max-width: 768px) {
    .news-detail-page {
        background: #f5f7fb;
    }

    .news-detail-page .container {
        width: 100%;
        padding: 0 15px;
    }

    .article-container {
        padding: 20px 0 40px;
    }

    .article-main {
        padding: 0;
        box-shadow: none;
    }

    .article-header {
        margin-bottom: 20px;
    }

    .article-badge {
        font-size: 12px;
        padding: 4px 12px;
        margin-bottom: 12px;
    }

    .article-title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .article-meta {
        flex-wrap: wrap;
        gap: 12px;
        font-size: 13px;
        justify-content: flex-start;
    }

    .article-cover {
        border-radius: 8px;
        margin-bottom: 20px;
    }

    .article-content {
        font-size: 15px;
        line-height: 1.8;
    }

    .article-content p {
        text-align: left;
        margin-bottom: 16px;
    }

    .article-tags {
        margin-top: 24px;
        padding-top: 20px;
    }

    .tag-label {
        width: 100%;
        margin-bottom: 8px;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
        border-radius: 8px;
    }

    .share-buttons {
        width: 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .share-btn {
        width: 40px;
        height: 40px;
    }

    .share-btn svg {
        width: 18px;
        height: 18px;
    }

    .article-nav {
        flex-direction: column;
        gap: 12px;
        padding-top: 20px;
    }

    .article-prev,
    .article-next {
        text-align: left;
        padding: 14px 16px;
    }

    .article-back {
        margin-top: 24px;
    }

    .back-btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    /* 移动端分享弹窗 */
    .share-modal-content {
        width: 90%;
        max-width: 320px;
        margin: 0 auto;
    }

    .share-modal-header {
        padding: 14px 16px;
        font-size: 15px;
    }

    .share-modal-close {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }

    .share-modal-body {
        padding: 20px 16px;
    }

    .share-modal-qr {
        width: 150px;
        height: 150px;
    }
}

@media screen and (max-width: 480px) {
    .article-badge {
        font-size: 11px;
        padding: 3px 10px;
    }

    .article-title {
        font-size: 18px;
        line-height: 1.4;
    }

    .article-meta {
        font-size: 12px;
        gap: 8px;
    }

    .article-meta span {
        font-size: 12px;
    }

    .article-cover {
        border-radius: 6px;
        margin-bottom: 16px;
    }

    .article-content {
        font-size: 14px;
        line-height: 1.75;
    }

    .article-content h2 {
        font-size: 17px;
        margin: 20px 0 10px;
    }

    .article-content h3 {
        font-size: 15px;
        margin: 16px 0 8px;
    }

    .article-content blockquote {
        padding: 14px 16px;
        margin: 16px 0;
    }

    .article-content ul,
    .article-content ol {
        padding-left: 18px;
    }

    .article-tags {
        gap: 6px;
        margin-top: 20px;
    }

    .tag-label {
        width: 100%;
        font-size: 13px;
    }

    .tag-item {
        padding: 4px 10px;
        font-size: 12px;
    }

    .share-label {
        font-size: 13px;
    }

    .share-btn {
        width: 36px;
        height: 36px;
    }

    .share-btn svg {
        width: 16px;
        height: 16px;
    }

    .article-prev,
    .article-next {
        padding: 12px 14px;
    }

    .article-nav-title {
        font-size: 13px;
    }
}

/* ========== 移动端触摸优化 ========== */
@media screen and (max-width: 768px) {
    /* 触摸反馈 */
    .share-btn,
    .tag-item,
    .back-btn,
    .article-prev,
    .article-next {
        -webkit-tap-highlight-color: rgba(254, 114, 10, 0.1);
        transition: transform 0.15s ease, opacity 0.15s ease;
        touch-action: manipulation;
    }

    .share-btn:active,
    .tag-item:active,
    .back-btn:active,
    .article-prev:active,
    .article-next:active {
        transform: scale(0.96);
        opacity: 0.85;
    }

    /* 图片最大宽度优化 */
    .article-content img {
        max-width: 100%;
        border-radius: 6px;
    }

    /* 代码块滚动优化 */
    .article-content pre {
        border-radius: 6px;
    }

    /* 链接触摸效果 */
    .article-content a:active {
        opacity: 0.7;
    }

    /* 返回按钮安全区域 */
    .article-back {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    /* 面包屑横向滚动支持 */
    .breadcrumb-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .breadcrumb-list::-webkit-scrollbar {
        display: none;
    }
}
