/* RESET & FONTS */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --color-bg: #050505;
    --color-green: #33ff33;
    --color-green-dim: #008f11;
    --color-orange: #ffb000;
    --color-red: #ff3333;
    --color-cyan: #00efff;
    --font-term: 'VT323', monospace;
    --text-glow: 0 0 10px rgba(51, 255, 51, 0.7), 0 0 2px rgba(51, 255, 51, 0.5);
    --text-glow-dim: 0 0 5px rgba(0, 143, 17, 0.5);
    --text-glow-red: 0 0 10px rgba(255, 51, 51, 0.7);
    --text-glow-cyan: 0 0 10px rgba(0, 239, 255, 0.7);
}

.val-red {
    color: var(--color-red);
    text-shadow: var(--text-glow-red);
}

.val-cyan {
    color: var(--color-cyan);
    text-shadow: var(--text-glow-cyan);
}

.val-orange {
    color: var(--color-orange);
    text-shadow: 0 0 8px var(--color-orange);
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-green);
    font-family: var(--font-term);
    font-size: 24px;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-shadow: var(--text-glow);
}

/* CRT EFFECTS */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    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% 3px, 3px 100%;
    pointer-events: none;
    z-index: 999;
}

/* Vignette & Flicker */
.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) 60%, rgba(0, 0, 0, 0.85) 90%);
    z-index: 2;
    animation: flicker 0.15s infinite;
}

/* Scanline Animation */
.crt-overlay::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    animation: scanline 8s linear infinite;
    opacity: 0.3;
}


/* UTILS */
.screen {
    width: 100%;
    max-width: 1200px;
    height: 95vh;
    border: 4px solid var(--color-green);
    box-shadow: 0 0 20px var(--color-green-dim), inset 0 0 20px var(--color-green-dim);
    padding: 20px;
    display: none;
    /* Changed from flex to none to hide by default */
    /* Global Flex properties moved to .active */
    flex-direction: column;
    /* Global Column */
    overflow: hidden;
    /* Global Internal Scroll Container */
    position: relative;
    background: rgba(0, 20, 0, 0.2);
    backdrop-filter: blur(2px);
}

.screen.active {
    display: flex;
    /* Show only when active */
}

.retro-btn {
    background: rgba(0, 59, 0, 0.3);
    border: 2px solid var(--color-green);
    color: var(--color-green);
    font-family: var(--font-term);
    font-size: 1.5rem;
    padding: 10px 30px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    margin-top: 20px;
    text-shadow: var(--text-glow);
    box-shadow: 0 0 10px var(--color-green-dim);
}

.retro-btn:hover {
    background: var(--color-green);
    color: var(--color-bg);
    box-shadow: 0 0 25px var(--color-green);
    text-shadow: none;
}

/* SCREEN 1: TITLE */
#screen-title {
    justify-content: center;
    align-items: center;
    box-shadow: none;
    background: transparent;
    position: relative;
    overflow: hidden;
    /* Ensure rain doesn't spill */
}

#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind content but valid */
    opacity: 0.3;
    /* Subtle background */
}

/* Ensure content sits above rain */
.title-container {
    text-align: center;
    position: relative;
    z-index: 1;
}

.glitch {
    font-size: 5rem;
    position: relative;
    animation: glitch-skew 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}


.subtitle {
    font-size: 2rem;
    color: var(--color-orange);
    margin-bottom: 40px;
    letter-spacing: 4px;
    text-shadow: 0 0 10px var(--color-orange);
}

.transmission-box {
    border: 1px solid var(--color-green-dim);
    padding: 20px;
    margin-bottom: 30px;
    min-width: 400px;
    background: rgba(0, 20, 0, 0.5);
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: .15em solid var(--color-green);
    width: 0;
    white-space: nowrap;
    border-right: .15em solid var(--color-green);
    width: 0;
    animation: typing 0.5s steps(40, end) forwards, blink .75s step-end infinite;
}

.delay-1 {
    animation-delay: 0.5s;
}

.delay-2 {
    animation-delay: 1.0s;
}

.delay-3 {
    animation-delay: 1.5s;
}

.cursor-block {
    display: inline-block;
    animation: blink-block 1s step-end infinite;
    margin-left: 5px;
    color: var(--color-green);
    text-shadow: var(--text-glow);
}

@keyframes blink-block {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* SCREEN 2: BRIEFING */
.briefing-header {
    border-bottom: 1px solid var(--color-orange);
    margin-bottom: 10px;
    /* Reduced from 20px */
    color: var(--color-orange);
    text-shadow: 0 0 10px var(--color-orange);
}

.briefing-content {
    display: flex;
    gap: 20px;
    /* Reduced from 40px */
    flex-grow: 1;
    overflow-y: auto;
    /* Global Scroll */
    min-height: 0;
    /* Firefox Fix */
    padding-right: 10px;
    /* Space for scrollbar */
}

.briefing-footer {
    flex-shrink: 0;
    margin-top: 20px;
    text-align: center;
}

.col-left,
.col-right {
    flex: 1;
}

h3 {
    margin-bottom: 10px;
    /* Reduced from 15px */
    text-decoration: underline;
}

.alert-box {
    border: 1px solid red;
    color: #ff5555;
    padding: 10px;
    /* Reduced from 15px */
    margin-top: 20px;
    /* Reduced from 30px */
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    text-shadow: 0 0 5px red;
}

.pulse-anim {
    animation: pulse-red 2s infinite;
    animation-delay: 1.5s;
    /* Start pulsing after typing */
}

.typing-header {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: .15em solid red;
    animation: typing-red 1s steps(30, end) forwards, blink-red .75s step-end infinite;
    animation-delay: 0.5s;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
        border-color: rgba(255, 0, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 0, 0, 0.8);
        border-color: red;
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
        border-color: rgba(255, 0, 0, 0.5);
    }
}

@keyframes typing-red {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-red {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: red
    }
}

.briefing-footer {
    text-align: center;
    margin-top: 20px;
}

.dos-objective {
    border: 1px solid var(--color-orange);
    color: var(--color-orange);
    padding: 5px;
    margin-top: 10px;
    text-align: center;
    text-shadow: 0 0 5px var(--color-orange);
    position: relative;
    /* For the absolute link */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hint-link {
    position: absolute;
    right: 10px;
    color: var(--color-cyan);
    cursor: pointer;
    font-weight: bold;
    text-shadow: 0 0 8px var(--color-cyan);
    animation: pulse-cyan 1.5s infinite;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0 5px;
    border: 1px solid var(--color-cyan);
}

.hint-link:hover {
    background: var(--color-cyan);
    color: #000;
}

.hidden {
    display: none !important;
}

@keyframes pulse-cyan {
    0% {
        opacity: 0.5;
        box-shadow: 0 0 5px var(--color-cyan);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 15px var(--color-cyan);
    }

    100% {
        opacity: 0.5;
        box-shadow: 0 0 5px var(--color-cyan);
    }
}

/* Hint styles */
.dos-hint {
    color: var(--color-cyan);
    margin-top: 5px;
    text-align: center;
    font-size: 0.9rem;
    min-height: 20px;
    /* Prevent layout jump */
    text-shadow: 0 0 5px var(--color-cyan);
}

/* Alert Levels */
.alert-low {
    color: var(--color-green);
    text-shadow: var(--text-glow-green);
}

.alert-med {
    color: var(--color-orange);
    text-shadow: 0 0 5px var(--color-orange);
}

.alert-high {
    color: red;
    text-shadow: 0 0 5px red;
    animation: blink 0.5s infinite;
}

/* SCREEN 3: TERMINAL */
#screen-terminal {
    justify-content: flex-start;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-green-dim);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.stat-group {
    font-size: 1.5rem;
}

.objective-bar {
    border: 1px solid var(--color-orange);
    color: var(--color-orange);
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    text-shadow: 0 0 8px var(--color-orange);
    background: rgba(255, 176, 0, 0.1);
}

#btn-abort {
    background: #330000;
    border: 2px solid red;
    color: red;
    font-family: var(--font-term);
    font-size: 1.5rem;
    padding: 5px 20px;
    cursor: pointer;
    text-transform: uppercase;
    text-shadow: 0 0 5px red;
}

#btn-abort:hover {
    background: red;
    color: black;
    box-shadow: 0 0 15px red;
}

.val-orange {
    color: var(--color-orange);
    text-shadow: 0 0 8px var(--color-orange);
}

.val-green {
    color: var(--color-green);
}

#game-output {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.4;
    white-space: pre-wrap;
    /* Preserves generic formatting */
    padding-right: 10px;
}

/* Terminal ASCII output style */
.terminal-block {
    background-color: rgba(17, 17, 17, 0.8);
    color: #ccc;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 10px 0;
    border-left: 3px solid var(--color-orange);
    box-shadow: inset 0 0 10px black;
}

.system-msg {
    color: var(--color-green);
    text-shadow: var(--text-glow);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.user-msg {
    color: white;
    text-shadow: 0 0 8px white;
    font-weight: bold;
}

.input-line {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--color-green-dim);
    padding-top: 10px;
}

.prompt {
    margin-right: 10px;
    font-weight: bold;
    animation: blink 1s infinite;
}

#cmd-input {
    background: transparent;
    border: none;
    color: var(--color-green);
    font-family: var(--font-term);
    font-size: 1.2rem;
    flex-grow: 1;
    outline: none;
    text-shadow: var(--text-glow);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: var(--color-green-dim);
    border: 1px solid black;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-green);
    box-shadow: 0 0 10px var(--color-green);
}

/* ANIMATIONS */
@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--color-green);
    }
}

@keyframes flicker {
    0% {
        opacity: 0.9;
    }

    5% {
        opacity: 0.8;
    }

    10% {
        opacity: 0.9;
    }

    15% {
        opacity: 0.85;
    }

    25% {
        opacity: 0.5;
    }

    30% {
        opacity: 0.9;
    }

    55% {
        opacity: 0.9;
    }

    60% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.9;
    }
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100vh);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
    }

    20% {
        transform: skew(-2deg);
    }

    40% {
        transform: skew(2deg);
    }

    60% {
        transform: skew(0deg);
    }

    80% {
        transform: skew(1deg);
    }

    100% {
        transform: skew(0deg);
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(61px, 9999px, 34px, 0);
    }

    5% {
        clip: rect(98px, 9999px, 86px, 0);
    }

    10% {
        clip: rect(10px, 9999px, 20px, 0);
    }

    15% {
        clip: rect(74px, 9999px, 9px, 0);
    }

    20% {
        clip: rect(71px, 9999px, 60px, 0);
    }

    25% {
        clip: rect(31px, 9999px, 78px, 0);
    }

    30% {
        clip: rect(3px, 9999px, 45px, 0);
    }

    35% {
        clip: rect(95px, 9999px, 78px, 0);
    }

    40% {
        clip: rect(39px, 9999px, 70px, 0);
    }

    45% {
        clip: rect(21px, 9999px, 67px, 0);
    }

    50% {
        clip: rect(8px, 9999px, 5px, 0);
    }

    55% {
        clip: rect(56px, 9999px, 99px, 0);
    }

    60% {
        clip: rect(18px, 9999px, 65px, 0);
    }

    65% {
        clip: rect(50px, 9999px, 29px, 0);
    }

    70% {
        clip: rect(96px, 9999px, 9px, 0);
    }

    75% {
        clip: rect(12px, 9999px, 12px, 0);
    }

    80% {
        clip: rect(4px, 9999px, 5px, 0);
    }

    85% {
        clip: rect(25px, 9999px, 58px, 0);
    }

    90% {
        clip: rect(29px, 9999px, 50px, 0);
    }

    95% {
        clip: rect(39px, 9999px, 54px, 0);
    }

    100% {
        clip: rect(59px, 9999px, 56px, 0);
    }
}

@keyframes blink-text {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.blink-anim {
    animation: blink-text 1s infinite;
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(2px, 9999px, 88px, 0);
    }

    5% {
        clip: rect(31px, 9999px, 39px, 0);
    }

    10% {
        clip: rect(56px, 9999px, 55px, 0);
    }

    15% {
        clip: rect(99px, 9999px, 38px, 0);
    }

    20% {
        clip: rect(14px, 9999px, 89px, 0);
    }

    25% {
        clip: rect(69px, 9999px, 59px, 0);
    }

    30% {
        clip: rect(90px, 9999px, 85px, 0);
    }

    35% {
        clip: rect(6px, 9999px, 78px, 0);
    }

    40% {
        clip: rect(20px, 9999px, 34px, 0);
    }

    45% {
        clip: rect(59px, 9999px, 66px, 0);
    }

    50% {
        clip: rect(33px, 9999px, 10px, 0);
    }

    55% {
        clip: rect(72px, 9999px, 4px, 0);
    }

    60% {
        clip: rect(76px, 9999px, 49px, 0);
    }

    65% {
        clip: rect(64px, 9999px, 60px, 0);
    }

    70% {
        clip: rect(38px, 9999px, 7px, 0);
    }

    75% {
        clip: rect(29px, 9999px, 83px, 0);
    }

    80% {
        clip: rect(1px, 9999px, 85px, 0);
    }

    85% {
        clip: rect(81px, 9999px, 44px, 0);
    }

    90% {
        clip: rect(7px, 9999px, 19px, 0);
    }

    95% {
        clip: rect(77px, 9999px, 41px, 0);
    }

    100% {
        clip: rect(50px, 9999px, 2px, 0);
    }
}

/* SCREEN 4: DOS GAME OVER */
.dos-theme {
    background-color: #0000AA;
    color: white;
    font-family: 'Courier New', monospace;
    /* Classic DOS font */
    text-shadow: none;
    /* No glow for DOS */
    border: none;
    box-shadow: none;
    justify-content: center;
    align-items: center;
}

.dos-box {
    border: 4px double white;
    padding: 40px;
    background: #0000AA;
    max-width: 800px;
    text-align: center;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.5);
}

#end-title {
    font-size: 3rem;
    margin-bottom: 20px;
    background: white;
    color: #0000AA;
    display: inline-block;
    padding: 5px 20px;
}

.dos-divider {
    margin: 20px 0;
    font-weight: bold;
}

.dos-text {
    font-size: 1.5rem;
    line-height: 1.6;
    margin: 30px 0;
}

.agent-portrait-container {
    margin: 20px 0;
}

.agent-portrait {
    width: 150px;
    height: auto;
    border: 4px solid white;
    filter: grayscale(100%) contrast(150%);
    image-rendering: pixelated;
    box-shadow: 5px 5px 0px black;
}

.dos-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.dos-btn {
    background: #aaaaaa;
    color: black;
    border: 2px solid white;
    font-size: 1.2rem;
    padding: 10px 20px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    box-shadow: 5px 5px 0px black;
}

.dos-btn:hover {
    background: white;
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0px black;
}

.dos-btn:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0px black;
}

/* SCREEN 5: SHUTDOWN / CONTACT */
#screen-shutdown {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: black;
    /* Pure black for shutdown */
    border: none;
    box-shadow: none;
}

.shutdown-container {
    max-width: 800px;
}

.shutdown-text {
    color: var(--color-green);
    margin: 20px 0 40px 0;
    font-size: 1.5rem;
}

.contact-box {
    border: 1px solid var(--color-green-dim);
    padding: 30px;
    background: rgba(0, 20, 0, 0.4);
}

.retro-link {
    color: var(--color-cyan);
    font-size: 2rem;
    text-decoration: none;
    border: 2px solid var(--color-cyan);
    padding: 10px 30px;
    display: inline-block;
    transition: all 0.2s;
    text-shadow: var(--text-glow-cyan);
    box-shadow: 0 0 10px var(--color-cyan);
}

.retro-link:hover {
    background: var(--color-cyan);
    color: black;
    box-shadow: 0 0 30px var(--color-cyan);
}

/* BRIEFING AGENT CARD (Horizontal) */
.agent-briefing-card {
    margin-top: 20px;
    border: 2px dashed var(--color-red);
    /* Hazard style */
    padding: 10px;
    background: rgba(50, 0, 0, 0.3);

    /* Horizontal Layout */
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    justify-content: center;
}

.reveal-anim {
    opacity: 0;
    animation: fade-in 1s forwards;
    animation-delay: 2.0s;
    /* Reveal after warning pulse starts */
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

.agent-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.agent-title {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
    letter-spacing: 1px;
    line-height: 1.2;
}

.small-portrait {
    width: 100px;
    /* Smaller than game over screen */
    border-color: var(--color-red);
    /* Red border for enemy */
    box-shadow: 5px 5px 0px rgba(255, 0, 0, 0.5);
}

.folder-link {
    display: inline-block;
    margin-top: 5px;
    /* Reduced from 15px */
    color: var(--color-orange);
    /* Verified file color */
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--color-orange);
    padding: 5px 10px;
    transition: all 0.2s;
    text-shadow: 0 0 5px var(--color-orange);
    font-size: 1rem;
}

.folder-link:hover {
    background: var(--color-orange);
    color: black;
    box-shadow: 0 0 15px var(--color-orange);
}

.folder-icon {
    margin-right: 5px;
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    body {
        font-size: 18px;
        /* Reduce base font size */
        padding: 0;
        align-items: flex-start;
        /* Revert to hidden overflow for "Confined" feel */
        overflow: hidden !important;
        height: 100dvh !important;
    }

    .crt-overlay {
        display: none;
        /* Hide heavy overlay for performance/readability on mobile */
    }

    .screen {
        height: 100dvh !important;
        /* Full viewport height (dynamic) */
        min-height: 100dvh;
        max-width: 100%;
        /* Remove border to save space */
        padding: 10px;
        flex-direction: column;
        overflow: hidden;
        /* Prevent screen itself from scrolling */
    }

    /* Title Screen */
    .glitch {
        font-size: 3rem;
        /* Smaller title */
    }

    .subtitle {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .transmission-box {
        min-width: unset;
        width: 100%;
        font-size: 0.9rem;
    }

    /* Briefing */
    .briefing-content {
        flex-direction: column;
        /* Stack columns */
        gap: 20px;
        overflow-y: auto;
        /* Internal scrolling */
        flex-grow: 1;
        /* Take up available space */
        min-height: 0;
        /* Firefox flex fix */
        margin-bottom: 20px;
    }

    .briefing-footer {
        flex-shrink: 0;
        /* Pin to bottom */
    }

    /* Terminal */
    #screen-terminal {
        padding: 10px;
    }

    .status-bar {
        font-size: 0.9rem;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .stat-group {
        font-size: 1.1rem;
    }

    #game-output {
        font-size: 1rem;
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling */
    }

    /* Touch Targets */
    .retro-btn,
    .dos-btn {
        padding: 15px 20px;
        /* Larger hit area */
        font-size: 1.2rem;
        width: 100%;
        /* Full width buttons */
        margin-top: 15px;
    }

    #btn-abort {
        padding: 5px 10px;
        font-size: 1rem;
    }

    /* VICTORY SCREEN MOBILE FIX */
    .dos-box {
        width: 100%;
        max-height: 100vh;
        overflow-y: auto;
        padding: 15px;
        border: 2px double white;
        /* Smaller border */
    }

    .dos-controls {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }

    .dos-btn {
        margin: 0;
        /* Reset margins for flex gap */
        width: 100%;
    }

    /* Input */
    .input-line {
        padding-bottom: 10px;
        /* Space for virtual keyboard */
    }

    #cmd-input {
        font-size: 1rem;
        /* Prevent zoom on focus */
    }
}