@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-red: #8b0000;
    --scanline: rgba(18, 16, 16, 0.5);
}

* {
    box-sizing: border-box;
    cursor: crosshair;
}

body {
    background-color: #000;
    color: var(--text-color);
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-shadow: 2px 2px 0px #000;
}

/* CRT Overlay */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
    animation: flicker 0.15s infinite;
}

.crt-overlay::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%);
    pointer-events: none;
}

@keyframes flicker {
    0% {
        opacity: 0.9;
    }

    50% {
        opacity: 1.0;
    }

    100% {
        opacity: 0.9;
    }
}

/* Game Container */
.game-container {
    width: 800px;
    height: 600px;
    border: 4px solid #333;
    background: #111;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.screen-view {
    flex: 2;
    background: #000;
    border-bottom: 4px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.screen-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    filter: contrast(1.2) brightness(0.8) grayscale(0.5);
}

.text-area {
    flex: 1;
    padding: 20px;
    background: #0a0a0a;
    overflow-y: auto;
}

.room-title {
    color: var(--accent-red);
    margin-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.room-desc {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #aaa;
}

.choices {
    list-style: none;
    padding: 0;
}

.choice-btn {
    display: block;
    width: 100%;
    background: none;
    border: 2px solid #333;
    color: #fff;
    padding: 15px;
    margin-bottom: 10px;
    font-family: 'Press Start 2P', cursive;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}

.choice-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #000;
}

.choice-btn::before {
    content: "> ";
}

/* Glitch Text */
.glitch {
    animation: glitch-anim 2s infinite;
}

@keyframes glitch-anim {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}