:root {
    --gold: #f6c445;
    --gold-2: #b8860b;
    --gold-soft: #ffe9a8;
    --blue-0: #05010f;
    --blue-1: #0a0a2e;
    --blue-2: #10123f;
    --blue-3: #1a1c5c;
    --purple: #2a1152;
    --ink: #eef1ff;
    --danger: #ff5a5a;
    --ok: #43e08a;
    --line: rgba(246, 196, 69, 0.35);
    --font: "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100dvh;
    font-family: var(--font), serif;
    color: var(--ink);
    background: radial-gradient(1200px 800px at 50% -10%, var(--purple) 0%, transparent 60%),
    radial-gradient(1000px 900px at 50% 120%, #120a3a 0%, transparent 55%),
    linear-gradient(160deg, var(--blue-1), var(--blue-0) 70%);
    overflow: hidden;
}

#bg-rays {
    position: fixed;
    inset: -20% -20% 0 -20%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(from 0deg at 50% 8%,
    rgba(120, 110, 255, 0.10) 0deg,
    transparent 12deg,
    rgba(246, 196, 69, 0.06) 24deg,
    transparent 36deg,
    rgba(120, 110, 255, 0.10) 48deg,
    transparent 60deg);
    animation: spin 90s linear infinite;
    opacity: 0.7;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- sweeping stage spotlights ---------- */
#spotlights {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#spotlights span {
    position: absolute;
    top: -34%;
    left: 50%;
    width: 34vmax;
    height: 150vmax;
    transform-origin: top center;
    filter: blur(10px);
    mix-blend-mode: screen;
    opacity: .8;
    /* conical: narrow at the source (top), fanning out toward the far end */
    clip-path: polygon(48% 0, 52% 0, 100% 100%, 0 100%);
}

#spotlights span:nth-child(1) {
    background: linear-gradient(to bottom, rgba(246, 196, 69, 0.18), transparent 62%);
}

#spotlights span:nth-child(2) {
    background: linear-gradient(to bottom, rgba(120, 110, 255, 0.18), transparent 62%);
}

#spotlights span:nth-child(3) {
    width: 22vmax;
    background: linear-gradient(to bottom, rgba(255, 90, 90, 0.10), transparent 55%);
}

#spotlights span:nth-child(4) {
    width: 26vmax;
    background: linear-gradient(to bottom, rgba(246, 196, 69, 0.12), transparent 60%);
}

#spotlights span:nth-child(5) {
    width: 20vmax;
    background: linear-gradient(to bottom, rgba(120, 110, 255, 0.14), transparent 58%);
}

@media (prefers-reduced-motion: reduce) {
    #spotlights span, #bg-rays {
        animation: none !important;
    }
}

/* ---------- question flash (roam intro, in-stage) ---------- */
/* the flash sits on top of the question/options area of the SAME screen.
   during the intro the question + options fade out and this fades in. */
.stage-body {
    position: relative;
}

.q-flash {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease, visibility .4s ease;
}

.stage-body.intro .q-flash {
    opacity: 1;
    visibility: visible;
}

/* question + options dynamically appear / disappear around the flash */
.stage-body .question-frame,
.stage-body .options {
    transition: opacity .4s ease, transform .4s ease;
}

.stage-body.intro .question-frame,
.stage-body.intro .options {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    pointer-events: none;
}

.q-flash-inner {
    text-align: center;
}

.q-flash-num {
    font-size: clamp(28px, 7vw, 72px);
    font-weight: 800;
    letter-spacing: .04em;
    color: #fff;
}

.q-flash-prize {
    margin-top: 10px;
    font-size: clamp(36px, 10vw, 108px);
    font-weight: 900;
    color: var(--gold, #f6c445);
}

/* ---------- screens ---------- */
.screen {
    position: relative;
    z-index: 1;
    display: none;
    height: 100%;
    overflow: hidden;
    padding: 28px clamp(14px, 4vw, 48px);

}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* ---------- intro ---------- */
#intro {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.intro-inner {
    max-width: 640px;
    animation: rise .8s ease both;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.logo-ring {
    width: 168px;
    height: 168px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 35%, #3a2a7a, #0a0a2e 70%);
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 8px rgba(246, 196, 69, 0.08),
    inset 0 0 40px rgba(0, 0, 0, 0.6);
    position: relative;
}

.logo-ring::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 2px dashed rgba(246, 196, 69, 0.35);
    animation: spin 24s linear infinite;
}

.logo-core .rupee {
    font-size: 84px;
    font-weight: 800;
    color: var(--gold);
}

.title {
    font-size: clamp(28px, 6vw, 46px);
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(180deg, #fff, var(--gold) 55%, var(--gold-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.subtitle {
    margin-top: 14px;
    font-size: clamp(15px, 2.4vw, 20px);
    color: var(--gold-soft);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.host-line {
    margin-top: 14px;
    color: #b9bff0;
}

.host-line b {
    color: #fff;
}

.fine-print {
    margin-top: 26px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #8a90c9;
    max-width: 520px;
    margin-inline: auto;
}

/* ---------- buttons ---------- */
.btn-primary {
    margin-top: 26px;
    cursor: pointer;
    font-family: var(--font), serif;
    font-weight: 700;
    font-size: 17px;
    color: #24170a;
    padding: 14px 34px;
    border: none;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform .12s ease, box-shadow .12s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

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

.btn-primary.big {
    font-size: 20px;
    padding: 16px 46px;
}

/* ---------- game layout ---------- */
#game {
    flex-direction: column;
    justify-content: center;
}

.game-grid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}

.stage {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ---------- concentric studio stage floor (KBC hot-seat look) ---------- */
.stage-floor {
    position: absolute;
    left: 50%;
    bottom: -34vh;
    transform: translateX(-50%);
    width: 150vw;
    height: 80vh;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle at 50% 100%,
            rgba(120, 150, 255, 0.10) 0 2px,
            transparent 2px 46px),
        radial-gradient(circle at 50% 100%,
            rgba(90, 120, 255, 0.22) 0%,
            rgba(40, 30, 110, 0.12) 40%,
            transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 50% 100%, #000 0%, transparent 72%);
    mask-image: radial-gradient(circle at 50% 100%, #000 0%, transparent 72%);
    opacity: .7;
}

/* ---------- top HUD: walk away · prize · lifelines ---------- */
.hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.hud-walkaway {
    cursor: pointer;
    font-family: var(--font), serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold-soft);
    padding: 9px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(30, 32, 90, 0.9), rgba(10, 10, 46, 0.9));
    border: 1.5px solid var(--gold);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: transform .12s ease, box-shadow .12s ease;
}

.hud-walkaway:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.hud-prize {
    flex: 1;
    text-align: center;
    font-weight: 900;
    font-size: clamp(20px, 3vw, 30px);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #fff, var(--gold) 55%, var(--gold-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

/* lifelines — circular KBC-style badges */
.lifelines {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.lifeline {
    cursor: pointer;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 32%, #2a2d7a, #0a0b30 78%);
    border: 2px solid var(--gold);
    color: var(--gold-soft);
    font-weight: 800;
    box-shadow: 0 0 0 3px rgba(246, 196, 69, 0.10),
        0 4px 14px rgba(0, 0, 0, 0.5),
        inset 0 0 14px rgba(0, 0, 0, 0.55);
    transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.lifeline:hover:not(.used) {
    transform: translateY(-3px);
    box-shadow: 0 0 0 3px rgba(246, 196, 69, 0.18),
        0 8px 22px rgba(0, 0, 0, 0.5);
}

.lifeline .ll-icon {
    font-size: 18px;
    line-height: 1;
}

.lifeline .ll-icon small {
    font-size: 12px;
    opacity: .8;
}

.lifeline.used {
    filter: grayscale(0.9) brightness(0.55);
    cursor: not-allowed;
    position: relative;
}

.lifeline.used::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    height: 3px;
    border-radius: 2px;
    background: var(--danger);
    transform: rotate(-38deg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.q-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 6px 0 14px;
}

/* circular question-number badge (KBC bottom-left plaque) */
.q-badge {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 32%, #23256b, #0a0b30 78%);
    border: 2.5px solid var(--gold);
    box-shadow: 0 0 0 3px rgba(246, 196, 69, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.5),
        inset 0 0 16px rgba(0, 0, 0, 0.5);
}

.q-badge-num {
    font-weight: 900;
    font-size: 24px;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.q-index {
    flex: 1;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 13px;
}

/* countdown timer ring */
.timer {
    position: relative;
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    --tdeg: 360deg;
    --tcol: var(--ok);
    background: conic-gradient(var(--tcol) var(--tdeg), rgba(255, 255, 255, 0.08) 0);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.5);
    transition: filter .2s ease;
}

.timer::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #1a1c5c, #0a0a2e 75%);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

#timerNum {
    position: relative;
    z-index: 1;
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.timer.low {
    animation: timerPulse .6s ease-in-out infinite;
}

.timer.low #timerNum {
    color: var(--danger);
}

@keyframes timerPulse {
    50% {
        transform: scale(1.06);
    }
}

.timer.done #timerNum {
    color: var(--danger);
}

/* time-up flash on the plate */
.question-frame.timeup {
    animation: timeUpFlash .5s ease 2;
    border-color: var(--danger);
}

@keyframes timeUpFlash {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

/* question frame — hexagon-ish plate */
.question-frame {
    position: relative;
    padding: 26px 32px;
    background: linear-gradient(180deg, rgba(30, 32, 90, 0.9), rgba(10, 10, 46, 0.9));
    border: 2px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
    min-height: 96px;
    display: grid;
    place-items: center;
}

.question-frame.q-enter {
    animation: plateIn .55s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes plateIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(.96);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: none;
    }
}

/* spotlight flash when an answer locks */
.question-frame.locking {
    animation: lockFlash .5s ease 3;
    border-color: #fff;
}

@keyframes lockFlash {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

.question-text {
    text-align: center;
    font-size: clamp(16px, 2.2vw, 22px);
    font-weight: 600;
    line-height: 1.45;
}

.erased {
    color: transparent;
    background: repeating-linear-gradient(90deg, #444a7a 0 8px, transparent 8px 14px);
    border-radius: 3px;
    user-select: none;
}

/* inline lifeline panel — occupies space below question, above options */
.lifeline-panel {
    display: none;
    position: relative;
    margin-top: 18px;
    background: linear-gradient(180deg, #14163f, #0a0a2a);
    border: 2px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 20px 22px;
}

.lifeline-panel.open {
    display: block;
    animation: rise .25s ease both;
}

.panel-close {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    background: none;
    border: none;
    color: #9aa0d8;
    font-size: 26px;
    line-height: 1;
}

/* options */
.options {
    margin-top: 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
}

.option {
    position: relative;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 22px;
    color: var(--ink);
    font-size: clamp(14px, 1.7vw, 17px);
    font-weight: 500;
    background:
        linear-gradient(180deg, rgba(34, 40, 110, 0.96), rgba(9, 10, 44, 0.96));
    border: 2px solid var(--gold-2);
    clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform .1s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.option {
    animation: optIn .5s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes optIn {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.option:hover:not(.disabled) {
    border-color: var(--gold);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.option .tag {
    color: var(--gold);
    font-weight: 800;
    min-width: 20px;
    padding-right: 14px;
    margin-right: 2px;
    border-right: 1px solid rgba(246, 196, 69, 0.35);
}

.option.selected {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%);
    border-color: #fff;
    color: #241700;
    font-weight: 700;
    animation: pulse .7s ease-in-out 3;
}

.option.selected .tag {
    color: #241700;
    border-right-color: rgba(0, 0, 0, 0.3);
    text-shadow: none;
}

.option.reveal-wrong {
    background: linear-gradient(180deg, #5a1020, #350913);
    border-color: var(--danger);
}

.option.disabled {
    opacity: .55;
    cursor: default;
}

/* while a lifeline panel is open: lock the other controls (options + other
   lifelines + walk away). The open panel and its close button stay usable. */
.panel-locked .option,
.panel-locked .lifeline,
.panel-locked .hud-walkaway {
    pointer-events: none;
}

.panel-locked .option:not(.disabled),
.panel-locked .lifeline:not(.used),
.panel-locked .hud-walkaway {
    opacity: .45;
    filter: grayscale(.6) brightness(.7);
    cursor: not-allowed;
    transition: opacity .15s ease, filter .15s ease;
}

/* kill hover lift/shadow on any locked button */
.panel-locked .option:hover,
.panel-locked .lifeline:hover,
.panel-locked .hud-walkaway:hover {
    transform: none;
    box-shadow: none;
}

.panel-locked .option:hover {
    border-color: var(--gold-2); /* undo hover gold border */
}

.real-answer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--gold-2);
    background: linear-gradient(180deg, rgba(246, 196, 69, .14), rgba(184, 134, 11, .08));
    animation: realAnswerIn .5s ease both;
}

.real-answer-tag {
    flex: none;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    color: #201400;
    background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}

.real-answer-text {
    color: var(--gold-soft);
    font-size: 1rem;
    line-height: 1.4;
}

@keyframes realAnswerIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    50% {
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
    }
}

.poll-bar-wrap {
    position: absolute;
    left: 0;
    bottom: -14px;
    width: 100%;
    padding: 0 6px;
}

.poll-bar {
    position: relative;
    height: 6px;
    border-radius: 4px;
    width: 0;
    background: linear-gradient(90deg, var(--gold-2), var(--gold));
    transition: width 1s cubic-bezier(.2, .8, .2, 1);
    overflow: hidden;
}

.poll-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
    to {
        transform: translateX(100%);
    }
}

.poll-pct {
    position: absolute;
    right: 10px;
    bottom: -4px;
    font-size: 11px;
    color: var(--gold-soft);
    font-weight: 700;
}

/* ---------- ladder ---------- */
.ladder-wrap {
    background: linear-gradient(180deg, rgba(16, 18, 63, 0.85), rgba(6, 6, 30, 0.9));
    border: 1.5px solid var(--gold-2);
    border-radius: 16px;
    padding: 14px 12px;
    position: sticky;
    top: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.ladder-title {
    text-align: center;
    color: var(--gold);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.ladder {
    list-style: none;
    display: flex;
    flex-direction: column-reverse;
    gap: 2px;
}

.ladder li {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--gold-soft);
}

.ladder li .amt {
    font-variant-numeric: tabular-nums;
}

.ladder li .lv {
    color: #6b70a8;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: right;
}

.ladder li.milestone {
    color: #fff;
}

.ladder li.milestone .amt {
    color: var(--gold-soft);
}

.ladder li.current {
    background: linear-gradient(90deg, var(--gold-2), var(--gold));
    color: #22160a;
    font-weight: 800;
}

.ladder li.current .lv {
    color: #4a3200;
}

.ladder li.current::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 7px solid var(--gold);
}

.ladder li.done {
    color: #7f86c2;
}

.ladder li.done .amt {
    opacity: .7;
}

.ladder li.grand {
    color: var(--gold);
    font-weight: 900;
}

/* ---------- win ---------- */
#win {
    align-items: flex-start;
    justify-content: center;
}

.win-inner {
    max-width: 620px;
    width: 100%;
    text-align: center;
    padding: 20px 0 60px;
    animation: rise .7s ease both;
    position: relative;
}

.win-kicker {
    font-size: clamp(26px, 5vw, 40px);
    color: var(--gold);
}

/* ---------- walked-away ending ---------- */
.gaveup-inner {
    max-width: 560px;
    width: 100%;
    text-align: center;
    padding: 20px 0 60px;
    animation: rise .6s ease both;
}

.gaveup-icon {
    font-size: clamp(46px, 9vw, 72px);
    color: var(--gold-soft);
    line-height: 1;
    margin-bottom: 8px;
}

.gaveup-kicker {
    font-size: clamp(24px, 5vw, 38px);
    color: var(--gold);
}

.gaveup-actions {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.gaveup-actions .btn-primary,
.gaveup-actions .btn-ghost {
    margin-top: 0;
}

.feedback-form {
    margin-top: 6px;
    text-align: left;
}

.fb-label {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--gold-soft);
}

.fb-label .req {
    color: var(--danger, #ff5a5a);
}

.fb-label .opt {
    color: #8a90c8;
    font-weight: 400;
}

.feedback-form input[type="text"],
.feedback-form input[type="email"],
.feedback-text {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(2, 2, 14, 0.5);
    border: 1.5px solid rgba(246, 196, 69, 0.4);
    color: #eef0ff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: normal;
}

.feedback-text {
    resize: vertical;
}

.fb-contact-row {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.fb-contact-row input {
    margin-top: 0;
    flex: 1;
    min-width: 0;
}

.fb-select {
    flex: 0 0 auto;
    padding: 12px 34px 12px 14px;
    border-radius: 12px;
    background: rgba(2, 2, 14, 0.5);
    border: 1.5px solid rgba(246, 196, 69, 0.4);
    color: #eef0ff;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    /* gold chevron */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffe9a8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.fb-select option {
    background: #14163f;
    color: #eef0ff;
}

.feedback-form input:focus,
.feedback-text:focus,
.fb-select:focus {
    outline: none;
    border-color: var(--gold);
}

.fb-error {
    color: var(--danger, #ff5a5a);
    font-size: 13.5px;
    min-height: 18px;
    margin-top: 10px;
}

/* Netlify honeypot — hidden from real users */
.hp {
    display: none;
}

.win-sub {
    margin-top: 6px;
    color: #b9bff0;
}

.prize-big {
    margin: 10px 0 26px;
    font-size: clamp(34px, 7vw, 58px);
    font-weight: 800;
    background: linear-gradient(180deg, #fff, var(--gold) 60%, var(--gold-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tax-card {
    text-align: left;
    background: linear-gradient(180deg, rgba(16, 18, 63, 0.92), rgba(6, 6, 30, 0.95));
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tax-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(246, 196, 69, 0.08);
    border-bottom: 1px solid var(--line);
    font-weight: 700;
    color: var(--gold-soft);
}

.tax-badge {
    font-size: 11px;
    background: var(--danger);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.tax-list {
    list-style: none;
    padding: 6px 0;
    max-height: 320px;
    overflow-y: auto;
}

.tax-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 18px;
    font-size: 14px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    opacity: 0;
    animation: rowIn .4s ease forwards;
}

.tax-list li .amt {
    color: var(--danger);
    font-weight: 700;
    white-space: nowrap;
}

.tax-total, .tax-inhand {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    font-weight: 800;
}

.tax-total {
    border-top: 1px solid var(--line);
    color: var(--danger);
}

.tax-inhand {
    background: linear-gradient(90deg, var(--gold-2), var(--gold));
    color: #22160a;
    font-size: 19px;
}

.win-note {
    margin-top: 20px;
    color: #9aa0d8;
    font-size: 14px;
    line-height: 1.5;
}

@keyframes rowIn {
    to {
        opacity: 1;
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* confetti */
.confetti span {
    position: fixed;
    top: -12px;
    width: 9px;
    height: 14px;
    z-index: 5;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0.9;
    }
}

/* cash rain */
.cash-rain {
    position: fixed;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}

.cash-note {
    position: absolute;
    top: -80px;
    width: 58px;
    height: 30px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 13px;
    color: rgba(255, 255, 255, .95);
    border: 1px solid rgba(255, 255, 255, .4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45), inset 0 0 8px rgba(255, 255, 255, .15);
    will-change: transform;
    animation: cashFall linear forwards;
}

.cash-note::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 3px;
    border: 1px dashed rgba(255, 255, 255, .35);
}

.cash-note.c500 {
    background: linear-gradient(135deg, #7d55a3, #4a2d6b);
}

.cash-note.c200 {
    background: linear-gradient(135deg, #e7a13c, #b8720f);
}

.cash-note.c100 {
    background: linear-gradient(135deg, #8a5bd9, #4b2d8f);
}

.cash-note.c50 {
    background: linear-gradient(135deg, #3ba0e7, #1b6bb0);
}

.cash-note.c10 {
    background: linear-gradient(135deg, #e73ca0, #b00f6b);
}

@keyframes cashFall {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--drift, 0), 108vh) rotate(var(--spin, 540deg));
        opacity: 1;
    }
}

/* ---------- modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 2, 14, 0.78);
    backdrop-filter: blur(4px);
    padding: 18px;
}

.modal-overlay.open {
    display: flex;
    animation: rise .25s ease both;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, #14163f, #0a0a2a);
    border: 2px solid var(--gold);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    padding: 24px;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    cursor: pointer;
    background: none;
    border: none;
    color: #9aa0d8;
    font-size: 26px;
    line-height: 1;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.modal-actions .btn-primary,
.modal-actions .btn-ghost {
    margin-top: 0;
    flex: 1;
}

.btn-ghost {
    cursor: pointer;
    font-family: var(--font), serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--gold-soft);
    padding: 14px 20px;
    border-radius: 999px;
    background: transparent;
    border: 1.5px solid var(--gold);
    transition: background .12s ease, transform .12s ease;
}

.btn-ghost:hover {
    background: rgba(246, 196, 69, 0.12);
    transform: translateY(-1px);
}

.modal h3,
.lifeline-panel h3 {
    color: var(--gold);
    font-size: 20px;
    margin-bottom: 6px;
    text-align: center;
}

.modal .m-sub,
.lifeline-panel .m-sub {
    color: #b9bff0;
    font-size: 13.5px;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* phone-a-friend */
.phone-log {
    background: #05061c;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    font-family: "Courier New", monospace;
    font-size: 13px;
    color: #9df5b8;
    min-height: 120px;
    margin-bottom: 14px;
    line-height: 1.7;
}

.phone-log .err {
    color: var(--danger);
}

.brand-jiortel {
    text-align: center;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-size: 22px;
    background: linear-gradient(90deg, #ff5a5a, #f6c445, #43e08a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tag {
    text-align: center;
    font-size: 11px;
    color: #8a90c9;
    margin-top: -8px;
    margin-bottom: 14px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(246, 196, 69, 0.08);
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 700;
}

.balance-row .bal {
    color: var(--danger);
}

.wallet {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 12px 0;
}

.note {
    cursor: pointer;
    user-select: none;
    width: 62px;
    height: 40px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: transform .1s ease;
    position: relative;
}

.note::before {
    content: "₹";
    font-size: 11px;
    margin-right: 1px;
    opacity: .8;
}

.note:hover {
    transform: translateY(-3px);
}

.note.selected {
    outline: 3px solid var(--gold);
}

.note.n500 {
    background: #6d4b8f;
}

.note.n200 {
    background: #d98f2b;
}

.note.n100 {
    background: #7a4bd9;
}

.note.n50 {
    background: #2b8fd9;
}

.note.n20 {
    background: #d9612b;
}

.note.n10 {
    background: #d92b6d;
}

.note.n5 {
    background: #2bad7a;
}

.note.n2 {
    background: #557a2b;
}

.note.n1 {
    background: #7a6b2b;
}

.recharge-cost {
    text-align: center;
    margin: 10px 0;
    font-size: 14px;
    color: var(--gold-soft);
}

.recharge-cost b {
    color: var(--gold);
    font-size: 18px;
}

.selected-total {
    text-align: center;
    font-size: 13px;
    color: #b9bff0;
    margin-bottom: 12px;
}

.btn-recharge {
    width: 100%;
}

.btn-recharge:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.recharge-fail {
    color: var(--danger);
    text-align: center;
    font-weight: 700;
    margin-top: 12px;
    animation: shake .4s;
}

@keyframes shake {
    25% {
        transform: translateX(-6px);
    }
    75% {
        transform: translateX(6px);
    }
}

/* audience — animated bar graph */
.poll-chart {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-items: end;
    height: 220px;
    margin-top: 10px;
    padding: 6px 4px 0;
}

.poll-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.poll-col-pct {
    font-weight: 800;
    font-size: 14px;
    color: var(--gold-soft);
}

.poll-col-track {
    width: 100%;
    max-width: 54px;
    flex: 1;
    display: flex;
    align-items: flex-end;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--gold-2);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.poll-col-fill {
    width: 100%;
    height: 0;
    border-radius: 8px 8px 0 0;
    background: var(--gold);
    transition: height .9s cubic-bezier(.2, .8, .2, 1);
    position: relative;
}

.poll-col-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .25);
    animation: barShine 1.6s ease-in-out infinite;
}

@keyframes barShine {
    0%, 100% {
        opacity: .35;
    }
    50% {
        opacity: .8;
    }
}

.poll-col-tag {
    font-weight: 800;
    font-size: 13px;
    color: #0c1024;
    background: linear-gradient(180deg, #fff, var(--gold) 55%, var(--gold-2));
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 6px;
}

.poll-col-opt {
    font-size: 11px;
    color: #aab1e6;
    text-align: center;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.audience-note {
    text-align: center;
    margin-top: 14px;
    font-size: 12.5px;
    color: #8a90c9;
    font-style: italic;
}

/* ---------- responsive ---------- */

/* large desktop — widen ladder + breathe */
@media (min-width: 1500px) {
    .game-grid {
        max-width: 1440px;
        grid-template-columns: 1fr 340px;
        gap: 40px;
    }
}

/* tablet / narrow desktop — stack ladder above stage */
@media (max-width: 860px) {
    .game-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ladder-wrap {
        order: -1;
        position: static;
        padding: 10px 12px;
    }

    .ladder {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 6px;
    }

    .ladder li {
        padding: 4px 10px;
        font-size: 12px;
    }

    .ladder li.current {
        order: -1;
    }
}

/* phones — single-column options, compact everything to fit viewport */
@media (max-width: 560px) {
    .screen {
        padding: 16px 14px;
    }

    .game-grid {
        gap: 12px;
    }

    /* ladder becomes a slim scroll-free chip strip */
    .ladder-wrap {
        padding: 8px 10px;
    }

    .ladder-title {
        margin-bottom: 6px;
    }

    .ladder li {
        padding: 3px 8px;
        font-size: 11px;
        gap: 6px;
    }

    /* hide non-essential ladder rungs, keep milestones + current */
    .ladder li:not(.milestone):not(.current):not(.grand) {
        display: none;
    }

    .hud {
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 10px;
    }

    .hud-prize {
        order: -1;
        flex: 1 0 100%;
    }

    .lifelines {
        flex: 1;
        justify-content: flex-end;
        gap: 10px;
    }

    .lifeline {
        width: 46px;
        height: 46px;
    }

    .q-badge {
        width: 46px;
        height: 46px;
    }

    .q-badge-num {
        font-size: 20px;
    }

    .q-topbar {
        margin: 4px 0 8px;
    }

    .timer {
        width: 52px;
        height: 52px;
    }

    #timerNum {
        font-size: 18px;
    }

    .question-frame {
        padding: 18px 22px;
        min-height: 72px;
    }

    .options {
        grid-template-columns: 1fr;
        margin-top: 16px;
        gap: 10px;
    }

    .option {
        padding: 12px 16px;
    }

    /* win screen compaction — flex so nothing clips, list absorbs spare height */
    #win {
        align-items: center;
    }

    .win-inner {
        padding: 6px 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }

    .win-kicker {
        margin: 0;
    }

    .prize-big {
        margin: 4px 0 12px;
    }

    .tax-card {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .tax-list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

    .win-note {
        margin-top: 10px;
    }

    .btn-primary {
        flex: 0 0 auto;
    }

    .modal {
        padding: 18px 16px;
    }
}

/* very small phones — trim further */
@media (max-width: 380px) {
    .lifeline {
        width: 42px;
        height: 42px;
    }

    .lifeline .ll-icon {
        font-size: 15px;
    }

    .option {
        padding: 11px 18px;
    }
}

/* short / landscape viewports — protect against vertical scroll */
@media (max-height: 620px) {
    .screen {
        padding: 12px clamp(12px, 3vw, 32px);
    }

    .logo-ring {
        width: 96px;
        height: 96px;
        margin-bottom: 10px;
    }

    .logo-core .rupee {
        font-size: 48px;
    }

    .fine-print {
        margin-top: 12px;
    }

    .btn-primary {
        margin-top: 14px;
    }

    .options {
        margin-top: 12px;
        gap: 8px 16px;
    }

    .question-frame {
        min-height: 64px;
        padding: 16px 24px;
    }

    /* win screen must fit short viewports — list absorbs spare height */
    #win {
        align-items: center;
    }

    .win-inner {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 6px 0;
        gap: 2px;
    }

    .win-kicker {
        font-size: clamp(20px, 4vw, 30px);
    }

    .win-sub, .win-note {
        margin: 4px 0 0;
        font-size: 12.5px;
    }

    .prize-big {
        margin: 2px 0 8px;
    }

    .tax-card {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .tax-head {
        padding: 8px 16px;
    }

    .tax-list {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

    .tax-list li, .tax-total, .tax-inhand {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .btn-primary {
        flex: 0 0 auto;
        margin-top: 10px;
    }
}

/* landscape phone — put ladder back beside stage so height stays small */
@media (max-width: 860px) and (orientation: landscape) and (max-height: 520px) {
    .game-grid {
        grid-template-columns: 1fr 200px;
        gap: 14px;
    }

    .ladder-wrap {
        order: 0;
    }

    .ladder {
        flex-direction: column-reverse;
    }

    .options {
        grid-template-columns: 1fr 1fr;
    }
}
