/**
 * 详情页专用样式
 */

/* ===== 布局 ===== */
.main-content {
    padding: 8px 0 50px;
}

.content-wrap {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.content-left {
    flex: 1;
    min-width: 0;
}

.content-right {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ===== 文章卡片 ===== */
.article-card {
    background: var(--stn-card-bg);
    border: 1px solid var(--stn-border);
    border-radius: 12px;
    padding: 40px 44px;
    box-shadow: var(--stn-shadow);
}

/* ===== 文章头部 ===== */
.article-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
    margin-bottom: 28px;
}
.article-header .cat-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 14px;
    border-radius: 30px;
    background: rgba(212, 168, 92, 0.15);
    color: var(--stn-primary);
    border: 1px solid rgba(212, 168, 92, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.article-header h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--stn-text-light);
    line-height: 1.3;
    margin-bottom: 12px;
}
.article-header .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.8rem;
    color: var(--stn-text-muted);
}
.article-header .meta i {
    margin-right: 4px;
    color: var(--stn-primary);
    font-size: 0.7rem;
}
.article-header .meta .sep {
    color: #4a403a;
}
.article-header .tag-group {
    display: flex;
    gap: 6px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.article-header .tag-group .tag {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 30px;
    background: rgba(212, 168, 92, 0.08);
    color: var(--stn-primary);
    border: 1px solid rgba(212, 168, 92, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.article-header .tag-group .tag.new {
    background: rgba(52, 152, 219, 0.12);
    color: #5dade2;
    border-color: rgba(52, 152, 219, 0.15);
}
.article-header .tag-group .tag.hot {
    background: rgba(165, 69, 58, 0.2);
    color: #e0746a;
    border-color: rgba(165, 69, 58, 0.2);
}

/* ===== 文章正文 ===== */
.article-body {
    color: var(--stn-text-body);
    font-size: 1rem;
    line-height: 1.8;
}
.article-body p {
    margin-bottom: 18px;
}
.article-body h2 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--stn-text-light);
    margin: 32px 0 14px;
    padding-left: 14px;
    border-left: 3px solid var(--stn-primary);
}
.article-body h3 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--stn-text-light);
    margin: 24px 0 10px;
}
.article-body ul,
.article-body ol {
    margin: 0 0 18px 24px;
}
.article-body ul li,
.article-body ol li {
    margin-bottom: 6px;
}
.article-body ul li::marker {
    color: var(--stn-primary);
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}
.article-body blockquote {
    border-left: 3px solid var(--stn-primary);
    padding: 12px 20px;
    margin: 16px 0;
    background: rgba(212, 168, 92, 0.05);
    color: var(--stn-text-light);
    border-radius: 0 8px 8px 0;
}
.article-body a {
    color: var(--stn-primary);
    text-decoration: underline;
}
.article-body a:hover {
    color: var(--stn-secondary);
}

/* ===== 提示框 ===== */
.tip-box {
    background: rgba(212, 168, 92, 0.06);
    border-left: 4px solid var(--stn-primary);
    padding: 16px 20px;
    margin: 20px 0 24px;
    border-radius: 0 8px 8px 0;
}
.tip-box strong {
    color: var(--stn-text-light);
}
.tip-box.warning {
    border-left-color: #a5453a;
    background: rgba(165, 69, 58, 0.08);
}
.tip-box.warning strong {
    color: #e0746a;
}

/* ===== 表格 ===== */
.table-wrap {
    overflow-x: auto;
    margin: 20px 0 24px;
}
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}
.table-wrap table thead {
    background: rgba(212, 168, 92, 0.12);
}
.table-wrap table th {
    padding: 10px 16px;
    text-align: left;
    color: var(--stn-text-light);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(212, 168, 92, 0.1);
}
.table-wrap table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.table-wrap table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
.table-wrap table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== 文章底部 ===== */
.article-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.article-footer .share {
    display: flex;
    gap: 12px;
    align-items: center;
}
.article-footer .share span {
    font-size: 0.8rem;
    color: var(--stn-text-muted);
}
.article-footer .share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--stn-text-muted);
    transition: var(--transition);
    font-size: 0.9rem;
    text-decoration: none;
}
.article-footer .share a:hover {
    background: rgba(212, 168, 92, 0.1);
    color: var(--stn-text-light);
    border-color: rgba(212, 168, 92, 0.2);
}
.article-footer .article-nav {
    display: flex;
    gap: 24px;
    font-size: 0.85rem;
}
.article-footer .article-nav a {
    color: var(--stn-text-muted);
    transition: var(--transition);
    text-decoration: none;
}
.article-footer .article-nav a:hover {
    color: var(--stn-text-light);
}
.article-footer .article-nav a i {
    margin: 0 4px;
}

/* ===== 相关推荐 ===== */
.related-section {
    margin-top: 28px;
    background: var(--stn-card-bg);
    border: 1px solid var(--stn-border);
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: var(--stn-shadow);
}
.related-section .rel-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--stn-text-light);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.related-section .rel-title i {
    color: var(--stn-primary);
}
.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.related-grid .rel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.related-grid .rel-item:hover {
    background: var(--stn-card-bg);
    border-color: rgba(212, 168, 92, 0.15);
}
.related-grid .rel-item .icon {
    color: var(--stn-primary);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.related-grid .rel-item .info {
    flex: 1;
    min-width: 0;
}
.related-grid .rel-item .info h5 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--stn-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.related-grid .rel-item .info .rel-meta {
    font-size: 0.65rem;
    color: var(--stn-text-muted);
}

/* ===== 目录导航 ===== */
.toc-widget {
    background: var(--stn-card-bg);
    border: 1px solid var(--stn-border);
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: var(--stn-shadow);
}
.toc-widget .toc-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--stn-text-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toc-widget .toc-title i {
    color: var(--stn-primary);
}
.toc-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.toc-widget ul li {
    padding: 4px 0 4px 16px;
    font-size: 0.85rem;
    color: var(--stn-text-body);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    list-style: none;
}
.toc-widget ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--stn-primary);
    font-weight: 700;
}
.toc-widget ul li:hover {
    color: var(--stn-text-light);
    padding-left: 20px;
}
.toc-widget ul li:last-child {
    border-bottom: none;
}

/* ===== 侧边栏小部件 ===== */
.widget {
    background: var(--stn-card-bg);
    border: 1px solid var(--stn-border);
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: var(--stn-shadow);
    display: flex;
    flex-direction: column;
}

.widget-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--stn-text-light);
    border-bottom: 1px solid rgba(212, 168, 92, 0.1);
    padding-bottom: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.widget-title i {
    color: var(--stn-primary);
}

.hot-list {
    display: flex;
    flex-direction: column;
}
.hot-list .hot-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    cursor: pointer;
}
.hot-list .hot-item:last-child {
    border-bottom: none;
}
.hot-list .hot-item:hover {
    padding-left: 6px;
    color: var(--stn-text-light);
}
.hot-list .hot-rank {
    font-weight: 700;
    color: var(--stn-primary);
    font-size: 0.8rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.hot-list .hot-rank.top1 {
    color: #f1c40f;
}
.hot-list .hot-rank.top2 {
    color: #bdc3c7;
}
.hot-list .hot-rank.top3 {
    color: #e67e22;
}
.hot-list .hot-info {
    flex: 1;
}
.hot-list .hot-info .title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--stn-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hot-list .hot-info .views {
    font-size: 0.7rem;
    color: var(--stn-text-muted);
}

.update-list {
    display: flex;
    flex-direction: column;
}
.update-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition);
    cursor: pointer;
}
.update-item:last-child {
    border-bottom: none;
}
.update-item:hover {
    padding-left: 4px;
    color: var(--stn-text-light);
}
.update-item .date {
    font-size: 0.65rem;
    color: var(--stn-text-muted);
    flex-shrink: 0;
    width: 56px;
}
.update-item .title {
    font-size: 0.85rem;
    color: var(--stn-text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.update-item:hover .title {
    color: var(--stn-text-light);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .content-right {
        width: 260px;
    }
    .article-card {
        padding: 28px 24px;
    }
    .article-header h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 820px) {
    .content-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    .content-right {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .content-right .widget {
        flex: 1;
        min-width: 200px;
    }
    .toc-widget {
        display: none;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 14px;
    }
    .content-right .widget {
        min-width: 100%;
    }
    .article-card {
        padding: 20px 16px;
    }
    .article-header h1 {
        font-size: 1.3rem;
    }
    .article-header .meta {
        gap: 12px;
        font-size: 0.7rem;
    }
    .article-body {
        font-size: 0.92rem;
    }
    .article-body h2 {
        font-size: 1.2rem;
    }
    .article-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .article-footer .share {
        justify-content: center;
    }
    .article-footer .article-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    .related-grid .rel-item .info h5 {
        white-space: normal;
    }
}