/* --- 全局基础设置 --- */
:root {
    --primary-color: #2563eb;    /* 科技蓝 */
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --accent-color: #f59e0b;     /* 亮黄色，用于高亮标签 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 导航栏 --- */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Banner & 科普区域 --- */
.hero {
    padding: 40px 0 20px;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.intro-box {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.intro-box h2 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* --- 精选推荐表格 / 卡片 --- */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.deal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.deal-card h3 {
    margin-bottom: 10px;
}

.specs-list {
    list-style: none;
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.specs-list li {
    margin-bottom: 6px;
}

.price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.aff-btn {
    display: block;
    text-align: center;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    padding: 10px 0;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
}

.aff-btn:hover {
    background: var(--primary-hover);
}

/* --- 页脚 --- */
footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 40px;
}

.disclaimer {
    margin-top: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 响应式适配 (移动端) --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none; /* 移动端默认隐藏 */
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--card-bg);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.show {
        display: flex; /* 点击展开 */
    }

    .hero h1 {
        font-size: 1.5rem;
    }
}

/* --- Hero 区域与横排副标题栏 --- */
.hero {
    padding: 35px 0 20px;
}

.hero h1 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 16px;
}

/* 副标题与导航的 Flex 容器 */
.subtitle-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 12px 18px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.subtitle {
    color: var(--text-muted);
    margin: 0; /* 清除默认边距，使其垂直居中 */
    font-size: 0.95rem;
    flex: 1;   /* 让文本占据左侧剩余空间 */
}

/* 横排快速导航 */
.inline-toc {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

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

.inline-toc a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    background: #eff6ff; /* 浅蓝色背景，做成标签样式 */
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.inline-toc a:hover {
    background: #dbeafe;
    border-color: #bfdbfe;
}

/* --- 移动端响应式适配 --- */
@media (max-width: 768px) {
    .subtitle-bar {
        flex-direction: column; /* 手机端改为上下排列 */
        align-items: flex-start;
        padding: 16px;
    }
}
/* --- 对比表格响应式与滑动美化 --- */
.table-container {
    width: 100%;
    overflow-x: auto; /* 关键：超出时允许水平滑动 */
    -webkit-overflow-scrolling: touch; /* 优化 iOS 触控滑动流畅度 */
    margin-top: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.compare-table {
    width: 100%;
    min-width: 680px; /* 关键：强制表格保持最小宽度，防止列挤压变形 */
    border-collapse: collapse;
    text-align: left;
    font-size: 0.92rem;
    background: var(--card-bg);
}

.compare-table th {
    background: #f1f5f9;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap; /* 表头不换行 */
}

.compare-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* 最后一列（场景文案）允许自动换行与合理宽度 */
.compare-table td.scene-text {
    min-width: 220px;
    line-height: 1.6;
}

/* 高亮 GIA 爆款/推荐行 */
.recommend-row {
    background-color: #eff6ff; /* 浅蓝背景 */
}

.gia-title {
    color: var(--primary-color);
    font-size: 1rem;
}

.mini-tag {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

/* 状态标签样式 */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: bold;
    white-space: nowrap;
}

.status-badge.bad { background-color: #fee2e2; color: #991b1b; }
.status-badge.warn { background-color: #fef3c7; color: #92400e; }
.status-badge.good { background-color: #dcfce7; color: #166534; }

.highlight-scene {
    color: #0f172a;
}

.highlight-scene strong {
    color: #1e3a8a;
}

/* 移动端提示：如果屏幕太窄，自动在表格上方显示滑动提示 */
@media (max-width: 768px) {
    .table-container::before {
        content: "👈 左右滑动查看完整表格";
        display: block;
        padding: 6px 12px;
        font-size: 0.78rem;
        color: var(--text-muted);
        background: #f8fafc;
        border-bottom: 1px solid var(--border-color);
        text-align: right;
    }
}

/* --- 优惠码展示区域 --- */
.promo-code {
    font-size: 0.85rem;
    color: #d97706;          /* 深橙色，引导视觉 */
    background-color: #fffbeb; /* 极浅的黄色背景，增加一点质感 */
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
    border: 1px dashed #fcd34d; /* 虚线边框更有“优惠券”的感觉 */
    display: inline-block;
}

.promo-code strong {
    font-weight: 700;
    font-family: monospace;  /* 等宽字体让代码（如大写字母和数字）更清晰易读 */
    font-size: 0.9rem;
}

/* 没有优惠码时的底部占位，保持卡片按钮对齐 */
.promo-placeholder {
    margin-bottom: 12px;
}

