* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #05080b;
    color: #dce8ec;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.hidden {
    display: none !important;
}


/* START SCREEN */

.screen {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at center, #17242b 0%, #05080b 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.start-card,
.end-card {
    width: min(92%, 560px);
    padding: 42px 32px;
    background: rgba(10, 17, 21, .97);
    border: 1px solid #344850;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0,0,0,.8);
}

.shield {
    font-size: 60px;
    margin-bottom: 15px;
}

.start-card h1,
.end-card h1 {
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.start-card p,
.end-card p {
    color: #91a4ab;
    line-height: 1.6;
}

.mission {
    margin: 25px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mission div {
    padding: 13px;
    background: #101a1f;
    border: 1px solid #27383f;
    border-radius: 8px;
}

#startBtn,
#nextBtn {
    width: 100%;
    border: 0;
    padding: 16px;
    border-radius: 8px;
    background: #1f9d70;
    color: white;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
}

.secondary {
    width: 100%;
    margin-top: 10px;
    padding: 13px;
    background: transparent;
    color: #87999f;
    border: 1px solid #344850;
    border-radius: 8px;
}


/* TOP BAR */

#game {
    height: 100vh;
}

.topbar {
    height: 64px;
    background: #0b1115;
    border-bottom: 1px solid #26363c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
}

.brand {
    font-weight: bold;
    letter-spacing: 2px;
}

.brand span {
    margin-right: 8px;
}

.nightInfo {
    color: #9baeb4;
}

.nightInfo span {
    color: #fff;
    font-weight: bold;
}

.clock {
    font-family: monospace;
    font-size: 24px;
    color: #63e6be;
}


/* GAME */

.game-layout {
    height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 15px;
    padding: 15px;
}

.monitor {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.camera-header,
.camera-footer {
    background: #0d1519;
    border: 1px solid #2a3b41;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
}

.camera-header {
    border-radius: 10px 10px 0 0;
}

.live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    background: #ff3b30;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px #ff3b30;
}

#cameraStatus {
    color: #ff5e57;
    font-size: 12px;
    font-weight: bold;
}

.camera-screen {
    flex: 1;
    min-height: 350px;
    position: relative;
    overflow: hidden;
    background: #111a1d;
    border-left: 1px solid #2a3b41;
    border-right: 1px solid #2a3b41;
}


/* SCENE */

#scene {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(#151d20 0 65%, #090e10 65%);
}

#scene::before {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 14%;
    bottom: 0;
    border: 3px solid #27353a;
    background:
        linear-gradient(90deg,
        transparent 0 30%,
        #202b2f 30% 31%,
        transparent 31% 69%,
        #202b2f 69% 70%,
        transparent 70%);
}

#scene::after {
    content: "";
    position: absolute;
    left: 25%;
    right: 25%;
    bottom: 0;
    height: 35%;
    background: linear-gradient(90deg, #111719, #1c272b, #111719);
    transform: perspective(300px) rotateX(20deg);
    transform-origin: bottom;
}

.room-label {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 5;
    background: rgba(0,0,0,.6);
    padding: 7px 12px;
    font-size: 12px;
    letter-spacing: 1px;
}


/* OBJECTS */

#sceneObjects {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.object {
    position: absolute;
    font-size: 55px;
    filter: grayscale(.6);
    opacity: .7;
}

.desk {
    left: 38%;
    bottom: 22%;
}

.door {
    right: 13%;
    bottom: 14%;
    font-size: 95px;
}

.box {
    left: 15%;
    bottom: 17%;
    font-size: 70px;
}

.monitor-icon {
    left: 45%;
    top: 31%;
    font-size: 65px;
}

.suspicious {
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 53%;
    transform: translate(-50%, -50%);
    font-size: 70px;
    animation: pulse 1s infinite;
    cursor: pointer;
    filter: drop-shadow(0 0 20px red);
}

@keyframes pulse {
    0%,100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.18);
    }
}


/* CCTV EFFECT */

.scanlines {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,.025) 0,
        rgba(255,255,255,.025) 1px,
        transparent 1px,
        transparent 4px
    );
}

#staticEffect {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none;
    opacity: .08;
    background-image:
        repeating-radial-gradient(
            circle,
            #fff 0 1px,
            transparent 1px 3px
        );
    animation: noise .15s steps(2) infinite;
}

@keyframes noise {
    0% { transform: translate(0,0); }
    50% { transform: translate(-2%,2%); }
    100% { transform: translate(2%,-2%); }
}


/* FLASHLIGHT */

.flashlight-on #scene {
    background: #182326;
}

.flashlight-on #scene::before {
    box-shadow: 0 0 100px 40px rgba(220,245,255,.1);
}

.camera-footer {
    border-radius: 0 0 10px 10px;
    color: #82949b;
    font-size: 12px;
}

.camera-footer span {
    color: #d7e4e8;
}


/* CONTROL PANEL */

.control-panel {
    background: #0b1216;
    border: 1px solid #26373e;
    border-radius: 10px;
    padding: 15px;
    overflow-y: auto;
}

.control-panel h2 {
    font-size: 12px;
    letter-spacing: 2px;
    color: #73878e;
    margin-bottom: 10px;
}

.camera-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cam-btn {
    background: #121d22;
    color: #b8c8cd;
    border: 1px solid #2b3d44;
    padding: 12px 8px;
    border-radius: 7px;
    text-align: left;
}

.cam-btn small {
    display: block;
    margin-top: 4px;
    color: #647980;
}

.cam-btn.active {
    border-color: #43cfa0;
    color: #63e6be;
    box-shadow: inset 3px 0 #43cfa0;
}

.control-section {
    margin-top: 22px;
}

.big-control,
.alarm-control {
    width: 100%;
    padding: 15px;
    margin-bottom: 9px;
    border-radius: 7px;
    border: 1px solid #30444b;
    background: #142126;
    color: #dbe7ea;
}

.big-control span {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    color: #70858c;
}

.big-control.on {
    border-color: #f5d76e;
    color: #f5d76e;
}

.alarm-control {
    background: #351619;
    border-color: #7d3036;
    color: #ff7474;
}

.alarm-control.cooldown {
    opacity: .5;
}


/* STATS */

.stats {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #26373d;
}

.stat {
    display: grid;
    grid-template-columns: 60px 1fr 45px;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 11px;
    color: #788b91;
}

.stat strong {
    text-align: right;
    color: #d7e3e7;
}

.bar {
    height: 7px;
    background: #1d292e;
    border-radius: 10px;
    overflow: hidden;
}

#alertBar {
    height: 100%;
    width: 0%;
    background: #e85b5b;
    transition: width .2s;
}

#powerBar {
    height: 100%;
    width: 100%;
    background: #52c59b;
}


/* OBJECTIVE */

.objective {
    margin-top: 12px;
    border-top: 1px solid #26373d;
    padding-top: 15px;
}

.objective p {
    color: #84979e;
    line-height: 1.5;
    font-size: 13px;
}

.found {
    margin-top: 15px;
    padding: 10px;
    background: #111b20;
    font-size: 11px;
    color: #71858c;
}

.found b {
    color: #63e6be;
}


/* EVENT */

.event-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    padding: 13px 20px;
    background: #351719;
    border: 1px solid #a23b40;
    color: #ff9a9a;
    border-radius: 7px;
    box-shadow: 0 10px 30px #000;
}


/* RESULTS */

.results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 25px 0;
    gap: 10px;
}

.results div {
    padding: 15px;
    background: #111c21;
    border-radius: 8px;
}

.results span,
.results b {
    display: block;
}

.results span {
    font-size: 11px;
    color: #71858b;
}

.results b {
    margin-top: 7px;
    font-size: 20px;
}


/* RESPONSIVE */

@media (max-width: 800px) {

    body {
        overflow: auto;
    }

    .game-layout {
        height: auto;
        min-height: calc(100vh - 64px);
        grid-template-columns: 1fr;
    }

    .camera-screen {
        min-height: 430px;
    }

    .control-panel {
        overflow: visible;
    }

    .topbar {
        padding: 0 12px;
    }

    .brand {
        font-size: 12px;
    }

    .clock {
        font-size: 19px;
    }
}

@media (max-width: 500px) {

    .mission {
        grid-template-columns: 1fr;
    }

    .start-card,
    .end-card {
        padding: 28px 18px;
    }

    .camera-screen {
        min-height: 330px;
    }

    .camera-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}