/* FNAF 3D Web - Retro CRT Horror Aesthetics & Styling */

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

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000000;
    font-family: 'VT323', monospace;
    color: #ffffff;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* CRT Scanlines & Vignette Filter Overlay */
.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 50%),
                radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.75) 100%);
    background-size: 100% 4px, 100% 100%;
}

.game-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.hidden {
    display: none !important;
}

/* --- TITLE SCREEN --- */
#title-screen {
    background: radial-gradient(circle, #1a0808 0%, #050202 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 60px;
    z-index: 100;
}

.title-header {
    max-width: calc(100% - 340px);
}

.creator-credit-badge {
    position: absolute;
    top: 40px;
    right: 60px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(14, 8, 8, 0.88);
    border: 2px solid rgba(255, 75, 75, 0.55);
    border-radius: 4px;
    box-shadow: 0 0 18px rgba(255, 30, 30, 0.22), inset 0 0 12px rgba(255, 60, 60, 0.08);
    letter-spacing: 2px;
}

.creator-credit-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff4444;
    box-shadow: 0 0 8px #ff2222;
    animation: recBlink 1.8s infinite;
}

.creator-credit-label {
    font-size: 23px;
    color: #b8b0b0;
}

.creator-credit-name {
    font-size: 26px;
    color: #ffffff;
    font-weight: normal;
    text-shadow: 0 0 10px rgba(255, 90, 70, 0.8);
}

.title-header h1 {
    font-size: 64px;
    letter-spacing: 4px;
    color: #eeeeee;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.3), 3px 3px 0 #880000;
    animation: titleGlitch 4s infinite;
}

.title-header h2 {
    font-size: 42px;
    color: #ff3333;
    letter-spacing: 6px;
    text-shadow: 0 0 10px #ff0000;
}

.title-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 320px;
}

.menu-btn {
    background: rgba(10, 10, 10, 0.85);
    border: 2px solid #555555;
    color: #dddddd;
    font-family: 'VT323', monospace;
    font-size: 32px;
    padding: 10px 20px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    letter-spacing: 2px;
}

.menu-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: translateX(10px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.title-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.opt-btn {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    font-family: 'VT323', monospace;
    font-size: 22px;
    padding: 6px 14px;
    cursor: pointer;
    margin-right: 10px;
}

.opt-btn:hover {
    color: #fff;
    border-color: #fff;
}

.copyright {
    font-size: 20px;
    color: #555;
}

/* Title Glitch Animation */
@keyframes titleGlitch {
    0%, 92%, 100% { opacity: 1; transform: skewX(0deg); }
    93% { opacity: 0.8; transform: skewX(8deg); }
    95% { opacity: 0.3; transform: skewX(-12deg); }
    97% { opacity: 0.9; transform: skewX(4deg); }
}

/* --- NEWSPAPER INTRO --- */
#newspaper-screen {
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.newspaper-frame {
    background: #e4dec7;
    color: #111;
    width: 680px;
    padding: 30px;
    border: 6px solid #222;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
    font-family: 'Times New Roman', serif;
}

.np-header {
    border-bottom: 3px double #111;
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.np-header h2 {
    font-size: 48px;
    letter-spacing: 2px;
    font-weight: bold;
}

.np-content h3 {
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.np-content p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.np-fineprint {
    font-size: 11px !important;
    font-style: italic;
    color: #555;
}

/* --- NIGHT INTRO SCREEN --- */
#night-intro-screen {
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#intro-night-text {
    font-size: 54px;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.intro-clock {
    font-size: 72px;
    color: #44ff44;
    text-shadow: 0 0 15px #00ff00;
}

/* --- GAMEPLAY HUD --- */
#gameplay-screen {
    pointer-events: none;
}

.hud-top-right {
    position: absolute;
    top: 25px;
    right: 35px;
    text-align: right;
    pointer-events: auto;
}

#hud-clock {
    font-size: 56px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

#hud-night {
    font-size: 32px;
    color: #aaaaaa;
}

.hud-bottom-left {
    position: absolute;
    bottom: 25px;
    left: 35px;
    z-index: 25;
    pointer-events: auto;
}

.power-display {
    font-size: 34px;
    margin-bottom: 6px;
}

.usage-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 28px;
}

#power-usage-bars {
    display: flex;
    gap: 4px;
}

.usage-bar {
    width: 14px;
    height: 24px;
    background: #222;
    border: 1px solid #444;
}

.usage-bar.active.tier-1 { background: #00ff66; box-shadow: 0 0 6px #00ff66; }
.usage-bar.active.tier-2 { background: #66ff00; box-shadow: 0 0 6px #66ff00; }
.usage-bar.active.tier-3 { background: #ccff00; box-shadow: 0 0 6px #ccff00; }
.usage-bar.active.tier-4 { background: #ffcc00; box-shadow: 0 0 6px #ffcc00; }
.usage-bar.active.tier-5 { background: #ff6600; box-shadow: 0 0 6px #ff6600; }
.usage-bar.active.tier-6 { background: #ff0033; box-shadow: 0 0 8px #ff0033; animation: blinkFast 0.3s infinite; }

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

/* --- STRESS & HEART RATE MONITOR --- */
.stress-display {
    margin-top: 14px;
    background: rgba(10, 15, 10, 0.75);
    border: 1px solid #335533;
    padding: 6px 12px;
    border-radius: 4px;
    width: 240px;
}

.stress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 24px;
    margin-bottom: 4px;
}

.stress-label {
    color: #88cc88;
    letter-spacing: 1px;
}

#stress-value {
    font-weight: bold;
    color: #ffffff;
}

#stress-status {
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
}

.status-calm { background: #113311; color: #44ff44; border: 1px solid #22aa22; }
.status-uneasy { background: #333311; color: #ffff44; border: 1px solid #aaaa22; }
.status-panic { background: #441111; color: #ff3333; border: 1px solid #ff2222; animation: blinkFast 0.4s infinite; }

.stress-bar-track {
    width: 100%;
    height: 12px;
    background: #111;
    border: 1px solid #444;
    border-radius: 2px;
    overflow: hidden;
}

.stress-fill {
    height: 100%;
    transition: width 0.2s ease, background 0.3s ease;
}

.stress-fill.calm {
    background: linear-gradient(90deg, #00aa44, #33ff77);
    box-shadow: 0 0 6px #00ff66;
}

.stress-fill.uneasy {
    background: linear-gradient(90deg, #ffaa00, #ffdd33);
    box-shadow: 0 0 6px #ffcc00;
}

.stress-fill.panic {
    background: linear-gradient(90deg, #ff2200, #ff0055);
    box-shadow: 0 0 10px #ff0033;
    animation: blinkFast 0.3s infinite;
}

/* Panic Vignette Pulsing on Screen */
.panic-pulse {
    animation: panicVignettePulse 0.8s infinite alternate ease-in-out !important;
}

@keyframes panicVignettePulse {
    0% {
        box-shadow: inset 0 0 80px rgba(180, 0, 0, 0.4);
    }
    100% {
        box-shadow: inset 0 0 160px rgba(255, 0, 0, 0.85);
    }
}

/* --- DESK FAN HUD BUTTON --- */
.fan-hud-control {
    margin-top: 10px;
}

.fan-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #181c18;
    border: 2px solid #336633;
    color: #bbffbb;
    font-family: 'VT323', monospace;
    font-size: 22px;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s, border-color 0.15s;
}

.fan-btn:hover {
    background: #243024;
    border-color: #66cc66;
}

.fan-btn.active {
    background: #1e2e1e;
    border-color: #44ff44;
    color: #ffffff;
}

.fan-btn:not(.active) {
    background: #221818;
    border-color: #663333;
    color: #ff9999;
}

/* --- GENERATOR & FUEL HUD MONITOR --- */
.generator-hud-info {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'VT323', monospace;
    font-size: 20px;
}

.gen-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 20, 15, 0.85);
    border: 1px solid #225533;
    padding: 3px 8px;
    border-radius: 3px;
    color: #88ffaa;
    text-shadow: 0 0 6px #00ff66;
}

.gen-dot {
    width: 8px;
    height: 8px;
    background: #00ff66;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff66;
    animation: genDotPulse 1.2s infinite alternate;
}

@keyframes genDotPulse {
    0% { opacity: 0.6; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 12px #00ff66; }
}

.fuel-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 15, 15, 0.85);
    border: 1px solid #773322;
    padding: 3px 8px;
    border-radius: 3px;
    color: #ffdd88;
    transition: all 0.2s ease;
    cursor: default;
}

.fuel-badge strong {
    color: #44ff66;
    text-shadow: 0 0 6px #00ff66;
}

.fuel-badge.used {
    background: rgba(20, 20, 20, 0.7);
    border-color: #444;
    color: #777;
}

.fuel-badge.used strong {
    color: #aa4444;
    text-shadow: none;
}

/* --- 3D INTERACTIVE PROP TOOLTIP --- */
#world-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: rgba(8, 12, 10, 0.92);
    border: 2px solid #00ff66;
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.4), inset 0 0 10px rgba(0, 255, 100, 0.15);
    color: #ffffff;
    font-family: 'VT323', monospace;
    font-size: 18px;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 4px;
    text-shadow: 0 0 5px rgba(0, 255, 100, 0.8);
    transform: translate(5px, 5px);
    transition: opacity 0.1s ease;
}

#world-tooltip .tt-icon {
    font-size: 20px;
    margin-right: 4px;
}

/* --- REFUEL TOAST NOTIFICATION --- */
#refuel-toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    background: rgba(5, 25, 12, 0.95);
    border: 3px solid #00ff66;
    box-shadow: 0 0 30px rgba(0, 255, 100, 0.7), inset 0 0 20px rgba(0, 255, 100, 0.3);
    color: #ffffff;
    font-family: 'VT323', monospace;
    font-size: 30px;
    letter-spacing: 2px;
    padding: 12px 26px;
    border-radius: 6px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 99999;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#refuel-toast.refuel-toast-active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    animation: toastGlitch 0.4s ease-out;
}

@keyframes toastGlitch {
    0% { transform: translateX(-50%) translateY(-20px) skewX(10deg); filter: hue-rotate(90deg); }
    40% { transform: translateX(-48%) translateY(2px) skewX(-6deg); }
    70% { transform: translateX(-52%) translateY(-1px) skewX(3deg); }
    100% { transform: translateX(-50%) translateY(0) skewX(0deg); filter: hue-rotate(0deg); }
}

/* --- DOOR & LIGHT BUTTON PANELS --- */
.door-controls {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(20, 20, 20, 0.85);
    padding: 12px;
    border: 3px solid #333;
    border-radius: 6px;
    pointer-events: auto;
}

.door-controls.left {
    left: 20px;
}

.door-controls.right {
    right: 20px;
}

.ctrl-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #181818;
    border: 2px solid #555;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 24px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.1s;
}

.ctrl-btn:hover {
    background: #282828;
    border-color: #888;
}

.ctrl-btn.active {
    background: #333;
    border-color: #fff;
}

.btn-led {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #000;
}

.led-green { background: #00ff00; box-shadow: 0 0 8px #00ff00; }
.led-red { background: #ff0000; box-shadow: 0 0 8px #ff0000; }
.led-white { background: #ffffff; box-shadow: 0 0 10px #ffffff; }
.led-off { background: #333333; }

/* --- MONITOR TOGGLE BAR (BOTTOM) --- */
#monitor-toggle-bar {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 550px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.2s, border-color 0.2s;
}

#monitor-toggle-bar:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.monitor-bar-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.arrow-up {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid rgba(255, 255, 255, 0.7);
}

.monitor-bar-icon span {
    font-size: 20px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
}

/* --- CAMERA MONITOR OVERLAY --- */
#camera-monitor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 40;
    pointer-events: auto;
}

#camera-static-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.25;
    pointer-events: none;
}

.cam-rec-indicator {
    position: absolute;
    top: 35px;
    left: 45px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 32px;
    letter-spacing: 2px;
}

.rec-dot {
    width: 22px;
    height: 22px;
    background: #ff0000;
    border-radius: 50%;
    box-shadow: 0 0 12px #ff0000;
    animation: recBlink 1s infinite;
}

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

#camera-name-display {
    position: absolute;
    top: 35px;
    right: 450px;
    font-size: 36px;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 8px #fff;
}

#camera-audio-only-notice {
    position: absolute;
    top: 40%;
    left: 30%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 36px;
    color: #ff3333;
    letter-spacing: 3px;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 40px;
    border: 2px dashed #ff3333;
}

/* --- CAMERA MAP LAYOUT (BOTTOM RIGHT) --- */
.camera-map {
    position: absolute;
    bottom: 35px;
    right: 45px;
    width: 440px;
    height: 380px;
    background: rgba(5, 10, 5, 0.7);
    border: 2px solid #447744;
    padding: 10px;
}

.map-lines-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cam-btn {
    position: absolute;
    background: #112211;
    border: 2px solid #55aa55;
    color: #ffffff;
    font-family: 'VT323', monospace;
    font-size: 20px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.1s;
}

.cam-btn:hover {
    background: #225522;
    border-color: #88ff88;
}

.cam-btn.active {
    background: #44aa44;
    color: #000000;
    font-weight: bold;
    border-color: #ffffff;
    box-shadow: 0 0 10px #44aa44;
}

.you-marker {
    position: absolute;
    bottom: 25px;
    left: 195px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    color: #44ff44;
}

.you-box {
    width: 12px;
    height: 12px;
    background: #44ff44;
    box-shadow: 0 0 6px #44ff44;
    margin-bottom: 2px;
}

/* Specific Camera Positions on Map */
.cam-1a { top: 20px; left: 190px; }
.cam-1b { top: 90px; left: 190px; }
.cam-1c { top: 160px; left: 145px; }
.cam-5  { top: 110px; left: 40px; }
.cam-2a { top: 250px; left: 145px; }
.cam-2b { top: 310px; left: 145px; }
.cam-3  { top: 240px; left: 40px; }
.cam-4a { top: 250px; left: 280px; }
.cam-4b { top: 310px; left: 280px; }
.cam-6  { top: 240px; left: 370px; }
.cam-7  { top: 110px; left: 370px; }

/* --- CUSTOM NIGHT SCREEN --- */
#custom-night-screen {
    background: #080808;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 100;
}

#custom-night-screen h2 {
    font-size: 52px;
    letter-spacing: 4px;
    margin-bottom: 30px;
    color: #eee;
}

.custom-animatronics-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.anim-card {
    background: #161616;
    border: 3px solid #444;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
}

.anim-card h3 {
    font-size: 28px;
    margin-bottom: 12px;
}

.card-freddy h3 { color: #b87333; }
.card-bonnie h3 { color: #8877cc; }
.card-chica h3 { color: #e6b800; }
.card-foxy h3 { color: #cc4444; }

.ai-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-step-btn {
    background: #333;
    border: 2px solid #666;
    color: #fff;
    font-family: 'VT323', monospace;
    font-size: 32px;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.ai-step-btn:hover {
    background: #555;
}

.ai-level-num {
    font-size: 40px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.custom-actions {
    display: flex;
    gap: 20px;
}

/* --- GAME OVER & WIN SCREENS --- */
#game-over-screen {
    background: radial-gradient(circle, #2a0505 0%, #000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#game-over-screen h1 {
    font-size: 88px;
    color: #ff1111;
    letter-spacing: 8px;
    text-shadow: 0 0 25px #ff0000;
    margin-bottom: 30px;
    animation: titleGlitch 2s infinite;
}

#win-screen {
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.win-clock-large {
    font-size: 120px;
    color: #55ff55;
    text-shadow: 0 0 30px #00ff00;
    letter-spacing: 6px;
    animation: winPulse 1.5s infinite;
}

#win-night-text {
    font-size: 48px;
    margin: 20px 0 40px 0;
    color: #fff;
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* --- HOW TO PLAY MODAL --- */
#how-to-play-modal {
    z-index: 250;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.htp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
}

.modal-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    border: 4px solid #666;
    padding: 30px 40px;
    width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 150;
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
}

.modal-frame.htp-modal-frame {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: min(940px, 95vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 24px 30px;
    background: linear-gradient(180deg, #131614 0%, #0a0c0b 100%);
    border: 3px solid #447755;
    border-radius: 8px;
    box-shadow: 0 0 65px rgba(0, 0, 0, 0.95), 0 0 24px rgba(68, 255, 136, 0.16);
    overflow: hidden;
    z-index: 2;
}

.htp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px dashed rgba(68, 170, 102, 0.45);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.htp-kicker {
    display: block;
    font-size: 18px;
    letter-spacing: 2.5px;
    color: #66bb88;
    margin-bottom: 2px;
}

.modal-frame.htp-modal-frame h2 {
    font-size: 40px;
    margin: 0;
    text-align: left;
    color: #ffdd55;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(255, 221, 85, 0.35);
}

.htp-close-x {
    background: rgba(30, 15, 15, 0.8);
    border: 2px solid #774444;
    color: #ff9999;
    font-family: 'VT323', monospace;
    font-size: 26px;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s ease;
}

.htp-close-x:hover {
    background: #cc3333;
    border-color: #ff8888;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 60, 60, 0.6);
}

.htp-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.htp-tab-btn {
    background: #101712;
    border: 2px solid #2f4f38;
    border-radius: 4px;
    color: #99bb9f;
    font-family: 'VT323', monospace;
    font-size: 21px;
    letter-spacing: 1px;
    padding: 8px 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.htp-tab-btn:hover {
    background: #19291e;
    border-color: #55aa6e;
    color: #e6ffe9;
}

.htp-tab-btn.active {
    background: #1d3b26;
    border-color: #55ff88;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(68, 255, 136, 0.3);
    text-shadow: 0 0 8px rgba(100, 255, 150, 0.6);
}

.htp-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 4px;
}

.htp-panel {
    display: none;
}

.htp-panel.active {
    display: block;
    animation: htpFadeIn 0.18s ease-out;
}

@keyframes htpFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.htp-intro-banner {
    background: rgba(30, 55, 36, 0.45);
    border: 1px solid #3c774c;
    border-left: 4px solid #55ff88;
    border-radius: 4px;
    padding: 10px 16px;
    margin-bottom: 14px;
    font-size: 22px;
    line-height: 1.35;
    color: #e2f5e6;
}

.htp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.htp-card {
    background: rgba(18, 22, 20, 0.92);
    border: 1px solid #2e4435;
    border-radius: 6px;
    padding: 14px 16px;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.45);
}

.htp-card-wide {
    grid-column: 1 / -1;
}

.htp-card.htp-secret-hint {
    background: linear-gradient(135deg, rgba(32, 24, 10, 0.92), rgba(18, 14, 8, 0.95));
    border-color: #886b2d;
}

.htp-card h3 {
    font-size: 25px;
    letter-spacing: 1.5px;
    color: #ffdd66;
    margin-bottom: 8px;
}

.htp-card.htp-secret-hint h3 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
}

.htp-card p {
    font-size: 21px;
    line-height: 1.4;
    color: #d6ded8;
}

.htp-key-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    font-size: 20px;
    color: #d6ded8;
    margin-top: 4px;
}

.htp-key-list div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.htp-modal-frame kbd,
.htp-esc-hint kbd {
    display: inline-block;
    background: #1d2821;
    border: 1px solid #55aa77;
    border-bottom-width: 3px;
    border-radius: 4px;
    padding: 0 7px;
    font-family: 'Share Tech Mono', 'VT323', monospace;
    font-size: 18px;
    color: #88ffbb;
    line-height: 1.3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.htp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px dashed rgba(68, 170, 102, 0.35);
    padding-top: 14px;
    margin-top: 16px;
    gap: 16px;
}

.htp-esc-hint {
    font-size: 20px;
    color: #88998c;
    letter-spacing: 1px;
}

.htp-got-it-btn {
    text-align: center;
    min-width: 200px;
    padding: 8px 26px;
    border-color: #55aa77;
    color: #e8ffee;
}

.htp-got-it-btn:hover {
    background: #55ff88;
    border-color: #ffffff;
    color: #06150a;
    transform: none;
    box-shadow: 0 0 18px rgba(85, 255, 136, 0.65);
}

@media (max-width: 780px) {
    .creator-credit-badge {
        top: 18px;
        right: 24px;
        padding: 6px 12px;
    }
    .title-header {
        max-width: 100%;
        margin-top: 32px;
    }
    .htp-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
    .htp-grid {
        grid-template-columns: 1fr;
    }
    .htp-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

.modal-frame strong {
    color: #44ff88;
}

/* --- ENDO-01 CAM 5 BATTERY & DISCHARGE HUD --- */
#cam5-endo-panel {
    position: absolute;
    top: 85px;
    left: 45px;
    width: 380px;
    background: rgba(10, 18, 12, 0.88);
    border: 2px solid #2d6638;
    border-radius: 6px;
    padding: 16px;
    z-index: 45;
    box-shadow: 0 0 20px rgba(0, 255, 128, 0.2), inset 0 0 15px rgba(0, 40, 20, 0.5);
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.endo-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #2d6638;
    padding-bottom: 8px;
}

.endo-icon {
    font-size: 28px;
}

.endo-title-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.endo-title {
    font-size: 20px;
    letter-spacing: 2px;
    color: #88ffaa;
    text-shadow: 0 0 6px #44ff88;
}

.status-badge {
    display: inline-block;
    font-size: 16px;
    letter-spacing: 1.5px;
    padding: 2px 8px;
    border-radius: 3px;
    width: fit-content;
}

.status-badge.charging {
    background: #113318;
    color: #aaffbb;
    border: 1px solid #33aa55;
    animation: chargingPulse 1.5s infinite alternate;
}

.status-badge.critical {
    background: #441111;
    color: #ffaaaa;
    border: 1px solid #ff3333;
    animation: blinkFast 0.3s infinite;
}

.status-badge.active {
    background: #443311;
    color: #ffdd88;
    border: 1px solid #ffaa00;
}

.status-badge.empty {
    background: #222222;
    color: #888888;
    border: 1px solid #444444;
}

@keyframes chargingPulse {
    0% { box-shadow: 0 0 4px rgba(68, 255, 136, 0.3); }
    100% { box-shadow: 0 0 12px rgba(68, 255, 136, 0.7); }
}

.endo-battery-container {
    margin-bottom: 15px;
}

.battery-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    letter-spacing: 1px;
    color: #dddddd;
    margin-bottom: 6px;
}

.battery-meter-frame {
    position: relative;
    width: 100%;
    height: 26px;
    background: #080c08;
    border: 2px solid #448855;
    border-radius: 4px;
    overflow: hidden;
}

.battery-fill {
    height: 100%;
    transition: width 0.2s ease, background 0.3s ease;
}

.battery-fill.normal {
    background: linear-gradient(90deg, #118833, #33cc66);
    box-shadow: 0 0 8px #33cc66;
}

.battery-fill.warning {
    background: linear-gradient(90deg, #bb8811, #ffaa00);
    box-shadow: 0 0 10px #ffaa00;
}

.battery-fill.critical {
    background: linear-gradient(90deg, #bb2211, #ff2200);
    box-shadow: 0 0 12px #ff2200;
    animation: blinkFast 0.4s infinite;
}

.battery-segments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.battery-segments span {
    width: 2px;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.endo-discharge-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #0d2228;
    border: 2px solid #00ffff;
    color: #ffffff;
    font-family: 'VT323', monospace;
    font-size: 24px;
    letter-spacing: 2px;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.4);
    transition: all 0.15s ease;
}

.endo-discharge-btn:hover:not(:disabled) {
    background: #00ffff;
    color: #000000;
    box-shadow: 0 0 24px #00ffff;
    transform: scale(1.02);
}

.endo-discharge-btn:disabled, .endo-discharge-btn.cooling {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: #555555;
    box-shadow: none;
}

.shock-icon {
    font-size: 26px;
    color: #ffff00;
    text-shadow: 0 0 8px #ffff00;
}

/* --- MAP MODE SWITCHER TABS --- */
.map-mode-tabs {
    position: absolute;
    top: -42px;
    left: 0;
    display: flex;
    gap: 8px;
    z-index: 50;
}

.map-tab-btn {
    background: #0d1a0d;
    border: 2px solid #336633;
    border-bottom: none;
    color: #88cc88;
    font-family: 'VT323', monospace;
    font-size: 20px;
    letter-spacing: 1.5px;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.15s;
}

.map-tab-btn:hover {
    background: #183018;
    color: #ffffff;
}

.map-tab-btn.active {
    background: #1e3e1e;
    color: #ffffff;
    border-color: #66cc66;
    box-shadow: 0 -4px 10px rgba(100, 255, 100, 0.3);
}

#tab-mode-vents.active {
    background: #0a2628;
    border-color: #00ffff;
    color: #aaffff;
    box-shadow: 0 -4px 12px rgba(0, 255, 255, 0.4);
}

/* --- VENTILATION MAP & FLAP CONTROLS --- */
.camera-map-vents {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.vent-lines-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.vent-lines-svg line {
    animation: ventPulse 2s infinite alternate ease-in-out;
}

@keyframes ventPulse {
    0% { stroke-opacity: 0.55; stroke-width: 3.5; }
    100% { stroke-opacity: 0.95; stroke-width: 4.5; }
}

.vent-flap-btn {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(12, 24, 20, 0.92);
    border: 2px solid #00aaaa;
    color: #ffffff;
    font-family: 'VT323', monospace;
    font-size: 16px;
    letter-spacing: 1px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.12s ease;
    z-index: 10;
}

.vent-flap-btn:hover {
    transform: scale(1.05);
}

.vent-flap-btn.open {
    border-color: #00ffaa;
    box-shadow: 0 0 8px rgba(0, 255, 170, 0.4);
}

.vent-flap-btn.closed {
    background: rgba(35, 10, 10, 0.95);
    border-color: #ff3333;
    color: #ff9999;
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.6);
    animation: flapClosedGlow 1.2s infinite alternate;
}

@keyframes flapClosedGlow {
    0% { box-shadow: 0 0 6px #ff3333; }
    100% { box-shadow: 0 0 14px #ff3333; }
}

.vent-flap-btn.office-flap {
    font-size: 18px;
    padding: 6px 12px;
    border-width: 2.5px;
}

.flap-label {
    font-weight: bold;
}

.flap-status-text {
    font-size: 13px;
    opacity: 0.85;
}

/* --- OFFICE ENDO INTRUDER 10s ALERT --- */
#office-endo-alert {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    pointer-events: none;
    animation: alertStrobe 0.5s infinite alternate;
}

.endo-alert-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(30, 0, 0, 0.92);
    border: 3px solid #ff0033;
    border-radius: 8px;
    padding: 10px 24px;
    box-shadow: 0 0 30px #ff0033;
}

.alert-icon {
    font-size: 36px;
    animation: blinkFast 0.25s infinite;
}

.alert-text-block {
    text-align: center;
}

.alert-title {
    font-size: 32px;
    letter-spacing: 3px;
    color: #ffffff;
    text-shadow: 0 0 10px #ff0033;
}

.alert-sub {
    font-size: 24px;
    letter-spacing: 2px;
    color: #ffbbbb;
}

.alert-sub strong {
    font-size: 32px;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

@keyframes alertStrobe {
    0% { transform: translateX(-50%) scale(1); filter: brightness(1); }
    100% { transform: translateX(-50%) scale(1.03); filter: brightness(1.25); }
}

/* ==========================================================================
   FREE-ROAM (6:00 AM) WALKING MODE & INTERACTION STYLES
   ========================================================================== */

/* 6:00 AM Celebratory Notification Banner */
#roam-6am-banner {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
    transition: opacity 1.5s ease-out;
}

#roam-6am-banner.fade-banner {
    opacity: 0.2;
}

#roam-6am-banner:hover,
#roam-6am-banner.fade-banner:hover {
    opacity: 1;
}

.banner-box {
    background: rgba(10, 24, 14, 0.94);
    border: 3px solid #00ff66;
    border-radius: 12px;
    padding: 14px 32px;
    box-shadow: 0 0 35px rgba(0, 255, 102, 0.6), inset 0 0 20px rgba(0, 255, 102, 0.2);
    text-align: center;
    max-width: 780px;
    animation: bannerPop 0.6s ease-out;
}

@keyframes bannerPop {
    0% { transform: scale(0.7); opacity: 0; }
    80% { transform: scale(1.04); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.banner-title {
    font-size: 38px;
    color: #ffffff;
    letter-spacing: 3px;
    text-shadow: 0 0 14px #00ff66;
    margin-bottom: 4px;
}

.banner-desc {
    font-size: 22px;
    color: #88ffaa;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.banner-controls {
    font-size: 20px;
    color: #ffffff;
    border-top: 1px solid rgba(0, 255, 102, 0.35);
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.banner-controls strong {
    color: #ffff33;
    text-shadow: 0 0 8px #ffff33;
}

.banner-sub {
    font-size: 18px;
    color: #aaddbb;
}

/* Free-Roam HUD Indicator (Top Left) */
#roam-hud-indicator {
    position: absolute;
    top: 25px;
    left: 25px;
    z-index: 80;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.roam-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(12, 30, 18, 0.85);
    border: 2px solid #00ff66;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 22px;
    color: #ffffff;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.35);
}

.roam-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00ff66;
    box-shadow: 0 0 10px #00ff66;
    animation: blink 0.8s infinite alternate;
}

.roam-tips {
    font-size: 16px;
    color: #aaccbb;
    letter-spacing: 1px;
}

/* Crosshair in Screen Center */
#roam-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: 70;
    text-shadow: 0 0 4px #000000;
}

/* 3D Contextual Interaction Prompt */
#roam-interaction-prompt {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 85;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

#roam-interaction-prompt:hover {
    transform: translateX(-50%) scale(1.06);
    filter: brightness(1.2);
}

.prompt-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(14, 20, 28, 0.95);
    border: 3px solid #00f0ff;
    border-radius: 12px;
    padding: 12px 28px;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5), inset 0 0 15px rgba(0, 240, 255, 0.2);
    animation: promptFloat 1.2s infinite alternate ease-in-out;
}

@keyframes promptFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

#prompt-icon {
    font-size: 38px;
}

.prompt-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

#prompt-title {
    font-size: 26px;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #00f0ff;
}

#prompt-key {
    font-size: 19px;
    color: #00ffcc;
    letter-spacing: 1px;
}

/* ==========================================================================
   RETRO SNAKE ARCADE CABINET MODAL (SZAFA GRAJĄCA)
   ========================================================================== */

#snake-arcade-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(4, 8, 12, 0.88);
    backdrop-filter: blur(8px);
    z-index: 120;
}

.snake-cabinet-frame {
    background: linear-gradient(180deg, #18222b 0%, #0d1217 100%);
    border: 4px solid #00ff66;
    border-radius: 16px;
    box-shadow: 0 0 45px rgba(0, 255, 102, 0.4), inset 0 0 25px rgba(0, 255, 102, 0.15);
    padding: 18px 24px;
    width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: cabinetAppear 0.3s ease-out;
}

@keyframes cabinetAppear {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Marquee Header */
.snake-cabinet-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #08150c;
    border: 2px solid #00ff66;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.cabinet-marquee-title {
    font-size: 24px;
    color: #00ff66;
    letter-spacing: 2px;
    text-shadow: 0 0 8px #00ff66;
}

.cabinet-exit-btn {
    background: #440d12;
    border: 2px solid #ff3344;
    border-radius: 6px;
    color: #ffffff;
    font-family: 'VT323', monospace;
    font-size: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.cabinet-exit-btn:hover {
    background: #ff2233;
    transform: scale(1.05);
    box-shadow: 0 0 12px #ff2233;
}

/* Scoreboard */
.snake-scoreboard {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #091017;
    border: 1px solid #1a3325;
    border-radius: 6px;
    padding: 6px 14px;
    margin-bottom: 10px;
}

.score-block {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.score-lbl {
    font-size: 18px;
    color: #88aa99;
}

.score-val {
    font-size: 26px;
    color: #00ff66;
    text-shadow: 0 0 8px #00ff66;
}

.score-actions {
    display: flex;
    gap: 8px;
}

.snake-btn {
    background: #11281a;
    border: 1px solid #00ff66;
    border-radius: 4px;
    color: #ffffff;
    font-family: 'VT323', monospace;
    font-size: 18px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.snake-btn:hover {
    background: #00ff66;
    color: #000000;
}

/* CRT Screen Frame */
.snake-screen-container {
    position: relative;
    width: 400px;
    height: 400px;
    border: 4px solid #111a22;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 255, 102, 0.2);
}

#snake-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #051108;
}

.snake-crt-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(rgba(18, 25, 20, 0) 50%, rgba(0, 0, 0, 0.35) 50%);
    background-size: 100% 4px;
}

/* Game Over Screen Overlay */
#snake-gameover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 4, 4, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
}

.snake-go-box {
    text-align: center;
}

.snake-go-box h2 {
    font-size: 48px;
    color: #ff3344;
    text-shadow: 0 0 15px #ff2233;
    margin-bottom: 8px;
}

.snake-go-box p {
    font-size: 26px;
    color: #ffffff;
    margin-bottom: 6px;
}

.snake-go-box .blink {
    font-size: 20px;
    color: #00ff66;
    animation: blink 0.7s infinite alternate;
}

/* Control Panel with On-Screen D-Pad */
.snake-control-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.dpad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-bottom: 6px;
}

.dpad-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.dpad-btn {
    width: 52px;
    height: 42px;
    background: #15222d;
    border: 2px solid #00ff66;
    border-radius: 8px;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.1s ease, transform 0.1s ease;
}

.dpad-btn:hover {
    background: #00ff66;
    color: #000000;
}

.dpad-btn:active {
    transform: scale(0.92);
}

.dpad-center {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #00ff66;
    font-size: 14px;
}

.snake-keys-hint {
    font-size: 16px;
    color: #779988;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   SHIFT END & TRANSITION TO NIGHT 2 SCREEN
   ========================================================================== */

#shift-transition-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #0e1e12 0%, #030805 100%);
    z-index: 150;
}

.shift-trans-box {
    text-align: center;
    max-width: 650px;
    padding: 30px;
    animation: fadeIn 0.8s ease-in;
}

.shift-trans-icon {
    font-size: 64px;
    margin-bottom: 12px;
    animation: sunPulse 2s infinite alternate ease-in-out;
}

@keyframes sunPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 10px #ffaa00); }
    100% { transform: scale(1.12); filter: drop-shadow(0 0 25px #ffee55); }
}

.shift-trans-box h1 {
    font-size: 52px;
    color: #ffffff;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(0, 255, 102, 0.8);
    margin-bottom: 8px;
}

.shift-trans-sub {
    font-size: 24px;
    color: #99ffbb;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.shift-trans-badge {
    display: inline-block;
    background: rgba(0, 255, 102, 0.15);
    border: 3px solid #00ff66;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 34px;
    color: #00ff66;
    letter-spacing: 3px;
    text-shadow: 0 0 15px #00ff66;
    margin-bottom: 16px;
}

.shift-trans-loading {
    font-size: 26px;
    color: #ffeedd;
    letter-spacing: 2px;
    animation: blink 0.9s infinite alternate;
}

/* ========================================================= */
/* --- 11. SECRET ENDING FULLSCREEN OVERLAY --- */
/* ========================================================= */

#secret-ending-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #020202;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    animation: fadeInEnding 1.2s ease forwards;
}

@keyframes fadeInEnding {
    from { opacity: 0; background: #000; }
    to { opacity: 1; background: radial-gradient(circle, #1a1505 0%, #030303 80%); }
}

.secret-ending-frame {
    text-align: center;
    border: 4px double #d4a017;
    background: rgba(10, 8, 2, 0.92);
    box-shadow: 0 0 60px rgba(212, 160, 23, 0.4), inset 0 0 40px rgba(0, 0, 0, 0.9);
    padding: 40px 60px;
    border-radius: 12px;
    font-family: 'VT323', monospace;
    user-select: none;
    max-width: 700px;
    animation: pulseBorder 2.5s infinite alternate ease-in-out;
}

@keyframes pulseBorder {
    0% { border-color: #d4a017; box-shadow: 0 0 30px rgba(212, 160, 23, 0.3); }
    100% { border-color: #ffe066; box-shadow: 0 0 70px rgba(255, 224, 102, 0.6); }
}

.secret-ending-stars {
    font-size: 32px;
    color: #ffd700;
    letter-spacing: 12px;
    text-shadow: 0 0 15px #ffd700;
    margin-bottom: 12px;
}

.secret-ending-title {
    font-size: 76px;
    color: #ffd700;
    letter-spacing: 8px;
    text-shadow: 0 0 25px rgba(255, 215, 0, 0.9), 0 0 50px rgba(255, 170, 0, 0.5);
    margin: 0 0 8px 0;
    animation: textFlicker 3s infinite alternate;
}

@keyframes textFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.7; }
    94% { opacity: 1; }
    97% { opacity: 0.85; }
}

.secret-ending-subtitle {
    font-size: 34px;
    color: #fff2a8;
    letter-spacing: 4px;
    text-shadow: 0 0 12px rgba(255, 242, 168, 0.7);
    margin-bottom: 16px;
}

.secret-ending-lore {
    font-size: 26px;
    color: #ff7755;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 80, 50, 0.8);
    margin-bottom: 24px;
}

.secret-ending-timer-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}

.secret-ending-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #d4a017, #fff066);
    box-shadow: 0 0 10px #ffe066;
    animation: endingProgress 4.2s linear forwards;
}

@keyframes endingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.secret-ending-footer {
    font-size: 22px;
    color: #888888;
    letter-spacing: 2px;
    animation: blink 0.8s infinite alternate;
}

/* ==========================================================================
   12. NIGHT 6 MENU, NEWSPAPER MODAL, ESCAPE CHASE BANNER & GOOD/BAD ENDINGS
   ========================================================================== */

.ending-stars-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.ending-badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 22px;
    letter-spacing: 2px;
    font-family: 'VT323', monospace;
}

.ending-badge-pill.badge-good {
    background: rgba(255, 195, 50, 0.16);
    border: 2px solid #ffcc44;
    color: #ffe27a;
    text-shadow: 0 0 10px rgba(255, 204, 68, 0.8);
}

.ending-badge-pill.badge-bad {
    background: rgba(220, 30, 30, 0.18);
    border: 2px solid #ff3b3b;
    color: #ff8888;
    text-shadow: 0 0 10px rgba(255, 50, 50, 0.8);
}

.ending-badge-pill.badge-secret {
    background: rgba(212, 160, 23, 0.2);
    border: 2px solid #ffd700;
    color: #fff099;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.9);
}

.menu-btn-night6 {
    border-color: #cc4422;
    color: #ffbb88;
    text-shadow: 0 0 8px rgba(255, 100, 40, 0.6);
}

.menu-btn-night6:hover {
    background: #ff4422;
    border-color: #ffaa66;
    color: #ffffff;
    box-shadow: 0 0 22px rgba(255, 68, 34, 0.8);
}

/* --- 6:00 AM Escape Chase Warning Banner --- */
#chase-warning-banner {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 65;
    pointer-events: none;
    width: min(760px, 90vw);
}

.chase-banner-box {
    background: rgba(28, 12, 4, 0.92);
    border: 3px solid #ffaa22;
    border-radius: 8px;
    padding: 14px 26px;
    text-align: center;
    box-shadow: 0 0 28px rgba(255, 150, 20, 0.55);
}

#chase-warning-banner.chase-active-mode .chase-banner-box {
    background: rgba(38, 4, 4, 0.92);
    border-color: #ff2222;
    box-shadow: 0 0 36px rgba(255, 20, 20, 0.75);
    animation: chaseAlertPulse 0.65s infinite alternate;
}

@keyframes chaseAlertPulse {
    from { transform: scale(1); }
    to { transform: scale(1.025); }
}

.chase-banner-title {
    font-size: 36px;
    color: #ffdd55;
    letter-spacing: 3px;
    text-shadow: 0 0 12px rgba(255, 180, 30, 0.9);
    margin-bottom: 4px;
}

#chase-warning-banner.chase-active-mode .chase-banner-title {
    color: #ff4444;
    text-shadow: 0 0 16px #ff0000;
}

.chase-banner-sub {
    font-size: 23px;
    color: #f5efe6;
    letter-spacing: 1px;
}

.chase-banner-sub strong {
    color: #ffdd44;
}

/* --- Night 6 Desk Newspaper Inspection Modal --- */
#desk-newspaper-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

.desk-newspaper-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(4px);
}

.desk-newspaper-dialog {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 26px;
    align-items: center;
    background: #14110e;
    border: 3px solid #8a7352;
    border-radius: 10px;
    padding: 22px 28px;
    max-width: 880px;
    max-height: 90vh;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.95), 0 0 28px rgba(210, 160, 80, 0.25);
    animation: fadeIn 0.28s ease-out;
}

.desk-newspaper-img-wrap {
    flex: 0 0 auto;
    border: 3px solid #3a3024;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
}

.desk-newspaper-img-wrap img {
    display: block;
    max-height: 74vh;
    width: auto;
    max-width: 420px;
    object-fit: contain;
}

.desk-newspaper-caption {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 370px;
}

.desk-newspaper-caption h3 {
    font-size: 32px;
    color: #ffd266;
    letter-spacing: 2px;
    line-height: 1.15;
}

.desk-newspaper-caption p {
    font-size: 23px;
    line-height: 1.45;
    color: #ded6c8;
}

.desk-newspaper-caption p strong {
    color: #ff6655;
}

.desk-np-close-btn {
    text-align: center;
    border-color: #d4a044;
    color: #ffe299;
    margin-top: 6px;
}

/* --- Fullscreen Good Ending & Bad Ending Screens --- */
#good-ending-screen,
#bad-ending-screen {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    animation: endingScreenFade 0.9s ease forwards;
}

#good-ending-screen {
    background: radial-gradient(circle at center, #241908 0%, #060503 85%);
}

#bad-ending-screen {
    background: radial-gradient(circle at center, #260505 0%, #040101 85%);
}

@keyframes endingScreenFade {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.ending-showcase-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(980px, 94vw);
    max-height: 94vh;
    background: rgba(10, 10, 12, 0.94);
    border-radius: 12px;
    overflow: hidden;
    padding: 22px 30px 26px;
}

.good-ending-card {
    border: 4px double #f5b942;
    box-shadow: 0 0 65px rgba(245, 185, 66, 0.38), inset 0 0 35px rgba(0, 0, 0, 0.85);
}

.bad-ending-card {
    border: 4px double #e02424;
    box-shadow: 0 0 70px rgba(224, 36, 36, 0.45), inset 0 0 40px rgba(0, 0, 0, 0.9);
}

.ending-artwork-frame {
    position: relative;
    width: 100%;
    max-height: 54vh;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 18px;
    background: #000;
}

.ending-artwork-frame img {
    display: block;
    width: 100%;
    max-height: 54vh;
    object-fit: cover;
}

.ending-artwork-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 45px rgba(0, 0, 0, 0.72);
}

.ending-artwork-vignette.bad-vignette {
    box-shadow: inset 0 0 60px rgba(80, 0, 0, 0.78);
}

.ending-info-panel {
    text-align: center;
    max-width: 820px;
}

.ending-stars-row {
    font-size: 24px;
    letter-spacing: 5px;
    margin-bottom: 4px;
}

.good-stars {
    color: #ffd666;
    text-shadow: 0 0 12px rgba(255, 214, 102, 0.8);
}

.bad-stars {
    color: #ff5555;
    text-shadow: 0 0 12px rgba(255, 60, 60, 0.8);
}

.ending-main-title {
    font-size: 72px;
    letter-spacing: 8px;
    line-height: 1.0;
    margin-bottom: 10px;
}

.good-title {
    color: #ffdf73;
    text-shadow: 0 0 24px rgba(255, 200, 60, 0.9), 0 0 50px rgba(255, 140, 20, 0.5);
}

.bad-title {
    color: #ff2e2e;
    text-shadow: 0 0 24px rgba(255, 30, 30, 0.95), 3px 3px 0 #440000;
    animation: titleGlitch 3.2s infinite;
}

.ending-lore-text {
    font-size: 24px;
    line-height: 1.38;
    color: #e6e2da;
    margin-bottom: 18px;
    letter-spacing: 0.8px;
}

.ending-return-btn {
    display: inline-block;
    text-align: center;
    min-width: 280px;
    border-color: #f5b942;
    color: #ffe89e;
}

.bad-return-btn {
    border-color: #e02424;
    color: #ffaaaa;
}

.bad-return-btn:hover {
    background: #e02424;
    border-color: #ff7777;
    color: #ffffff;
    box-shadow: 0 0 24px rgba(224, 36, 36, 0.85);
}


