body {
    background-color: #081484;
    color: #fff;
    text-align: center;
    font-family: sans-serif;
    margin: 0;
    padding: 0;
}

.site-main {
    padding: 2rem;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.25rem;
    border-bottom: 2px solid #f5c518;
    background: rgba(0, 0, 40, 0.25);
}

.navbar-spacer {
    flex: 1;
}

.navbar-brand {
    flex: 1;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #f5c518;
    text-decoration: none;
}

.navbar-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
    align-items: center;
}

.nav-icon-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.15s, background 0.15s;
}

.nav-icon-btn:hover {
    color: #f5c518;
    background: rgba(245, 197, 24, 0.1);
}

a {
    color: #f5c518;
}

h1 a {
    color: #f5c518;
    text-decoration: none;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.home-hero {
    max-width: 440px;
    margin: 4rem auto;
}

.home-tagline {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
    opacity: 0.8;
    margin: 0 0 2.5rem;
    letter-spacing: 0.04em;
}

.btn-play {
    display: inline-block;
    background: #f5c518;
    color: #081484;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    padding: 0.9rem 2.75rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.btn-play:hover {
    background: #ffd740;
    color: #081484;
    transform: translateY(-2px);
}

.home-empty {
    opacity: 0.65;
    font-style: italic;
}

.round-label {
    font-size: 2rem;
    letter-spacing: 0.1em;
    font-family: Georgia, "Times New Roman", serif;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #f5c518;
}

.dollar-label {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    text-transform: uppercase;
    color: #f5c518;
    font-size: 1.6rem;
    letter-spacing: 0.08em;
}

.clue-card {
    border: 3px solid #f5c518;
    border-bottom: none;
    padding: 2rem 1.5rem;
    max-width: 400px;
    min-width: 400px;
    margin: 0 auto 0;
}

.clue-category {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    text-transform: uppercase;
    color: #f5c518;
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    margin: 0 0 0.5rem;
}

/* 400px card + 2rem font ≈ 16–18 chars/line → 4–7 lines for typical clues */
.question {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 2rem;
    line-height: 1.4;
    margin: 0 0 1.5rem;
}

.clue-prompt {
    font-size: 1rem;
    margin: 0 0 1rem;
}

.answer-panel {
    max-width: calc(400px + 3rem);
    min-width: calc(400px + 3rem);
    margin: 0 auto 1.5rem;
    border: 3px solid #f5c518;
    border-top: none;
}

.answer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #081484;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.04em;
}

.meta-label {
    color: #f5c518;
    font-weight: bold;
}

.answer-form {
    display: flex;
    align-items: stretch;
    gap: 0.6rem;
    background: #081484;
    border-top: 1px solid rgba(245, 197, 24, 0.3);
    padding: 0;
}

.answer-form input[type="text"],
.answer-form input[type="number"] {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: max(1.15rem, 16px); /* >= 16px prevents iOS auto-zoom on focus */
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    outline: none;
    padding: 0.55rem 0 0.55rem 0.75rem;
    min-width: 0;
}

.answer-form input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.answer-form input[type="number"]::-webkit-inner-spin-button,
.answer-form input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.answer-form input[type="text"]::placeholder,
.answer-form input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.btn-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-check {
    background: #040c53;
    color: #f5c518;
    font-size: 1.3rem;
    border-radius: 0;
    width: 3rem;
    height: auto;
    aspect-ratio: 1;
}

.score {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 2rem;
    line-height: 1.4;
    margin: 1rem 0 0;
}

.progress {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 0.25rem;
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(8, 20, 132, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.confirm-dialog {
    background: #0a1a6e;
    border: 2px solid #f5c518;
    padding: 2rem 2rem 1.5rem;
    max-width: 360px;
    width: 90%;
    text-align: center;
}

.confirm-dialog h3 {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #f5c518;
    margin: 0 0 1rem;
}

.confirm-correct-answer {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    font-size: 1.6rem;
    margin: 0 0 1rem;
}

.confirm-divider {
    border: none;
    border-top: 1px solid rgba(245, 197, 24, 0.4);
    margin: 0 0 1rem;
}

.confirm-your-answer {
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
    opacity: 0.85;
}

.confirm-your-answer strong {
    color: #f5c518;
}

.confirm-buttons {
    display: flex;
    gap: 0.75rem;
}

.confirm-buttons form {
    flex: 1;
}

.confirm-buttons button {
    width: 100%;
    padding: 0.65rem 0;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    letter-spacing: 0.05em;
}

.btn-no {
    background: #c0392b;
    color: #fff;
}

.btn-yes {
    background: #27ae60;
    color: #fff;
}

.play-layout {
    position: relative;
}

.progress-track {
    position: absolute;
    right: calc(50% + 205px + 2rem);
    top: 3px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.progress-box {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(245, 197, 24, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.progress-box.correct {
    border-color: #27ae60;
    background: #27ae60;
    color: #fff;
}

.progress-box.wrong {
    border-color: #c0392b;
    background: #c0392b;
    color: #fff;
}

/* Score animations */
.score-wrapper {
    position: relative;
    height: 2.8rem;
    margin: 1rem 0 0;
}

.score-wrapper .score {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0;
}

/* Correct: pop + confetti burst */
@keyframes score-pop-out {
    0%   { transform: scale(1);   opacity: 1; }
    40%  { transform: scale(1.4); opacity: 1; }
    100% { transform: scale(0);   opacity: 0; }
}

@keyframes score-pop-in {
    0%   { transform: scale(0);    opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    80%  { transform: scale(0.95); }
    100% { transform: scale(1);    opacity: 1; }
}

@keyframes confetti-burst {
    from { opacity: 1; transform: translate(-50%, -50%) scale(0); }
    65%  { opacity: 1; }
    to   { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.score-wrapper.score--correct .score-old {
    animation: score-pop-out 0.3s ease-in forwards;
}

.score-wrapper.score--correct .score-new {
    animation: score-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s both;
}

.score-wrapper.score--correct::before,
.score-wrapper.score--correct::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
    animation: confetti-burst 0.65s ease-out 0.05s both;
}

.score-wrapper.score--correct::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f5c518;
    box-shadow:
        -52px -36px 0 2px #27ae60,
         52px -36px 0 2px #e74c3c,
        -28px -58px 0 2px #3498db,
         28px -58px 0 2px #f5c518,
        -66px   8px 0 2px #9b59b6,
         66px   8px 0 2px #e74c3c;
}

.score-wrapper.score--correct::after {
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: #3498db;
    box-shadow:
        -38px  46px 0 0 #f5c518,
         38px  46px 0 0 #27ae60,
           0px  64px 0 0 #e74c3c,
        -60px -20px 0 0 #3498db,
         60px -20px 0 0 #9b59b6;
}

/* Wrong: shake + chromatic aberration */
@keyframes score-shake {
    0%   { transform: translateX(0);    text-shadow: none; }
    10%  { transform: translateX(-6px); text-shadow: 3px 0 #f00, -3px 0 #0ff; color: #c0392b; }
    20%  { transform: translateX(6px);  text-shadow: -4px 0 #f00, 4px 0 #00f; color: #c0392b; }
    30%  { transform: translateX(-5px); text-shadow: 2px 0 #f00, -2px 0 #0ff; color: #c0392b; }
    40%  { transform: translateX(5px);  text-shadow: -3px 0 #f00, 3px 0 #00f; color: #c0392b; }
    50%  { transform: translateX(-4px); text-shadow: 3px 0 #f00, -3px 0 #0ff; color: #c0392b; }
    60%  { transform: translateX(3px);  text-shadow: -2px 0 #f00, 2px 0 #00f;  color: #c0392b;}
    70%  { transform: translateX(-2px); text-shadow: none; }
    80%  { transform: translateX(2px); }
    90%  { transform: translateX(-1px); }
    100% { transform: translateX(0);    text-shadow: none; }
}

.score--wrong {
    animation: score-shake 0.7s ease-out forwards;
}

/* ── Mobile play page ────────────────────────────────────────── */

.m-play {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.m-topbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid rgba(245, 197, 24, 0.3);
}

.m-round {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f5c518;
    font-weight: bold;
}

.m-progress {
    display: flex;
    gap: 0.2rem;
}

.m-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 3px solid #f5c518;
    border-bottom: none;
    padding: 1rem;
    min-height: 200px;
    text-align: center;
}

.m-card-category {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    text-transform: uppercase;
    color: #f5c518;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    margin: 0 0 0.25rem;
}

.m-card-value {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: bold;
    color: #f5c518;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    margin: 0 0 0.5rem;
}

.m-card-clue {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.m-card-clue .question {
    font-size: 1.55rem;
    margin: 0;
}

.m-card-clue .m-fj-prompt {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 1rem;
    opacity: 0.55;
    margin: 0;
}

.m-answer {
    border: 3px solid #f5c518;
    border-top: none;
}

.m-score-row {
    padding-top: 0.5rem;
    text-align: center;
}

.m-score-row .score {
    font-size: 1.5rem;
    margin: 0;
}

.m-score-row .score-wrapper {
    height: 2.2rem;
    margin: 0;
}
