:root {
    --color-bg: #050505;
    --color-bg-dim: #0a0a0a;
    --color-primary: #00f0ff; /* Electric Blue */
    --color-secondary: #00ff9d; /* Matrix Green */
    --color-danger: #ff2a2a; /* Error Red */
    --color-warning: #ffbe00;
    --color-text-main: #e0e0e0;
    --color-text-muted: #666666;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-glass: rgba(255, 255, 255, 0.03);
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Syne', sans-serif;
    
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    --container-width: 1200px;
}

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

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

h1 { font-size: clamp(3rem, 8vw, 6rem); margin-bottom: var(--space-sm); }
h2 { font-size: clamp(2rem, 5vw, 4rem); }
h3 { font-size: 1.5rem; }

.mono { font-family: var(--font-mono); }
.text-primary { color: var(--color-primary); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.text-success { color: var(--color-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-white { color: #fff; }
.text-dim { color: #444; }
.text-sm { font-size: 0.875rem; }

.display-text { font-size: 2.5rem; letter-spacing: -0.02em; }
.text-body { font-size: 1.125rem; color: #ccc; }

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.max-w-600 { max-width: 600px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.text-center { text-align: center; }

/* Layouts */
.section-padding { padding: var(--space-xl) 0; }

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

@media (max-width: 768px) {
    .grid-2col { grid-template-columns: 1fr; }
    .reversed-mobile { display: flex; flex-direction: column-reverse; }
}

/* Backgrounds */
.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    pointer-events: none;
}

.vignette {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 40%, #050505 100%);
    z-index: -1;
    pointer-events: none;
}

/* Components */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid transparent;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: #000;
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background: transparent;
    color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.btn-outline {
    border-color: var(--color-border);
    color: #fff;
}
.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.05);
}

.glass-nav {
    position: fixed;
    top: 0; width: 100%;
    padding: 20px 0;
    background: rgba(5,5,5,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

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

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-primary); }

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
}

#swarm-canvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.6;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
    50% { transform: translate(-50%, 10px); opacity: 1; }
}

/* Terminal Window */
.terminal-window {
    background: #0f0f0f;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    font-size: 0.9rem;
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-body {
    padding: 20px;
    line-height: 1.8;
}

/* Race Track */
.race-track-container {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: 8px;
}

.lane {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.lane-info {
    width: 150px;
    flex-shrink: 0;
}

.track {
    flex-grow: 1;
    height: 4px;
    background: #222;
    position: relative;
    border-radius: 2px;
}

.runner {
    height: 100%;
    background: #444;
    border-radius: 2px;
    position: relative;
}
.runner::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 10px;
    height: 10px;
    background: inherit;
    border-radius: 50%;
}

.runner-win { background: var(--color-secondary); box-shadow: 0 0 10px var(--color-secondary); }
.runner-crash { background: var(--color-danger); opacity: 0.5; }
.runner-slow { background: var(--color-warning); opacity: 0.7; }

/* Scanner UI */
.scanner-ui {
    border: 1px solid var(--color-danger);
    background: rgba(255, 42, 42, 0.05);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--color-danger);
    box-shadow: 0 0 15px var(--color-danger);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

.overlay-alert {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--color-danger);
    padding: 10px;
    z-index: 5;
}

/* Stat Cards */
.stat-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--color-border);
    padding: 20px;
    min-width: 200px;
}

.stat-value { font-size: 2rem; font-family: var(--font-mono); font-weight: 700; margin-top: 5px; }

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

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

.footer-links a {
    color: var(--color-text-muted);
    margin-left: 20px;
    text-decoration: none;
}
.footer-links a:hover { color: #fff; }

/* Form Styles */
.form-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    text-align: left;
}

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    color: #fff;
    font-family: var(--font-mono);
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: 0;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
    background: rgba(0, 240, 255, 0.02);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Custom Select styling */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.form-input::placeholder, .form-textarea::placeholder {
    color: #333;
}

/* Basic validation styling */
.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--color-danger);
}

.btn-submit {
    width: 100%;
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 15px;
    font-family: var(--font-mono);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    background: var(--color-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}
