* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.25), transparent 30%),
        linear-gradient(135deg, #1e40af, #16a34a 55%, #facc15);
}

.page {
    width: min(1120px, 94%);
    margin: 0 auto;
    padding: 28px 0;
}

.intro-card,
.game-card {
    background: rgba(8, 20, 40, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}

.intro-card {
    text-align: center;
    margin-bottom: 24px;
}

h1 {
    margin: 0 0 10px;
    font-size: clamp(34px, 5vw, 62px);
    color: #facc15;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 5px 0 rgba(0, 0, 0, 0.4);
}

.intro-card p {
    max-width: 800px;
    margin: 0 auto 18px;
    line-height: 1.5;
    color: #e7f6ff;
}

.settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
    margin: 22px auto;
    max-width: 720px;
}

.field {
    text-align: left;
    background: rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 18px;
}

label {
    display: block;
    font-weight: 800;
    margin-bottom: 10px;
    color: #facc15;
}

select {
    width: 100%;
    padding: 13px 14px;
    border: none;
    border-radius: 12px;
    outline: none;
    font-size: 16px;
}

button {
    border: none;
    border-radius: 14px;
    padding: 13px 22px;
    background: #facc15;
    color: #10203b;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    background: #fbbf24;
}

.controls,
.hint {
    font-size: 14px;
    color: #d7ecff;
}

.top-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.stat {
    background: #07172f;
    border-radius: 16px;
    padding: 12px;
    text-align: center;
}

.stat span {
    display: block;
    font-size: 13px;
    color: #b9d8ff;
    margin-bottom: 4px;
}

.stat strong {
    font-size: 23px;
    color: #facc15;
}

canvas {
    width: 100%;
    display: block;
    border-radius: 18px;
    background: #6ee7b7;
    border: 4px solid rgba(255, 255, 255, 0.28);
}

.hint {
    text-align: center;
    margin-bottom: 0;
}

.quiz-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.68);
}

.quiz-card {
    width: min(620px, 95%);
    background: #ffffff;
    color: #10203b;
    border-radius: 24px;
    padding: 26px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
}

.quiz-label {
    display: inline-block;
    margin: 0 0 12px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #facc15;
    color: #10203b;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 13px;
}

.quiz-card h2 {
    margin: 0 0 20px;
    font-size: 24px;
}

.quiz-answers {
    display: grid;
    gap: 12px;
}

.quiz-answers button {
    width: 100%;
    background: #2563eb;
    color: white;
    text-align: left;
}

.quiz-answers button:hover {
    background: #1d4ed8;
}

.quiz-answers button.correct-answer {
    background: #16a34a;
}

.quiz-answers button.wrong-answer {
    background: #dc2626;
}

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

.hidden {
    display: none;
}

@media (max-width: 760px) {
    .settings,
    .top-bar {
        grid-template-columns: 1fr;
    }

    button {
        width: 100%;
    }
}
