/* =============================================
   竞价精灵 - 官网公共样式
   深浅双主题（默认浅色）
   ============================================= */

/* ===== 重置 + 全局 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    transition: background 0.35s, color 0.35s;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ===== 主题变量 ===== */
:root {
    --bg:         #ffffff;
    --bg-alt:     #f7f8fa;
    --bg-card:    #ffffff;
    --text:       #1a1d24;
    --text-2:     #5a6270;
    --text-3:     #8e95a3;
    --border:     #e5e7eb;
    --primary:    #c0392b;
    --primary-h:  #8b1818;
    --primary-10: rgba(192,57,43,0.10);
    --accent:     #f59e0b;
    --shadow:     rgba(0,0,0,0.08);
    --shadow-lg:  rgba(0,0,0,0.12);
    --nav-bg:     rgba(255,255,255,0.85);
    --hero-gradient: linear-gradient(135deg, #fdf2f0 0%, #fef8f6 50%, #f5f7ff 100%);
    --code-bg:    #f5f6fa;
}
[data-theme="dark"] {
    --bg:         #0a0e14;
    --bg-alt:     #0f141d;
    --bg-card:    #141b24;
    --text:       #e8eaed;
    --text-2:     #8a92a3;
    --text-3:     #5a6270;
    --border:     #1f2630;
    --primary:    #ff5757;
    --primary-h:  #ff7878;
    --primary-10: rgba(255,87,87,0.12);
    --accent:     #ffb81c;
    --shadow:     rgba(0,0,0,0.25);
    --shadow-lg:  rgba(0,0,0,0.40);
    --nav-bg:     rgba(10,14,20,0.88);
    --hero-gradient: linear-gradient(135deg, #0a0e14 0%, #141820 50%, #0d1018 100%);
    --code-bg:    #141b24;
}

body { background: var(--bg); color: var(--text); }

/* ===== 工具类 ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section   { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.text-center { text-align: center; }
.text-muted  { color: var(--text-2); }
.text-sm     { font-size: 14px; }

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}
.section-subtitle {
    font-size: 16px;
    color: var(--text-2);
    max-width: 640px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(192,57,43,0.25);
}
.btn-primary:hover { background: var(--primary-h); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(192,57,43,0.35); }
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { height: 52px; padding: 0 36px; font-size: 16px; border-radius: 10px; }

/* ===== 顶部导航 ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    background: var(--nav-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.35s, border-color 0.35s;
}
.navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.nav-brand img {
    width: 28px; height: 28px;
    border-radius: 6px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    font-size: 14px;
    color: var(--text-2);
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 主题切换按钮 */
.theme-toggle {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: transparent;
    border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* 移动端菜单 */
.nav-toggle {
    display: none;
    width: 36px; height: 36px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    .nav-links {
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 16px 24px;
        gap: 0;
        border-bottom: 1px solid var(--border);
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
}

/* ===== Hero 区 ===== */
.hero {
    padding: 140px 0 80px;
    background: var(--hero-gradient);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text);
}
.hero h1 .highlight { color: var(--primary); }
.hero .hero-desc {
    font-size: 18px;
    color: var(--text-2);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.hero-screenshot {
    max-width: 960px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px var(--shadow-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.hero-screenshot img { width: 100%; }
.hero-screenshot .placeholder {
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-3);
    background: var(--bg-alt);
}

/* ===== 功能网格 ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--shadow);
    border-color: var(--primary);
}
.feature-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--primary-10);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}
.feature-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}
.feature-card p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
}

/* ===== 数据展示条 ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
@media (max-width: 768px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }
.stat-item .stat-num {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}
.stat-item .stat-label {
    font-size: 14px;
    color: var(--text-2);
    margin-top: 4px;
}

/* ===== 图文交替模块 ===== */
.feature-detail {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 40px 0;
}
.feature-detail.reverse { flex-direction: row-reverse; }
.feature-detail-text { flex: 1; }
.feature-detail-text h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}
.feature-detail-text p {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.8;
    margin-bottom: 16px;
}
.feature-detail-media {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}
.feature-detail-media .placeholder {
    height: 340px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--text-3);
}
@media (max-width: 768px) {
    .feature-detail, .feature-detail.reverse { flex-direction: column; gap: 32px; }
}

/* ===== 价格卡片 ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}
@media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; } }
.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s;
    position: relative;
}
.price-card.popular {
    border-color: var(--primary);
    box-shadow: 0 8px 32px var(--shadow);
    transform: scale(1.04);
}
.price-card.popular::before {
    content: '推荐';
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
}
.price-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.price-card .price {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}
.price-card .price span { font-size: 14px; font-weight: 400; color: var(--text-2); }
.price-card .price-desc {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 20px;
}
.price-card ul {
    text-align: left;
    margin-bottom: 24px;
}
.price-card ul li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-card ul li::before {
    content: '✓';
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* ===== CTA 区 ===== */
.cta-section {
    padding: 80px 0;
    text-align: center;
    background: var(--primary);
    color: #fff;
}
.cta-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}
.cta-section p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 28px;
}
.cta-section .btn-outline {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}
.cta-section .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

/* ===== 底部 ===== */
.footer {
    padding: 48px 0 24px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}
.footer-brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-desc {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 320px;
}
.footer-col h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}
.footer-col a {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    padding: 4px 0;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
    border-bottom: 1px solid var(--border);
}
.faq-q {
    width: 100%;
    background: transparent;
    text-align: left;
    padding: 18px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s;
}
.faq-q:hover { color: var(--primary); }
.faq-q .arrow { transition: transform 0.2s; font-size: 12px; color: var(--text-3); }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.8;
}
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 16px; }

/* ===== 通用页头 ===== */
.page-header {
    padding: 120px 0 48px;
    background: var(--hero-gradient);
    text-align: center;
}
.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}
.page-header p {
    font-size: 16px;
    color: var(--text-2);
}

/* ===== 表格 ===== */
.table-wrap {
    overflow-x: auto;
}
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table-wrap th, .table-wrap td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.table-wrap th {
    font-weight: 600;
    color: var(--text);
    background: var(--bg-alt);
}
.table-wrap td { color: var(--text-2); }

/* ===== 滚动动画 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
