:root {
    --bg-dark: #000000;
    --accent: #ffffff;
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --glass-bg: rgba(0, 0, 0, 0.8);
    --glass-border: #ffffff;
    --font-family: 'Outfit', monospace, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    text-transform: uppercase;
}

/* Background Image */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('bg.png') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    filter: grayscale(100%) contrast(150%);
    z-index: -3;
}

/* Dither Overlay Pattern */
.dither-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%, #000), 
        linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%, #000);
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    opacity: 0.4;
    z-index: -2;
    pointer-events: none;
}

/* CRT Scanlines, Vignette & Flicker */
.crt-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    z-index: 100;
    pointer-events: none;
    box-shadow: inset 0 0 120px rgba(0,0,0,0.9);
    animation: crt-scroll 10s linear infinite, crt-flicker 0.15s infinite;
}

@keyframes crt-scroll {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 0 400px, 0 0; }
}

@keyframes crt-flicker {
    0% { opacity: 0.95; }
    100% { opacity: 1; }
}

/* Main Container with CRT Glow Effect */
.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    z-index: 1;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
}

/* Brutalist Glitch Card */
.glass-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    padding: 3rem;
    text-align: center;
    box-shadow: 10px 10px 0px rgba(255, 255, 255, 0.2);
    position: relative;
    animation: jitter 5s infinite;
}

@keyframes jitter {
    0%, 9%, 11%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-2px, 2px); }
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #000;
    border: 1px solid #fff;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
    to { visibility: hidden; }
}

h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    position: relative;
}

.highlight {
    color: #000;
    background: #fff;
    padding: 0 4px;
}

/* Glitch Effect Core */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 rgba(255,255,255,0.7);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 rgba(150,150,150,0.7);
    animation: glitch-anim2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { clip-path: inset(30% 0 40% 0); }
}

@keyframes glitch-anim2 {
    0% { clip-path: inset(10% 0 60% 0); }
    20% { clip-path: inset(30% 0 20% 0); }
    40% { clip-path: inset(70% 0 10% 0); }
    60% { clip-path: inset(20% 0 50% 0); }
    80% { clip-path: inset(50% 0 30% 0); }
    100% { clip-path: inset(5% 0 80% 0); }
}

.description {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-family: monospace;
    text-align: left;
    border-left: 2px solid #fff;
    padding-left: 10px;
}

/* Animation Zone */
.animation-zone {
    position: relative;
    height: 100px;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.moon-glitch {
    width: 60px;
    height: 60px;
    background: repeating-linear-gradient(
      0deg,
      #000,
      #000 2px,
      #fff 2px,
      #fff 4px
    );
    border: 2px solid #fff;
    border-radius: 0; /* brutalist */
    position: relative;
    animation: moon-spin 10s infinite step-end;
}

@keyframes moon-spin {
    0% { transform: scaleX(1); }
    50% { transform: scaleX(-1); }
    100% { transform: scaleX(1); }
}

.zzz-container {
    position: absolute;
    top: 0;
    right: 35%;
}

.zzz {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    opacity: 0;
    font-family: monospace;
    animation: fly-zzz 4s infinite step-start;
}

.zzz:nth-child(2) { animation-delay: 1.3s; font-size: 2rem; }
.zzz:nth-child(3) { animation-delay: 2.6s; font-size: 2.5rem; }

@keyframes fly-zzz {
    0% { transform: translate(0, 0); opacity: 0; }
    20% { opacity: 1; transform: translate(10px, -20px); }
    40% { opacity: 0.5; transform: translate(20px, -40px); }
    60% { opacity: 1; transform: translate(30px, -60px); }
    80% { opacity: 0; }
    100% { opacity: 0; }
}

/* Subscribe Form */
.subscribe-form {
    display: flex;
    gap: 0;
    margin-bottom: 2.5rem;
    border: 2px solid #fff;
}

input[type="email"] {
    flex: 1;
    background: #000;
    border: none;
    padding: 14px 20px;
    color: white;
    font-family: monospace;
    font-size: 1rem;
    outline: none;
}

input[type="email"]:focus {
    background: #111;
}

button {
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    border-left: 2px solid #fff;
    padding: 14px 28px;
    font-family: monospace;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
}

button:hover {
    background: #000;
    color: #fff;
}

button:active {
    transform: translate(2px, 2px);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.social-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-family: monospace;
}

.social-links a:hover {
    color: var(--accent);
    text-decoration: line-through;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .glass-card {
        padding: 2rem 1.5rem;
        box-shadow: 5px 5px 0px rgba(255, 255, 255, 0.2);
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .subscribe-form {
        flex-direction: column;
        border: none;
        gap: 10px;
    }
    
    input[type="email"], button {
        border: 2px solid #fff;
    }
    
    button {
        border-left: 2px solid #fff;
    }
}

/* Computer Vision Tracking Effect */
.cv-tracker {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: 50;
    transition: top 0.4s ease-out, left 0.4s ease-out, width 0.4s ease-out, height 0.4s ease-out, opacity 0.2s;
    background: rgba(255, 255, 255, 0.03);
    opacity: 0;
}

.cv-tracker.active {
    opacity: 1;
}

.cv-tracker::before, .cv-tracker::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
}

.cv-tracker::before {
    top: -2px; left: -2px;
    border-right: none; border-bottom: none;
}

.cv-tracker::after {
    bottom: -2px; right: -2px;
    border-left: none; border-top: none;
}

.cv-label {
    position: absolute;
    top: -18px;
    left: -1px;
    background: #fff;
    color: #000;
    font-size: 0.65rem;
    font-family: monospace;
    font-weight: bold;
    padding: 1px 4px;
    white-space: nowrap;
    letter-spacing: 0px;
}
