/* ===================================================
   VG游戏指南 (vgtip.3loumao.org) - 现代多端响应式样式表
   支持明亮日间模式（默认）与沉浸夜间模式无缝切换
   =================================================== */

/* ================== 主题色彩系统 ================== */
:root, .theme-light {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-cyan: #0284c7;
    --accent-purple: #6366f1;
    --accent-blue: #2563eb;
    --accent-gold: #d97706;
    
    --gradient-brand: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #6366f1 100%);
    --gradient-card: #ffffff;
    --hero-bg: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 60%),
               radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.08), transparent 60%),
               #ffffff;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 25px rgba(2, 132, 199, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
    
    --header-bg: rgba(255, 255, 255, 0.92);
    --footer-bg: #f1f5f9;
    --footer-text: #64748b;
    --code-bg: #f8fafc;
    --tag-bg: rgba(2, 132, 199, 0.08);
    --tag-border: rgba(2, 132, 199, 0.2);
    --capsule-bg: #ffffff;
}

.theme-dark {
    --bg-main: #0a0e17;
    --bg-surface: #121824;
    --bg-card: #161e2e;
    --bg-hover: #1c263b;
    --border-color: #232e47;
    --border-light: #303e5e;
    
    --text-primary: #e6edf8;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-cyan: #00d2ff;
    --accent-purple: #7928ca;
    --accent-blue: #3b82f6;
    --accent-gold: #f59e0b;
    
    --gradient-brand: linear-gradient(135deg, #00d2ff 0%, #3b82f6 50%, #7928ca 100%);
    --gradient-card: linear-gradient(180deg, rgba(22, 30, 46, 0.8) 0%, rgba(18, 24, 36, 0.95) 100%);
    --hero-bg: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 60%),
               radial-gradient(circle at bottom left, rgba(121, 40, 202, 0.15), transparent 60%),
               #121824;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 210, 255, 0.15);
    
    --header-bg: rgba(10, 14, 23, 0.88);
    --footer-bg: #070a10;
    --footer-text: #64748b;
    --code-bg: #0d121c;
    --tag-bg: rgba(0, 210, 255, 0.08);
    --tag-border: rgba(0, 210, 255, 0.2);
    --capsule-bg: rgba(22, 30, 46, 0.8);
}

/* ================== 全局重置 ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================== 顶部导航栏 ================== */
.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 20px;
}

.header-brand-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.logo-badge {
    background: var(--gradient-brand);
    color: #fff;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-item:hover, .nav-item.active {
    color: var(--accent-cyan);
    background: var(--tag-bg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.theme-toggle-btn, .lang-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.theme-toggle-btn:hover, .lang-switch-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ================== 主体与布局 ================== */
.site-main {
    flex: 1;
    padding: 30px 20px 60px;
}

/* 首页 Hero Banner */
.hero-banner {
    background: var(--hero-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
    max-width: 800px;
}

.tag-capsules {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.capsule-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.tag-capsule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--capsule-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.tag-capsule .count {
    background: var(--tag-bg);
    color: var(--accent-cyan);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-capsule:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

/* ================== 文章列表网格 ================== */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-cyan);
    padding-left: 12px;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-hover);
}

.card-cover-wrap {
    display: block;
    width: 100%;
    height: 195px;
    overflow: hidden;
    position: relative;
    background-color: var(--border-color);
}

.card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .card-cover {
    transform: scale(1.05);
}

.card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 8px;
}

.card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--accent-cyan);
}

.card-summary {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.card-tag {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.card-tag:hover {
    background: rgba(2, 132, 199, 0.18);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

/* 分页控件 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.page-btn {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.page-indicator {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ================== 详情页样式 ================== */
.detail-layout {
    max-width: 900px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent-cyan);
}

.article-detail-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
    margin-bottom: 40px;
}

.detail-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 28px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta-left {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* 文章底部关联标签 */
.detail-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.detail-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.tag-pill {
    background: var(--tag-bg);
    color: var(--accent-cyan);
    border: 1px solid var(--tag-border);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.82rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.tag-pill:hover {
    background: rgba(2, 132, 199, 0.2);
}

/* 正文富文本样式 */
.article-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content h2, .article-content h3, .article-content h4 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.article-content h3 {
    font-size: 1.25rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

/* 图文混排与图片图注容器 */
.article-image-box {
    margin: 1.75rem auto;
    padding: 0;
    text-align: center;
}

.article-image-box img {
    display: block;
    margin: 0 auto;
}

.image-caption {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    line-height: 1.5;
}


/* 游戏特惠/信息卡片组件 */
.com-game-card {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin: 18px 0;
    gap: 16px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
}

.com-game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.com-game-card .game-img-wrapper {
    position: relative;
    width: 135px;
    min-width: 135px;
    height: 65px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
}

.com-game-card .game-img-wrapper .game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.com-game-card .static-color-discount-box {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
}

.com-game-card .game-info {
    flex: 1;
    min-width: 0;
}

.com-game-card .game-info .line-1 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.com-game-card .game-info .line-2 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.com-game-card .price-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.com-game-card .current-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ef4444;
}

.com-game-card .current-price::before {
    content: "¥";
    font-size: 0.8rem;
    margin-right: 1px;
}

.com-game-card .original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 !important;
}

.com-game-card .original-price::before {
    content: "¥";
}

.com-game-card .static-color-tag-box {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-size: 0.72rem;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
}

.com-game-card .platform-icon-list {
    display: none;
}

.article-content blockquote {
    background: var(--bg-hover);
    border-left: 4px solid var(--accent-cyan);
    padding: 12px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 14px 0 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.article-content blockquote p {
    margin: 0;
}

/* 现代自适应游戏特惠信息卡片组件 */
.game-card-widget {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    margin: 18px 0;
    gap: 16px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.game-card-widget:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-hover);
}

.game-card-widget .game-card-thumb {
    position: relative;
    width: 140px;
    min-width: 140px;
    height: 68px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #0f172a;
}

.game-card-widget .game-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.game-card-widget .game-discount-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.game-card-widget .game-card-body {
    flex: 1;
    min-width: 0;
}

.game-card-widget .game-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-widget .game-card-prices {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.game-card-widget .price-current {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ef4444;
}

.game-card-widget .price-original {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin: 0 !important;
}

.game-card-widget .price-lowest-tag {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.game-card-widget .price-unreleased {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

@media (max-width: 768px) {
    .game-card-widget {
        padding: 10px 12px;
        gap: 12px;
    }
    .game-card-widget .game-card-thumb {
        width: 105px;
        min-width: 105px;
        height: 52px;
    }
    .game-card-widget .game-card-name {
        font-size: 0.95rem;
    }
    .game-card-widget .price-current {
        font-size: 1.1rem;
    }
}

/* ================== 相关推荐模块 ================== */
.related-section {
    margin-top: 35px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
}

.related-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid var(--accent-cyan);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.related-card {
    display: flex;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    align-items: center;
}

.related-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.12);
}

.related-cover-wrap {
    width: 130px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--border-color);
}

.related-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-cover {
    transform: scale(1.06);
}

.related-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.related-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.related-card:hover .related-card-title {
    color: var(--accent-cyan);
}

.related-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 专区 Header */
.tag-hero {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-card);
}

.tag-hero-badge {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.tag-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.tag-stat {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 页脚 */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 30px;
    margin-top: auto;
    font-size: 0.88rem;
    color: var(--footer-text);
}

.footer-info h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.footer-disclaimer {
    margin: 15px 0;
    max-width: 800px;
    font-size: 0.82rem;
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    font-size: 0.8rem;
}

/* ================== 404 / 错误页样式 ================== */
.error-page-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 55vh;
    padding: 40px 16px;
}

.error-card {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 60px 40px;
    max-width: 520px;
    width: 100%;
}

.error-code {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.error-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 26px;
    background: var(--gradient-brand);
    color: #ffffff;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

/* ================== 移动端专门深度优化 ================== */
@media (max-width: 768px) {
    /* 1. 【核心修复】解除手机端头部固定悬停！随页面自然滚动，绝不遮挡文章！ */
    .site-header {
        position: static;
        box-shadow: none;
    }
    
    /* 2. 手机端导航分层布局：第一行品牌工具，第二行横向滑动标签 */
    .header-inner {
        height: auto;
        padding: 12px 0 8px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .header-brand-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    /* 3. 标签导航横向平滑滚动，严禁折行换行堆叠 */
    .nav-links {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        gap: 6px;
        scrollbar-width: none;
    }
    
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    
    /* 4. 【移动端双排】首页与标签专区文章卡片双列紧凑自适应 */
    .container {
        padding: 0 12px;
    }

    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .card-cover-wrap {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .card-body {
        padding: 10px;
    }

    .card-title {
        font-size: 0.88rem;
        line-height: 1.35;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-summary {
        font-size: 0.76rem;
        line-height: 1.4;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    /* 方案B：移动端标签单行全量横向平滑手势滑动，零压缩完整字样 */
    .card-tags {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 5px;
        margin-bottom: 8px;
        padding-bottom: 2px;
    }

    .card-tags::-webkit-scrollbar {
        display: none;
    }

    .card-tag {
        flex-shrink: 0;
        font-size: 0.7rem;
        padding: 2px 7px;
        white-space: nowrap;
        border-radius: 4px;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        font-size: 0.7rem;
        padding-top: 6px;
    }

    .card-footer .author-name,
    .card-footer .publish-time {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .article-detail-card {
        padding: 20px 16px;
    }
    
    .detail-title {
        font-size: 1.45rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-banner {
        padding: 24px 18px;
    }

    .tag-hero {
        padding: 18px 16px;
        margin-bottom: 18px;
        gap: 14px;
    }

    .tag-hero-badge {
        width: 46px;
        height: 46px;
        font-size: 1.4rem;
        border-radius: 10px;
    }

    .tag-title {
        font-size: 1.35rem;
    }

    .error-card {
        padding: 40px 20px;
    }

    .error-code {
        font-size: 3.8rem;
    }

    .error-title {
        font-size: 1.3rem;
    }
}

