/* Base Variables */
:root {
    --bg-color: #09090b;
    --accent: #00ffd0;
    --accent-glow: rgba(0, 255, 208, 0.4);
    --accent-dark: rgba(0, 255, 208, 0.1);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --error: #ef4444;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.bg-glow {
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle, var(--accent-dark) 0%, transparent 60%);
    filter: blur(100px);
    z-index: -2;
    pointer-events: none;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

/* Typography */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 600;
}

.highlight {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

/* UI Components */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.btn-primary {
    display: inline-block;
    background: var(--text-main);
    color: var(--bg-color);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    color: var(--bg-color);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

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

.btn-outline {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Header */
header {
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

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

.nav-links a:not(.btn-outline) {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-links a:not(.btn-outline):hover {
    color: var(--text-main);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.lang-switcher a {
    color: var(--text-muted);
}

.lang-switcher a.active {
    color: var(--accent);
    font-weight: bold;
}

.lang-switcher .divider {
    color: var(--glass-border);
}

/* Sections General */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 120px;
}

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

.hero h1 {
    font-size: 4.5rem;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 300;
}

.cta-group {
    display: flex;
    gap: 16px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero-canvas {
    width: 400px;
    height: 400px;
}

/* Problem & Solution */
.dilemma-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.dilemma-grid .card {
    padding: 32px;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

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

.dilemma-grid .card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.breakthrough-card {
    padding: 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.breakthrough-card.highlight-border {
    border: 1px solid var(--accent-dark);
    box-shadow: 0 0 30px var(--accent-dark);
}

.badge {
    display: inline-block;
    background: var(--accent-dark);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid var(--accent-glow);
}

.breakthrough-card h3 {
    font-size: 2rem;
    margin-bottom: 40px;
}

.breakthrough-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    text-align: left;
}

.b-feature h4 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.b-feature p {
    color: var(--text-muted);
}

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

.feature-card {
    padding: 40px 32px;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-dark);
}

.feature-number {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Playground */
.playground-header {
    text-align: center;
    margin-bottom: 48px;
}

.playground-header h2 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.playground-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.editor-container {
    display: flex;
    align-items: stretch;
    padding: 2px;
    background: linear-gradient(135deg, var(--glass-border) 0%, transparent 100%);
}

.editor-pane {
    flex: 1;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pane-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--glass-border);
}

.size-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

pre {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    overflow-x: auto;
    flex: 1;
}

.compile-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: var(--bg-color);
}

.btn-compile {
    background: var(--glass-bg);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-compile:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 20px var(--accent-glow);
}

.hex-dump {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    color: var(--text-muted);
}

.hex-line {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeInHex 0.3s forwards;
}

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

.hex-offset { color: var(--text-muted); }
.hex-chars { color: var(--text-main); }

.metrics {
    padding: 16px 20px;
    background: rgba(0, 255, 208, 0.05);
    border-top: 1px solid var(--accent-dark);
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.metric .value {
    font-weight: 700;
}

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

/* Quick Start */
.terminal-mockup {
    max-width: 800px;
    margin: 0 auto;
    background: #000;
}

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

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4b5563;
}

.dots span:nth-child(1) { background: #ef4444; }
.dots span:nth-child(2) { background: #eab308; }
.dots span:nth-child(3) { background: #22c55e; }

.terminal-header .title {
    margin: 0 auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-right: 42px; /* offset for dots */
}

.terminal-body {
    padding: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
}

.line.comment { color: #6b7280; }
.line.command .prompt { color: var(--accent); margin-right: 8px; }
.line.output { color: #d1d5db; }
.line.output.success { color: var(--accent); }

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 40px;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 16px;
    font-size: 0.95rem;
}

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

.link-group h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.link-group a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    color: #52525b;
    font-size: 0.9rem;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 60px;
    }
    
    .hero h1 { font-size: 3.5rem; }
    
    .cta-group {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: 60px;
    }
    
    .dilemma-grid, .breakthrough-features, .three-pillars {
        grid-template-columns: 1fr;
    }
    
    .editor-container {
        flex-direction: column;
    }
    
    .btn-compile {
        margin: 16px 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
}

/* Custom Magic Wand Cursor for Clickable Elements */
a, button, .btn-primary, .btn-secondary, .btn-outline, .btn-compile {
    cursor: url('wand.svg') 9 2, pointer !important;
}

/* --- Contact Form Page --- */
.form-page {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    padding-bottom: 60px;
}

.contact-section {
    width: 100%;
    max-width: 600px;
    padding-top: 40px;
}

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

.contact-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.form-container {
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Geist', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-dark);
    background: rgba(0, 0, 0, 0.7);
}

.btn-submit {
    width: 100%;
    font-size: 1.1rem;
    padding: 16px;
    cursor: url('wand.svg') 9 2, pointer !important;
}

.success-message {
    text-align: center;
    padding: 32px;
    background: rgba(0, 255, 208, 0.05);
    border: 1px solid var(--accent-dark);
    border-radius: 8px;
    display: none;
}

.success-message h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.success-message p {
    color: var(--text-muted);
}
