/*
 * Suroe Games - Unified Articles CSS
 * 统一43个文章页面的样式
 * 提取自所有文章页面的内联样式
 */

/* CSS 变量定义 */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6b8cbc;
    --accent-color: #ff7b54;
    --light-color: #f8f9fa;
    --dark-color: #2d3748;
    --light-bg: #f8f9fa;
    --text-color: #2d3748;
    --border-color: #e2e8f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --gray-light: #e2e8f0;
    --gray-medium: #a0aec0;
    --gray-dark: #4a5568;
}

/* 基础重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础页面样式 */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ec 100%);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 独立的右侧广告栏容器
   默认隐藏，仅当视口足够宽（容器 1200px + 广告 ~320px + 边距）时
   才以 fixed 形式悬浮显示，避免窄屏上悬浮遮挡正文 */
.right-sidebar-ad {
    position: fixed;
    right: 20px;
    top: 140px;
    width: auto;
    min-width: 300px;
    max-width: 336px;
    z-index: 1000;
    display: none; /* 默认隐藏，仅在宽屏显示 */
}

/* 宽屏（≥1600px）时显示右侧悬浮广告，保证不与正文内容重叠 */
@media (min-width: 1600px) {
    .right-sidebar-ad {
        display: block;
    }
}

/* 右侧广告容器样式 - 与顶部广告样式一致 */
.right-sidebar-ad .sidebar-ad {
    display: block;
    width: 100%;
    background: transparent;
    border-radius: 8px;
    padding: 15px;
    box-shadow: none;
    border: none;
}

.right-sidebar-ad .ad-label {
    display: inline-block;
    font-size: 10px;
    color: #999;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding: 2px 6px;
    background-color: transparent;
    border-radius: 2px;
}

/* 页面头部样式 */
.header {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    color: var(--dark-color);
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 文章内容区域 */
.article-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.article-content h2 {
    color: var(--primary-color);
    margin: 25px 0 15px 0;
    font-size: 1.8rem;
}

.article-content h3 {
    color: var(--accent-color);
    margin: 20px 0 10px 0;
    font-size: 1.4rem;
}

.article-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.article-content ul, .article-content ol {
    margin: 15px 0 15px 20px;
}

.article-content li {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

/* 推荐文章容器 */
.related-articles-container {
    margin: 40px 0;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.related-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.related-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: var(--dark-color);
    display: block;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: var(--primary-color);
}

.related-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.related-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

/* 返回按钮 */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-button:hover {
    background: #3a5a85;
    transform: translateY(-2px);
}

/* 立即游玩按钮 - 文章结尾引导去玩对应游戏 */
.play-now-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    margin: 0 10px 12px 0;
}

.play-now-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, #16a34a, #15803d);
}

/* 广告容器 */
.ad-container {
    display: flex;
    justify-content: center;
    margin: 25px 0;
    min-height: 90px;
    background: white;
    border-radius: 12px;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.ad-label {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

/* 页脚样式：与全站统一为通栏条（原为圆角卡片 + margin，与其它页面不一致） */
footer {
    text-align: center;
    padding: 25px 30px;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    border-top: 1px solid #e2e8f0;
    width: 100%;
    margin-top: auto;
    position: relative;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

footer p {
    margin: 10px 0;
    font-size: 0.9rem;
}

.footer-copyright {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
}

/* 版权归属声明：本站嵌入第三方游戏，此声明必须保留 */
.footer-disclaimer {
    margin: 10px 0 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* 移动端页脚：左对齐 + 链接置顶一排（间距收窄、不换行；长段落居中不易读） */
@media (max-width: 768px) {
    footer {
        padding: 16px 6px 18px;
        text-align: left;
    }

    .footer-links {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        margin: 0 0 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .footer-links a {
        font-size: 0.7rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* 年份那一行居中 */
    .footer-copyright {
        text-align: center;
    }

    .footer-disclaimer {
        text-align: left;
        font-size: 0.78rem;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 20px;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-content {
        padding: 25px;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
}

/* FAQ 手风琴（评测文章用 details/summary） */
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 0 16px;
    background: #f8fafc;
    transition: border-color 0.3s ease;
}

.faq-item:hover {
    border-color: #cbd5e1;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-color);
    padding: 14px 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8em;
    color: var(--accent-color);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-item[open] summary::before {
    transform: rotate(180deg);
}

.faq-item p {
    margin: 0;
    padding: 0 0 14px;
}

/* ============================================
   文章内配图
   ============================================ */
.article-content img {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    margin: 18px auto 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* ============================================
   文章内对比表格（列表型文章的开头速览）
   ============================================ */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.94rem;
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.article-content thead th {
    background: var(--primary-color);
    color: #fff;
    text-align: left;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

.article-content tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    vertical-align: top;
}

.article-content tbody tr:nth-child(even) {
    background: #fafbfc;
}

.article-content tbody tr:last-child td {
    border-bottom: none;
}

.article-content tbody td strong {
    color: var(--dark-color);
}

/* 窄屏横向滚动，避免表格挤压 */
@media (max-width: 700px) {
    .article-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .article-content thead th,
    .article-content tbody td {
        white-space: nowrap;
    }
}

/* ============================================
   FAQ 问答区（h3 + p 结构，扫读性更好）
   ============================================ */
.article-content .faq-block h3 {
    font-size: 1.05rem;
    color: var(--dark-color);
    margin: 22px 0 6px 0;
    line-height: 1.4;
}

.article-content .faq-block h3:first-of-type {
    margin-top: 16px;
}

.article-content .faq-block p {
    margin: 0;
    color: var(--gray-dark);
}

/* ============================================
   相关文章静态兜底（JS 渲染前的可见链接）
   ============================================ */
.related-static {
    margin: 30px 0 10px;
    padding: 18px 20px;
    background: #fff;
    border-left: 4px solid var(--accent-color);
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.related-static h3 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: var(--dark-color);
}

.related-static ul {
    margin: 0;
    padding-left: 20px;
}

.related-static li {
    margin-bottom: 6px;
}

.related-static a {
    color: var(--primary-color);
    text-decoration: none;
}

.related-static a:hover {
    text-decoration: underline;
}

/* ============================================
   列表型文章组件（目录 TOC / 可横向滚动表格 / 游戏规格块）
   ============================================ */
.article-content .toc {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 24px 0;
    box-shadow: var(--shadow);
}

.article-content .toc h2 {
    margin: 0 0 10px 0;
    font-size: 1.05rem;
    color: var(--dark-color);
}

.article-content .toc ol {
    margin: 0;
    padding-left: 20px;
}

.article-content .toc li {
    margin: 5px 0;
}

.article-content .toc a {
    color: var(--primary-color);
    text-decoration: none;
}

.article-content .toc a:hover {
    text-decoration: underline;
}

/* 表格在窄屏可横向滚动（配合 <caption> 与 aria-label） */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
}

.table-scroll table {
    margin: 0;
    min-width: 560px;
}

.table-scroll:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.article-content table caption {
    caption-side: top;
    text-align: left;
    font-size: 0.85rem;
    color: var(--gray-dark);
    padding: 0 0 8px 0;
}

/* 每款游戏的规格块 */
.game-specs {
    list-style: none;
    margin: 12px 0 0;
    padding: 12px 16px;
    background: var(--light-bg);
    border-radius: 8px;
    display: grid;
    gap: 6px;
}

.game-specs li {
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin: 0;
}

.game-specs b {
    color: var(--dark-color);
    font-weight: 600;
}

/* 广告位预留高度，减少布局偏移（CLS） */
.ad-section {
    min-height: 90px;
}


/* 列表型文章的首屏说明块改用 <h2>（大纲合规）时，视觉上保持小号，
   避免继承 .article-content h2 的 1.8rem 正文标题尺寸 */
.article-content .highlight-box h2 {
    font-size: 1.05rem;
    color: var(--dark-color);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

/* 侧栏广告预留高度，减少布局偏移（CLS） */
.right-sidebar-ad .sidebar-ad {
    min-height: 250px;
}
