/* ========================================
   SpaceSniffer Website Styles
   Version: 1.0
   Author: SpaceSniffer Chinese Site
   ======================================== */

/* ==================== CSS Variables ==================== */
:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary: #0EA5E9;
    --accent: #10B981;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-dark: #0F172A;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --border: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

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

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

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-download {
    background: #000;
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* ==================== Header ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

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

.logo-text span {
    color:;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav a {
    padding: 8px 16px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav a:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.nav a.active {
    color: var(--primary);
    background: var(--bg-secondary);
}

.nav-cta {
    background: var(--primary) !important;
    color: white !important;
    margin-left: 8px;
}

.nav-cta:hover {
    background: var(--primary-dark) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==================== Hero Section ==================== */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 50%, #C7D2FE 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}


.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--bg-primary);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 span {
	color: var(--primary);
}

.hero > .container > .hero-content > p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ==================== Section Styling ==================== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

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

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* ==================== Features Grid ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== Page Hero (Inner Pages) ==================== */
.page-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
    position: relative;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg-primary);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.page-hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
}

/* ==================== Breadcrumb ==================== */
.breadcrumb {
    padding: 16px 0;
    background: var(--bg-secondary);
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--text-secondary);
}

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

.breadcrumb span {
    color: var(--text-light);
}

.breadcrumb strong {
    color: var(--text-primary);
}

/* ==================== Steps ==================== */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.step {
    text-align: center;
    position: relative;
}

.step::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -16px;
    width: 32px;
    height: 2px;
    background: var(--primary);
}

.step:last-child::after {
    display: none;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    font-weight: 700;
}

.step h4 {
    margin-bottom: 8px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ==================== Download Cards ==================== */
.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.download-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.download-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.download-card-header h3 {
    color: white;
    margin-bottom: 4px;
}

.download-card-header span {
    font-size: 0.875rem;
    opacity: 0.9;
}

.download-card-body {
    padding: 24px;
}

.download-info {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.download-info:last-of-type {
    border-bottom: none;
}

.download-info span:first-child {
    color: var(--text-secondary);
}

.download-info span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.download-card-body .btn {
    width: 100%;
    margin-top: 16px;
}

/* ==================== Code Block ==================== */
.code-block {
    background: var(--bg-dark);
    border-radius: var(--radius);
    padding: 20px;
    margin: 24px 0;
    overflow-x: auto;
}

.code-block pre {
    color: #E2E8F0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
}

.code-block .comment {
    color: #64748B;
}

.code-block .key {
    color: #818CF8;
}

.code-block .value {
    color: #34D399;
}

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

.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question i {
    color: var(--primary);
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

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

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

.faq-answer p,
.faq-answer ul {
    padding: 0 24px 20px;
    color: var(--text-secondary);
}

.faq-answer ul {
    padding-left: 40px;
    list-style: disc;
}

.faq-answer li {
    margin-bottom: 8px;
}

/* ==================== News Cards ==================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.news-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.news-card.featured {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.news-card.featured .news-image {
    height: 100%;
}

.news-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.news-content {
    padding: 24px;
}

.news-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.tag-version {
    background: #DBEAFE;
    color: var(--primary);
}

.tag-feature {
    background: #D1FAE5;
    color: var(--accent);
}

.tag-update {
    background: #FEF3C7;
    color: #D97706;
}

.news-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.news-meta {
    display: flex;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.news-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.news-link:hover {
    gap: 8px;
}

/* ==================== Changelog Timeline ==================== */
.changelog-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.changelog-item {
    position: relative;
    padding-left: 24px;
    padding-bottom: 32px;
    border-left: 2px solid var(--border);
}

.changelog-item:last-child {
    border-left-color: transparent;
}

.changelog-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow);
}

.changelog-version {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.version-tag {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.version-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.changelog-content h4 {
    margin-bottom: 12px;
}

.changelog-content ul {
    list-style: disc;
    padding-left: 24px;
    color: var(--text-secondary);
}

.changelog-content li {
    margin-bottom: 8px;
}

/* ==================== Modal ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: hidden;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.modal-body {
    padding: 24px;
}

.download-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.download-option {
    text-align: center;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
}

.download-option i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.download-option:hover i {
    color: white;
}

.download-option h4 {
    margin-bottom: 8px;
}

.download-option p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.qr-placeholder {
    width: 160px;
    height: 160px;
    background: white;
    margin: 0 auto 12px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-light);
    border: 2px dashed var(--border);
}

.modal-footer {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==================== Footer ==================== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand p {
    color: var(--text-light);
    margin-top: 16px;
    line-height: 1.7;
}

.footer h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer-bottom p a {
    color: var(--primary-light);
    margin-left: 16px;
}

.footer-bottom p a:hover {
    color: white;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .features-grid,
    .download-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .step::after {
        display: none;
    }

    .news-card.featured {
        grid-column: span 1;
        display: block;
    }

    .news-card.featured .news-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .nav.active {
        display: flex;
    }

    .nav-cta {
        margin-left: 0;
        margin-top: 8px;
        text-align: center;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

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

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

    .features-grid,
    .download-grid,
    .news-grid,
    .steps {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
    }

    .download-options {
        grid-template-columns: 1fr;
    }
}

/* ==================== Utility Classes ==================== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }

/* ==================== Print Styles ==================== */
@media print {
    .header,
    .footer,
    .menu-toggle {
        display: none;
    }

    body {
        font-size: 12pt;
    }
}