:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #0f1520;
    --bg-card: #121a2a;
    --border: #1a2540;
    --text-primary: #e0e6f0;
    --text-secondary: #6b7a99;
    --accent: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.15);
    --accent-green: #00ff88;
    --accent-purple: #b36dff;
    --accent-red: #ff3d5a;
    --accent-yellow: #ffc83d;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

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

.accent {
    color: var(--accent);
}

/* ═══════════ NAVBAR ═══════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: background 0.3s, backdrop-filter 0.3s;
}

.navbar.scrolled {
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-mono);
    transition: color 0.2s;
    letter-spacing: 0.02em;
}

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

.nav-cta {
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    border-radius: 4px;
    transition: box-shadow 0.3s, transform 0.2s;
}

.nav-cta:hover {
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow);
    transform: translateY(-1px);
}

/* ═══════════ HERO ═══════════ */
.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    background: rgba(0, 229, 255, 0.05);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
    font-family: var(--font-mono);
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-glow);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Terminal Window */
.hero-visual {
    flex: 1;
    max-width: 520px;
}

.terminal-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: var(--accent-red); }
.terminal-dot.yellow { background: var(--accent-yellow); }
.terminal-dot.green { background: var(--accent-green); }

.terminal-title {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    min-height: 250px;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--accent-green);
    font-weight: 700;
}

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

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.terminal-output {
    color: var(--text-secondary);
    line-height: 1.8;
}

.terminal-output .success {
    color: var(--accent-green);
}

.terminal-output .info {
    color: var(--accent);
}

.terminal-output .warn {
    color: var(--accent-yellow);
}

/* ═══════════ SECTIONS COMMON ═══════════ */
section {
    position: relative;
    z-index: 2;
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* ═══════════ FEATURES ═══════════ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    border-color: rgba(0, 229, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

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

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.feature-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 4px;
    background: rgba(0, 229, 255, 0.05);
}

/* ═══════════ WORKFLOW ═══════════ */
.workflow-steps {
    max-width: 700px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
}

.step:hover {
    border-color: rgba(0, 229, 255, 0.3);
}

.step-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.4;
    line-height: 1;
    min-width: 60px;
}

.step:hover .step-number {
    opacity: 1;
}

.step-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.step-visual {
    margin-top: 1rem;
}

.step-visual code {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-green);
}

.step-connector {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    color: var(--border);
}

/* ═══════════ DOWNLOAD ═══════════ */
.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-purple), var(--accent));
}

.download-info {
    margin-bottom: 2rem;
}

.download-version {
    margin-bottom: 1.5rem;
}

.version-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 50px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.download-version h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.download-version p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.download-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.meta-value.hash {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.download-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.download-alt {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.download-alt a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.download-alt a:hover {
    color: var(--accent);
}

.download-alt .divider {
    color: var(--border);
}

/* ═══════════ CHANGELOG ═══════════ */
.changelog-list {
    max-width: 700px;
    margin: 0 auto;
}

.changelog-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    transition: border-color 0.3s;
}

.changelog-item:hover {
    border-color: rgba(0, 229, 255, 0.2);
}

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

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    border-radius: 4px;
    background: rgba(107, 122, 153, 0.15);
    color: var(--text-secondary);
}

.tag.current {
    background: var(--accent-glow);
    color: var(--accent);
}

.date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.changelog-content ul {
    list-style: none;
}

.changelog-content li {
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.change-type {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    font-weight: 600;
    border-radius: 3px;
    margin-right: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.change-type.new {
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-green);
}

.change-type.improve {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent);
}

.change-type.fix {
    background: rgba(255, 61, 90, 0.1);
    color: var(--accent-red);
}

/* ═══════════ FOOTER ═══════════ */
.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    background: var(--bg-secondary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo-text {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.footer-col a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* ═══════════ ANIMATIONS ═══════════ */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content, .hero-visual,
.feature-card, .step, .download-card,
.changelog-item {
    opacity: 0;
    animation: fade-in-up 0.6s ease forwards;
}

.hero-content { animation-delay: 0.2s; }
.hero-visual { animation-delay: 0.5s; }

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        padding: 7rem 1.5rem 3rem;
        text-align: center;
    }

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

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        max-width: 100%;
    }

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

    .nav-links {
        display: none;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
        flex-wrap: wrap;
    }

    .download-meta {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .download-card {
        padding: 2rem 1.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }
}
