/* ===== Audacity 中文网 - 主样式表 ===== */
:root {
    --primary: #5a2d82;
    --primary-dark: #3e1a5e;
    --primary-light: #7b4db5;
    --accent: #FF7F1E;
    --accent-hover: #e06a0d;
    --bg: #f8f7fc;
    --bg-card: #ffffff;
    --text: #2d2d2d;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #e5e0f0;
    --shadow: 0 2px 12px rgba(90, 45, 130, 0.08);
    --shadow-lg: 0 8px 30px rgba(90, 45, 130, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --header-height: 68px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; display: block; }

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

/* ===== Header ===== */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--primary-dark); }
.logo img { width: 40px; height: 40px; border-radius: 8px; }
.logo span { color: var(--primary); }

.nav { display: flex; gap: 8px; list-style: none; }
.nav a {
    display: block;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    transition: all .2s;
}
.nav a:hover, .nav a.active { background: rgba(90,45,130,0.08); color: var(--primary); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; padding: 8px; color: var(--text); }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #4a1e70 0%, #5a2d82 40%, #3e1a5e 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,127,30,0.12);
    border-radius: 50%;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(123,77,181,0.15);
    border-radius: 50%;
    pointer-events: none;
}
.hero .container { display: flex; align-items: center; gap: 60px; position: relative; z-index: 1; }
.hero-content { flex: 1; }
.hero-content h1 { font-size: 42px; font-weight: 800; line-height: 1.25; margin-bottom: 16px; }
.hero-content h1 span { color: var(--accent); }
.hero-content .subtitle { font-size: 18px; opacity: .9; margin-bottom: 32px; line-height: 1.6; }
.hero-image { flex: 1; text-align: center; }
.hero-image img { border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }

.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .3s;
    text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,127,30,0.35); }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.btn-lg { padding: 16px 40px; font-size: 18px; }

/* ===== Features Grid ===== */
.section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 34px; font-weight: 800; color: var(--primary-dark); margin-bottom: 12px; }
.section-title p { font-size: 17px; color: var(--text-light); max-width: 600px; margin: 0 auto; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    padding: 36px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all .3s;
    border: 1px solid transparent;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border); }
.feature-card .icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 20px; }
.feature-card .icon.purple { background: rgba(90,45,130,.1); }
.feature-card .icon.orange { background: rgba(255,127,30,.1); }
.feature-card .icon.green { background: rgba(34,197,94,.1); }
.feature-card .icon.blue { background: rgba(59,130,246,.1); }
.feature-card .icon.red { background: rgba(239,68,68,.1); }
.feature-card .icon.teal { background: rgba(20,184,166,.1); }
.feature-card h3 { font-size: 19px; margin-bottom: 10px; color: var(--primary-dark); }
.feature-card p { font-size: 15px; color: var(--text-light); line-height: 1.7; }

/* ===== Screenshots ===== */
.screenshots { background: #fff; }
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.screenshot-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all .3s; }
.screenshot-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.screenshot-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ===== Download CTA ===== */
.download-cta {
    background: linear-gradient(135deg, #5a2d82 0%, #7b4db5 100%);
    color: #fff;
    text-align: center;
    padding: 70px 0;
}
.download-cta h2 { font-size: 34px; font-weight: 800; margin-bottom: 16px; }
.download-cta p { font-size: 17px; opacity: .9; margin-bottom: 32px; max-width: 600px; margin-inline: auto; }
.download-cta .btn-primary { font-size: 18px; padding: 16px 48px; }

/* ===== Tutorial Preview ===== */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}
.tutorial-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all .3s;
}
.tutorial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tutorial-card .thumb { position: relative; overflow: hidden; }
.tutorial-card .thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.tutorial-card .thumb .step {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--primary);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.tutorial-card .body { padding: 20px 24px; }
.tutorial-card .body h3 { font-size: 18px; margin-bottom: 8px; color: var(--primary-dark); }
.tutorial-card .body p { font-size: 14px; color: var(--text-light); }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
}
.faq-item .q {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 17px;
    color: var(--primary-dark);
}
.faq-item .q::after { content: '+'; font-size: 22px; color: var(--primary); transition: transform .3s; }
.faq-item.open .q::after { content: '\2212'; }
.faq-item .a { padding: 0 24px 20px; font-size: 15px; color: var(--text-light); display: none; }
.faq-item.open .a { display: block; }

/* ===== Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-item .num { font-size: 42px; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.stat-item .label { font-size: 15px; color: var(--text-light); }

/* ===== Page Hero (for sub-pages) ===== */
.page-hero {
    background: linear-gradient(135deg, #4a1e70 0%, #5a2d82 100%);
    color: #fff;
    padding: 50px 0;
    text-align: center;
}
.page-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.page-hero p { font-size: 17px; opacity: .9; max-width: 600px; margin: 0 auto; }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 16px 0; font-size: 14px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-light); }

/* ===== Download Page ===== */
.download-section { padding: 60px 0; }
.download-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}
.download-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 36px 32px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 2px solid transparent;
    transition: all .3s;
}
.download-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.download-card.featured { border-color: var(--accent); position: relative; }
.download-card.featured::before {
    content: '推荐';
    position: absolute;
    top: -1px;
    right: 20px;
    background: var(--accent);
    color: #fff;
    padding: 4px 16px;
    border-radius: 0 0 8px 8px;
    font-size: 12px;
    font-weight: 600;
}
.download-card .os-icon { font-size: 48px; margin-bottom: 16px; }
.download-card h3 { font-size: 22px; margin-bottom: 8px; color: var(--primary-dark); }
.download-card .version { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.download-card .info { font-size: 14px; color: var(--text-light); margin-bottom: 20px; line-height: 1.6; }
.download-card .btn { margin-bottom: 8px; }

.download-btns { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.download-btns .btn { width: 100%; justify-content: center; text-align: center; }

/* ===== Version Info Table ===== */
.version-table { width: 100%; border-collapse: collapse; margin-top: 30px; }
.version-table th, .version-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.version-table th { background: var(--primary); color: #fff; font-weight: 600; }
.version-table tr:hover td { background: rgba(90,45,130,.03); }

/* ===== Tutorial Page ===== */
.tutorial-toc {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}
.tutorial-toc h3 { font-size: 20px; margin-bottom: 16px; color: var(--primary-dark); }
.tutorial-toc ol { padding-left: 20px; }
.tutorial-toc li { padding: 6px 0; font-size: 15px; }
.tutorial-toc li a { color: var(--text); }
.tutorial-toc li a:hover { color: var(--primary); }
.tutorial-step { margin-bottom: 40px; }
.tutorial-step h2 { font-size: 24px; color: var(--primary-dark); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.tutorial-step img { border-radius: var(--radius); margin: 20px 0; box-shadow: var(--shadow); }
.tutorial-step p, .tutorial-step ul { margin-bottom: 14px; line-height: 1.8; }
.tutorial-step ul { padding-left: 24px; }
.tutorial-step ul li { margin-bottom: 8px; }

/* ===== Features Page ===== */
.feature-detail { margin-bottom: 60px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.feature-detail:last-child { border: none; }
.feature-detail h2 { font-size: 26px; color: var(--primary-dark); margin-bottom: 16px; }
.feature-detail .row { display: flex; gap: 40px; align-items: center; }
.feature-detail .row.reverse { flex-direction: row-reverse; }
.feature-detail .text { flex: 1; }
.feature-detail .img { flex: 1; }
.feature-detail .img img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ===== Content Card ===== */
.content-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    line-height: 1.8;
}
.content-card h2 { font-size: 24px; color: var(--primary-dark); margin-bottom: 16px; }
.content-card h3 { font-size: 20px; color: var(--primary); margin: 24px 0 12px; }
.content-card p { margin-bottom: 14px; }
.content-card ul { padding-left: 24px; margin-bottom: 14px; }
.content-card ul li { margin-bottom: 8px; }

/* ===== Sidebar ===== */
.page-layout { display: flex; gap: 40px; }
.sidebar {
    width: 280px;
    flex-shrink: 0;
}
.sidebar-widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.sidebar-widget h4 { font-size: 17px; color: var(--primary-dark); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li { padding: 8px 0; border-bottom: 1px solid #f0edf5; }
.sidebar-widget ul li:last-child { border: none; }
.sidebar-widget ul li a { font-size: 14px; color: var(--text-light); }
.sidebar-widget ul li a:hover { color: var(--primary); }
.main-content { flex: 1; min-width: 0; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; }
.pagination a, .pagination span { padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.pagination a { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; }

/* ===== Footer ===== */
.footer {
    background: #2d1a3d;
    color: rgba(255,255,255,.7);
    padding: 50px 0 24px;
    font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-bottom: 36px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.6); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,.45);
    font-size: 13px;
}
.footer-bottom p { margin-bottom: 6px; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .hero .container { flex-direction: column; text-align: center; }
    .hero-content h1 { font-size: 32px; }
    .hero-btns { justify-content: center; }
    .feature-detail .row, .feature-detail .row.reverse { flex-direction: column; }
    .screenshot-gallery { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .page-layout { flex-direction: column; }
    .sidebar { width: 100%; }
}

@media (max-width: 768px) {
    .nav { display: none; }
    .nav.open { display: flex; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--bg-card); padding: 16px; box-shadow: var(--shadow-lg); }
    .nav-toggle { display: block; }
    .hero { padding: 50px 0 40px; }
    .hero-content h1 { font-size: 28px; }
    .screenshot-gallery { grid-template-columns: 1fr; }
    .download-cards { grid-template-columns: 1fr; }
    .tutorial-grid { grid-template-columns: 1fr; }
    .section-title h2 { font-size: 26px; }
    .btn-lg { padding: 14px 32px; font-size: 16px; }
}

/* ===== Download Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .25s ease;
}
.modal-overlay.open { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    background: #fff;
    border-radius: 16px;
    max-width: 740px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: modalSlide .3s ease;
    overflow: hidden;
}

@keyframes modalSlide {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all .2s;
}
.modal-close:hover { color: #333; background: #f0f0f0; }

.modal-body {
    display: flex;
    gap: 0;
}

.modal-left {
    flex: 1;
    padding: 36px 32px;
    background: #faf8fd;
    min-width: 0;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-pan-icon { font-size: 24px; }

.modal-features {
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
}
.modal-features li {
    padding: 10px 0;
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.modal-tips {
    background: #fff8e1;
    border-left: 3px solid var(--accent);
    padding: 14px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #8b6914;
    line-height: 1.6;
}
.modal-tips strong { color: #d4380d; }

.modal-right {
    width: 320px;
    flex-shrink: 0;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.modal-qr-wrapper {
    margin-bottom: 16px;
}

/* QR Code breathing border animation */
.qr-breathing-border {
    display: inline-block;
    padding: 10px;
    border: 3px solid #5a2d82;
    border-radius: 16px;
    animation: qrBreathe 2.4s ease-in-out infinite;
}

@keyframes qrBreathe {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(90,45,130,.35);
        border-color: #5a2d82;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 14px rgba(90,45,130,0);
        border-color: #7b4db5;
        transform: scale(1.03);
    }
}

.qr-breathing-border img {
    display: block;
    border-radius: 10px;
}

.modal-scan-text {
    text-align: center;
    margin-bottom: 8px;
}
.scan-app-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
}
.scan-desc {
    font-size: 14px;
    color: var(--text-light);
}

.modal-save-hint {
    font-size: 13px;
    color: #d4380d;
    text-align: center;
    line-height: 1.5;
    margin-top: 4px;
}

/* Dummy download button style (button tag same visual as .btn) */
button.btn {
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: all .3s;
    text-decoration: none;
    line-height: 1.4;
}

button.btn-outline {
    background: transparent;
    border: 2px solid #ddd;
    color: var(--text);
}
button.btn-outline:hover {
    background: rgba(90,45,130,.05);
}

/* Modal responsive */
@media (max-width: 680px) {
    .modal-body {
        flex-direction: column;
    }
    .modal-left {
        padding: 28px 24px;
    }
    .modal-right {
        width: 100%;
        padding: 20px 24px 32px;
        border-top: 1px solid var(--border);
    }
    .modal-container {
        max-width: 100%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-content h1 { font-size: 24px; }
    .btn { padding: 12px 24px; font-size: 14px; }
}
