/* ===== SpaceSniffer 软件站 - 主样式表 ===== */
/* 设计理念：现代、紧凑、蓝色系科技风 */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #1976D2;
    --primary-dark: #1565C0;
    --primary-light: #42A5F5;
    --accent: #FF6F00;
    --accent-hover: #E65100;
    --bg: #f4f7fb;
    --bg-card: #ffffff;
    --text: #263238;
    --text-light: #607D8B;
    --text-muted: #90A4AE;
    --border: #e0e6ed;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
    --max-width: 1140px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Header / Nav ---- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.navbar .logo img {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(25, 118, 210, 0.08);
}

/* ---- Hero Section ---- */
.hero {
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 40%, #1976D2 100%);
    color: #fff;
    padding: 64px 0 48px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to top, var(--bg), transparent);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 48px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-content h1 span {
    color: #64B5F6;
}

.hero-content .hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 28px;
    max-width: 520px;
    line-height: 1.6;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-badges .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #fff;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
    line-height: 1.5;
    box-shadow: none;
}

.btn:hover {
    box-shadow: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.5);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: #fff;
}

.btn-lg {
    padding: 8px 24px;
    font-size: 15px;
}

.hero-visual {
    flex: 0 0 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual .treemap-demo {
    width: 100%;
    aspect-ratio: 4/3;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.12);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 3px;
    padding: 2px;
    overflow: hidden;
}

.treemap-demo .block {
    border-radius: 2px;
    transition: all 0.3s;
}

.treemap-demo .block:hover {
    opacity: 0.7;
}

/* ---- Section Common ---- */
.section {
    padding: 56px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ---- Feature Cards ---- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

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

.feature-card .feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(25, 118, 210, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 1.3rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ---- Stats Bar ---- */
.stats-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 24px;
    box-shadow: var(--shadow-sm);
}

.stat-item {
    text-align: center;
    min-width: 120px;
}

.stat-item .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-item .stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ---- Screenshot Preview ---- */
.screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.screenshot-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

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

.screenshot-card .screenshot-img {
    width: 100%;
    aspect-ratio: 16/10;
    background: #e8edf2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.screenshot-card .screenshot-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-card .screenshot-label {
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    text-align: center;
}

/* ---- CTA Section ---- */
.cta-section {
    background: linear-gradient(135deg, #1565C0, #1976D2);
    color: #fff;
    padding: 48px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cta-section p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 24px;
    font-size: 1rem;
}

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

/* ---- Download Modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 680px;
    width: 92%;
    box-shadow: var(--shadow-lg);
    position: relative;
    display: flex;
    gap: 32px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    background: #f0f0f0;
    color: var(--text);
}

/* 左栏 - 资源详情 */
.modal-left {
    flex: 2;
    min-width: 0;
}

.modal-left h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
}

.modal-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-features li {
    position: relative;
    padding: 6px 0 6px 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.modal-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.7;
}

/* 右栏 - 二维码 + 引导 */
.modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
}

/* 二维码呼吸边框 */
@keyframes qr-breathe {
    0%, 100% {
        border-color: rgba(60,235,126,0.45);
        box-shadow: 0 0 8px rgba(60,235,126,0.10);
    }
    50% {
        border-color: rgba(77,168,255,0.45);
        box-shadow: 0 0 12px rgba(77,168,255,0.10);
    }
}

.modal-box .qr-wrapper {
    display: inline-block;
    padding: 10px;
    border: 3px solid rgba(60,235,126,0.45);
    border-radius: 14px;
    margin-bottom: 12px;
    animation: qr-breathe 3.5s ease-in-out infinite;
    transition: transform 0.2s;
}

.modal-box .qr-wrapper:hover {
    transform: scale(1.03);
}

.modal-box .qr-wrapper img {
    width: 180px;
    height: 180px;
    display: block;
}

.modal-guide {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.7;
    margin-bottom: 10px;
}

.modal-guide strong {
    color: var(--text);
}

.modal-pwd-tag {
    background: #FFF3E0;
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

#modalDlBtn {
    margin-top: 4px;
    padding: 8px 28px;
    font-size: 0.95rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition);
    color: #fff;
    width: 100%;
    text-align: center;
}

/* 响应式：小屏上下排列 */
@media (max-width: 560px) {
    .modal-box {
        flex-direction: column;
        gap: 20px;
        padding: 24px 20px;
    }
    .modal-left h3 {
        text-align: center;
    }
    .modal-right .qr-wrapper img {
        width: 150px;
        height: 150px;
    }
}

/* ---- Page Sub-header ---- */
.page-header {
    background: linear-gradient(135deg, #0D47A1, #1976D2);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.page-header .breadcrumb {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
}

.page-header .breadcrumb a {
    color: rgba(255,255,255,0.9);
}

.page-header .breadcrumb a:hover {
    color: #fff;
}

/* ---- Download Page ---- */
.download-table-wrap {
    overflow-x: auto;
}

.download-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}

.download-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.download-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-light);
    vertical-align: middle;
}

.download-table tr:last-child td {
    border-bottom: none;
}

.download-table tr:hover td {
    background: #f8fafc;
}

.dl-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
    line-height: 1.5;
    box-shadow: none;
}

.dl-btn:hover {
    box-shadow: none;
}

.dl-btn-quark {
    background: #1677FF;
    color: #fff;
}

.dl-btn-quark:hover {
    background: #0958D9;
    color: #fff;
}

.dl-btn-baidu {
    background: #2468E6;
    color: #fff;
}

.dl-btn-baidu:hover {
    background: #1A53C2;
    color: #fff;
}

.dl-pwd {
    display: inline-block;
    background: #FFF3E0;
    color: #E65100;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 4px;
}

.download-note {
    margin-top: 32px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 0.88rem;
    color: #8D6E00;
    line-height: 1.7;
}

/* ---- Tutorial Page ---- */
.tutorial-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
}

.tutorial-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 28px 0 12px;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 2px solid #E3F2FD;
}

.tutorial-content h2:first-child {
    margin-top: 0;
}

.tutorial-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--primary-dark);
}

.tutorial-content p {
    margin-bottom: 12px;
    color: var(--text-light);
}

.tutorial-content ul, .tutorial-content ol {
    margin: 8px 0 16px 20px;
    color: var(--text-light);
}

.tutorial-content li {
    margin-bottom: 6px;
}

.tutorial-content code {
    background: #ECEFF1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.88rem;
    color: #D84315;
}

.tutorial-content .step-box {
    background: #F3F8FD;
    border-left: 3px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
}

.tutorial-content .tip-box {
    background: #FFF8E1;
    border-left: 3px solid #FFC107;
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
    font-size: 0.9rem;
}

/* ---- FAQ Page ---- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 18px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    transition: background var(--transition);
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-question .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
    color: var(--text-muted);
}

.faq-item.open .faq-question .arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 20px 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
    border-top: 1px solid var(--border);
}

/* ---- Footer ---- */
.site-footer {
    background: #263238;
    color: #B0BEC5;
    padding: 32px 0;
    margin-top: auto;
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-disclaimer {
    background: #1B2327;
    padding: 10px 0;
    text-align: center;
    font-size: 0.8rem;
    color: #78909C;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hero .container {
        flex-direction: column;
        gap: 32px;
    }

    .hero-visual {
        flex: 0 0 auto;
        width: 100%;
        max-width: 380px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar {
        gap: 16px;
    }

    .screenshots {
        grid-template-columns: 1fr;
    }

    .tutorial-content {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 16px;
        gap: 8px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 4px;
    }

    .nav-links a {
        padding: 5px 10px;
        font-size: 0.82rem;
    }

    .hero {
        padding: 40px 0 32px;
    }

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

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .stats-bar {
        flex-direction: column;
        align-items: center;
    }
}
