* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #07111f;
    --surface: #0d1b2a;
    --surface-light: #13263a;
    --border: rgba(255, 255, 255, 0.09);
    --text: #f5f7fa;
    --muted: #91a4b8;
    --accent: #35d0ba;
    --accent-dark: #159c8b;
    --danger: #ff6b6b;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(53, 208, 186, 0.12), transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(52, 152, 219, 0.10), transparent 30%),
        var(--bg);
    color: var(--text);
    font-family: Inter, Segoe UI, Arial, sans-serif;
    line-height: 1.6;
}

.topbar {
    height: 72px;
    padding: 0 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 17, 31, 0.88);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.4px;
}

.brand strong {
    color: var(--accent);
}

.brand-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(53, 208, 186, 0.4);
    border-radius: 9px;
    color: var(--accent);
}

.header-status {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(53, 208, 186, 0.8);
}

.container {
    width: min(1100px, 90%);
    margin: 0 auto;
    padding: 60px 0 80px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

#loadingScreen {
    min-height: 65vh;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

#loadingScreen.active {
    display: flex;
}

.loader {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hero {
    min-height: 360px;
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, 0.85) 100%),
        linear-gradient(135deg, #17334a, #07111f);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 35%, rgba(53, 208, 186, 0.18), transparent 25%),
        linear-gradient(120deg, transparent 50%, rgba(255,255,255,0.025) 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 42px;
    max-width: 850px;
}

.eyebrow {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 18px;
}

h2 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 12px;
}

h3 {
    font-size: 17px;
    margin-bottom: 16px;
}

.scenario-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #b9c7d5;
    font-size: 14px;
    margin-bottom: 22px;
}

.separator {
    color: #526579;
}

#briefing {
    max-width: 760px;
    color: #d4dde6;
    font-size: 16px;
}

.objectives-card,
.results-card,
.leaderboard-card {
    margin-top: 22px;
    padding: 30px;
    background: rgba(13, 27, 42, 0.86);
    border: 1px solid var(--border);
    border-radius: 20px;
}

#objectives {
    display: grid;
    gap: 10px;
}

.objective {
    padding: 12px 15px;
    border-radius: 10px;
    background: rgba(255,255,255,0.035);
    color: #c9d5e0;
}

.objective::before {
    content: "✓";
    color: var(--accent);
    font-weight: 700;
    margin-right: 10px;
}

.questions-section {
    margin-top: 60px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 26px;
}

#questionProgress {
    color: var(--muted);
    font-size: 13px;
}

.question-card {
    margin-bottom: 22px;
    padding: 28px;
    background: rgba(13, 27, 42, 0.9);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.question-number {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 9px;
}

.question-text {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 20px;
}

.choices {
    display: grid;
    gap: 10px;
}

.choice {
    position: relative;
}

.choice input {
    position: absolute;
    opacity: 0;
}

.choice label {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px 17px;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    color: #c5d0db;
    transition: 0.2s ease;
}

.choice label:hover {
    border-color: rgba(53, 208, 186, 0.45);
    background: rgba(53, 208, 186, 0.04);
}

.choice input:checked + label {
    border-color: var(--accent);
    background: rgba(53, 208, 186, 0.08);
    color: white;
}

.choice-letter {
    min-width: 28px;
    height: 28px;
    border: 1px solid #42576b;
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
}

.choice input:checked + label .choice-letter {
    background: var(--accent);
    border-color: var(--accent);
    color: #06131c;
}

.primary-button,
.secondary-button {
    border: none;
    border-radius: 11px;
    padding: 15px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.primary-button {
    margin-top: 18px;
    background: var(--accent);
    color: #06131c;
}

.primary-button:hover {
    background: #52e0cc;
    transform: translateY(-1px);
}

.primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.secondary-button {
    margin-top: 24px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.secondary-button:hover {
    border-color: var(--accent);
}

.results-card,
.leaderboard-card {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.score-display {
    margin: 35px 0 5px;
    text-align: center;
}

#score {
    font-size: 90px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -5px;
}

.score-display span {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 2px;
}

.percentage-display {
    text-align: center;
    color: var(--accent);
    font-size: 25px;
    font-weight: 700;
    margin-bottom: 35px;
}

.result-item {
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.result-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 8px;
}

.result-score {
    color: var(--accent);
    font-weight: 700;
}

.result-rationale {
    color: var(--muted);
    font-size: 14px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 70px 1fr 120px 100px;
    gap: 15px;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.rank {
    color: var(--accent);
    font-weight: 800;
}

.player {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leader-score {
    text-align: right;
    font-weight: 700;
}

.leader-percentage {
    text-align: right;
    color: var(--muted);
}

footer {
    border-top: 1px solid var(--border);
    padding: 24px 6%;
    display: flex;
    justify-content: space-between;
    color: #64778b;
    font-size: 12px;
}

@media (max-width: 700px) {
    .container {
        width: 94%;
        padding-top: 30px;
    }

    .topbar {
        padding: 0 3%;
    }

    .header-status {
        display: none;
    }

    .hero-content {
        padding: 28px;
    }

    .objectives-card,
    .question-card,
    .results-card,
    .leaderboard-card {
        padding: 22px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .leaderboard-row {
        grid-template-columns: 40px 1fr 70px;
    }

    .leader-percentage {
        display: none;
    }

    footer {
        flex-direction: column;
        gap: 6px;
    }
}