/* terminal.css */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    font-family: "VT323", monospace;
    color: #33ff66;
    padding: 16px;
}

#screen {
    width: min(960px, 100%);
    max-width: 100%;
    height: min(680px, 100%);
    padding: 16px 20px 20px;
    background: radial-gradient(circle at center, #082408 0, #021102 56%, #000 100%);
    border: 3px solid #33ff66;
    box-shadow: 0 0 12px rgba(51, 255, 102, 0.6), 0 0 44px rgba(22, 130, 22, 0.55);
    border-radius: 8px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

#screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 50%, transparent 50%);
    background-size: 100% 3px;
    pointer-events: none;
    mix-blend-mode: multiply;
    z-index: 2;
}

#screen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 60%, rgba(0, 0, 0, 0.35) 100%);
    z-index: 3;
}

#hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(51, 255, 102, 0.5);
    padding-bottom: 8px;
    margin-bottom: 12px;
    letter-spacing: 1.3px;
    font-size: 24px;
    text-shadow: 0 0 8px rgba(51, 255, 102, 0.75);
}

#sound-toggle {
    border: 1px solid rgba(51, 255, 102, 0.75);
    background: transparent;
    color: #33ff66;
    font-family: inherit;
    font-size: 24px;
    line-height: 1;
    padding: 4px 10px;
    cursor: pointer;
    text-shadow: 0 0 6px rgba(51, 255, 102, 0.65);
}

#sound-toggle:hover,
#sound-toggle:focus {
    background: rgba(51, 255, 102, 0.9);
    color: #001400;
    outline: none;
}

/* Subtle flicker */
@keyframes flicker {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.97;
    }

    60% {
        opacity: 0.9;
    }
}

#terminal,
#boot-sequence {
    animation: flicker 0.2s infinite;
    position: relative;
    z-index: 4;
    line-height: 1.2;
    font-size: 28px;
}

#boot-sequence,
#output {
    white-space: pre-wrap;
}

/* Cursor */
.cursor {
    display: inline-block;
    width: 11px;
    background: #33ff66;
    margin-left: 4px;
    animation: blink 0.8s steps(1) infinite;
    box-shadow: 0 0 8px rgba(51, 255, 102, 0.75);
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }

    50.01%, 100% {
        opacity: 0;
    }
}

.hidden {
    display: none;
}

#menu {
    margin-top: 16px;
}

#menu p {
    margin: 0 0 8px;
    letter-spacing: 1.2px;
}

#menu button {
    display: block;
    width: 100%;
    margin: 6px 0;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(51, 255, 102, 0.75);
    color: #33ff66;
    font-family: inherit;
    font-size: 28px;
    text-align: left;
    cursor: pointer;
    transition: background 0.06s linear, color 0.06s linear, box-shadow 0.06s linear;
}

#menu button:hover,
#menu button:focus,
#menu button.active {
    background: rgba(51, 255, 102, 0.9);
    color: #001400;
    box-shadow: 0 0 12px rgba(51, 255, 102, 0.75);
    outline: none;
}

#hint {
    margin-top: 12px;
    color: rgba(130, 255, 160, 0.95);
    font-size: 22px;
    letter-spacing: 0.9px;
}

@media (max-width: 680px) {
    #terminal,
    #boot-sequence,
    #menu button {
        font-size: 22px;
    }

    #hud {
        font-size: 19px;
    }

    #sound-toggle {
        font-size: 19px;
        white-space: nowrap;
    }

    #hint {
        font-size: 18px;
    }
}
