/* --- VARIABLES --- */
:root {
    --bg-dark: #0b0c10;
    --bg-panel: rgba(20, 24, 28, 0.95);
    --blue-primary: #45a29e;
    --blue-bright: #66fcf1;
    --yellow-alert: #ffcc00;
    --red-deviant: #ff3333;
    --text-main: #e0e0e0;
    --text-dim: #888888;
    --font-ui: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Courier New', monospace;
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }

body {
    background-color: var(--bg-dark);
    /* Removed the hardcoded gradient so JS images show */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-main);
    font-family: var(--font-ui);
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-rows: 80px 1fr auto;
    transition: background-image 1s ease-in-out; /* Smooth transition between BG images */
}

/* Darkens the background image so text pops */
body::before {
    content: "";
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); /* 60% Darkness overlay */
    z-index: -1;
}

/* --- VISUAL FX --- */
.scanlines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    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% 2px, 3px 100%;
    pointer-events: none; z-index: 10; opacity: 0.6;
}

.vignette {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 60%, black 100%);
    pointer-events: none; z-index: 9;
}

.blink { animation: blinker 2s linear infinite; }
@keyframes blinker { 50% { opacity: 0; } }

/* --- HEADER --- */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px;
    background: var(--bg-panel);
    border-bottom: 1px solid rgba(102, 252, 241, 0.1);
    z-index: 20;
    backdrop-filter: blur(5px);
}

.hud-label {
    font-size: 0.75rem; letter-spacing: 2px; color: var(--blue-primary);
    margin-bottom: 5px; font-weight: 600;
}

.hud-value { font-size: 1.2rem; color: #fff; letter-spacing: 1px; }
.mono { font-family: var(--font-mono); }

.stat-group { text-align: right; margin-left: 30px; }

.meter-track {
    width: 200px; height: 6px; background: #222;
    position: relative; overflow: hidden;
}

.meter-fill {
    height: 100%; width: 0%; background: var(--blue-bright);
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1), background 0.6s ease;
    box-shadow: 0 0 10px var(--blue-bright);
}

/* --- GAME STAGE --- */
#game-stage {
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    position: relative; perspective: 1000px;
    z-index: 5;
}

#android-led {
    width: 120px; height: 120px; margin-bottom: 40px;
    filter: drop-shadow(0 0 15px var(--blue-bright));
    transition: filter 0.5s ease;
}

#narrative-container {
    width: 70%; max-width: 900px;
    text-align: center;
    /* Added background plate for readability over images */
    background: rgba(11, 12, 16, 0.85);
    padding: 40px;
    border: 1px solid rgba(69, 162, 158, 0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#story-text {
    font-size: 1.6rem; line-height: 1.6; font-weight: 300;
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.text-visible { opacity: 1 !important; transform: translateY(0) !important; }

/* --- CONTROLS --- */
#controls-area {
    padding: 30px 50px;
    display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
    /* Removed the gradient background so the image shows through at the bottom too */
    background: transparent;
    min-height: 150px; z-index: 20;
    margin-bottom: 20px;
}

.choice-btn {
    background: rgba(11, 12, 16, 0.9);
    border: 1px solid var(--blue-primary);
    border-left: 4px solid var(--blue-primary);
    color: var(--blue-bright);
    padding: 15px 25px;
    min-width: 240px;
    font-size: 1rem; text-transform: uppercase; letter-spacing: 1.5px;
    cursor: pointer; position: relative; overflow: hidden;
    transition: all 0.2s ease;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.choice-btn:hover {
    background: rgba(102, 252, 241, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(69, 162, 158, 0.2);
}

.choice-btn.deviant {
    border-color: var(--red-deviant); color: var(--red-deviant);
}
.choice-btn.deviant:hover {
    background: rgba(255, 51, 51, 0.15);
    box-shadow: 0 5px 15px rgba(255, 51, 51, 0.2);
}

/* --- NEW CONTINUE BUTTON (The arrow) --- */
.continue-btn {
    background: transparent;
    border: 2px solid rgba(102, 252, 241, 0.3);
    color: var(--blue-bright);
    width: 60px; height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
    margin-top: 10px;
}

.continue-btn:hover {
    background: rgba(102, 252, 241, 0.1);
    border-color: var(--blue-bright);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--blue-primary);
}