@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');
html {
    min-height: 100vh;
}
body {
    margin: 0;
    padding: 25px;
    font-family: "Roboto Mono", monospace;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    color: #222222;
}

:root {
    --red: #d52b1e;
    --ink: #20262d;
    --paper: #f7f8fa;
    --line: #dfe3e8;
    --blue: #4c7edb;
}

body {
    background:
        radial-gradient(circle at 100% 0%, rgba(213, 43, 30, 0.06), transparent 28rem),
        var(--paper);
}

.trivia-app {
    max-width: 760px;
    margin: 18px auto;
}

.topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.topbar h1 {
    margin: 2px 0 0;
    font-size: clamp(28px, 6vw, 44px);
    letter-spacing: -2px;
}

.eyebrow {
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin: 0;
}

.scoreboard {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #69717a;
    font-size: 13px;
}

.scoreboard strong {
    color: var(--ink);
    font-size: 28px;
}

.progress {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #dde1e5;
    margin-bottom: 18px;
}

.progress div {
    height: 100%;
    background: var(--red);
    transition: width 250ms ease;
}

.question-card {
    background: white;
    border: 2px solid var(--ink);
    border-radius: 16px;
    box-shadow: 0 3px 0 rgba(32, 38, 45, 0.16);
    padding: clamp(22px, 5vw, 42px);
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #7a828b;
    font-size: 13px;
}

.category {
    display: inline-block;
    border-radius: 999px;
    background: #edf3ff;
    color: #315da8;
    padding: 7px 10px;
    font-weight: 800;
}

.category-towns { background: #fff1e8; color: #9a501f; }
.category-lakes { background: #e9f7f7; color: #28787b; }
.category-rivers { background: #edf0ff; color: #535ba2; }
.category-mountains { background: #eff3e9; color: #62713e; }

.question-card h2 {
    max-width: 620px;
    margin: 22px 0 26px;
    font-size: clamp(22px, 4vw, 32px);
    line-height: 1.25;
}

.found-panel {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.found-heading {
    display: flex;
    justify-content: space-between;
    color: #69717a;
    font-size: 13px;
    margin-bottom: 8px;
}

.found-heading strong {
    color: var(--ink);
}

.found-grid {
    display: grid;
    gap: 7px;
}

.found-item {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 10px;
}

.found-item .rank {
    color: #8a929b;
    font-size: 12px;
}

.found-item strong,
.found-item small {
    display: block;
}

.found-item small {
    color: #69717a;
    margin-top: 2px;
}

.rarity,
.rarity-badge {
    border-radius: 999px;
    background: #edf0f3;
    color: #59616a;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.rarity-ultra-rare,
.rarity-badge {
    background: #fff0ee;
    color: #922218;
}

.rarity-very-rare {
    background: #f3ecff;
    color: #67449a;
}

.rarity-rare {
    background: #fff4dc;
    color: #8a6417;
}

.rarity-uncommon {
    background: #eaf7f1;
    color: #176943;
}

.empty-found {
    color: #8a929b;
    font-size: 13px;
    margin: 10px 0 4px;
}

.next-category {
    width: 100%;
    min-height: 46px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.choice {
    min-height: 58px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    padding: 10px 13px;
    transition: transform 120ms ease, border 120ms ease, background 120ms ease;
}

.choice:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: #9ba5af;
}

.choice span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-right: 9px;
    border-radius: 6px;
    background: #edf0f3;
    font-size: 12px;
}

.choice.correct {
    border-color: #1e9b64;
    background: #eaf7f1;
}

.choice.wrong {
    border-color: #d52b1e;
    background: #fff0ee;
}

.answer-form {
    margin-top: 22px;
}

.answer-form label {
    display: block;
    color: #69717a;
    font-size: 13px;
    margin-bottom: 7px;
}

.answer-row {
    display: flex;
    gap: 8px;
}

.answer-row input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    font: inherit;
}

.answer-row input:focus {
    outline: 3px solid rgba(76, 126, 219, 0.14);
    border-color: var(--blue);
}

.submit,
.next,
.play-again {
    border: 0;
    border-radius: 8px;
    background: var(--ink);
    color: white;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.submit {
    padding: 0 18px;
}

.feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 9px;
    margin-top: 18px;
    padding: 14px 16px;
}

.feedback.success { background: #eaf7f1; color: #176943; }
.feedback.miss { background: #fff0ee; color: #922218; }
.feedback p { margin: 4px 0 0; color: #59616a; font-size: 13px; }

.next {
    flex: none;
    background: white;
    color: var(--ink);
    border: 1px solid currentColor;
    padding: 11px 13px;
}

.finish {
    min-height: 340px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.finish h2 {
    margin: 12px 0 10px;
}

.final-score {
    color: var(--red);
    font-size: 72px;
    line-height: 1;
    font-weight: 800;
}

.final-score span {
    display: block;
    color: #7a828b;
    font-size: 13px;
    margin-top: 8px;
}

.play-again {
    margin-top: 22px;
    padding: 14px 22px;
}

@media (max-width: 600px) {
    body { padding: 14px; }
    .choices { grid-template-columns: 1fr; }
    .answer-row { flex-direction: column; }
    .submit { height: 48px; }
    .feedback { align-items: flex-start; flex-direction: column; }
    .next { width: 100%; }
}
.vishidden {
    visibility: hidden;
}
.floatright {
    float: right;
}
.code {
    text-decoration: underline;
}
.points::after {
    content: " pts";
}