/* ===== CSS Variables ===== */
:root {
    --primary: #007ACC;
    --primary-dark: #005A9E;
    --primary-light: #E8F4FD;
    --accent: #E74C3C;
    --accent-hover: #C0392B;
    --success: #2ECC71;
    --warning: #F39C12;
    --text: #2C3E50;
    --text-light: #7F8C8D;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --max-width: 1200px;
    --nav-height: 64px;
}

/* ===== Reset & Base ===== */
*, *::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", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ===== Navigation ===== */
.nav {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
}
.nav-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; padding: 0 20px;
}
.nav-logo {
    font-size: 22px; font-weight: 700; color: var(--primary);
    display: flex; align-items: center; gap: 8px;
}
.nav-logo img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
    display: block; padding: 8px 16px; border-radius: 6px;
    color: var(--text); font-size: 14px; font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
    background: var(--primary-light); color: var(--primary);
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); }
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none; position: absolute; top: var(--nav-height); left: 0; right: 0;
        background: var(--white); flex-direction: column; gap: 0;
        border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 14px 20px; border-radius: 0; border-bottom: 1px solid var(--border); }
}

/* ===== Container ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #007ACC 0%, #005A9E 50%, #003D6B 100%);
    color: var(--white); padding: 80px 0 60px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.hero p { font-size: 18px; opacity: 0.9; max-width: 700px; margin: 0 auto 32px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 768px) {
    .hero { padding: 50px 0 40px; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-block; padding: 12px 28px; border-radius: 6px;
    font-size: 15px; font-weight: 600; border: none; cursor: pointer;
    text-align: center; transition: background 0.2s, color 0.2s; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }
.btn-sm {
    padding: 5px 16px; font-size: 13px; border-radius: 4px;
    box-shadow: none;
}
.btn-sm:hover { transform: none; }
.btn-sm.btn-primary:hover { background: var(--accent-hover); }
.btn-sm.btn-outline { border: 1px solid var(--border); color: var(--text); background: var(--white); }
.btn-sm.btn-outline:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* ===== Section Titles ===== */
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.section-title p { color: var(--text-light); font-size: 15px; max-width: 600px; margin: 0 auto; }
@media (max-width: 768px) {
    .section-title h2 { font-size: 24px; }
}

/* ===== Feature Cards ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.feature-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 28px;
    box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-card img { width: 64px; height: 64px; margin: 0 auto 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; font-weight: 600; }
.feature-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ===== Screenshots ===== */
.screenshots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.screenshot-item {
    background: var(--white); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow);
}
.screenshot-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.screenshot-item .caption { padding: 12px 16px; font-size: 14px; color: var(--text-light); text-align: center; }

/* ===== Platform Icons ===== */
.platforms { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.platform-item { text-align: center; }
.platform-item img { width: 48px; height: 48px; margin: 0 auto 6px; }
.platform-item span { font-size: 13px; color: var(--text-light); }

/* ===== CTA ===== */
.cta {
    background: linear-gradient(135deg, #007ACC 0%, #005A9E 100%);
    color: var(--white); text-align: center; padding: 60px 0;
}
.cta h2 { font-size: 28px; margin-bottom: 12px; font-weight: 700; }
.cta p { font-size: 16px; opacity: 0.9; margin-bottom: 24px; }
.cta .btn { margin: 0 6px; }

/* ===== Download Page ===== */
.download-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--white); text-align: center; padding: 60px 0 40px;
}
.download-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.download-hero p { opacity: 0.85; font-size: 16px; max-width: 600px; margin: 0 auto; }
.download-section { padding: 40px 0; }
.download-card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); padding: 32px; margin-bottom: 24px;
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.download-card .card-info { flex: 1; min-width: 240px; }
.download-card h3 { font-size: 20px; margin-bottom: 6px; font-weight: 600; }
.download-card .ver { color: var(--text-light); font-size: 13px; margin-bottom: 8px; }
.download-card .desc { color: var(--text-light); font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.download-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.download-btns .extract-code { font-size: 12px; color: var(--accent); font-weight: 600; margin-left: 4px; }
.download-card .card-qr { flex-shrink: 0; text-align: center; }
.download-card .card-qr img { width: 100px; height: 100px; }
.download-card .card-qr .qr-hint { font-size: 11px; color: var(--text-light); margin-top: 4px; }
@media (max-width: 768px) {
    .download-card { flex-direction: column; text-align: center; }
    .download-btns { justify-content: center; }
    .download-hero h1 { font-size: 26px; }
}

/* ===== Modal (for QR) ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.5); justify-content: center; align-items: center;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 32px; max-width: 500px; width: 90%; box-shadow: var(--shadow-lg);
    display: flex; gap: 24px; align-items: center;
}
.modal h4 { font-size: 16px; margin-bottom: 8px; }
.modal p { font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.modal img { width: 140px; height: 140px; }
.modal-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-light);
}
@media (max-width: 480px) {
    .modal { flex-direction: column; text-align: center; }
}

/* ===== Features Page ===== */
.feature-section { padding: 40px 0; border-bottom: 1px solid var(--border); }
.feature-section:last-child { border-bottom: none; }
.feature-section h2 { font-size: 26px; margin-bottom: 16px; font-weight: 700; }
.feature-section h3 { font-size: 18px; margin: 20px 0 10px; font-weight: 600; }
.feature-section ul { padding-left: 24px; margin: 12px 0; }
.feature-section li { margin-bottom: 6px; color: var(--text-light); font-size: 14px; line-height: 1.8; }

/* Version comparison table */
.compare-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.compare-table th, .compare-table td {
    padding: 12px 16px; border: 1px solid var(--border); text-align: center;
}
.compare-table th { background: var(--primary-light); font-weight: 600; color: var(--primary); }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table tr:nth-child(even) td { background: #FAFBFC; }
.compare-table .check { color: var(--success); font-weight: 700; }
.compare-table .cross { color: #ccc; }

/* ===== About Page ===== */
.about-section { padding: 40px 0; }
.about-section h2 { font-size: 24px; margin-bottom: 12px; font-weight: 700; }
.about-section p { color: var(--text-light); font-size: 14px; line-height: 1.9; margin-bottom: 16px; }

/* ===== Footer ===== */
.footer {
    background: #1a1a2e; color: #aaa; padding: 30px 0 24px;
    text-align: center; font-size: 13px;
}
.footer .disclaimer {
    margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08);
    color: #777; font-size: 12px;
}
.footer a { color: #aaa; }
.footer a:hover { color: #ddd; }

/* ===== Utilities ===== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.badge {
    display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600; background: var(--primary-light); color: var(--primary);
}

/* ===== Keyword tags on homepage ===== */
.keyword-cloud { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px 0; }
.keyword-tag {
    display: inline-block; padding: 4px 14px;
    background: var(--primary-light); color: var(--primary);
    border-radius: 20px; font-size: 13px; font-weight: 500;
}
