/* ==========================================================================
   CYBERPUNK 2077 - PURE AESTHETIC STYLESHEET
   ========================================================================== */

:root {
    /* Core Cyberpunk 2077 Palette */
    --cp-yellow: #FFD300;
    --cp-cyan: #02D7F2;
    --cp-red: #FF1111;
    --cp-black: #000000;
    --cp-dark-gray: #0A0A0A;
    --cp-panel: rgba(10, 10, 10, 0.85);
    
    /* Typography */
    --font-primary: 'Rajdhani', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--cp-black);
    color: var(--cp-yellow);
    font-family: var(--font-primary);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    text-transform: uppercase;
}

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

/* --------------------------------------------------------------------------
   CRT / SCANLINE EFFECTS & CURVATURE
   -------------------------------------------------------------------------- */
.crt-tube {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 998;
    pointer-events: none;
    /* Combine static scanlines, vignette, and a slight glass reflection */
    background: 
        radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 65%),
        linear-gradient(rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%),
        radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.8) 100%);
    background-size: 100% 100%, 100% 4px, 100% 100%;
    animation: flicker 0.15s infinite;
}

.crt-bulge {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 999;
    pointer-events: none;
    /* Strong inset shadow for depth and thick border for the rounded monitor shape */
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
    border: 15px solid #000;
    border-radius: 80px;
}

@keyframes flicker {
    0% { opacity: 0.95; }
    50% { opacity: 1; }
    100% { opacity: 0.92; }
}

/* --------------------------------------------------------------------------
   HUD LAYER (Diegetic UI)
   -------------------------------------------------------------------------- */
.hud-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 10;
    padding: 2vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hud-text {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
}

.hud-text.yellow { color: var(--cp-yellow); }
.hud-text.cyan { color: var(--cp-cyan); }
.hud-text.red { color: var(--cp-red); animation: blink 1s infinite steps(2); }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hud-top-left { position: absolute; top: 30px; left: 30px; display: flex; gap: 15px; }
.hud-top-right { position: absolute; top: 30px; right: 30px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hud-bottom-left { position: absolute; bottom: 30px; left: 30px; }
.hud-bottom-right { position: absolute; bottom: 30px; right: 30px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

/* Battery / Status Indicator */
.battery-indicator {
    display: flex;
    gap: 4px;
}
.battery-indicator .bar {
    width: 12px; height: 6px;
    transform: skewX(-20deg);
}
.bar.fill { background-color: var(--cp-cyan); }
.bar.empty { border: 1px solid var(--cp-cyan); }

/* Telemetry Data */
.telemetry {
    font-family: var(--font-mono);
    color: var(--cp-cyan);
    font-size: 12px;
    line-height: 1.5;
}

/* Crosshair Motif */
.crosshair {
    position: relative;
    width: 40px; height: 40px;
}
.crosshair-h {
    position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: var(--cp-cyan);
}
.crosshair-v {
    position: absolute; top: 0; left: 50%; width: 2px; height: 100%; background: var(--cp-cyan);
}

/* --------------------------------------------------------------------------
   HERO CONTAINER & BRUTALIST FRAME
   -------------------------------------------------------------------------- */
.hero-container {
    position: relative;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.cyber-frame {
    position: relative;
    width: 90%;
    max-width: 950px;
    background: var(--cp-panel);
    border: 3px solid var(--cp-yellow);
    padding: 40px;
    /* Brutalist diagonal cut via clip-path */
    clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 40px));
}

/* Frame Notches */
.frame-notch-tl, .frame-notch-br {
    position: absolute;
    width: 40px; height: 40px;
    background: var(--cp-yellow);
}
.frame-notch-tl { top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.frame-notch-br { bottom: 0; right: 0; clip-path: polygon(100% 100%, 100% 0, 0 100%); }

/* Sawtooth Pattern */
.sawtooth-bar {
    position: absolute;
    top: -3px; left: 20%;
    width: 200px; height: 15px;
    background: repeating-linear-gradient(
        -45deg,
        var(--cp-yellow),
        var(--cp-yellow) 5px,
        transparent 5px,
        transparent 10px
    );
}

/* --------------------------------------------------------------------------
   CONTENT & GLITCH TYPOGRAPHY
   -------------------------------------------------------------------------- */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cyber-badge {
    background: var(--cp-yellow);
    color: var(--cp-black);
    padding: 4px 12px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    display: inline-block;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.glitch-text {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3.8vw, 2.5rem);
    font-weight: 900;
    color: var(--cp-yellow);
    position: relative;
    line-height: 1.1;
    text-shadow: 2px 2px 0px var(--cp-cyan), -2px -2px 0px var(--cp-red);
    display: inline-block;
    white-space: nowrap;
}

/* Glitch Animation */
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--cp-panel);
    clip: rect(0, 0, 0, 0);
}
.glitch-text::before {
    left: 3px;
    text-shadow: -2px 0 var(--cp-red);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -3px;
    text-shadow: 2px 0 var(--cp-cyan);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(10px, 9999px, 30px, 0); }
    20% { clip: rect(50px, 9999px, 60px, 0); }
    40% { clip: rect(20px, 9999px, 40px, 0); }
    60% { clip: rect(80px, 9999px, 90px, 0); }
    80% { clip: rect(5px, 9999px, 25px, 0); }
    100% { clip: rect(45px, 9999px, 65px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 85px, 0); }
    20% { clip: rect(15px, 9999px, 35px, 0); }
    40% { clip: rect(75px, 9999px, 95px, 0); }
    60% { clip: rect(35px, 9999px, 50px, 0); }
    80% { clip: rect(90px, 9999px, 100px, 0); }
    100% { clip: rect(10px, 9999px, 20px, 0); }
}

.sub-heading {
    color: var(--cp-cyan);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 30px;
}

/* --------------------------------------------------------------------------
   BUTTONS (Brutalist UX)
   -------------------------------------------------------------------------- */
.action-area {
    display: flex;
    gap: 20px;
}

.cyber-button {
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.2rem;
    padding: 15px 40px;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.cyber-button.primary {
    background: var(--cp-yellow);
    color: var(--cp-black);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}
.cyber-button.primary:hover {
    background: var(--cp-cyan);
    color: var(--cp-black);
    transform: translateY(-2px) scale(0.98);
}

.cyber-button.secondary {
    border: 2px solid var(--cp-red);
    color: var(--cp-red);
    clip-path: polygon(15px 0, 100% 0, 100% 100%, 0 100%, 0 15px);
}
.cyber-button.secondary:hover {
    background: var(--cp-red);
    color: var(--cp-black);
    transform: translateY(-2px) scale(0.98);
}

/* --------------------------------------------------------------------------
   FRAME FOOTER
   -------------------------------------------------------------------------- */
.frame-footer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: flex-end;
    gap: 15px;
}

.barcode {
    width: 60px; height: 20px;
    background: repeating-linear-gradient(
        to right,
        var(--cp-yellow),
        var(--cp-yellow) 2px,
        transparent 2px,
        transparent 4px,
        var(--cp-yellow) 4px,
        var(--cp-yellow) 5px,
        transparent 5px,
        transparent 8px
    );
}

.serial {
    color: var(--cp-yellow);
    font-family: var(--font-mono);
    font-size: 10px;
}
