* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

@font-face {
    font-family: 'Benguiat';
    src: url('/BenguiatProITC-BoldCond.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --red: #ff0000;
    --dark-red: #cc0000;
    --blood-red: #8b0000;
    --black: #000000;
    --off-black: #0a0a0a;
    --yellow: #ffff00;
    --code-red: #ff0000;

    /* Site-consistent colors */
    --crt-red: #ff3333;
    --crt-red-dim: #cc0000;
    --crt-red-bright: #ff8888;
}

body {
    font-family: 'Benguiat', 'VT323', 'Courier New', monospace;
    background: #000000;
    color: var(--red);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    touch-action: manipulation;
}

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 12px;
    color: var(--red);
    opacity: 0.4;
    white-space: pre;
    animation: matrixFall linear infinite;
}

@keyframes matrixFall {
    0% {
        top: -100%;
    }
    100% {
        top: 100%;
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(255, 0, 0, 0.02) 2px,
        rgba(255, 0, 0, 0.02) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

.crt-container {
    width: 100%;
    min-height: 100vh;
    background: #000000;
    padding: 0;
}

.crt-screen {
    width: 100%;
    min-height: 100vh;
    background: #000000;
    position: relative;
    overflow: auto;
}

.screen {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

.overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: transparent;
}

.boot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
    position: relative;
}

.skip-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    font-size: 0.85em;
    font-family: 'Benguiat', 'VT323', 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.6);
    border: 1.5px solid rgba(255, 0, 0, 0.6);
    border-radius: 4px;
    color: var(--red);
    cursor: pointer;
    z-index: 150;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.skip-button:hover {
    background: rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.9);
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.5);
    transform: translateY(-2px);
}

.skip-button:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
}

.backrooms-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    font-size: 0.85em;
    font-family: 'Benguiat', 'VT323', 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.6);
    border: 1.5px solid rgba(139, 0, 0, 0.6);
    border-radius: 4px;
    color: #8B0000;
    cursor: pointer;
    z-index: 150;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.3);
}

.backrooms-button:hover {
    background: rgba(139, 0, 0, 0.15);
    border-color: rgba(139, 0, 0, 0.9);
    box-shadow: 0 0 25px rgba(139, 0, 0, 0.5);
    transform: translateY(-2px);
}

.backrooms-button:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.4);
}

.microsoft-logo {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.logo-image {
    max-width: 90vw;
    width: 600px;
    height: auto;
    opacity: 0;
    animation: logoGlowIn 3s ease-in-out forwards, logoFlicker 4s ease-in-out 3s infinite;
}

@keyframes logoGlowIn {
    0% {
        opacity: 0;
        filter: brightness(0) drop-shadow(0 0 0px rgba(255, 0, 0, 0));
    }
    50% {
        opacity: 0.5;
        filter: brightness(0.8) drop-shadow(0 0 20px rgba(255, 0, 0, 0.6));
    }
    100% {
        opacity: 1;
        filter: brightness(1.2) drop-shadow(0 0 30px rgba(255, 0, 0, 0.8));
    }
}

@keyframes logoFlicker {
    0%, 100% {
        filter: brightness(1.2) drop-shadow(0 0 30px rgba(255, 0, 0, 0.8));
    }
    50% {
        filter: brightness(1.4) drop-shadow(0 0 40px rgba(255, 0, 0, 1));
    }
}

.logo-text {
    position: relative;
    display: inline-block;
    animation: redGlow 2s ease-in-out infinite;
}

.logo-registered {
    font-size: 0.4em;
    vertical-align: super;
}

@keyframes redGlow {
    0%, 100% {
        text-shadow: 0 0 30px var(--yellow), 0 0 60px var(--yellow), 0 0 80px var(--red);
    }
    50% {
        text-shadow: 0 0 50px var(--yellow), 0 0 80px var(--yellow), 0 0 120px var(--red);
    }
}

.boot-text {
    font-size: clamp(1em, 3.5vw, 1.5em);
    color: var(--red);
    line-height: 1.8;
    position: relative;
    z-index: 10;
    max-width: 90%;
    margin: 0 auto;
    text-align: left;
}

.boot-text p {
    margin: 15px 0;
    opacity: 0;
    animation: fadeIn 1.2s ease-in forwards;
}

.boot-text p strong {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

#boot-line-1 { animation-delay: 0.5s; font-size: 0.8em; }
#boot-line-2 { animation-delay: 1s; font-size: 0.8em; }
#boot-line-3 { animation-delay: 1.5s; }
#boot-line-4 { animation-delay: 2s; font-size: 1.2em; }
#boot-line-5 { animation-delay: 2.5s; }
#boot-line-6 { animation-delay: 3s; }
#boot-prompt {
    animation-delay: 3.5s;
    font-size: 0.7em;
    margin-top: 40px;
    line-height: 1.6;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.blink {
    animation: blink 1s step-end infinite;
}

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

.dialogue-box {
    display: none;
    position: fixed;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(300px, 85vw, 800px);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(10, 0, 0, 0.25));
    border: 1.5px solid rgba(255, 0, 0, 0.5);
    border-radius: 12px;
    padding: 30px;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.3),
                0 0 80px rgba(255, 0, 0, 0.15),
                inset 0 0 30px rgba(255, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    transition: all 0.4s ease;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.dialogue-box:hover {
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.5),
                0 0 90px rgba(255, 0, 0, 0.2),
                inset 0 0 35px rgba(255, 0, 0, 0.08);
    border-color: rgba(255, 50, 50, 0.7);
    transform: translateX(-50%) translateY(-2px);
}

.dialogue-header {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 0, 0, 0.25);
}

.character-name {
    font-size: clamp(1.1em, 3.5vw, 1.5em);
    font-weight: 400;
    color: var(--red);
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.6), 0 0 5px rgba(255, 0, 0, 0.8);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.dialogue-content {
    min-height: 90px;
    margin-bottom: 18px;
}

.dialogue-content p {
    font-size: clamp(0.95em, 3.2vw, 1.25em);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    margin: 0;
    letter-spacing: 0.3px;
}

.dialogue-prompt {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 0, 0, 0.25);
}

.prompt-text {
    font-size: clamp(0.85em, 2.8vw, 1em);
    font-weight: 300;
    color: #ffaa00;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.prompt-indicator {
    color: #ffaa00;
    font-size: 1.5em;
    animation: blinkIndicator 1s infinite;
}

@keyframes blinkIndicator {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

#enter-button-container {
    display: none;
    position: fixed;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
}

.enter-button-image {
    width: clamp(200px, 40vw, 400px);
    height: auto;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.enter-button-image:hover {
    transform: scale(1.1);
}

.window-frame {
    background: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.window-title-bar {
    background: transparent;
    color: var(--red);
    padding: 12px 15px;
    border-bottom: 2px solid var(--red);
    font-size: clamp(1.2em, 5vw, 1.6em);
    font-weight: bold;
    text-shadow: 0 0 10px var(--red);
    position: sticky;
    top: 0;
    z-index: 10;
}

.window-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.window-menu {
    position: absolute;
    left: 15px;
    font-size: 1.2em;
}

.title-text {
    letter-spacing: 4px;
}

.window-controls {
    position: absolute;
    right: 15px;
}

.window-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    border: 2px solid var(--red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: var(--red);
    transition: all 0.2s;
}

.window-btn:active {
    background: var(--red);
    color: var(--black);
}

.window-content {
    flex: 1;
    background: transparent;
    padding: 15px;
    color: var(--red);
    overflow-y: auto;
}

.status-bar {
    background: var(--red);
    color: var(--black);
    padding: 10px 15px;
    font-size: clamp(1.2em, 4vw, 1.4em);
    font-weight: bold;
    position: sticky;
    bottom: 0;
    z-index: 10;
    border-top: 2px solid var(--red);
}

.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.ascii-title {
    text-align: center;
    font-size: clamp(0.5em, 2vw, 0.9em);
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--red);
    text-shadow: 0 0 15px var(--red);
    letter-spacing: 0;
    overflow-x: auto;
}

.title-line {
    white-space: pre;
}

.info-table {
    border: 2px solid var(--red);
    margin-bottom: 15px;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.table-header {
    background: rgba(255, 0, 0, 0.1);
    font-weight: bold;
    border-bottom: 2px solid var(--red);
}

.table-cell {
    padding: 12px;
    border-bottom: 1px solid var(--dark-red);
    font-size: clamp(1.1em, 4vw, 1.3em);
    line-height: 1.8;
}

.table-row:last-child .table-cell:last-child {
    border-bottom: none;
}

.table-cell span {
    color: var(--red);
    font-weight: bold;
    text-shadow: 0 0 10px var(--red);
}

.press-enter {
    text-align: center;
    margin: 20px 0;
    font-size: clamp(1.5em, 6vw, 2.5em);
    color: var(--red);
    text-shadow: 0 0 20px var(--red);
    animation: pulse 2s ease-in-out infinite;
}

.press-enter-sub {
    font-size: 0.5em;
    color: var(--dark-red);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.question-area {
    background: transparent;
    border: 2px solid var(--red);
    border-radius: 0;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.question-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--dark-red);
    font-size: clamp(0.9em, 3vw, 1em);
}

.question-category {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--red);
    border-radius: 0;
    color: var(--red);
    text-transform: uppercase;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px var(--red);
}

.question-points {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--red);
    border-radius: 0;
    color: var(--red);
    font-weight: 600;
    font-size: 0.9em;
    text-shadow: 0 0 8px var(--red);
}

.timer {
    color: var(--red);
    font-weight: 500;
    font-size: 0.95em;
    text-shadow: 0 0 5px var(--red);
}

.question-text {
    font-size: clamp(1.1em, 4vw, 1.4em);
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--red);
    font-weight: 400;
    min-height: 50px;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.answer-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.answer-option {
    padding: 14px 16px;
    background: transparent;
    border: 2px solid var(--dark-red);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: clamp(1em, 3.5vw, 1.15em);
    color: var(--red);
    text-align: left;
    position: relative;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 400;
    line-height: 1.5;
}

.answer-option::before {
    content: '>';
    flex-shrink: 0;
    opacity: 0;
    transition: all 0.15s ease;
    font-size: 1em;
    color: var(--red);
}

.answer-option:active,
.answer-option.selected {
    background: rgba(255, 0, 0, 0.1);
    border-color: var(--red);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.answer-option:active::before,
.answer-option.selected::before {
    opacity: 1;
    color: var(--red);
}

.answer-option.correct {
    background: rgba(255, 0, 0, 0.2);
    border-color: var(--red);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
    animation: correctFlash 0.5s ease-out;
}

.answer-option.correct::before {
    content: '✓';
    color: var(--red);
    font-weight: bold;
    opacity: 1;
}

.answer-option.incorrect {
    background: rgba(139, 0, 0, 0.2);
    border-color: var(--blood-red);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.6);
    animation: incorrectShake 0.5s ease-out;
}

.answer-option.incorrect::before {
    content: '✕';
    color: var(--blood-red);
    font-weight: bold;
    opacity: 1;
}

@keyframes correctFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.question-feedback {
    margin-top: 20px;
    padding: 16px;
    background: transparent;
    border: 2px solid var(--dark-red);
    border-radius: 0;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

.feedback-result {
    font-size: clamp(1.3em, 4.5vw, 1.6em);
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    color: var(--red);
    text-shadow: 0 0 10px var(--red);
}

.feedback-result.correct {
    color: var(--red);
    text-shadow: 0 0 15px var(--red);
}

.feedback-result.incorrect {
    color: var(--blood-red);
    text-shadow: 0 0 10px var(--blood-red);
}

.feedback-explanation {
    font-size: clamp(0.95em, 3.2vw, 1.05em);
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--red);
    text-align: center;
}

.feedback-points {
    font-size: clamp(1.1em, 3.8vw, 1.3em);
    color: var(--red);
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 0 10px var(--red);
}

.next-question-btn,
.continue-btn {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    color: var(--red);
    border: 2px solid var(--red);
    border-radius: 0;
    cursor: pointer;
    font-family: 'Benguiat', 'VT323', 'Courier New', monospace;
    font-size: clamp(1em, 3.5vw, 1.1em);
    font-weight: 600;
    transition: all 0.15s ease;
    min-height: 44px;
    text-shadow: 0 0 8px var(--red);
}

.next-question-btn:active,
.continue-btn:active {
    background: var(--red);
    color: var(--black);
    text-shadow: none;
}

.continue-btn.secondary {
    background: transparent;
    color: var(--dark-red);
    border: 2px solid var(--dark-red);
    text-shadow: 0 0 8px var(--dark-red);
}

.continue-btn.secondary:active {
    background: var(--dark-red);
    color: var(--black);
    text-shadow: none;
}

.progress-section {
    padding: 16px;
    background: transparent;
    border: 2px solid var(--dark-red);
    border-radius: 0;
}

.progress-label {
    font-size: clamp(0.9em, 3vw, 1em);
    color: var(--red);
    margin-bottom: 10px;
    font-weight: 500;
    text-shadow: 0 0 5px var(--red);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--black);
    border: 2px solid var(--red);
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--red);
    border-radius: 0;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--red);
}

.level-up-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
}

.level-up-title {
    font-size: clamp(2em, 8vw, 4em);
    color: var(--red);
    text-shadow: 0 0 30px var(--red);
    margin-bottom: 30px;
    animation: levelUpPulse 1s ease-in-out infinite;
}

@keyframes levelUpPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 30px var(--red);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 60px var(--red);
    }
}

.vecna-level-dialogue {
    font-size: clamp(1.2em, 4vw, 1.6em);
    color: var(--red);
    margin-bottom: 30px;
    max-width: 600px;
}

.results-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
}

.results-title {
    font-size: clamp(2em, 8vw, 3.5em);
    color: var(--red);
    text-shadow: 0 0 30px var(--red);
    margin-bottom: 30px;
    text-align: center;
}

.results-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.result-stat {
    background: rgba(10, 0, 0, 0.3);
    padding: 15px;
    border: 2px solid var(--red);
    text-align: center;
}

.result-label {
    display: block;
    font-size: clamp(1em, 3.5vw, 1.2em);
    color: var(--dark-red);
    margin-bottom: 8px;
}

.result-value {
    display: block;
    font-size: clamp(2em, 6vw, 2.5em);
    font-weight: bold;
    color: var(--red);
    text-shadow: 0 0 15px var(--red);
}

.result-title {
    color: var(--red);
    font-size: 2em;
    text-shadow: 0 0 15px var(--red);
}

.achievements-earned {
    margin-bottom: 30px;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--dark-red);
}

.achievement-item {
    padding: 12px;
    background: rgba(10, 0, 0, 0.3);
    border: 1px solid var(--red);
    margin-bottom: 8px;
}

.achievement-name {
    font-size: clamp(1.1em, 4vw, 1.4em);
    color: var(--red);
    font-weight: bold;
}

.achievement-desc {
    font-size: clamp(0.9em, 3vw, 1.1em);
    color: var(--dark-red);
}

.achievement-bonus {
    font-size: clamp(1em, 3.5vw, 1.2em);
    color: var(--red);
    margin-top: 4px;
}

.results-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: auto;
}

.leaderboard-container {
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.leaderboard-title {
    font-size: clamp(2em, 7vw, 3em);
    color: var(--red);
    text-shadow: 0 0 30px var(--red);
    text-align: center;
    margin-bottom: 30px;
}

.leaderboard-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(10, 0, 0, 0.3);
    border: 1px solid var(--dark-red);
    margin-bottom: 8px;
    transition: all 0.2s ease;
    font-size: clamp(1.1em, 4vw, 1.3em);
}

.leaderboard-item:active {
    background: rgba(255, 0, 0, 0.1);
    border-color: var(--red);
}

.leaderboard-item.top-3 {
    border-color: var(--red);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.lb-rank {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--red);
    min-width: 50px;
}

.lb-username {
    flex: 1;
    color: var(--red);
    padding: 0 10px;
}

.lb-points {
    font-size: 1.1em;
    color: var(--red);
    font-weight: bold;
}

@media (min-width: 600px) {
    .crt-container {
        padding: 20px;
    }

    .answer-options {
        grid-template-columns: 1fr 1fr;
    }

    .results-stats {
        grid-template-columns: 1fr 1fr;
    }

    .results-buttons {
        flex-direction: row;
    }

    .table-row {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .table-cell {
        border-right: 1px solid var(--dark-red);
        border-bottom: none;
    }

    .table-cell:last-child {
        border-right: none;
    }

    .table-row:not(.table-header) .table-cell {
        border-bottom: none;
    }
}

@media (hover: hover) {
    .answer-option:hover {
        background: rgba(255, 0, 0, 0.1);
        border-color: var(--red);
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
    }

    .answer-option:hover::before {
        opacity: 1;
        color: var(--red);
    }

    .next-question-btn:hover,
    .continue-btn:hover {
        background: var(--red);
        color: var(--black);
        text-shadow: none;
    }

    .continue-btn.secondary:hover {
        background: var(--dark-red);
        color: var(--black);
        text-shadow: none;
    }

    .window-btn:hover {
        background: var(--red);
        color: var(--black);
    }
}

.backrooms-container {
    padding: 20px;
    max-width: 100%;
    overflow: hidden;
    max-height: calc(100vh - 250px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.backrooms-content {
    margin-bottom: 20px;
}

.upside-down-text {
    transform: rotate(180deg) scaleX(-1);
    transform-origin: center;
    display: block;
    width: 100%;
}

.backrooms-text {
    font-family: 'VT323', 'Courier New', monospace;
    font-size: clamp(0.7em, 2.5vw, 0.9em);
    line-height: 1.4;
    color: var(--red);
    text-shadow: 0 0 8px var(--red);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--dark-red);
    overflow-x: auto;
    animation: backroomsGlitch 3s infinite;
}

@keyframes backroomsGlitch {
    0%, 90%, 100% {
        text-shadow: 0 0 8px var(--red);
        opacity: 1;
    }
    93% {
        text-shadow: 0 0 15px var(--red), 0 0 25px var(--red);
        opacity: 0.8;
    }
    95% {
        text-shadow: 0 0 8px var(--red);
        opacity: 1;
    }
}

#close-backrooms-btn {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .backrooms-text {
        font-size: 0.65em;
        padding: 10px;
    }

    .backrooms-container {
        padding: 15px;
        max-height: calc(100vh - 200px);
    }
}
