@font-face {
    font-family: "EGA";
    src: url("fonts/PxPlus_IBM_EGA9.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg: #050000;
    --panel: rgba(20, 0, 0, 0.92);
    --panel-dark: rgba(10, 0, 0, 0.9);
    --border: #ff3b3b;
    --text: #ffb3b3;
    --dim: #a06666;
    --accent: #ff1a1a;
    --warning: #ff7070;
    --glow: 0 0 8px rgba(255, 60, 60, 0.35);
    --glow-strong: 0 0 14px rgba(255, 80, 80, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    cursor: none;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, rgba(40, 60, 120, 0.18), transparent 35%), linear-gradient(180deg, #0a0d16 0%, #05070d 100%);
    color: var(--text);
    font-family: "EGA", monospace;
    font-size: 18px;
    line-height: 1.55;
    letter-spacing: 0.5px;
    overflow: hidden;
    position: relative;
    text-shadow: var(--glow-strong);
    cursor: none;
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background: repeating-linear-gradient( to bottom, rgba(255, 255, 255, 0.07) 0px, rgba(255, 255, 255, 0.07) 1px, transparent 3px, transparent 5px );
        opacity: 0.2;
        pointer-events: none;
        z-index: 2;
    }

    body::after {
        content: "";
        position: fixed;
        inset: 0;
        background: radial-gradient( ellipse at center, transparent 67%, rgba(0, 0, 0, 0.12) 72%, rgba(0, 0, 0, 0.28) 88%, rgba(0, 0, 0, 0.45) 100% ), linear-gradient( to bottom, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.04) 50%, rgba(255, 255, 255, 0.02) );
        box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.95), inset 0 0 40px rgba(119, 247, 255, 0.05);
        pointer-events: none;
        z-index: 2;
    }

button,
a,
.nav-link,
.game-tab,
.log-toggle,
.boot-button,
.utility-option,
.ascii-progress-bar,
input,
audio {
    cursor: none;
}

.terminal-cursor {
    position: fixed;
    width: 14px;
    height: 14px;
    border: 1px solid var(--accent);
    background: rgba(255, 26, 26, 0.12);
    box-shadow: var(--glow), 0 0 14px rgba(255, 26, 26, 0.35);
    pointer-events: none;
    z-index: 99999;
    transform: translate(-2px, -2px);
    mix-blend-mode: screen;
}

    .terminal-cursor::after {
        content: "";
        position: absolute;
        left: 4px;
        top: 4px;
        width: 4px;
        height: 4px;
        background: var(--warning);
        box-shadow: 0 0 8px rgba(255, 80, 80, 0.8);
    }

    .terminal-cursor.clicking {
        transform: translate(-2px, -2px) scale(0.82);
        background: rgba(255, 80, 80, 0.25);
    }

.site-shell-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 22vw);
    gap: 18px;
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    margin: 16px auto;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.left-column,
.right-column {
    height: 100%;
    min-height: 0;
}

.left-column {
    min-width: 0;
}

    .left-column .page {
        width: 100%;
        height: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .left-column main {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }

.right-column {
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    height: 100%;
    min-height: 0;
}

.side-window {
    height: 100%;
    min-height: 0;
    border: 2px solid var(--border);
    background: var(--panel);
    box-shadow: var(--glow), inset 0 0 24px rgba(255, 80, 80, 0.08);
    overflow: hidden;
}

.music-window,
.misc-window {
    min-height: 0;
    overflow: hidden;
}

    .music-window .window-content,
    .misc-window .window-content {
        height: calc(100% - 42px);
        min-height: 0;
        padding: 14px;
        overflow-y: auto;
        overflow-x: hidden;
    }

.audio-player-hidden {
    display: none;
}

.player-meta {
    margin-top: 14px;
    display: grid;
    gap: 6px;
}

    .player-meta p {
        margin: 0;
    }

    .player-meta strong {
        color: var(--warning);
        font-weight: normal;
    }

.player-meta,
#now-playing,
#player-status,
.audio-repair-log,
.audio-system-message {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.audio-repair-log {
    max-height: 150px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.terminal-player {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

.terminal-player-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.player-button {
    min-width: 92px;
    text-align: center;
}

.terminal-progress-wrap {
    display: grid;
    gap: 6px;
}

.terminal-progress-label {
    display: flex;
    justify-content: space-between;
    color: var(--warning);
    font-size: 0.9rem;
}

.ascii-progress-bar {
    font-size: 1.15rem;
    letter-spacing: 1px;
    color: var(--text);
    text-shadow: var(--glow);
    white-space: pre;
    overflow: hidden;
    line-height: 1.2;
    padding: 6px 8px;
    border: 1px solid var(--border);
    background: rgba(20, 0, 0, 0.9);
    box-shadow: inset 0 0 8px rgba(255, 80, 80, 0.08);
    cursor: none;
    user-select: none;
}

    .ascii-progress-bar:hover,
    .ascii-progress-bar:focus-visible {
        background: rgba(255, 80, 80, 0.08);
        outline: none;
    }

.terminal-volume-wrap {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    color: var(--warning);
}

.terminal-volume {
    width: 100%;
    accent-color: #ff3b3b;
    cursor: none;
}

    .terminal-volume:focus-visible {
        outline: 1px solid var(--warning);
        outline-offset: 2px;
    }

.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: rgba(2, 4, 10, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

    .boot-overlay.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

.boot-screen {
    width: min(760px, 100%);
    border: 2px solid var(--border);
    background: rgba(5, 8, 18, 0.96);
    box-shadow: var(--glow), inset 0 0 24px rgba(119, 247, 255, 0.08);
    padding: 20px;
}

    .boot-screen h1,
    .panel h2,
    .project h3,
    .window-title,
    .directory-header,
    .current-file,
    .topbar,
    .ascii,
    .nav-link,
    .boot-lines,
    .status-box strong,
    .meta-label,
    .meta-value,
    .game-tab,
    .file-name,
    .file-marker {
        animation: textFlicker 7s infinite steps(1);
    }

    .boot-screen h1 {
        margin: 0 0 8px;
        color: var(--accent);
        text-shadow: 0 0 8px rgba(255, 105, 200, 0.35);
        font-size: clamp(1.5rem, 4vw, 2.2rem);
        letter-spacing: 1px;
    }

    .boot-screen p {
        margin: 0 0 12px;
        color: var(--dim);
    }

.boot-lines {
    min-height: 160px;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid rgba(119, 247, 255, 0.45);
    background: rgba(119, 247, 255, 0.04);
    color: var(--text);
    white-space: pre-wrap;
    line-height: 1.4;
    box-shadow: inset 0 0 12px rgba(119, 247, 255, 0.04);
    overflow: auto;
}

#boot-lines {
    white-space: pre-wrap;
}

.boot-cursor {
    display: inline-block;
    color: var(--text);
    text-shadow: var(--glow);
    animation: blink 1s steps(1) infinite;
    vertical-align: baseline;
    margin-left: 2px;
    font-size: 1.05em;
}

    .boot-cursor.hidden {
        display: none;
    }

.screen-transition {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 9;
    opacity: 0;
    pointer-events: none;
}

.hidden-utility {
    display: none;
}

    .hidden-utility.revealed {
        display: inline-block;
        animation: hiddenLogReveal 0.4s ease-out forwards;
    }

.hidden-log {
    display: none;
}

    .hidden-log.revealed {
        display: block;
        animation: hiddenLogReveal 0.4s ease-out forwards;
    }

@keyframes hiddenLogReveal {
    0% {
        opacity: 0;
        transform: translateY(6px);
        filter: brightness(2);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: brightness(1);
    }
}

.screen-flicker {
    animation: quickScreenFlicker 0.12s steps(2);
}

@keyframes quickScreenFlicker {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(2.2);
    }

    100% {
        filter: brightness(1);
    }
}

.screen-transition.active {
    opacity: 1;
}

.screen-transition.power-on {
    animation: sitePowerOn 0.45s ease-out forwards;
}

.site-shell {
    opacity: 1;
    filter: brightness(1);
    transition: opacity 0.2s ease, filter 0.2s ease;
}

    .site-shell.pre-poweron {
        opacity: 0.18;
        filter: brightness(0.35);
    }

    .site-shell.powering-on {
        animation: pageBrighten 0.55s ease-out forwards;
    }

@keyframes sitePowerOn {
    0% {
        opacity: 1;
        transform: scaleY(0.02);
        filter: brightness(2.4);
    }

    18% {
        opacity: 1;
        transform: scaleY(0.06);
        filter: brightness(2.8);
    }

    38% {
        opacity: 1;
        transform: scaleY(1);
        filter: brightness(1.6);
    }

    100% {
        opacity: 0;
        transform: scaleY(1);
        filter: brightness(1);
    }
}

@keyframes pageBrighten {
    0% {
        opacity: 0.18;
        filter: brightness(0.35);
    }

    25% {
        opacity: 0.45;
        filter: brightness(0.75);
    }

    55% {
        opacity: 0.75;
        filter: brightness(1.35);
    }

    100% {
        opacity: 1;
        filter: brightness(1);
    }
}

.boot-progress-wrap {
    margin: 16px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#boot-progress-label {
    color: var(--warning);
    font-size: 0.95rem;
}

#boot-progress-fill {
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--text);
    text-shadow: var(--glow);
    white-space: pre;
    overflow: hidden;
    line-height: 1.2;
}

.boot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.boot-overlay.powering-off {
    animation: screenPowerOn 0.45s ease forwards;
}

@keyframes screenPowerOn {
    0% {
        opacity: 1;
        transform: scaleY(1);
        filter: brightness(1);
    }

    35% {
        opacity: 1;
        transform: scaleY(0.04);
        filter: brightness(1.8);
    }

    60% {
        opacity: 1;
        transform: scaleY(0.08);
        filter: brightness(2.2);
    }

    100% {
        opacity: 0;
        transform: scaleY(1);
        filter: brightness(1);
    }
}

.boot-button,
.game-tab {
    border: 1px solid var(--border);
    background: rgba(4, 8, 18, 0.9);
    color: var(--text);
    font: inherit;
    box-shadow: var(--glow);
}

.boot-button {
    padding: 10px 14px;
    cursor: none;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

    .boot-button:hover,
    .boot-button:focus-visible,
    .nav-link:hover,
    .nav-link:focus-visible,
    .game-tab:hover,
    .game-tab:focus-visible {
        background: rgba(119, 247, 255, 0.12);
        color: #ffffff;
        transform: translateY(-1px);
        outline: none;
    }

    .boot-button:disabled {
        opacity: 0.7;
        cursor: none;
        transform: none;
    }

.boot-hint {
    color: var(--warning);
    font-size: 0.92rem;
}

.page {
    position: relative;
    z-index: 1;
    border: 2px solid var(--border);
    background: var(--panel);
    box-shadow: var(--glow), inset 0 0 24px rgba(119, 247, 255, 0.08);
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 2px solid var(--border);
    color: var(--warning);
    text-shadow: var(--glow);
    flex-wrap: wrap;
}

.boot {
    padding: 18px 18px 0;
    color: var(--dim);
}

    .boot p {
        margin: 0 0 8px;
    }

.hero {
    padding: 12px 18px 6px;
    border-bottom: 2px solid rgba(119, 247, 255, 0.3);
}

.ascii-wrap {
    overflow-x: auto;
    padding-bottom: 10px;
}

.ascii {
    margin: 0;
    color: var(--accent);
    text-shadow: 0 0 8px rgba(255, 105, 200, 0.35);
    font-size: clamp(10px, 1.5vw, 14px);
    line-height: 1.1;
    min-width: max-content;
}

.subtitle {
    margin: 14px 0 0;
    color: var(--text);
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    border-bottom: 2px solid rgba(119, 247, 255, 0.3);
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 8px 12px;
    display: inline-block;
    box-shadow: var(--glow);
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-page-button {
    all: unset;
    display: inline-block;
}

    .nav-page-button.nav-link {
        color: var(--text);
        text-decoration: none;
        border: 1px solid var(--border);
        padding: 8px 12px;
        display: inline-block;
        box-shadow: var(--glow);
        transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
        cursor: none;
    }

    .nav-page-button:hover,
    .nav-page-button:focus-visible {
        background: rgba(255, 80, 80, 0.12);
        color: #ffffff;
        transform: translateY(-1px);
        outline: none;
    }

main {
    padding: 18px;
    display: grid;
    gap: 18px;
}

.panel {
    border: 1px solid var(--border);
    padding: 16px;
    box-shadow: inset 0 0 12px rgba(119, 247, 255, 0.05);
    background: var(--panel-dark);
}

    .panel h2 {
        margin-top: 0;
        color: var(--warning);
        font-size: 1rem;
        letter-spacing: 1px;
    }

.panel-title::before {
    content: "> ";
    color: var(--accent);
}

.status-grid,
.meta-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.meta-box,
.status-box {
    border: 1px solid rgba(255, 80, 80, 0.45);
    padding: 10px;
    color: var(--dim);
    background: rgba(255, 80, 80, 0.05);
    box-shadow: inset 0 0 8px rgba(255, 80, 80, 0.04);
}

    .status-box strong,
    .meta-label {
        display: block;
        color: var(--warning);
        margin-bottom: 6px;
        font-size: 0.8rem;
    }

.meta-value {
    color: var(--text);
}

.project-list {
    display: grid;
    gap: 10px;
}

.project {
    border: 1px dashed rgba(255, 80, 80, 0.45);
    padding: 12px;
}

    .project h3 {
        margin: 0 0 6px;
        font-size: 1.3rem;
        color: var(--text);
    }

.log {
    color: var(--dim);
    white-space: pre-line;
    line-height: 1.7;
}

.log-accordion {
    display: grid;
    gap: 10px;
}

.log-toggle {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    background: rgba(20, 0, 0, 0.9);
    color: var(--warning);
    font: inherit;
    padding: 10px 12px;
    box-shadow: var(--glow);
    cursor: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

    .log-toggle:hover,
    .log-toggle:focus-visible {
        background: rgba(255, 80, 80, 0.12);
        color: #ffffff;
        outline: none;
        transform: translateY(-1px);
    }

    .log-toggle.active {
        background: rgba(255, 80, 80, 0.12);
        color: #ffffff;
    }

.log-panel {
    display: none;
    border: 1px solid rgba(255, 80, 80, 0.45);
    background: rgba(20, 0, 0, 0.85);
    padding: 14px;
}

    .log-panel.open {
        display: block;
    }

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .contact-links a {
        color: var(--warning);
        text-decoration: none;
    }

        .contact-links a:hover {
            text-decoration: underline;
        }

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.1em;
    background: var(--text);
    vertical-align: text-bottom;
    margin-left: 6px;
    animation: blink 1s steps(1) infinite;
    box-shadow: 0 0 8px rgba(185, 250, 255, 0.45);
}

.favorites-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    margin-top: 16px;
}

.game-entry {
    display: none;
    opacity: 0;
    transform: translateY(6px);
}

    .game-entry.active {
        display: block;
        animation: fileOpen 0.2s ease-out forwards;
    }

@keyframes fileOpen {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.directory-header,
.current-file {
    border: 1px solid rgba(255, 80, 80, 0.45);
    padding: 8px 10px;
    color: var(--warning);
    background: rgba(255, 80, 80, 0.06);
    text-shadow: var(--glow);
    font-size: 0.9rem;
}

.game-tab {
    padding: 10px 12px;
    text-align: left;
    cursor: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    background: rgba(20, 0, 0, 0.9);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: var(--text);
}

.file-marker {
    color: var(--accent);
    opacity: 0.35;
    transition: opacity 0.15s ease;
}

.file-name {
    letter-spacing: 0.03em;
}

.game-tab.active {
    background: rgba(255, 80, 80, 0.12);
    border-color: var(--accent);
    color: #ffffff;
}

    .game-tab.active .file-marker {
        opacity: 1;
    }

.tab-view-wrap {
    display: grid;
    gap: 10px;
}

.tab-view {
    border: 1px solid rgba(255, 80, 80, 0.45);
    min-height: 300px;
    background: rgba(20, 0, 0, 0.85);
    box-shadow: inset 0 0 12px rgba(255, 80, 80, 0.05);
}

.window-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 80, 80, 0.45);
    background: rgba(255, 80, 80, 0.08);
    color: var(--warning);
    text-shadow: var(--glow);
}

.window-title {
    font-size: 0.95rem;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-dot {
    width: 10px;
    height: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--glow);
    display: inline-block;
}

.window-content {
    padding: 14px;
}

.game-entry h3 {
    margin-top: 0;
    font-size: 20px;
    color: var(--warning);
}

.game-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 16px;
}

    .game-images img {
        width: 100%;
        max-width: 220px;
        border: 1px solid var(--border);
        box-shadow: var(--glow);
        display: block;
    }

.image-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.97);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

    .image-viewer.active {
        display: flex;
    }

    .image-viewer img {
        width: auto;
        height: auto;
        max-width: 96vw;
        max-height: 96vh;
        border: 1px solid var(--border);
        box-shadow: var(--glow), 0 0 24px rgba(119, 247, 255, 0.2);
        background: #000;
        display: block;
        image-rendering: auto;
    }

footer {
    padding: 14px 18px 18px;
    border-top: 2px solid rgba(119, 247, 255, 0.3);
    color: var(--dim);
}

.page-panel {
    display: none;
}

    .page-panel.active {
        display: block;
    }

.utility-links {
    margin-bottom: 12px;
}

.utility-panel-hidden {
    display: none;
}

.left-column main,
.boot-lines,
.tab-view,
.log-panel,
.ascii-wrap {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(20, 0, 0, 0.9);
}

    .left-column main::-webkit-scrollbar,
    .boot-lines::-webkit-scrollbar,
    .tab-view::-webkit-scrollbar,
    .log-panel::-webkit-scrollbar,
    .ascii-wrap::-webkit-scrollbar {
        width: 14px;
        height: 14px;
    }

    .left-column main::-webkit-scrollbar-track,
    .boot-lines::-webkit-scrollbar-track,
    .tab-view::-webkit-scrollbar-track,
    .log-panel::-webkit-scrollbar-track,
    .ascii-wrap::-webkit-scrollbar-track {
        background: rgba(20, 0, 0, 0.9);
        border-left: 1px solid rgba(255, 80, 80, 0.35);
    }

    .left-column main::-webkit-scrollbar-thumb,
    .boot-lines::-webkit-scrollbar-thumb,
    .tab-view::-webkit-scrollbar-thumb,
    .log-panel::-webkit-scrollbar-thumb,
    .ascii-wrap::-webkit-scrollbar-thumb {
        background: rgba(255, 26, 26, 0.55);
        border: 2px solid rgba(20, 0, 0, 0.95);
        box-shadow: inset 0 0 8px rgba(255, 80, 80, 0.35);
    }

        .left-column main::-webkit-scrollbar-thumb:hover,
        .boot-lines::-webkit-scrollbar-thumb:hover,
        .tab-view::-webkit-scrollbar-thumb:hover,
        .log-panel::-webkit-scrollbar-thumb:hover,
        .ascii-wrap::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 80, 80, 0.8);
        }


/* Internal scrollbars for the fixed right-side windows and audio repair output. */
.music-window .window-content,
.misc-window .window-content,
.audio-repair-log {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(20, 0, 0, 0.9);
}

    .music-window .window-content::-webkit-scrollbar,
    .misc-window .window-content::-webkit-scrollbar,
    .audio-repair-log::-webkit-scrollbar {
        width: 10px;
    }

    .music-window .window-content::-webkit-scrollbar-track,
    .misc-window .window-content::-webkit-scrollbar-track,
    .audio-repair-log::-webkit-scrollbar-track {
        background: rgba(20, 0, 0, 0.9);
        border-left: 1px solid rgba(255, 80, 80, 0.35);
    }

    .music-window .window-content::-webkit-scrollbar-thumb,
    .misc-window .window-content::-webkit-scrollbar-thumb,
    .audio-repair-log::-webkit-scrollbar-thumb {
        background: rgba(255, 26, 26, 0.55);
        border: 2px solid rgba(20, 0, 0, 0.95);
        box-shadow: inset 0 0 8px rgba(255, 80, 80, 0.35);
    }

        .music-window .window-content::-webkit-scrollbar-thumb:hover,
        .misc-window .window-content::-webkit-scrollbar-thumb:hover,
        .audio-repair-log::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 80, 80, 0.8);
        }

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes screenShimmer {
    0% {
        transform: translateY(-100%);
    }

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

@keyframes textFlicker {
    0%, 15%, 19%, 21%, 60%, 100% {
        opacity: 1;
    }

    16% {
        opacity: 0.92;
    }

    17% {
        opacity: 0.85;
    }

    20% {
        opacity: 0.9;
    }

    61% {
        opacity: 0.94;
    }

    62% {
        opacity: 0.88;
    }
}

.crt-shimmer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0.08;
    background: linear-gradient( to bottom, transparent 0%, rgba(255, 255, 255, 0.06) 48%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.06) 52%, transparent 100% );
    animation: screenShimmer 7s linear infinite;
}

@media (max-width: 1100px) {
    body {
        overflow: auto;
    }

    .site-shell-wrap {
        grid-template-columns: 1fr;
        height: auto;
    }

    .left-column,
    .right-column {
        height: auto;
    }

        .left-column .page {
            height: auto;
        }

        .left-column main {
            overflow-y: visible;
        }

    .right-column {
        grid-template-rows: auto auto;
    }

    .music-window,
    .misc-window {
        min-height: 320px;
    }

        .music-window .window-content,
        .misc-window .window-content {
            height: auto;
            max-height: 520px;
        }
}

@media (max-width: 800px) {
    .favorites-layout {
        grid-template-columns: 1fr;
    }

    .tab-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .page {
        width: 100%;
    }

    .boot-screen {
        padding: 16px;
    }

    .boot-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar,
    .boot,
    .hero,
    nav,
    main,
    footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ascii {
        font-size: 9px;
    }

    .crt-shimmer {
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 3;
        opacity: 0.08;
        background: linear-gradient( to bottom, transparent 0%, rgba(255, 255, 255, 0.06) 48%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.06) 52%, transparent 100% );
        animation: screenShimmer 7s linear infinite;
    }
}


/* Relay chat: make the user's turn unmistakable and keep long scripted replies usable. */
.relay-chat-input {
    min-width: 0;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

    .relay-chat-input::-webkit-scrollbar {
        display: none;
    }

    .relay-chat-input.relay-input-active {
        border-color: var(--warning);
        background: rgba(48, 0, 0, 0.96);
        box-shadow: 0 0 0 1px rgba(255, 112, 112, 0.65), var(--glow-strong), inset 0 0 12px rgba(255, 80, 80, 0.18);
        animation: relayInputReadyPulse 1.15s steps(2, end) infinite;
    }

.relay-chat-input-row.user-turn {
    position: relative;
    margin-top: 18px;
}

    .relay-chat-input-row.user-turn::before {
        content: "> INPUT REQUIRED";
        position: absolute;
        left: 0;
        bottom: calc(100% + 4px);
        color: var(--warning);
        font-size: 0.75rem;
        text-shadow: var(--glow);
        pointer-events: none;
    }

@keyframes relayInputReadyPulse {
    0%, 100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.35);
    }
}
