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

html { background: #000; min-height: 100%; }

body {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    background: #000;
    color: #c8c8c8;
    min-height: 100vh;
    padding: 2rem 1rem 4rem;
    line-height: 1.6;
}

/* ?? Back link ?? */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #555;
    text-decoration: none;
    letter-spacing: 0.06em;
    margin-bottom: 2.5rem;
    transition: color 0.15s;
}
.back-link:hover { color: #aaa; }
.back-link::before { content: '<'; }

/* ?? Layout ?? */
.container {
    max-width: 680px;
    margin: 0 auto;
}

/* ?? Header ?? */
.header {
    border-bottom: 1px solid #222;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}
.header-title {
    font-size: 1.6rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.header-sub {
    font-size: 0.75rem;
    color: #555;
    letter-spacing: 0.12em;
}

/* ?? Prompt line ?? */
.prompt-line {
    font-size: 0.8rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2rem;
}
.prompt-line .cwd { color: #888; }
.prompt-cursor {
    display: inline-block;
    width: 7px;
    height: 13px;
    background: #777;
    animation: blink 1.1s step-end infinite;
    vertical-align: -2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ?? Quiz container ?? */
#quiz-container {
    margin-bottom: 1.8rem;
}

/* ?? Progress ?? */
.progress {
    font-size: 0.78rem;
    color: #555;
    letter-spacing: 0.08em;
    margin-bottom: 1.8rem;
    padding-left: 2px;
}

/* ?? Question text ?? */
.question-text {
    font-size: 0.92rem;
    color: #e0e0e0;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 14px;
    background: #0d0d0d;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
}

/* ?? Options ?? */
.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.8rem;
}

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: #0b0b0b;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #c8c8c8;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.option:hover {
    background: #111;
    border-color: #333;
    color: #fff;
}

.option-letter {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    color: #555;
    min-width: 24px;
}

.option.correct {
    background: #0b1a0b;
    border-color: #2a5a2a;
    color: #88cc88;
}

.option.wrong {
    background: #1a0b0b;
    border-color: #5a2a2a;
    color: #cc8888;
}

.option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ?? Loading ?? */
.loading {
    font-size: 0.85rem;
    color: #555;
    text-align: center;
    padding: 2rem;
    letter-spacing: 0.06em;
}

/* ?? Result block ?? */
.result-block {
    display: none;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

#results-screen { display: none; }
#results-screen.show { display: block; }

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #0d0d0d;
    border-bottom: 1px solid #1e1e1e;
}

.result-label {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #555;
}

.result-body {
    padding: 14px;
    background: #080808;
}

.score {
    font-size: 1.6rem;
    color: #88cc88;
    font-weight: 500;
    letter-spacing: 0.06em;
    margin: 8px 0;
}

.result-message {
    font-size: 0.85rem;
    color: #aaa;
    letter-spacing: 0.04em;
    margin: 12px 0 16px;
}

/* ?? Run button (Play again) ?? */
.run-btn {
    font-family: inherit;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    width: 100%;
    padding: 13px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.4rem;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.run-btn::before { content: '?'; font-size: 0.7rem; color: #555; }
.run-btn:hover { color: #fff; border-color: #555; background: #111; }
.run-btn:active { background: #1a1a1a; }

/* ?? Status line ?? */
.status-line {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: #555;
    margin-top: 1.2rem;
    min-height: 18px;
    padding-left: 2px;
    transition: color 0.2s;
}
.status-line.ok { color: #668866; }
.status-line.err { color: #886666; }

/* ?? Footer ?? */
.footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #1a1a1a;
    font-size: 0.72rem;
    color: #333;
    letter-spacing: 0.1em;
    text-align: right;
}
