:root {
    --bg: #000000;
    --surface: rgba(20, 20, 25, 0.88);
    --surface-strong: #1a1a24;
    --text: #ffffff;
    --muted: #a0a0a0;
    --accent: #5E17EB;
    --accent-dark: #CCFF00;
    --accent-soft: rgba(94, 23, 235, 0.2);
    --success: #CCFF00;
    --error: #E50000;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(94, 23, 235, 0.5), transparent 45%),
        radial-gradient(circle at bottom right, rgba(229, 0, 0, 0.4), transparent 45%),
        radial-gradient(circle at bottom left, rgba(204, 255, 0, 0.25), transparent 45%),
        linear-gradient(180deg, #111 0%, #000 100%);
}

button,
input,
textarea,
select {
    font: inherit;
}

.app-shell {
    min-height: 100dvh;
    padding: 16px;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.screen {
    display: none;
    width: 100%;
    max-width: 440px;
    min-height: calc(100dvh - 32px);
    margin: 0 auto;
    flex-direction: column;
    gap: 16px;
}

.screen--active {
    display: flex;
}

.hero-image {
    flex: 0 0 34vh;
    min-height: 220px;
    max-height: 320px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-image--small {
    flex-basis: 24vh;
    min-height: 170px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.panel {
    flex: 1;
    background: var(--surface);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 24px 20px 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel--quiz {
    justify-content: flex-start;
    gap: 18px;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-dark);
}

h1,
h2 {
    margin: 0;
    line-height: 1.08;
}

h1 {
    font-size: clamp(2rem, 6vw, 2.55rem);
}

h2 {
    font-size: clamp(1.55rem, 5vw, 2rem);
}

.lead,
.final-score,
.feedback {
    font-size: 1rem;
    line-height: 1.5;
}

.lead {
    color: var(--muted);
    margin: 14px 0 24px;
}

.primary-btn {
    width: 100%;
    border: 0;
    border-radius: 18px;
    padding: 16px 20px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, #E50000 100%);
    box-shadow: 0 14px 24px rgba(94, 23, 235, 0.3);
}

.primary-btn:active {
    transform: translateY(1px);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-label,
.score-chip {
    font-size: 0.92rem;
    font-weight: 700;
}

.score-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--accent-dark);
}

.progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.progress-fill {
    width: 20%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #E50000 0%, #CCFF00 100%);
    transition: width 0.25s ease;
}

.question-block {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.options {
    display: grid;
    gap: 12px;
}

.option-btn {
    width: 100%;
    padding: 15px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    text-align: left;
    color: var(--text);
    font-weight: 600;
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.option-btn:active {
    transform: scale(0.99);
}

.option-btn.is-correct {
    background: rgba(204, 255, 0, 0.15);
    border-color: rgba(204, 255, 0, 0.5);
    color: var(--success);
}

.option-btn.is-wrong {
    background: rgba(229, 0, 0, 0.15);
    border-color: rgba(229, 0, 0, 0.5);
    color: var(--error);
}

.option-btn:disabled {
    color: #777;
}

.feedback {
    min-height: 24px;
    margin: 0;
    font-weight: 800;
}

.feedback.success {
    color: var(--success);
}

.feedback.error {
    color: var(--error);
}

.final-score {
    margin: 16px 0 24px;
    color: var(--muted);
}

@media (min-width: 700px) {
    .app-shell {
        padding: 24px;
    }

    .screen {
        min-height: calc(100dvh - 48px);
    }
}
