:root {
    --bg-color: #020a14;
    --terminal-bg: #05101a;
    --text-primary: #ADD1FF;
    /* Light Blue / Baby Blue */
    --text-dim: #5D8AA8;
    /* Airforce Blue */
    --text-glow: #ADD1FF;
    --accent: #1A2E44;
    --error: #FF6B6B;
    --border-color: #ADD1FF;
    --font-main: 'Fira Code', 'Courier New', monospace;
}

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

body {
    background-color: #F0F8FF;
    /* AliceBlue - Light background as requested previously for high contrast */
    color: var(--text-primary);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    line-height: 1.6;
}

/* CRT Effects */
.scanline {
    width: 100%;
    height: 10px;
    z-index: 100;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(173, 209, 255, 0.04) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    position: absolute;
    bottom: 100%;
    animation: scanline 8s linear infinite;
    pointer-events: none;
}

.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 99;
}

@keyframes scanline {
    0% {
        bottom: 100%;
    }

    100% {
        bottom: -20px;
    }
}

/* Container */
.terminal-container {
    width: 95%;
    max-width: 1000px;
    height: 90vh;
    background-color: rgba(2, 10, 20, 0.98);
    border: 2px solid var(--border-color);
    box-shadow: 0 0 30px rgba(173, 209, 255, 0.2), inset 0 0 40px rgba(173, 209, 255, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
}

/* Header */
.terminal-header {
    background: rgba(173, 209, 255, 0.1);
    border-bottom: 2px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--text-primary);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px var(--text-primary);
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Main Content */
#app-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

.screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}

.screen.active {
    display: flex;
    opacity: 1;
}

.hidden {
    display: none !important;
}

/* Start Screen */
#start-screen {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ascii-art {
    font-size: 0.7rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-shadow: 0 0 8px var(--text-dim);
    line-height: normal;
}

@media (min-width: 768px) {
    .ascii-art {
        font-size: 1rem;
    }
}

.mission-brief {
    text-align: left;
    margin-bottom: 3rem;
    border-left: 3px solid var(--text-primary);
    padding-left: 1.5rem;
    background: rgba(173, 209, 255, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
    width: 100%;
    max-width: 600px;
}

.mission-brief p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Buttons */
.cyber-btn {
    background: transparent;
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    padding: 15px 45px;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
}

.cyber-btn:hover {
    background: var(--text-primary);
    color: #000;
    box-shadow: 0 0 35px rgba(173, 209, 255, 0.4);
}

.cyber-btn:active {
    transform: scale(0.97);
}

/* Quiz UI */
.quiz-status-bar {
    display: flex;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px dashed var(--text-dim);
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-item .label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

.status-item .value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-primary);
}

.question-terminal {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.prompt-line {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.prompt-user {
    color: var(--text-primary);
    margin-right: 10px;
}

.command {
    color: #fff;
}

.question-output {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    min-height: 100px;
    line-height: 1.5;
    color: #fff;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.option-btn {
    background: rgba(173, 209, 255, 0.05);
    border: 1px solid var(--text-dim);
    color: #fff;
    padding: 22px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    transition: all 0.2s;
    position: relative;
    border-radius: 4px;
}

.option-btn:hover {
    background: rgba(173, 209, 255, 0.15);
    border-color: var(--text-primary);
    transform: translateX(5px);
}

.option-btn.correct {
    background: var(--text-primary);
    color: #000;
    box-shadow: 0 0 25px rgba(173, 209, 255, 0.5);
    border-color: var(--text-primary);
}

.option-btn.wrong {
    background: var(--error);
    color: #fff;
    border-color: var(--error);
    box-shadow: 0 0 25px rgba(255, 107, 107, 0.4);
}

/* Feedback */
.feedback-console {
    border: 1px solid var(--text-primary);
    background: rgba(0, 0, 0, 0.9);
    margin-top: auto;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.feedback-header {
    background: var(--text-primary);
    color: #000;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.feedback-content {
    padding: 20px;
    font-size: 1.1rem;
    color: #ddd;
}

/* Result Screen */
#result-screen {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.result-title {
    font-size: 3rem;
    margin-bottom: 3.5rem;
    text-shadow: 0 0 20px var(--text-primary);
}

.result-stats {
    display: flex;
    gap: 5rem;
    margin-bottom: 4rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-label {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.stat-value {
    font-size: 4rem;
    font-weight: bold;
    color: var(--text-primary);
}

.mission-status {
    font-size: 2.5rem;
    margin-bottom: 4.5rem;
    font-weight: bold;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--text-dim);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}