:root {
    /* Dark mode (default) - CRT aesthetic */
    --bg-deep: rgb(8, 5, 5);
    --bg-main: rgb(15, 13, 10);
    --bg-panel: rgb(31, 28, 26);
    --text-primary: rgb(255, 204, 0);
    --text-secondary: rgb(200, 160, 40);
    --accent: rgb(51, 255, 102);
    --accent-dim: rgb(30, 150, 60);
    --glow-color: rgba(255, 204, 0, 0.3);
    --scanline-opacity: 0.08;
}

[data-theme="light"] {
    --bg-deep: rgb(215, 210, 200);
    --bg-main: rgb(225, 220, 210);
    --bg-panel: rgb(235, 230, 220);
    --text-primary: rgb(140, 102, 38);
    --text-secondary: rgb(100, 75, 30);
    --accent: rgb(38, 140, 64);
    --accent-dim: rgb(28, 100, 44);
    --glow-color: rgba(140, 102, 38, 0.2);
    --scanline-opacity: 0.03;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* CRT Scanlines overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, var(--scanline-opacity)) 2px,
        rgba(0, 0, 0, var(--scanline-opacity)) 4px
    );
    z-index: 1000;
}

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

/* Header */
header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-main);
    z-index: 100;
    border-bottom: 1px solid var(--bg-panel);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-shadow: 0 0 20px var(--glow-color);
}

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

.theme-toggle,
.lang-select {
    background: var(--bg-panel);
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-select {
    padding: 8px 12px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffcc00' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

[data-theme="light"] .lang-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238c6626' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
}

.theme-toggle:hover,
.lang-select:hover {
    background: var(--text-primary);
    color: var(--bg-main);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 24px 60px;
    background: var(--bg-deep);
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--bg-main));
    pointer-events: none;
}

.hero-logo {
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 700;
    letter-spacing: 8px;
    margin-bottom: 24px;
    text-shadow: 0 0 40px var(--glow-color), 0 0 80px var(--glow-color);
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 40px var(--glow-color), 0 0 80px var(--glow-color); }
    to { text-shadow: 0 0 60px var(--glow-color), 0 0 120px var(--glow-color); }
}

.hero-tagline {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 16px;
    max-width: 600px;
}

.hero-subtitle {
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    color: var(--accent);
    margin-bottom: 40px;
}

.status-badge {
    display: inline-block;
    background: var(--bg-panel);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

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

.platforms {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

.platform {
    background: var(--bg-panel);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--text-secondary);
    opacity: 0.8;
}

/* Terminal typing animation */
.terminal {
    background: var(--bg-deep);
    border: 1px solid var(--text-secondary);
    border-radius: 8px;
    padding: 24px;
    margin: 60px auto;
    max-width: 500px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.terminal-line {
    margin: 8px 0;
    opacity: 0;
    animation: typeIn 0.5s forwards;
}

.terminal-line:nth-child(1) { animation-delay: 0.5s; }
.terminal-line:nth-child(2) { animation-delay: 1.5s; }
.terminal-line:nth-child(3) { animation-delay: 2.5s; }

@keyframes typeIn {
    to { opacity: 1; }
}

.terminal-line .prompt {
    color: var(--accent);
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--text-primary);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Section styling */
section {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 16px;
    text-shadow: 0 0 20px var(--glow-color);
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
}

/* Preview Section */
.preview {
    background: var(--bg-main);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.preview-image {
    width: 100%;
    border-radius: 12px;
    border: 2px solid var(--bg-panel);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.preview-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 48px var(--glow-color);
    cursor: zoom-in;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px var(--glow-color);
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2001;
}

.lightbox-close:hover {
    color: var(--accent);
}

/* Features Grid */
.features {
    background: var(--bg-deep);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--text-secondary);
    border-radius: 8px;
    padding: 32px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px var(--glow-color);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.feature-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--accent);
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Effects Chain */
.effects-chain {
    background: var(--bg-main);
}

.chain-visual {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 48px 0;
}

.chain-item {
    background: var(--bg-panel);
    border: 1px solid var(--text-primary);
    padding: 16px 24px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chain-arrow {
    color: var(--accent);
    font-size: 1.5rem;
}

.presets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}

.preset {
    background: var(--bg-deep);
    border: 1px solid var(--text-secondary);
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.preset-key {
    color: var(--accent);
    font-weight: 700;
    margin-right: 8px;
}

/* Keyboard shortcuts */
.shortcuts {
    background: var(--bg-deep);
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-panel);
    border-radius: 4px;
}

.key {
    background: var(--bg-deep);
    border: 1px solid var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

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

/* Philosophy */
.philosophy {
    background: var(--bg-main);
    text-align: center;
}

.philosophy-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.philosophy-point {
    padding: 24px;
}

.philosophy-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.philosophy-title {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.philosophy-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* CTA */
.cta {
    background: var(--bg-deep);
    text-align: center;
    padding: 100px 24px;
}

.cta-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 24px;
    text-shadow: 0 0 20px var(--glow-color);
}

.cta-text {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 24px;
}

.cta-pricing {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.beta-note {
    display: inline-block;
    background: var(--bg-panel);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 16px 32px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--bg-main);
    padding: 40px 24px;
    text-align: center;
    border-top: 1px solid var(--bg-panel);
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    header {
        padding: 16px 0;
    }

    .logo {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }

    .header-controls {
        gap: 8px;
    }

    .theme-toggle,
    .lang-select {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .lang-select {
        padding-right: 24px;
    }

    .hero {
        padding: 100px 16px 40px;
        min-height: auto;
    }

    .hero-logo {
        letter-spacing: 4px;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        margin-bottom: 12px;
    }

    .section-subtitle {
        margin-bottom: 32px;
    }

    .feature-card {
        padding: 24px;
    }

    .chain-visual {
        gap: 8px;
    }

    .chain-item {
        padding: 10px 14px;
        font-size: 0.7rem;
    }

    .chain-arrow {
        font-size: 1rem;
    }

    .terminal {
        padding: 16px;
        margin: 40px 16px;
    }

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

    .platforms {
        gap: 8px;
    }

    .platform {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .cta {
        padding: 60px 16px;
    }

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

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .chain-visual {
        flex-direction: column;
    }

    .chain-arrow {
        transform: rotate(90deg);
    }

    .philosophy-points {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .presets-list {
        gap: 8px;
    }

    .preset {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
