:root {
    --bg-color: #0c0b0a;
    --text-main: #d9d4cc;
    --text-muted: #8c8881;
    --accent-orange: #ff5722;
    --accent-amber: #ffb300;
    --accent-red: #d32f2f;
    --ui-line: rgba(255, 87, 34, 0.3);
    --hud-green: #4caf50;
    --discord-color: #5865F2;
    
    --font-mono: 'Space Mono', monospace;
    --font-tech: 'Share Tech Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    overflow-x: hidden;
    line-height: 1.5;
    position: relative;
}

/* Canvas Background */
#micro-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* CRT / HUD Effects */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px;
    z-index: 100;
    pointer-events: none;
    opacity: 0.6;
}

.tracking-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(var(--ui-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--ui-line) 1px, transparent 1px);
    background-size: 100px 100px;
    z-index: -3;
    opacity: 0.15;
}

/* HUD Corners */
.hud-corner {
    position: fixed;
    width: 50px;
    height: 50px;
    border: 2px solid var(--accent-orange);
    z-index: 90;
    pointer-events: none;
    opacity: 0.7;
}
.top-left { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.top-right { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.bottom-left { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.bottom-right { bottom: 20px; right: 20px; border-left: none; border-top: none; }

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-orange);
    opacity: 1;
    transition: opacity 0.5s ease-out;
    z-index: 100;
    pointer-events: none;
    animation: float-down 2s infinite ease-in-out;
}

@keyframes float-down {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
    100% { transform: translateX(-50%) translateY(0); }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 80px;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--ui-line);
    background: #050403;
}

.logo {
    font-family: var(--font-tech);
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
}
.logo-prefix { font-size: 0.8rem; color: var(--text-muted); margin-right: 10px; }
.highlight { color: var(--accent-orange); }

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.85rem;
    transition: color 0.2s, background 0.2s;
    padding: 5px 10px;
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--bg-color);
    background: var(--accent-orange);
    border-color: var(--accent-orange);
}

/* Terminal Boxes */
.terminal-box {
    background: rgba(20, 18, 16, 0.85);
    border: 1px solid var(--ui-line);
    padding: 1.5rem;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    
    /* Animation initial state */
    transform: scaleY(0.01) scaleX(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease-out;
}

.terminal-box.is-visible {
    transform: scaleY(1) scaleX(1);
    opacity: 1;
}

.terminal-box::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 10px; height: 10px;
    border-top: 2px solid var(--accent-orange);
    border-left: 2px solid var(--accent-orange);
}

.box-header {
    font-family: var(--font-tech);
    font-size: 0.8rem;
    color: var(--accent-amber);
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--ui-line);
    padding-bottom: 5px;
    text-transform: uppercase;
}
.warning-header { color: var(--accent-red); border-bottom-color: var(--accent-red); }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 80px;
    position: relative;
}

.hero-content {
    max-width: 600px;
    width: 100%;
    z-index: 5;
}

.status-badge {
    display: inline-block;
    font-family: var(--font-tech);
    background: var(--accent-orange);
    color: var(--bg-color);
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.glitch {
    font-family: var(--font-tech);
    font-size: 4.5rem;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.target-box {
    border-left: 2px solid var(--accent-orange);
    padding-left: 15px;
    margin-bottom: 2rem;
}

.subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 5px;}
.typewriter { color: var(--accent-amber); font-size: 0.9rem; margin-bottom: 5px; }

/* Forms & Buttons */
.signup-container, .discord-container {
    width: 100%;
    margin-top: 2rem;
}

.email-form {
    display: flex;
    gap: 10px;
}

.transmitting-text {
    color: #7b9e7b;
    font-size: 1.2rem;
    font-family: var(--font-tech);
    text-align: center;
    letter-spacing: 5px;
    padding: 1rem 0;
}

input[type="email"] {
    flex: 1;
    background: transparent;
    border: 1px solid var(--ui-line);
    padding: 10px;
    color: var(--accent-orange);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
}
input[type="email"]:focus {
    border-color: var(--accent-orange);
    background: rgba(255, 87, 34, 0.05);
}
input[type="email"]::placeholder { color: var(--text-muted); }

.btn-primary {
    background: var(--accent-orange);
    color: var(--bg-color);
    border: none;
    font-family: var(--font-tech);
    font-weight: bold;
    padding: 0 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover { background: var(--text-main); }

.hidden { display: none !important; }

.success-text {
    color: var(--hud-green);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.btn-discord {
    display: block;
    background: transparent;
    color: var(--discord-color);
    border: 1px solid var(--discord-color);
    text-align: center;
    padding: 10px;
    text-decoration: none;
    font-family: var(--font-tech);
    font-weight: bold;
    transition: all 0.2s;
}
.btn-discord:hover {
    background: var(--discord-color);
    color: white;
}

/* Trailer Section */
.trailer-section, .lore-section {
    padding: 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

.lidar-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400vmax; /* Use vmax to guarantee it extends infinitely on any screen */
    height: 400vmax;
    z-index: -2;
    pointer-events: none;
}

.lidar-sweep-local {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(255, 87, 34, 0.05) 50%, rgba(255, 87, 34, 0.5) 100%);
    /* We will animate rotation via JS to sync with canvas */
    will-change: transform;
}

.full-width { width: 100%; max-width: 900px; margin: 0 auto; z-index: 5; }

.video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--ui-line);
    overflow: hidden;
}

.noise-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.25;
    mix-blend-mode: screen;
    pointer-events: none;
    animation: static-flicker 0.1s steps(1) infinite, pulse-52 52s infinite;
}

@keyframes static-flicker {
    0% { background-position: 0px 0px; }
    25% { background-position: 100px 50px; }
    50% { background-position: -50px -100px; }
    75% { background-position: 200px -50px; }
    100% { background-position: 0px 0px; }
}

@keyframes pulse-52 {
    0%, 99.5%, 100% { opacity: 0.25; filter: brightness(1); }
    99.8% { opacity: 0.45; filter: brightness(1.8); }
}

.play-reticle {
    width: 80px; height: 80px;
    border: 1px solid var(--accent-orange);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    display: flex; justify-content: center; align-items: center;
}
.play-reticle::before, .play-reticle::after {
    content: ''; position: absolute; background: var(--accent-orange);
}
.play-reticle::before { width: 100px; height: 1px; }
.play-reticle::after { width: 1px; height: 100px; }
.crosshair-center {
    width: 10px; height: 10px;
    background: var(--accent-orange);
    z-index: 2;
}
.play-reticle:hover { transform: scale(1.1); background: rgba(255, 87, 34, 0.2); }

.signal-lost {
    position: absolute;
    bottom: 20px; left: 20px;
    color: var(--accent-red);
    font-family: var(--font-tech);
}

/* Lore Section */
.lore-section {
    gap: 40px;
    justify-content: center;
}
.lore-section .terminal-box { flex: 1; max-width: 800px; }

.lore-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

footer {
    text-align: center;
    padding: 1rem;
    font-family: var(--font-tech);
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--ui-line);
    background: #050403;
}

@media (max-width: 768px) {
    /* Safe Area padding for iOS Safari UI / Notch / Dynamic Island */
    .hero, .trailer-section, .lore-section { 
        padding: 80px max(20px, env(safe-area-inset-right)) 80px max(20px, env(safe-area-inset-left)); 
    }
    .navbar {
        padding: max(1rem, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 1rem max(20px, env(safe-area-inset-left));
    }
    footer {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    /* Typography & Mobile Layout Fixes */
    .glitch { font-size: 3rem; }
    .email-form { flex-direction: column; }
    .btn-primary { padding: 15px; }
    .hud-corner { display: none; }
    .lore-section { flex-direction: column; }
    .nav-links a { margin-left: 1rem; font-size: 0.75rem; }
    
    .play-reticle { width: 60px; height: 60px; }
    .play-reticle::before { width: 80px; }
    .play-reticle::after { height: 80px; }
}
