/* ============================================
   FNAF Browser Game - Complete Stylesheet
   ============================================ */

/* CSS Variables for theming */
:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --accent-red: #8b0000;
    --accent-orange: #ff6600;
    --text-primary: #e0e0e0;
    --text-dim: #666;
    --warning-red: #ff0000;
    --power-green: #00ff00;
    --power-yellow: #ffff00;
    --power-red: #ff0000;
    --static-color: rgba(255, 255, 255, 0.03);
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Special Elite', monospace;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    cursor: default;
    user-select: none;
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 10;
}

.screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   TITLE SCREEN
   ============================================ */
#title-screen {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a0a 100%);
    flex-direction: column;
}

.title-container {
    text-align: center;
    position: relative;
    z-index: 2;
}

.static-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.3) 2px,
            rgba(0, 0, 0, 0.3) 4px);
    pointer-events: none;
    z-index: 1;
    animation: staticFlicker 0.1s infinite;
}

@keyframes staticFlicker {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.5;
    }
}

.game-title {
    font-family: 'Creepster', cursive;
    font-size: 4rem;
    color: var(--accent-red);
    text-shadow:
        0 0 10px rgba(139, 0, 0, 0.8),
        0 0 20px rgba(139, 0, 0, 0.6),
        0 0 40px rgba(139, 0, 0, 0.4),
        4px 4px 0 #000;
    letter-spacing: 4px;
    line-height: 1.2;
    animation: titlePulse 2s ease-in-out infinite;
}

.game-title span {
    font-size: 5rem;
    color: #cc0000;
    display: block;
}

@keyframes titlePulse {

    0%,
    100% {
        text-shadow:
            0 0 10px rgba(139, 0, 0, 0.8),
            0 0 20px rgba(139, 0, 0, 0.6),
            0 0 40px rgba(139, 0, 0, 0.4),
            4px 4px 0 #000;
    }

    50% {
        text-shadow:
            0 0 20px rgba(200, 0, 0, 1),
            0 0 40px rgba(200, 0, 0, 0.8),
            0 0 60px rgba(200, 0, 0, 0.6),
            4px 4px 0 #000;
    }
}

.menu-options {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.menu-btn {
    font-family: 'Special Elite', monospace;
    font-size: 1.3rem;
    padding: 15px 50px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #444;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    min-width: 250px;
}

.menu-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border-color: var(--accent-red);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.5);
}

.menu-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.copyright {
    margin-top: 60px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ============================================
   NIGHT SELECT SCREEN
   ============================================ */
#night-select-screen {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a0505 100%);
}

.night-select-container {
    text-align: center;
}

.night-select-container h2 {
    font-family: 'Creepster', cursive;
    font-size: 3rem;
    color: var(--accent-red);
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.6);
}

.night-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.night-btn {
    font-family: 'Creepster', cursive;
    font-size: 1.5rem;
    padding: 30px 20px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid #333;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.night-btn:hover {
    background: linear-gradient(180deg, var(--accent-red) 0%, #500000 100%);
    border-color: #ff0000;
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.8);
}

.night-btn.locked {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================
   LOADING SCREEN
   ============================================ */
#loading-screen {
    background: #000;
}

.loading-content {
    text-align: center;
}

.loading-content h2 {
    font-family: 'Special Elite', monospace;
    font-size: 5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.night-text {
    font-size: 2rem;
    color: var(--text-dim);
    margin-bottom: 40px;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: var(--text-primary);
    animation: loadingAnim 2s ease-in-out forwards;
}

@keyframes loadingAnim {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* ============================================
   GAME SCREEN - OFFICE VIEW
   ============================================ */
#game-screen {
    background: #050505;
    display: none;
}

#game-screen.active {
    display: block;
}

#office-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.office-view {
    display: flex;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0808 0%, #151010 50%, #0a0808 100%);
    position: relative;
}

/* Door Areas */
.door-area {
    width: 25%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.left-door-area {
    background: linear-gradient(90deg, #080808 0%, #101010 100%);
}

.right-door-area {
    background: linear-gradient(270deg, #080808 0%, #101010 100%);
}

/* Hallways */
.hallway {
    flex: 1;
    position: relative;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.left-hallway {
    background: linear-gradient(180deg, #0a0a0a 0%, #000 50%, #0a0a0a 100%);
    border-right: 3px solid #1a1a1a;
}

.right-hallway {
    background: linear-gradient(180deg, #0a0a0a 0%, #000 50%, #0a0a0a 100%);
    border-left: 3px solid #1a1a1a;
}

.hallway-content {
    width: 80%;
    height: 80%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animatronic shadows in hallways */
.animatronic-shadow {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: #1a1a1a;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
    animation: shadowFloat 2s ease-in-out infinite;
}

.animatronic-shadow.visible {
    display: flex;
}

.animatronic-shadow.lit {
    color: #ff6600;
    text-shadow: 0 0 30px rgba(255, 100, 0, 0.8);
}

@keyframes shadowFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Doors */
.door {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            #2a2a2a 0%,
            #1a1a1a 10%,
            #222 50%,
            #1a1a1a 90%,
            #2a2a2a 100%);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.8);
}

.left-door {
    border-right: 4px solid #333;
}

.right-door {
    border-left: 4px solid #333;
}

.door.closed {
    transform: translateY(0);
}

.door-texture {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 30px,
            rgba(0, 0, 0, 0.2) 30px,
            rgba(0, 0, 0, 0.2) 32px);
}

/* Door Controls */
.door-controls {
    position: absolute;
    bottom: 20%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
}

.left-controls {
    right: 10px;
}

.right-controls {
    left: 10px;
}

.door-btn,
.light-btn {
    font-family: 'Special Elite', monospace;
    font-size: 0.9rem;
    padding: 12px 20px;
    border: 2px solid #444;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 80px;
}

.door-btn {
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    color: #aaa;
}

.door-btn:hover {
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
    border-color: #666;
}

.door-btn.active {
    background: linear-gradient(180deg, #00aa00 0%, #006600 100%);
    border-color: #00ff00;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

.light-btn {
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    color: #aaa;
}

.light-btn:hover {
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
}

.light-btn.active {
    background: linear-gradient(180deg, #aaaa00 0%, #666600 100%);
    border-color: #ffff00;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.4);
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-label {
    font-size: 0.7rem;
    letter-spacing: 1px;
}

/* Central Office */
.office-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at center, #151515 0%, #0a0a0a 70%, #050505 100%);
}

.office-desk {
    position: absolute;
    bottom: 10%;
    width: 60%;
    padding: 30px;
}

.desk-items {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.monitor-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 20px;
    border: 2px solid #333;
    border-radius: 10px;
    background: rgba(20, 20, 20, 0.8);
    transition: all 0.3s ease;
}

.monitor-icon:hover {
    border-color: #666;
    background: rgba(40, 40, 40, 0.8);
    transform: scale(1.05);
}

.monitor-screen {
    width: 80px;
    height: 60px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 3px solid #444;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.monitor-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.03) 2px,
            rgba(0, 255, 0, 0.03) 4px);
    animation: scanline 0.1s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(4px);
    }
}

.monitor-icon span {
    font-size: 0.9rem;
    color: #888;
    letter-spacing: 2px;
}

/* Fan */
.fan {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    background: #1a1a1a;
    border: 3px solid #333;
}

.fan-blade {
    position: absolute;
    width: 30px;
    height: 6px;
    background: #444;
    top: 50%;
    left: 50%;
    transform-origin: 0 50%;
    border-radius: 3px;
}

.fan-blade:nth-child(1) {
    transform: rotate(0deg);
}

.fan-blade:nth-child(2) {
    transform: rotate(120deg);
}

.fan-blade:nth-child(3) {
    transform: rotate(240deg);
}

.fan {
    animation: fanSpin 0.5s linear infinite;
}

@keyframes fanSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Poster */
.office-poster {
    position: absolute;
    top: 15%;
    width: 150px;
    height: 200px;
    background: linear-gradient(180deg, #2a2020 0%, #1a1515 100%);
    border: 5px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-2deg);
}

.poster-content {
    font-family: 'Creepster', cursive;
    font-size: 1.2rem;
    color: #aa8800;
    text-align: center;
    text-shadow: 2px 2px 0 #000;
}

/* ============================================
   CAMERA OVERLAY
   ============================================ */
#camera-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#camera-overlay.hidden {
    display: none;
}

.monitor-frame {
    width: 90%;
    height: 80%;
    background: #0a0a0a;
    border: 8px solid #222;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 100, 0, 0.2);
}

.monitor-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%23111" width="100" height="100"/></svg>');
    opacity: 0;
    z-index: 10;
    pointer-events: none;
}

.monitor-static.active {
    opacity: 1;
    animation: staticNoise 0.1s steps(5) infinite;
}

@keyframes staticNoise {
    0% {
        background: repeating-radial-gradient(circle at 50% 50%,
                transparent,
                rgba(255, 255, 255, 0.03) 1px);
    }

    25% {
        background: repeating-radial-gradient(circle at 30% 70%,
                transparent,
                rgba(255, 255, 255, 0.05) 2px);
    }

    50% {
        background: repeating-radial-gradient(circle at 80% 20%,
                transparent,
                rgba(255, 255, 255, 0.02) 1px);
    }

    75% {
        background: repeating-radial-gradient(circle at 60% 40%,
                transparent,
                rgba(255, 255, 255, 0.04) 2px);
    }
}

.camera-view {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
}

.camera-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #0f0;
    font-size: 1.5rem;
    position: relative;
}

.camera-static-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 50, 0, 0.1) 2px,
            rgba(0, 50, 0, 0.1) 4px);
    pointer-events: none;
    animation: cameraLines 0.05s linear infinite;
}

@keyframes cameraLines {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(4px);
    }
}

.camera-ui {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 20;
}

/* Current camera info - positioned at top left of entire monitor */
.current-cam-info {
    position: fixed;
    top: calc(10% + 25px);
    left: calc(5% + 25px);
    color: #0f0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: rgba(0, 30, 0, 0.95);
    padding: 12px 18px;
    border: 2px solid #0a0;
    border-radius: 5px;
    z-index: 60;
    box-shadow: 0 0 15px rgba(0, 100, 0, 0.5);
}

#current-cam-id {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
}

#current-cam-name {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
}

/* Visual Facility Map */
.camera-map {
    background: rgba(0, 15, 0, 0.95);
    border: 2px solid #0a0;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 100, 0, 0.3);
}

.map-title {
    text-align: center;
    color: #0f0;
    font-size: 0.85rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #0a0;
    letter-spacing: 2px;
}

.facility-layout {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.map-row {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.map-row.extra-cams {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #063;
}

/* Camera buttons - redesigned */
.cam-btn {
    font-family: 'Special Elite', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 50px;
    padding: 5px;
    background: rgba(0, 40, 0, 0.8);
    border: 2px solid #0a0;
    color: #0f0;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 4px;
}

.cam-btn:hover {
    background: rgba(0, 80, 0, 0.9);
    border-color: #0f0;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
}

.cam-btn.active {
    background: rgba(0, 120, 0, 0.95);
    border-color: #0f0;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
}

.cam-btn .cam-label {
    font-size: 1rem;
    font-weight: bold;
}

.cam-btn .cam-name {
    font-size: 0.55rem;
    opacity: 0.8;
    letter-spacing: 1px;
}

/* Special button accents */
.cam-btn.stage-btn {
    background: rgba(60, 40, 0, 0.8);
    border-color: #a80;
}

.cam-btn.stage-btn:hover,
.cam-btn.stage-btn.active {
    background: rgba(100, 70, 0, 0.9);
    border-color: #fc0;
}

.cam-btn.pirate-btn {
    background: rgba(60, 0, 0, 0.8);
    border-color: #a00;
}

.cam-btn.pirate-btn:hover,
.cam-btn.pirate-btn.active {
    background: rgba(100, 0, 0, 0.9);
    border-color: #f00;
}

/* YOU ARE HERE indicator */
.office-indicator {
    width: 70px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 60, 100, 0.6);
    border: 2px solid #0af;
    border-radius: 4px;
    animation: youPulse 1.5s ease-in-out infinite;
}

.office-indicator .you-icon {
    font-size: 1.2rem;
}

.office-indicator .you-label {
    font-size: 0.6rem;
    color: #0af;
    font-weight: bold;
    letter-spacing: 2px;
}

@keyframes youPulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 170, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 15px rgba(0, 170, 255, 0.8);
    }
}

/* Remove old styles */
.map-container {
    display: none;
}

.current-cam {
    display: none;
}

.recording-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #f00;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rec-dot {
    width: 10px;
    height: 10px;
    background: #f00;
    border-radius: 50%;
    animation: recBlink 1s ease-in-out infinite;
}

@keyframes recBlink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0.3;
    }
}

.camera-close-btn {
    font-family: 'Special Elite', monospace;
    font-size: 1rem;
    padding: 15px 30px;
    background: rgba(20, 20, 20, 0.9);
    border: 2px solid #444;
    color: #aaa;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s ease;
}

.camera-close-btn:hover {
    background: rgba(40, 40, 40, 0.9);
    border-color: #666;
    color: #fff;
}

/* Camera Room Displays */
.camera-room {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.room-visual {
    font-size: 10rem;
    opacity: 0.3;
    margin-bottom: 20px;
}

.room-name {
    font-size: 1.5rem;
    color: #0f0;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.animatronic-display {
    position: absolute;
    font-size: 12rem;
    color: #ff6600;
    text-shadow: 0 0 30px rgba(255, 100, 0, 0.8);
    animation: animatronicStare 3s ease-in-out infinite;
}

@keyframes animatronicStare {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* ============================================
   HUD
   ============================================ */
#game-hud {
    position: fixed;
    z-index: 40;
    pointer-events: none;
}

.time-display {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px #000;
}

.night-display {
    position: fixed;
    top: 70px;
    right: 30px;
    font-size: 1.2rem;
    color: var(--text-dim);
}

.power-display {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.power-label {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.power-value {
    font-size: 2rem;
    color: var(--power-green);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.power-value.warning {
    color: var(--power-yellow);
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

.power-value.critical {
    color: var(--power-red);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: powerPulse 0.5s ease-in-out infinite;
}

@keyframes powerPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.power-bar {
    width: 150px;
    height: 10px;
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
    overflow: hidden;
}

.power-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--power-green), #00cc00);
    transition: width 0.3s ease;
}

.power-fill.warning {
    background: linear-gradient(90deg, var(--power-yellow), #cccc00);
}

.power-fill.critical {
    background: linear-gradient(90deg, var(--power-red), #cc0000);
}

.usage-display {
    font-size: 0.8rem;
    color: var(--text-dim);
}

#usage-bars {
    color: var(--power-green);
    letter-spacing: 3px;
}

/* ============================================
   JUMP SCARE OVERLAY
   ============================================ */
#jumpscare-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

#jumpscare-overlay.hidden {
    display: none;
}

.jumpscare-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: jumpscareShake 0.3s linear infinite;
}

@keyframes jumpscareShake {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-20px, 10px) scale(1.1);
    }

    50% {
        transform: translate(20px, -10px) scale(0.95);
    }

    75% {
        transform: translate(-10px, -20px) scale(1.05);
    }
}

.jumpscare-animatronic {
    font-size: 40rem;
    color: #ff3300;
    text-shadow:
        0 0 50px rgba(255, 50, 0, 1),
        0 0 100px rgba(255, 50, 0, 0.8);
    animation: jumpscarePulse 0.1s linear infinite;
}

@keyframes jumpscarePulse {

    0%,
    100% {
        opacity: 1;
        filter: brightness(1);
    }

    50% {
        opacity: 0.9;
        filter: brightness(1.5);
    }
}

/* ============================================
   POWER OUT OVERLAY
   ============================================ */
#powerout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
}

#powerout-overlay.hidden {
    display: none;
}

.freddy-face {
    font-size: 15rem;
    color: #1a1a1a;
    animation: freddyFlicker 2s ease-in-out infinite;
}

@keyframes freddyFlicker {

    0%,
    90%,
    100% {
        opacity: 0;
    }

    10%,
    30%,
    50%,
    70% {
        opacity: 0.1;
    }

    20%,
    40%,
    60%,
    80% {
        opacity: 0.3;
    }
}

/* ============================================
   GAME OVER SCREEN
   ============================================ */
#gameover-screen {
    background: #000;
}

.gameover-content {
    text-align: center;
}

.gameover-text {
    font-family: 'Creepster', cursive;
    font-size: 5rem;
    color: var(--accent-red);
    text-shadow:
        0 0 20px rgba(139, 0, 0, 0.8),
        4px 4px 0 #000;
    margin-bottom: 50px;
    animation: gameoverFlicker 1s ease-in-out infinite;
}

@keyframes gameoverFlicker {

    0%,
    92%,
    100% {
        opacity: 1;
    }

    93%,
    99% {
        opacity: 0.8;
    }

    95%,
    97% {
        opacity: 0.3;
    }
}

/* ============================================
   VICTORY SCREEN
   ============================================ */
#victory-screen {
    background: linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
}

.victory-content {
    text-align: center;
}

.victory-time {
    font-family: 'Special Elite', monospace;
    font-size: 6rem;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    animation: victoryGlow 2s ease-in-out infinite;
}

@keyframes victoryGlow {

    0%,
    100% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    }

    50% {
        text-shadow: 0 0 50px rgba(255, 255, 255, 0.5);
    }
}

.victory-message {
    margin: 40px 0;
    font-size: 1.5rem;
    color: var(--text-dim);
}

.night-complete {
    color: var(--accent-orange);
    font-size: 2rem;
    margin-top: 20px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}

.flicker {
    animation: flickerEffect 0.15s linear infinite;
}

@keyframes flickerEffect {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }

    .game-title span {
        font-size: 3rem;
    }

    .night-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .door-controls {
        padding: 10px;
    }

    .door-btn,
    .light-btn {
        padding: 8px 12px;
        min-width: 60px;
    }

    .btn-icon {
        font-size: 1.2rem;
    }

    .cam-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
}