:root {
    --c-red: #ff2a00;
    --c-red-dim: #661100;
    --c-yellow: #ffcc00;
    --c-bg: #050505;
    --c-panel: rgba(10, 8, 8, 0.96);
    --cursor-x: 50%;
    --cursor-y: 50%;
}

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

body {
    background-color: var(--c-bg);
    background-size: cover;
    background-position: center;
    height: 100vh;
    overflow: hidden;
    font-family: 'Courier Prime', monospace;
    color: #eee;
}

/* --- LOGIN BUTTON --- */
.login-trigger {
    position: fixed; top: 20px; left: 20px; z-index: 2000;
    background: rgba(0,0,0,0.8); border: 1px solid var(--c-red); color: var(--c-red);
    padding: 8px 15px; font-family: 'Bebas Neue'; letter-spacing: 1px; cursor: pointer;
    transition: 0.3s;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}
.login-trigger:hover { background: var(--c-red); color: #000; box-shadow: 0 0 15px var(--c-red); }

/* --- LOGIN MODAL --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95);
    z-index: 3000; display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(5px);
}
.modal-overlay.active { display: flex; }
.login-box {
    border: 2px solid var(--c-red);
    padding: 30px; width: 350px; background: #000;
    box-shadow: 0 0 50px var(--c-red-dim);
    text-align: center; position: relative;
}
.login-box::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
    background: repeating-linear-gradient(45deg, var(--c-red), var(--c-red) 10px, #000 10px, #000 20px);
}
.login-input {
    width: 100%; background: #111; border: 1px solid #444;
    color: var(--c-yellow); padding: 12px; margin-bottom: 15px;
    font-family: 'Courier Prime'; outline: none;
}
.login-input:focus { border-color: var(--c-yellow); }
.login-btn {
    width: 100%; background: var(--c-red); border: none; padding: 10px;
    font-family: 'Bebas Neue'; font-size: 1.5rem; cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}
.login-btn:hover { background: var(--c-yellow); color: #000; }

/* --- LAYER 1: CANVAS EMBERS --- */
#ember-canvas {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
}

/* --- LAYER 2: THERMAL FLASHLIGHT --- */
.thermal-layer {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2; pointer-events: none;
    mask-image: radial-gradient(circle 300px at var(--cursor-x) var(--cursor-y), black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle 300px at var(--cursor-x) var(--cursor-y), black 0%, transparent 100%);
    mask-composite: exclude;
}

/* --- LAYER 3: SCANLINES --- */
.scanlines {
    position: fixed; inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px; pointer-events: none; z-index: 3; opacity: 0.5;
}

/* --- LAYER 4: UI CONTAINER --- */
.container {
    position: relative; z-index: 10; height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px;
}

/* --- THE TACTICAL HUD BOX --- */
.content-box {
    background: var(--c-panel);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
    border-left: 4px solid var(--c-red);
    max-width: 600px; width: 100%; text-align: center;
    box-shadow: 0 0 80px rgba(0,0,0,0.8); position: relative;
}

.hazard-bar {
    height: 12px; width: 100%;
    background: repeating-linear-gradient(45deg, var(--c-red), var(--c-red) 10px, #000 10px, #000 20px);
    opacity: 0.9;
}

.inner-padding { padding: 2.5rem 3rem; }

h1 {
    font-family: 'Rubik Glitch', cursive; font-size: 5rem;
    color: var(--c-red); line-height: 0.8; margin-bottom: 5px; text-shadow: 3px 3px 0 #000;
}

.tagline {
    font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: #ccc;
    margin-bottom: 2rem; letter-spacing: 3px; text-transform: uppercase;
    border-bottom: 1px solid #333; display: inline-block; padding-bottom: 5px;
}

.victim-counter {
    font-size: 0.75rem; color: var(--c-yellow); letter-spacing: 1px; margin-bottom: 25px;
    border: 1px dashed #333; display: inline-block; padding: 5px 10px; background: #000;
}
.victim-counter span { color: #fff; font-weight: bold; }

/* --- ROULETTE HUD --- */
.roulette-box {
    background: rgba(20, 0, 0, 0.5); border: 1px solid var(--c-red-dim);
    padding: 15px; margin: 0 auto 25px auto; position: relative;
}
.roulette-box::before {
    content: ''; position: absolute; top: -1px; left: -1px; width: 8px; height: 8px;
    border-top: 2px solid var(--c-red); border-left: 2px solid var(--c-red);
}
.roulette-box::after {
    content: ''; position: absolute; bottom: -1px; right: -1px; width: 8px; height: 8px;
    border-bottom: 2px solid var(--c-red); border-right: 2px solid var(--c-red);
}
.roulette-display {
    font-family: 'Bebas Neue'; font-size: 1.3rem; color: #fff;
    min-height: 1.3em; margin-bottom: 10px; text-shadow: 0 0 10px rgba(255, 42, 0, 0.4);
}
.btn-roulette {
    background: transparent; border: 1px solid #444; color: #888;
    padding: 5px 12px; font-size: 0.8rem; cursor: pointer;
    font-family: 'Courier Prime'; text-transform: uppercase; transition: 0.3s;
}
.btn-roulette:hover { border-color: var(--c-yellow); color: var(--c-yellow); background: rgba(255, 204, 0, 0.1); }

/* --- FORM --- */
.input-group { display: flex; background: #000; border: 1px solid #333; padding: 4px; }

input[type="email"] {
    flex: 1; background: transparent; border: none; padding: 15px;
    color: #fff; font-family: 'Courier Prime'; font-size: 1rem; outline: none;
}

button.btn-ignite {
    background: var(--c-red); border: none; color: #000; padding: 0 25px;
    font-family: 'Bebas Neue'; font-size: 1.4rem; cursor: pointer;
    transition: 0.2s; clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
    opacity: 0.4; pointer-events: none;
}
button.btn-ignite.ready { opacity: 1; pointer-events: auto; }
button.btn-ignite:hover { background: var(--c-yellow); box-shadow: 0 0 25px var(--c-red); }

.waiver-box {
    margin-top: 15px; display: flex; align-items: flex-start; gap: 10px; text-align: left;
}
.waiver-box label { font-size: 0.65rem; color: #666; line-height: 1.3; cursor: pointer; }
.waiver-box label:hover { color: #999; }
input[type="checkbox"] { accent-color: var(--c-red); margin-top: 3px; cursor: pointer; }

.status-msg { margin-top: 15px; font-weight: bold; font-size: 0.8rem; height: 20px; }

/* --- TICKER --- */
.ticker-wrap {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #000; color: var(--c-red); border-top: 2px solid var(--c-red);
    padding: 8px 0; z-index: 50; font-size: 0.8rem; text-transform: uppercase; white-space: nowrap; overflow: hidden;
}
.ticker-move { display: inline-block; padding-left: 100%; animation: ticker 120s linear infinite; }
.ticker-item { display: inline-block; padding: 0 60px; }
.ticker-item span { color: #fff; margin: 0 5px; }
@keyframes ticker { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }

/* --- EXTRAS --- */
.emergency-btn {
    position: fixed; top: 20px; right: 20px;
    border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.4);
    padding: 8px 12px; text-decoration: none; font-size: 0.7rem; z-index: 100;
    transition: 0.3s;
}
.emergency-btn:hover { border-color: #fff; color: #fff; background: rgba(0,0,0,0.8); }

.idle-overlay {
    position: fixed; inset: 0; background: rgba(15, 0, 0, 0.98); z-index: 999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: 0.5s;
}
.idle-overlay.active { opacity: 1; pointer-events: auto; }
.idle-text { font-family: 'Rubik Glitch'; font-size: 4rem; color: var(--c-red); animation: pulse 0.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

@media (max-width: 600px) {
    h1 { font-size: 3.5rem; }
    .content-box { margin: 10px; max-width: 95%; }
    .inner-padding { padding: 1.5rem; }
    .input-group { flex-direction: column; background: transparent; border: none; gap: 10px; }
    input[type="email"] { background: #000; border: 1px solid #333; }
}

.toggle-link { display: block; margin-top: 15px; font-size: 0.8rem; color: #666; cursor: pointer; }
.toggle-link:hover { color: #fff; }
