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

:root {
    --bg-deep: #060a14;
    --bg: #0a0e1a;
    --bg-card: #111827;
    --bg-card-hover: #1a2235;
    --bg-alt: #0d1220;
    --border: #1e293b;
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.15);
    --primary-glow-strong: rgba(59, 130, 246, 0.3);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --amber: #f59e0b;
    --green: #22c55e;
    --radius: 12px;
    --radius-sm: 8px;
    --max-w: 1120px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

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

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

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

/* ===== Nav ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(6, 10, 20, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

.nav-logo:hover {
    color: var(--text);
}

.nav-logo img {
    border-radius: 6px;
}

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

.nav-links a {
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.lang-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-toggle:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.github-link {
    color: var(--text-dim);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.github-link:hover {
    color: var(--text);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 0 30px var(--primary-glow-strong);
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: var(--bg-card);
    color: var(--text);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-center {
    display: flex;
    width: fit-content;
    margin: 40px auto 0;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.glow-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25), transparent 70%);
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.6;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15), transparent 70%);
    bottom: -150px;
    right: -150px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    margin-bottom: 24px;
    box-shadow: 0 0 40px var(--primary-glow);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #e2e8f0 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.hero-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-badges img {
    height: 28px;
    border-radius: 6px;
}

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

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 48px;
    font-size: 1.05rem;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-glow);
    border-radius: 12px;
    margin-bottom: 20px;
    color: var(--primary-light);
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.feature-demo {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.demo-badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.caps-on {
    border-color: var(--amber);
    color: var(--amber);
}

.caps-off {
    border-color: var(--green);
    color: var(--green);
}

/* ===== Preview ===== */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s;
}

.preview-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.preview-card-wide {
    grid-column: 1 / -1;
    text-align: center;
}

.preview-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.preview-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.preview-card-wide img {
    max-width: 400px;
    max-height: 600px;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: contain;
}

.preview-card img {
    border-radius: 8px;
    width: 100%;
}

/* ===== Download ===== */
.download-steps {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 40px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    max-width: 300px;
}

.step-num {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
}

.step-content h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.step-content p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.download-actions {
    text-align: center;
    margin-bottom: 24px;
}

.download-req {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.req-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.req-badge svg {
    color: var(--green);
}

/* ===== Changelog Timeline ===== */
.timeline {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--text-muted);
}

.timeline-dot.latest {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow-strong);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.version-badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
}

.version-badge.latest {
    border-color: var(--primary);
    color: var(--primary-light);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.timeline-content p {
    font-size: 0.92rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

.footer-brand img {
    border-radius: 4px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links a:not(.github-link) {
        display: none;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

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

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

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

    .preview-images {
        grid-template-columns: 1fr;
    }

    .download-steps {
        flex-direction: column;
        align-items: flex-start;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .step {
        max-width: 100%;
    }

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

    .section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 16px 60px;
    }

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

    .hero-logo {
        width: 80px;
        height: 80px;
        border-radius: 18px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 14px 28px;
    }
}
