@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --green: #4af626;
    --bg-color: #0b0c0b;
    --scanline: rgba(0, 0, 0, 0.5);
    --glow: 0 0 10px rgba(74, 246, 38, 0.7), 0 0 20px rgba(74, 246, 38, 0.5);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    font-family: 'VT323', monospace;
    color: var(--green);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CRT SCREEN CONTAINER */
.crt-screen {
    width: 100%;
    height: 100%;
    position: relative;
    background: radial-gradient(circle, #1a1a1a 0%, #000000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    animation: flicker 0.15s infinite;
}

/* TEXT STYLING */
h1 {
    font-size: 5rem;
    margin: 0;
    text-shadow: var(--glow);
    letter-spacing: 5px;
    animation: glitch 1s linear infinite;
}

p {
    font-size: 1.5rem;
    margin-top: 10px;
    text-shadow: 0 0 5px var(--green);
}

.blink {
    animation: blinker 1s linear infinite;
}

/* SCANLINE OVERLAY */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

/* VIGNETTE & GLOW */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 11;
}

/* ANIMATIONS */
@keyframes blinker {
    50% { opacity: 0; }
}

@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 0.9; }
    15% { opacity: 0.95; }
    20% { opacity: 0.99; }
    50% { opacity: 0.95; }
    80% { opacity: 0.9; }
    100% { opacity: 0.97; }
}

@keyframes glitch {
    2%, 64% { transform: translate(2px,0) skew(0deg); }
    4%, 60% { transform: translate(-2px,0) skew(0deg); }
    62% { transform: translate(0,0) skew(5deg); }
}

/* BOOT SEQUENCE LOADER */
.loader-bar {
    width: 300px;
    height: 20px;
    border: 2px solid var(--green);
    margin-top: 30px;
    position: relative;
    box-shadow: var(--glow);
}

.fill {
    height: 100%;
    background-color: var(--green);
    width: 0%;
    animation: load 3s forwards cubic-bezier(0.1, 0.7, 1.0, 0.1);
}

@keyframes load {
    0% { width: 0%; }
    20% { width: 10%; }
    30% { width: 15%; }
    50% { width: 60%; }
    80% { width: 80%; }
    100% { width: 100%; }
}

.status {
    font-size: 1rem;
    margin-top: 10px;
}