@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;900&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background: #000000;
    color: white;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: relative;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 1rem 1rem;
}

@media (min-width: 768px) {
    main {
        padding: 0 3rem 1.5rem;
    }
}

#display-area {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 4vw, 5rem);
    min-height: 0;
    overflow: hidden;
    position: relative;
}

#display-area > .info-card {
    position: absolute;
}

#display-area > .poster-card {
    position: relative;
}

#display-area > #ball-element {
    position: absolute;
    right: calc(50% + clamp(160px, 13vw, 250px) + clamp(2rem, 4vw, 5rem));
}

#display-area > .quote-card {
    left: calc(50% + clamp(160px, 13vw, 250px) + clamp(2rem, 4vw, 5rem));
}

#bottom-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    shrink: 0;
    max-width: 100%;
}

.premium-ball {
    background: #000000;
    border: 1px solid rgba(34, 211, 238, 0.5);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 60px rgba(34, 211, 238, 0.2);
    width: clamp(200px, 48vmin, 580px);
    height: clamp(200px, 48vmin, 580px);
    border-radius: 50%;
    z-index: 2;
    flex-shrink: 0;
    container-type: size;
}
.premium-ball.draw-handoff-ready {
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
}
.premium-ball.draw-handoff-ready.draw-handoff-visible {
    opacity: 1 !important;
    transform: translateZ(0) scale(1);
}
.draw-handoff-flourish {
    position: absolute;
    inset: -18%;
    z-index: 8;
    pointer-events: none;
    overflow: hidden;
    border-radius: 50%;
    animation: handoff-ring-pulse .8s ease-out both;
}
.draw-handoff-flourish::before,
.draw-handoff-flourish::after {
    content: "";
    position: absolute;
    inset: 7%;
    border: 2px solid rgba(var(--draw-lighting-rgb), .9);
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(var(--draw-lighting-rgb), .75), inset 0 0 16px rgba(var(--draw-balls-rgb), .55);
    animation: handoff-ring-expand .8s ease-out both;
}
.draw-handoff-flourish::after {
    inset: 18%;
    border-color: rgba(var(--draw-ball-highlight-rgb), .95);
    animation-delay: 45ms;
}
.draw-handoff-flourish i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42%;
    height: 2px;
    transform-origin: 0 50%;
    transform: rotate(var(--spark-angle)) translateX(22%);
    background: linear-gradient(90deg, rgba(var(--draw-ball-highlight-rgb), .95), rgba(var(--draw-lighting-rgb), .1));
    box-shadow: 0 0 8px rgba(var(--draw-lighting-rgb), .9);
    animation: handoff-streak .34s cubic-bezier(.2,.8,.2,1) var(--spark-delay) both;
}
.draw-flight-proxy {
    position: fixed;
    z-index: 100;
    margin: 0;
    display: block;
    pointer-events: none;
    will-change: transform;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: top left;
    transition: transform 1.1s cubic-bezier(.12, .78, .18, 1), opacity .3s ease;
    box-shadow: inset -14px -19px 25px rgba(0,0,0,.58), inset 3px 3px 10px rgba(var(--draw-ball-highlight-rgb), .48), 0 0 0 8px rgba(var(--draw-lighting-rgb), .14), 0 14px 32px rgba(var(--draw-balls-rgb), .48);
}
.draw-flight-proxy-flying .draw-handoff-flourish {
    animation-duration: 1s;
}
.draw-flight-proxy-flying::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 180%;
    height: 32%;
    top: 38%;
    right: 64%;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(var(--draw-lighting-rgb), .16), rgba(var(--draw-ball-highlight-rgb), .82));
    filter: blur(5px);
    transform: rotate(-8deg);
    animation: handoff-comet .5s ease-out both;
}
@keyframes handoff-comet { 0% { opacity: 0; transform: rotate(-8deg) scaleX(.15); } 18% { opacity: .95; } 100% { opacity: 0; transform: rotate(-8deg) scaleX(1); } }
@keyframes handoff-ring-pulse { 0% { opacity: 0; transform: scale(.72); } 22% { opacity: 1; } 100% { opacity: 0; transform: scale(1.08); } }
@keyframes handoff-ring-expand { 0% { opacity: 0; transform: scale(.55); } 20% { opacity: 1; } 100% { opacity: 0; transform: scale(1.16); } }
@keyframes handoff-streak { 0% { opacity: 0; transform: rotate(var(--spark-angle)) translateX(4%) scaleX(.2); } 22% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--spark-angle)) translateX(42%) scaleX(1); } }

.ball-letter-text {
    font-size: clamp(20px, 6vmin, 52px);
}

.ball-number-text {
    /* The settled ball owns the final sizing; keep this fallback safe before
       draw-scene.css loads and for reduced-motion restores. */
    font-size: clamp(30px, 18vmin, 160px);
    margin-top: 0;
}

.cyan-inner-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82%;
    height: 82%;
    border: 8px solid rgb(34, 211, 238);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(34, 211, 238, 1), 
                inset 0 0 30px rgba(34, 211, 238, 0.8);
    pointer-events: none;
    z-index: 5;
}

.ball-glow {
    box-shadow: 0 0 100px -10px rgba(34, 211, 238, 0.6);
}

@keyframes ball-drop-center {
    0% {
        transform: scale(20); 
        opacity: 0;
        filter: blur(20px);
    }
    15% {
        opacity: 1;
        filter: blur(10px);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

.animate-ball-reveal {
    animation: ball-drop-center 1.1s cubic-bezier(0.15, 0.85, 0.35, 1) forwards;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#video-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #000000;
    display: none;
    align-items: center;
    justify-content: center;
}

#video-overlay.active {
    display: flex;
}

#bingo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.text-cyan-bright {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(34, 211, 238, 1), 
                 0 0 40px rgba(34, 211, 238, 0.8),
                 0 0 60px rgba(34, 211, 238, 0.5);
}

.ball-letter-bright {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(34, 211, 238, 1);
    font-weight: 900;
    letter-spacing: -0.05em;
}

.info-card {
    width: clamp(320px, 26vw, 500px);
    flex-shrink: 0;
    z-index: 1;
}

.info-card.hidden {
    display: none !important;
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-60px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(60px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.poster-card {
    animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.quote-card {
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
}

.poster-image-wrap {
    width: 100%;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    position: relative;
}

.poster-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        rgba(255,255,255,0.02) 30%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.02) 70%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.poster-img {
    width: 100%;
    display: block;
    object-fit: contain;
    border-radius: 1.25rem;
    position: relative;
    z-index: 2;
    opacity: 1;
    transition: none;
}

.poster-preview-video {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: none;
}

.poster-card.preview-playing .poster-img {
    opacity: 0;
}

.poster-card.preview-playing .poster-preview-video {
    opacity: 1;
}

.poster-card.preview-returning .poster-img {
    opacity: 1;
    transition: opacity 2.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.poster-card.preview-returning .poster-preview-video {
    opacity: 0;
    transition: opacity 2.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.poster-card.preview-returning .poster-image-wrap::after {
    content: "";
    position: absolute;
    inset: 5%;
    z-index: 4;
    border-radius: 1.5rem;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(34, 211, 238, 0.13) 28%, transparent 70%);
    mix-blend-mode: screen;
    animation: poster-return-glow 2.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes poster-return-glow {
    0% {
        opacity: 0;
        transform: scale(0.82);
    }
    28% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

.poster-title-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    padding-top: 0.55rem;
}

.poster-open-btn {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(34, 211, 238, 0.45);
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.1);
    color: #dffbff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.poster-open-btn:hover,
.poster-open-btn:focus-visible {
    background: rgba(34, 211, 238, 0.24);
    border-color: rgba(34, 211, 238, 0.9);
    transform: translateY(-1px);
    outline: none;
}

.poster-open-icon {
    width: 0.95rem;
    height: 0.95rem;
}

.poster-label {
    display: none;
}

.poster-video-actions {
    position: absolute;
    z-index: 4;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    pointer-events: none;
}

.poster-video-cue {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.25rem;
    padding: 0.45rem 0.75rem 0.45rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    background: rgba(3, 8, 15, 0.82);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 0 18px rgba(var(--draw-ball-highlight-rgb), 0.28);
    backdrop-filter: blur(8px);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.poster-video-cue:hover,
.poster-video-cue:focus-visible {
    background: rgba(var(--draw-balls-rgb), 0.9);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px) scale(1.02);
    outline: none;
}

.poster-video-play {
    position: relative;
    display: grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

.poster-video-play::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 0.12rem;
    border-top: 0.3rem solid transparent;
    border-bottom: 0.3rem solid transparent;
    border-left: 0.45rem solid #071018;
}

.poster-audio-icon {
    position: relative;
    width: 1.35rem;
    height: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.poster-audio-icon::before {
    content: "";
    position: absolute;
    left: 0.28rem;
    top: 0.43rem;
    width: 0.35rem;
    height: 0.45rem;
    border-radius: 0.08rem;
    background: #fff;
}

.poster-audio-icon::after {
    content: "";
    position: absolute;
    left: 0.55rem;
    top: 0.29rem;
    width: 0.42rem;
    height: 0.72rem;
    border: 2px solid #fff;
    border-left: 0;
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
}

.poster-card[role="button"]:focus-visible {
    outline: 2px solid var(--draw-ball-highlight);
    outline-offset: 4px;
}

.item-video-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.item-video-actions button {
    flex: 1 1 9rem;
    min-height: 2.65rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 0.8rem;
    background: rgba(34, 211, 238, 0.08);
    color: #dffbff;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.item-video-actions button:hover,
.item-video-actions button:focus-visible {
    background: rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.8);
    outline: none;
}

.poster-title {
    text-align: center;
    font-size: clamp(12px, 1.4vw, 20px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #22d3ee;
    padding: 0.6rem 0.25rem 0;
    text-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.quote-inner {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: clamp(1.5rem, 2.5vw, 3rem);
    position: relative;
}

.quote-mark {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 5vw, 72px);
    line-height: 1;
    color: rgba(34, 211, 238, 0.4);
    position: absolute;
    top: 10px;
    left: 20px;
}

.quote-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(18px, 1.8vw, 30px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 2rem;
    margin-bottom: 1.25rem;
}

.quote-attribution {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(11px, 1vw, 16px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(34, 211, 238, 0.6);
}

.empty-state-circle {
    width: clamp(200px, 24vmin, 320px);
    height: clamp(200px, 24vmin, 320px);
}

.empty-state-inner {
    width: clamp(70px, 8vmin, 110px);
    height: clamp(70px, 8vmin, 110px);
}

/* Cinematic idle stage */
.idle-atmosphere {
    position: absolute;
    inset: -8%;
    overflow: hidden;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(0,0,0,.06), rgba(0,0,0,.36)),
        url("attached_assets/generated_images/cine-bingo-stage-background.png") center / cover no-repeat;
    opacity: .72;
    z-index: -1;
    border-radius: 2rem;
}
.idle-aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .16;
    animation: idle-aurora-drift 10s ease-in-out infinite alternate;
}
.idle-aurora-one { width: 55%; height: 65%; left: 8%; top: 5%; background: #075cff; }
.idle-aurora-two { width: 45%; height: 55%; right: 5%; bottom: 5%; background: #00d9ff; animation-delay: -4s; }
.idle-particles { position: absolute; inset: 0; opacity: .55; }
.idle-particles-near {
    background-image: radial-gradient(circle, rgba(83,220,255,.9) 0 1.5px, transparent 2px);
    background-size: 83px 97px;
    animation: particles-rise 16s linear infinite;
}
.idle-particles-far {
    background-image: radial-gradient(circle, rgba(255,255,255,.45) 0 1px, transparent 1.5px);
    background-size: 47px 59px;
    background-position: 22px 12px;
    animation: particles-rise 28s linear infinite reverse;
}
#empty-state {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 3rem);
    transform: translateY(-5%);
    isolation: isolate;
}
#empty-state.hidden {
    display: none !important;
}
#display-area:has(#empty-state:not(.hidden)) + #bottom-section #draw-btn {
    display: none;
}
#idle-draw-scene {
    position: relative;
    width: clamp(420px, 58vmin, 760px);
    height: clamp(330px, 52vmin, 650px);
    overflow: hidden;
    border-radius: 38%;
    filter: drop-shadow(0 26px 55px rgba(0,78,255,.32));
}
#idle-draw-scene canvas { width: 100%; height: 100%; display: block; mix-blend-mode: screen; }
.idle-cage {
    position: absolute;
    width: 82%;
    height: 68%;
    left: 9%;
    top: 6%;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 50% 42%, rgba(21,100,255,.13), rgba(0,0,0,.65) 64%);
    border: 2px solid rgba(122,216,255,.38);
    box-shadow: inset 0 0 45px rgba(0,85,255,.23), 0 0 45px rgba(0,132,255,.12);
    animation: cage-float 5s ease-in-out infinite;
}
.idle-cage-bars {
    position: absolute; inset: -12%;
    border-radius: 50%;
    background: repeating-linear-gradient(90deg, transparent 0 8.5%, rgba(155,218,255,.48) 9%, rgba(255,255,255,.08) 9.7%, transparent 10.2%);
    transform: perspective(500px) rotateX(-8deg);
    animation: cage-shimmer 4s linear infinite;
}
.idle-cage-rim {
    position: absolute; left: 3%; right: 3%; height: 26%; border: 3px solid rgba(135,214,255,.5); border-radius: 50%; z-index: 3;
}
.idle-cage-rim-back { top: 1%; opacity: .45; }
.idle-cage-rim-front { bottom: 1%; box-shadow: 0 8px 25px rgba(0,116,255,.35); }
.idle-ball {
    position: absolute; z-index: 2; width: 18%; aspect-ratio: 1; border-radius: 50%;
    display: grid; place-items: center; font-size: clamp(10px, 1.8vmin, 20px); font-weight: 900;
    color: white; border: 1px solid rgba(255,255,255,.5);
    background: radial-gradient(circle at 35% 25%, #fff 0 4%, #28b7ff 8%, #0639dc 45%, #010924 80%);
    box-shadow: inset -7px -9px 14px rgba(0,0,0,.55), 0 5px 15px rgba(0,115,255,.35);
    animation: idle-ball-bob 3.4s ease-in-out infinite;
}
.idle-ball-1 { left: 20%; top: 53%; }
.idle-ball-2 { left: 39%; top: 43%; animation-delay: -.8s; }
.idle-ball-3 { right: 18%; top: 56%; animation-delay: -1.4s; }
.idle-ball-4 { left: 29%; top: 67%; animation-delay: -2.1s; }
.idle-ball-5 { right: 30%; top: 70%; animation-delay: -2.7s; }
.idle-cage-stand {
    position: absolute; left: 27%; right: 27%; bottom: 9%; height: 22%;
    border-left: 5px solid rgba(117,207,255,.42); border-right: 5px solid rgba(117,207,255,.42);
    transform: perspective(300px) rotateX(15deg);
}
.idle-cage-stand span { position: absolute; left: -28%; right: -28%; bottom: 0; height: 13%; border-radius: 50%; background: linear-gradient(90deg, #07101d, #3986bd, #e0f8ff, #255b85, #05080d); box-shadow: 0 9px 24px #000; }
.idle-cage-shadow { position: absolute; width: 78%; height: 16%; left: 11%; bottom: 4%; border-radius: 50%; background: rgba(0,97,255,.23); filter: blur(25px); }
.idle-scene-glint { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; right: 16%; top: 20%; box-shadow: 0 0 8px 3px #6de5ff, 0 0 28px 10px #006eff; animation: glint-pulse 2.6s ease-in-out infinite; }
.idle-copy { max-width: 320px; text-align: left; display: flex; flex-direction: column; }
.idle-copy .idle-kicker { color: #39c7ff; font-size: 10px; font-weight: 900; letter-spacing: .35em; text-transform: uppercase; margin-bottom: 12px; }
.idle-copy strong { font-size: clamp(26px, 3vw, 48px); line-height: .98; text-transform: uppercase; letter-spacing: -.045em; text-shadow: 0 0 35px rgba(0,133,255,.32); }
.idle-copy > span:last-child { color: rgba(255,255,255,.38); font-size: 11px; line-height: 1.6; margin-top: 14px; }
.landing-draw-action { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: center; margin-top: 1.5rem; }
.landing-draw-button { position: relative; min-width: 240px; padding: 1.15rem 2rem; border-radius: 1.25rem; display: flex; justify-content: center; align-items: center; gap: .8rem; font-size: 15px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #000; background: #fff; box-shadow: 0 13px 40px rgba(0,119,255,.28), 0 0 0 1px rgba(255,255,255,.8) inset; transition: transform .2s, background .2s; }
.landing-draw-button:hover { background: #ecfeff; transform: translateY(-2px); }
.landing-draw-button svg { width: 17px; fill: #0575ff; }
.draw-action-halo { position: absolute; inset: -18px -42px; border-radius: 50%; background: rgba(0,114,255,.2); filter: blur(25px); animation: action-pulse 2.2s ease-in-out infinite; }
.draw-action-caption { margin-top: 8px; color: rgba(255,255,255,.22); text-transform: uppercase; letter-spacing: .3em; font-size: 7px; font-weight: 900; }

/* Cinematic startup prompt */
#audio-prompt { background: radial-gradient(circle at 50% 42%, #061026 0, #01030a 38%, #000 76%); overflow: hidden; backdrop-filter: blur(24px); }
.audio-prompt-atmosphere { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0,0,0,.18),rgba(0,0,0,.62)), url("attached_assets/generated_images/cine-bingo-stage-background.png") center / cover no-repeat; }
.audio-orbit { position: absolute; border: 1px solid rgba(24,138,255,.16); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); animation: orbit-breathe 7s ease-in-out infinite; }
.audio-orbit-one { width: min(92vw, 740px); aspect-ratio: 1; box-shadow: 0 0 90px rgba(0,92,255,.08) inset; }
.audio-orbit-two { width: min(66vw, 510px); aspect-ratio: 1; animation-delay: -2.5s; }
.audio-particle-field { position: absolute; inset: -20%; background-image: radial-gradient(circle, rgba(46,179,255,.8) 0 1px, transparent 1.7px); background-size: 61px 73px; opacity: .42; animation: particles-rise 24s linear infinite; mask-image: radial-gradient(circle, #000 0 45%, transparent 78%); }
.audio-number-ball { position: absolute; width: clamp(76px, 10vw, 128px); height: clamp(76px, 10vw, 128px); min-width: 0; min-height: 0; opacity: .58; filter: blur(.15px); animation: audio-ball-float 6s ease-in-out infinite; }
.audio-number-ball .ball-letter-text { font-size: 18%; }.audio-number-ball .ball-number-text { font-size: 34%; }
.audio-number-ball-one { left: 8%; top: 19%; transform: rotate(-15deg); }
.audio-number-ball-two { right: 7%; top: 28%; animation-delay: -2s; transform: rotate(13deg) scale(.78); }
.audio-number-ball-three { left: 12%; bottom: 8%; animation-delay: -4s; transform: rotate(10deg) scale(.62); }
.audio-cage-silhouette { position: absolute; left: 50%; top: 50%; width: min(92vw, 780px); aspect-ratio: 1.55; transform: translate(-50%,-48%); border-radius: 50%; opacity: .13; overflow: hidden; border: 2px solid #2b9fff; filter: blur(.3px); }
.audio-cage-silhouette i { position: absolute; top: -15%; bottom: -15%; width: 2px; left: 16%; background: linear-gradient(transparent, #83d8ff, transparent); transform: rotate(13deg); }
.audio-cage-silhouette i:nth-child(2) { left: 33%; transform: rotate(7deg); }.audio-cage-silhouette i:nth-child(3) { left: 50%; transform: none; }.audio-cage-silhouette i:nth-child(4) { left: 67%; transform: rotate(-7deg); }.audio-cage-silhouette i:nth-child(5) { left: 84%; transform: rotate(-13deg); }
.audio-prompt-card { position: relative; width: min(100%, 390px); padding: 42px 36px 34px; text-align: center; border: 1px solid rgba(77,169,255,.24); border-radius: 38px; background: linear-gradient(145deg, rgba(20,26,40,.94), rgba(7,9,16,.96)); box-shadow: 0 30px 100px rgba(0,0,0,.7), 0 0 70px rgba(0,105,255,.15), inset 0 1px rgba(255,255,255,.08); overflow: hidden; }
.audio-prompt-shine { position: absolute; width: 80%; height: 130px; left: 10%; top: -100px; border-radius: 50%; background: #218cff; filter: blur(55px); opacity: .28; }
.audio-cage-preview { position: relative; width: min(100%, 210px); height: 132px; margin: 0 auto 20px; overflow: hidden; border: 1px solid rgba(var(--draw-lighting-rgb), .42); border-radius: 20px; background: #020407; box-shadow: 0 14px 38px rgba(0,0,0,.55), 0 0 34px rgba(var(--draw-lighting-rgb), .2), inset 0 1px rgba(255,255,255,.1); cursor: grab; touch-action: none; user-select: none; }
.audio-cage-preview:active { cursor: grabbing; }
.audio-cage-preview canvas { width: 100%; height: 100%; display: block; }
.audio-cage-preview::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 24px rgba(var(--draw-lighting-rgb), .12); }
.audio-cage-caption { position: absolute; z-index: 2; left: 50%; bottom: 7px; transform: translateX(-50%); padding: 3px 7px; border-radius: 999px; background: rgba(2,4,7,.8); color: rgba(255,255,255,.72); font-size: 5px; font-weight: 900; letter-spacing: .18em; white-space: nowrap; pointer-events: none; }
.audio-prompt-kicker { margin: 0 0 8px; color: #349eff; font-size: 8px; font-weight: 900; letter-spacing: .34em; text-transform: uppercase; }
.audio-prompt-card h2 { margin: 0; font-size: 29px; line-height: 1; text-transform: uppercase; font-weight: 900; letter-spacing: -.055em; }.audio-prompt-card h2 span { color: #1688ff; }
.audio-prompt-copy { margin: 13px auto 28px; max-width: 260px; color: rgba(255,255,255,.42); font-size: 10px; line-height: 1.6; }
.audio-prompt-actions { display: flex; flex-direction: column; gap: 11px; }
.audio-start-button,.audio-theme-button { width: 100%; border-radius: 16px; text-transform: uppercase; font-size: 10px; font-weight: 900; letter-spacing: .13em; transition: transform .2s, background .2s; }
.audio-start-button { padding: 17px 21px; background: white; color: #03050a; display: flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 10px 35px rgba(0,105,255,.22); }.audio-start-button b { position: absolute; right: 20px; color: #0878ff; font-size: 18px; }.audio-start-button:hover { transform: translateY(-2px); background: #eef9ff; }
.audio-theme-button { padding: 15px; color: #2b98ff; border: 1px solid rgba(30,129,255,.32); background: rgba(16,84,190,.1); }.audio-theme-button:hover { background: rgba(25,112,255,.19); }
.audio-prompt-note { margin: 20px 0 0; color: rgba(255,255,255,.2); font-size: 7px; text-transform: uppercase; letter-spacing: .14em; }.audio-prompt-note span { display: inline-block; width: 4px; height: 4px; border-radius: 50%; margin-right: 6px; background: #168bff; box-shadow: 0 0 7px #168bff; }

/* Clerk's embedded form must remain readable on Cine Bingo's dark modal. */
.cl-formFieldInput {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: rgb(var(--app-accent-rgb, 34 211 238)) !important;
    background: rgba(0, 0, 0, .52) !important;
}
.cl-formFieldInput::placeholder {
    color: rgba(255, 255, 255, .42) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, .42) !important;
    opacity: 1 !important;
}
.cl-socialButtonsBlockButton {
    justify-content: center !important;
    color: #fff !important;
    background: rgba(34, 211, 238, .07) !important;
}
.cl-socialButtonsBlockButtonText,
.cl-formFieldLabel,
.cl-dividerText,
.cl-footerActionText {
    color: rgba(255, 255, 255, .82) !important;
}
.cl-otpCodeFieldInput {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: rgb(var(--app-accent-rgb, 34 211 238)) !important;
    background: rgba(0, 0, 0, .58) !important;
    border-color: rgba(34, 211, 238, 0.3) !important;
}
.cl-otpCodeFieldInput:focus {
    border-color: rgba(34, 211, 238, 0.9) !important;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.9) !important;
}
/* Game mode and organizer lobby */
.host-controls-modal { position: fixed; inset: 0; z-index: 275; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.host-controls-modal.hidden { display: none; }
.host-controls-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.76); backdrop-filter: blur(12px); }
.game-session-panel { position: relative; z-index: 1; width: min(24rem, 100%); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 1.25rem; border: 1px solid rgba(34,211,238,.28); border-radius: 1.25rem; background: rgba(5,10,18,.96); box-shadow: 0 24px 80px rgba(0,0,0,.65); }
.host-controls-close { position: absolute; top: .65rem; right: .7rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; color: rgba(255,255,255,.62); background: rgba(255,255,255,.08); font-size: 1.25rem; line-height: 1; }
.host-controls-close:hover { color: #fff; background: rgba(255,255,255,.14); }
.game-session-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding-right: 2.35rem; color: rgba(255,255,255,.48); font-size: .56rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.game-session-panel strong { display: block; margin-top: .35rem; color: #fff; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.game-session-panel p { margin: .3rem 0 0; color: rgba(255,255,255,.78); font-size: .82rem; line-height: 1.5; }
.game-connection-state { display: inline-flex; align-items: center; gap: .3rem; color: #fbbf24; }
.game-connection-state::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.game-connection-state[data-state="online"] { color: #5eead4; }.game-connection-state[data-state="error"] { color: #fb7185; }
.host-share-details { margin-top: .8rem; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.09); }
.host-share-details label { display:block; color: rgba(255,255,255,.45); font-size: .56rem; font-weight:900; letter-spacing:.15em; text-transform:uppercase; }
.host-code-row { display:flex; gap:.5rem; margin-top:.35rem; }
.host-code-row output { flex:1; padding:.5rem .65rem; border:1px solid rgba(34,211,238,.3); border-radius:.55rem; color:#67e8f9; font-size:.9rem; font-weight:900; letter-spacing:.18em; text-align:center; background:#02070c; }
.host-code-row button,.host-game-controls button { min-height: 44px; border:1px solid rgba(34,211,238,.3); border-radius:.55rem; padding:.6rem .75rem; color:#cffafe; background:rgba(34,211,238,.1); font-size:.72rem; font-weight:900; letter-spacing:.04em; }
.host-code-row button:hover,.host-game-controls button:hover { background:rgba(34,211,238,.22); }
.host-room-link { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.host-game-controls { display:grid; grid-template-columns:repeat(2,1fr); gap:.5rem; margin-top:.8rem; }
.host-game-controls button[data-game-action="start"] { grid-column: 1 / -1; min-height: 52px; color:#041316; background:#67e8f9; border-color:#a5f3fc; font-size:.9rem; }
.host-game-controls button:disabled { opacity:.42; cursor:not-allowed; }
.host-game-controls button[data-game-action="end"] { border-color:rgba(251,113,133,.35); color:#fda4af; background:rgba(244,63,94,.1); }
.host-share-actions { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.75rem; }
.host-share-actions a { display:inline-flex; min-height:44px; align-items:center; padding:.55rem .7rem; border:1px solid rgba(255,255,255,.2); border-radius:.55rem; color:#fff; font-size:.78rem; font-weight:800; text-decoration:none; }
.host-participant-list { display:grid; gap:.35rem; margin:.6rem 0 0; padding:0; list-style:none; }
.host-participant-list li { padding:.55rem .65rem; border-radius:.5rem; color:#fff; background:rgba(255,255,255,.06); font-size:.8rem; }
@media (max-width: 640px) { .host-game-controls button { padding:.65rem .45rem; font-size:.7rem; } }

@keyframes idle-aurora-drift { to { transform: translate(10%, -8%) scale(1.15); opacity: .23; } }
@keyframes particles-rise { to { transform: translateY(-120px); } }
@keyframes cage-float { 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes cage-shimmer { to { transform: perspective(500px) rotateX(-8deg) translateX(10%); } }
@keyframes idle-ball-bob { 50% { transform: translateY(-9px) rotate(12deg); } }
@keyframes glint-pulse { 50% { opacity: .25; transform: scale(.55); } }
@keyframes action-pulse { 50% { transform: scale(1.12); opacity: .45; } }
@keyframes orbit-breathe { 50% { opacity: .45; transform: translate(-50%,-50%) scale(1.06); } }
@keyframes audio-ball-float { 50% { margin-top: -18px; filter: drop-shadow(0 12px 25px rgba(0,112,255,.55)); } }

.history-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-height: 110px;
    overflow-y: auto;
}

.history-chip {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1.2rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: black;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.chip-letter {
    font-size: 15px;
}

.chip-number {
    font-size: 20px;
}

.chip-name {
    font-size: 15px;
    max-width: 180px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.history-chip:hover {
    border-color: rgba(34, 211, 238, 0.3);
}

@media (max-width: 767px) {
    #display-area {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
        justify-content: flex-start;
        align-items: center;
        padding: 0.5rem 0.75rem 0;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
    }

    #display-area > .info-card {
        position: static;
    }

    #display-area > .poster-card {
        right: auto;
    }

    #display-area > .quote-card {
        left: auto;
    }

    #ball-element,
    #empty-state {
        order: 1;
        align-self: center;
    }

    #display-area > #ball-element {
        position: relative;
        right: auto;
    }

    #empty-state {
        width: 100%;
        min-height: 55vh;
        transform: none;
        flex-direction: column;
        justify-content: center;
        gap: 0;
        padding-bottom: 5rem;
    }
    #idle-draw-scene { width: min(100vw, 420px); height: min(55vh, 440px); margin-top: -2rem; }
    .idle-copy { margin-top: -1rem; text-align: center; align-items: center; }
    .idle-copy strong { font-size: clamp(24px, 8vw, 34px); }
    .idle-copy > span:last-child { max-width: 260px; font-size: 9px; }
    .landing-draw-action { margin-top: -.25rem; }
    .landing-draw-button { min-width: 218px; padding: 1rem 1.7rem; font-size: 12px; border-radius: 16px; }

    .poster-card {
        order: 2;
        align-self: center;
        overflow: visible;
        width: min(92vw, 420px);
        animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
    }

    .quote-card {
        order: 3;
        align-self: center;
        overflow: hidden;
        width: min(92vw, 420px);
        animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
    }

    .info-card {
        position: static;
        width: 100%;
        max-width: none;
        min-width: 0;
        flex-shrink: 1;
    }

    .poster-image-wrap {
        width: 100%;
        aspect-ratio: 5 / 3;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .poster-img {
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: contain;
    }

    .poster-preview-video {
        object-fit: contain;
    }

    .poster-title-row {
        min-height: 2.5rem;
        padding-top: 0.6rem;
    }

    .poster-title {
        font-size: 12px;
    }

    .poster-open-btn {
        width: 1.85rem;
        height: 1.85rem;
    }

    .premium-ball {
        width: 23vmin;
        height: 23vmin;
        max-width: 112px;
        max-height: 112px;
        min-width: 86px;
        min-height: 86px;
    }

    .ball-number-text {
        font-size: clamp(30px, 10vmin, 54px);
    }

    .ball-letter-text {
        font-size: clamp(12px, 3.5vmin, 20px);
    }

    .quote-text {
        font-size: 12px;
        line-height: 1.4;
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .quote-inner {
        padding: 0.75rem 1rem;
    }

    .quote-mark {
        font-size: 22px;
        top: 4px;
        left: 10px;
    }

    .quote-attribution {
        font-size: 8px;
    }

    .poster-label {
        font-size: 10px;
    }

    .history-chips-wrap {
        max-height: 96px;
        gap: 0.35rem;
        align-items: stretch;
    }

    .history-chip {
        align-items: flex-start;
        padding: 0.3rem 0.55rem;
        gap: 0.35rem;
        white-space: normal;
        max-width: 100%;
    }

    .chip-letter {
        font-size: 9px;
    }

    .chip-number {
        font-size: 13px;
    }

    .chip-name {
        font-size: 9px;
        max-width: 118px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.25;
    }

    .empty-state-circle {
        width: 150px;
        height: 150px;
    }

    .empty-state-inner {
        width: 50px;
        height: 50px;
    }

    #bottom-section {
        gap: 0.25rem;
    }

    .translate-toggle {
        font-size: 8px;
        padding: 0.2rem 0.5rem;
        margin-top: 0.5rem;
    }
}

@media (max-width: 767px) and (max-height: 720px) {
    #empty-state { min-height: 47vh; padding-bottom: 4rem; }
    #idle-draw-scene { width: min(82vw, 330px); height: 40vh; }
    .idle-copy > span:last-child, .idle-copy .idle-kicker { display: none; }
    .audio-prompt-card { padding: 29px 26px 24px; }
    .audio-cage-preview { width: 160px; height: 100px; margin-bottom: 14px; border-radius: 16px; }
    .audio-prompt-copy { margin-bottom: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    .idle-aurora,.idle-particles,.idle-cage,.idle-cage-bars,.idle-ball,.idle-scene-glint,.draw-action-halo,.audio-orbit,.audio-particle-field,.audio-number-ball { animation: none !important; }
}

/* Keep only the host audio/settings controls above the live draw scene. */
body:has(#video-overlay.active) .app-header {
    z-index: 240;
    pointer-events: none;
}
body:has(#video-overlay.active) .app-header > :not(.host-control-stack) {
    opacity: 0;
    visibility: hidden;
}
body:has(#video-overlay.active) .host-control-stack {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    z-index: 241;
    pointer-events: auto;
}

@media (max-height: 700px) {
    main {
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 0.75rem;
    }

    #display-area {
        flex: 0 0 auto;
        min-height: 190px;
        overflow: visible;
    }

    .premium-ball {
        width: 28vmin;
        height: 28vmin;
        max-width: 240px;
        max-height: 240px;
    }

    .info-card {
        width: 200px;
    }

    .quote-text {
        font-size: 14px;
    }

    .quote-inner {
        padding: 1.25rem;
    }

    .history-chips-wrap {
        max-height: 68px;
        gap: 0.35rem;
    }

    .history-chip {
        padding: 0.3rem 0.55rem;
        gap: 0.35rem;
    }

    .chip-letter {
        font-size: 9px;
    }

    .chip-number {
        font-size: 13px;
    }

    .chip-name {
        font-size: 9px;
        max-width: 80px;
    }

    #draw-btn {
        min-height: 40px;
        padding: 0.5rem 1.5rem;
        border-radius: 0.75rem;
        font-size: 11px;
        letter-spacing: 0.16em;
        margin-bottom: 0.15rem;
    }

    #bottom-section {
        gap: 0.2rem;
    }

    #history-bar {
        padding: 0.65rem 1rem;
    }
}

/* Keep the post-draw action compact on phones so it never covers the quote. */
@media (max-width: 767px) {
    #bottom-section {
        gap: 0.35rem;
    }

    #draw-btn {
        min-height: 42px;
        margin: 0;
        padding: 0.55rem 1.35rem;
        border-radius: 0.75rem;
        font-size: 11px;
        letter-spacing: 0.16em;
        box-shadow: 0 8px 24px rgba(255, 255, 255, 0.09);
    }
}

.translate-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    background: rgba(34, 211, 238, 0.08);
    color: rgba(34, 211, 238, 0.7);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(9px, 0.8vw, 13px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.translate-toggle:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.15);
    color: rgba(34, 211, 238, 0.9);
}

.translate-toggle.hidden {
    display: none !important;
}

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.host-claim-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background 0.6s ease;
    pointer-events: none;
}

.host-claim-overlay.host-claim-visible {
    background: rgba(0, 0, 0, 0.92);
    pointer-events: auto;
}

.host-claim-overlay.host-claim-hiding {
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.5s ease;
}

.host-claim-overlay.host-claim-hiding .host-claim-content {
    opacity: 0;
    transform: scale(0.8) translateY(-30px);
    transition: all 0.5s ease-in;
}

.host-claim-overlay.host-claim-hiding .host-confetti,
.host-claim-overlay.host-claim-hiding .host-spotlight {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.host-claim-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.host-claim-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
}

.host-claim-title-bingo {
    font-size: clamp(80px, 18vw, 220px);
    color: #22d3ee;
    text-shadow:
        0 0 40px rgba(34, 211, 238, 0.8),
        0 0 80px rgba(34, 211, 238, 0.5),
        0 0 120px rgba(34, 211, 238, 0.3),
        0 0 200px rgba(168, 85, 247, 0.2);
    animation: hostBingoTitlePulse 2s ease-in-out infinite;
}

.host-claim-title-fullcard {
    font-size: clamp(60px, 15vw, 180px);
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #ef4444, #fbbf24);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px rgba(251, 191, 36, 0.6)) drop-shadow(0 0 80px rgba(245, 158, 11, 0.4));
    animation: hostFullCardGradient 3s ease-in-out infinite, hostFullCardTitlePulse 2s ease-in-out infinite;
}

@keyframes hostBingoTitlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes hostFullCardTitlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes hostFullCardGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.host-claim-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(14px, 3vw, 28px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.host-claim-dismiss {
    margin-top: 1rem;
    padding: 0.75rem 3rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(10px, 1.2vw, 14px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.host-claim-dismiss:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

@keyframes hostConfettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

.host-confetti {
    position: absolute;
    animation: hostConfettiFall linear forwards;
    pointer-events: none;
    z-index: 1;
}

@keyframes hostSpotlightSweep {
    0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    50% { transform: translate(10%, 5%) scale(1.2); opacity: 1; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
}

.host-spotlight {
    position: absolute;
    border-radius: 50%;
    animation: hostSpotlightSweep 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* ===== Caller Board ===== */
#caller-board {
    background: radial-gradient(ellipse at 50% 0%, rgba(34, 211, 238, 0.06), transparent 60%), #050505;
}

.caller-board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
    .caller-board-header {
        padding: 1.25rem 2.5rem;
    }
}

.caller-board-grid {
    flex: 1;
    display: grid;
    grid-template-columns: auto repeat(15, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: clamp(3px, 0.6vmin, 8px);
    padding: clamp(6px, 1.2vmin, 20px);
    min-height: 0;
}

.caller-row-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: clamp(14px, 3.2vmin, 42px);
    color: #22d3ee;
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
    padding: 0 clamp(4px, 1vw, 16px);
    user-select: none;
}

.caller-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: clamp(6px, 1vmin, 14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.35);
    font-weight: 900;
    font-size: clamp(12px, 2.6vmin, 34px);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    min-width: 0;
    min-height: 0;
}

.caller-cell:active {
    transform: scale(0.92);
}

.caller-cell.called {
    background: rgba(34, 211, 238, 0.15);
    border-color: rgba(34, 211, 238, 0.5);
    color: #22d3ee;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

.caller-cell.latest {
    background: #22d3ee;
    border-color: #22d3ee;
    color: #000;
    text-shadow: none;
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.8), 0 0 60px rgba(34, 211, 238, 0.4);
    animation: callerPulse 1.2s ease-in-out infinite;
    z-index: 1;
}

@keyframes callerPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(34, 211, 238, 0.8), 0 0 60px rgba(34, 211, 238, 0.4); }
    50% { transform: scale(1.08); box-shadow: 0 0 45px rgba(34, 211, 238, 1), 0 0 90px rgba(34, 211, 238, 0.6); }
}

@media (max-width: 767px) and (orientation: portrait) {
    .caller-board-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: auto repeat(15, 1fr);
        grid-auto-flow: column;
    }

    .caller-row-letter {
        padding: clamp(2px, 0.8vh, 10px) 0;
    }
}

/* ===== Bingo theme library ===== */
.theme-library {
    position: fixed;
    inset: 0;
    z-index: 290;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(24px);
}

.theme-library.hidden { display: none; }

.theme-library-panel {
    position: relative;
    width: min(880px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 2rem;
    background: radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 45%), #111;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}

.theme-library-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.5rem;
}

.theme-library-kicker {
    color: #22d3ee;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.theme-library h2 {
    margin-top: 0.4rem;
    color: white;
    font-size: clamp(1.8rem, 5vw, 3.4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.theme-library-intro {
    max-width: 600px;
    margin: 0.5rem 0 1.5rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
}

.theme-library-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.theme-option {
    --theme-accent: #22d3ee;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    color: white;
    background: rgba(255,255,255,0.035);
    text-align: left;
}

button.theme-option:hover,
.theme-option.active {
    border-color: var(--theme-accent);
    background: color-mix(in srgb, var(--theme-accent) 12%, transparent);
}

.theme-option-icon {
    display: flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    color: var(--theme-accent);
    background: color-mix(in srgb, var(--theme-accent) 12%, transparent);
    font-size: 1.3rem;
    font-weight: 900;
}

.theme-option-copy,
.theme-option-copy strong,
.theme-option-copy small { display: block; min-width: 0; }
.theme-option-copy strong { font-size: 0.85rem; text-transform: uppercase; }
.theme-option-copy small { margin-top: 0.3rem; color: rgba(255,255,255,0.45); line-height: 1.35; }
.theme-option-status { color: var(--theme-accent); font-size: 0.58rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.theme-option.coming-soon { opacity: 0.58; }

.theme-library button:focus-visible,
.theme-option:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .theme-library-grid { grid-template-columns: 1fr; }
    .theme-option { grid-template-columns: 2.6rem minmax(0, 1fr); }
    .theme-option-icon { width: 2.6rem; height: 2.6rem; }
    .theme-option-status { grid-column: 2; }
}

/* Easy View Mode */
body.easy-view { font-size: 18px; background:#000; }
body.easy-view .text-\[8px\],
body.easy-view .text-\[9px\],
body.easy-view .text-\[10px\],
body.easy-view .text-\[11px\],
body.easy-view .text-\[12px\],
body.easy-view .text-xs { font-size: .9rem !important; line-height:1.45; letter-spacing:.03em !important; }
body.easy-view .text-sm { font-size: 1rem !important; }
body.easy-view .text-base { font-size: 1.1rem !important; }

/* 44px min targets */
body.easy-view button,
body.easy-view a[href],
body.easy-view input[type="radio"],
body.easy-view input[type="checkbox"],
body.easy-view label {
    min-height: 44px;
    min-width: 44px;
}
body.easy-view .w-4, body.easy-view .h-4,
body.easy-view .w-5, body.easy-view .h-5 {
    width: 24px;
    height: 24px;
}

/* High contrast */
body.easy-view .text-white\/20,
body.easy-view .text-white\/30,
body.easy-view .text-white\/40,
body.easy-view .text-white\/50,
body.easy-view .text-white\/60,
body.easy-view .text-white\/70,
body.easy-view .text-white\/80 {
    color: #ffffff !important;
}
body.easy-view .border-white\/5,
body.easy-view .border-white\/10,
body.easy-view .border-white\/20,
body.easy-view .border-cyan-500\/20,
body.easy-view .border-cyan-500\/30 {
    border-color: #ffffff !important;
}
body.easy-view .bg-black\/40,
body.easy-view .bg-black\/50,
body.easy-view .bg-neutral-900\/95 {
    background-color: #000000 !important;
}
body.easy-view .glass-panel {
    background: #000 !important;
    border: 2px solid #fff !important;
}

/* Reduce nonessential motion */
body.easy-view .animate-pulse,
body.easy-view .idle-aurora,
body.easy-view .idle-particles,
body.easy-view .idle-particles-near,
body.easy-view .idle-particles-far,
body.easy-view .audio-particle-field,
body.easy-view .poster-shimmer {
    animation: none !important;
    display: none !important;
}

.welcome-kicker,
.welcome-section-label { font-size:.78rem; line-height:1.35; letter-spacing:.08em; text-transform:uppercase; }
.welcome-intro { margin:.65rem auto 0; max-width:22rem; color:rgba(255,255,255,.78); font-size:1rem; line-height:1.5; }
.welcome-role-button { width:100%; min-height:64px; padding:.85rem 1rem; border:1px solid rgba(255,255,255,.18); border-radius:.85rem; color:#fff; background:rgba(255,255,255,.08); text-align:left; transition:background .2s,border-color .2s; }
.welcome-role-button:hover { background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.35); }
.welcome-role-button-primary { color:#031214; background:#22d3ee; border-color:#67e8f9; }
.welcome-role-button-primary:hover { background:#67e8f9; }
.welcome-role-button strong,.welcome-role-button span { display:block; }
.welcome-role-button strong { font-size:1.05rem; }
.welcome-role-button span { margin-top:.18rem; color:rgba(255,255,255,.72); font-size:.82rem; line-height:1.35; }
.welcome-role-button-primary span { color:rgba(3,18,20,.78); }
.welcome-role-button-practice { background:rgba(255,255,255,.055); }
.welcome-role-button-practice:hover { background:rgba(255,255,255,.12); }
.welcome-secondary-actions { gap:.75rem; margin-top:.25rem; padding-top:1rem; }
.welcome-utility-actions { display:grid; grid-template-columns:1fr 1.25fr; gap:.6rem; }
.welcome-utility-button {
    min-height:44px;
    padding:.7rem .65rem;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.45rem;
    border:1px solid rgba(255,255,255,.12);
    border-radius:.75rem;
    color:rgba(255,255,255,.62);
    background:rgba(255,255,255,.035);
    font-size:.67rem;
    font-weight:900;
    letter-spacing:.09em;
    text-transform:uppercase;
    transition:background .2s,border-color .2s,color .2s;
}
.welcome-utility-button svg {
    width:1rem;
    height:1rem;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
}
.welcome-utility-button:hover { color:#fff; background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.25); }
.welcome-utility-button-accent { color:#22d3ee; border-color:rgba(34,211,238,.3); background:rgba(34,211,238,.08); }
.welcome-utility-button-accent:hover { color:#67e8f9; background:rgba(34,211,238,.14); border-color:rgba(34,211,238,.5); }
.welcome-secondary-actions .welcome-preference-row {
    min-height:52px;
    padding:.65rem .8rem;
    border-color:transparent;
    background:rgba(255,255,255,.025);
}
.welcome-secondary-actions .welcome-preference-row:hover { background:rgba(255,255,255,.06); }
.welcome-secondary-actions .welcome-preference-row > div > span:first-child {
    color:rgba(255,255,255,.72);
    font-size:.78rem;
    font-weight:700;
}
.welcome-secondary-actions .welcome-preference-row > div > span:last-child {
    margin-top:.1rem;
    color:rgba(255,255,255,.42);
    font-size:.7rem;
}
.welcome-secondary-actions .welcome-preference-row input {
    width:1.15rem;
    height:1.15rem;
    opacity:.78;
}
.welcome-preference-row > div > span:last-child,.welcome-form-help { color:rgba(255,255,255,.72); font-size:.82rem; line-height:1.4; }
.host-format-guidance { margin:.7rem 0 0; padding:.8rem; border-left:3px solid #22d3ee; border-radius:.25rem; color:#fff; background:rgba(34,211,238,.08); font-size:.88rem; line-height:1.5; }
#audio-prompt:not([data-panel="main"]) .audio-number-ball { opacity:0; }
body.easy-view .welcome-card { border:2px solid #fff; }
body.easy-view .welcome-role-button,
body.easy-view .welcome-preference-row { border-width:2px; }
body.easy-view .welcome-role-button strong { font-size:1.2rem; }
body.easy-view .welcome-role-button span,
body.easy-view .welcome-preference-row > div > span:last-child,
body.easy-view .welcome-form-help,
body.easy-view .host-format-guidance { font-size:1rem; }

/* Give the welcome cage a useful, undistorted stage and balance the entry screen. */
#welcome-panel-main { gap:1.15rem; }
#welcome-panel-main .audio-cage-preview {
    width:min(100%, 320px);
    height:auto;
    aspect-ratio:1.62;
    margin:0 auto;
    flex:0 0 auto;
}

@media (max-width:767px) {
    #audio-prompt { padding:.6rem; }
    #audio-prompt .welcome-card {
        max-height:calc(100dvh - 1.2rem);
        border-radius:1.5rem;
    }
    #welcome-panel-main {
        gap:1rem;
        padding:1.2rem;
    }
    #welcome-panel-main .audio-cage-preview {
        width:min(100%, 330px);
        min-height:178px;
        aspect-ratio:1.68;
        margin:.1rem auto;
        border-radius:1.1rem;
    }
    .welcome-role-actions { gap:.65rem; }
    .welcome-role-button { min-height:60px; padding:.72rem .9rem; }
    .welcome-secondary-actions { margin-top:0; padding-top:.85rem; }
}

@media (max-width:767px) and (max-height:720px) {
    #welcome-panel-main {
        gap:.75rem;
        padding:1rem 1.15rem;
    }
    #welcome-panel-main .audio-cage-preview {
        width:min(100%, 280px);
        min-height:158px;
        aspect-ratio:1.7;
        margin:0 auto;
    }
    .welcome-intro { margin-top:.4rem; }
    .welcome-role-button { min-height:56px; }
    .welcome-secondary-actions { padding-top:.7rem; }
}

@media (min-width:768px) {
    #audio-prompt .welcome-card {
        width:min(960px, calc(100vw - 3rem));
        max-width:none;
    }
    #welcome-panel-main {
        display:grid;
        grid-template-columns:minmax(0, 1fr) minmax(360px, .95fr);
        grid-template-areas:
            "intro cage"
            "roles cage"
            "secondary cage";
        align-items:center;
        column-gap:2.5rem;
        row-gap:1.25rem;
        padding:2.25rem 2.5rem;
    }
    #welcome-panel-main > .text-center { grid-area:intro; }
    #welcome-panel-main > .welcome-role-actions { grid-area:roles; }
    #welcome-panel-main > .welcome-secondary-actions { grid-area:secondary; }
    #welcome-panel-main > #audio-cage-preview {
        grid-area:cage;
        width:100%;
        max-width:none;
        height:clamp(390px, 64vh, 560px);
        min-height:390px;
        aspect-ratio:auto;
        margin:0;
        border-radius:1.5rem;
    }
    #welcome-panel-main .welcome-intro {
        max-width:26rem;
        font-size:1.1rem;
    }
    #welcome-panel-main .welcome-role-button {
        min-height:76px;
        padding:1rem 1.15rem;
    }
    #welcome-panel-main .welcome-role-button strong { font-size:1.2rem; }
    #welcome-panel-main .welcome-role-button span { font-size:.9rem; }
    #welcome-panel-main .welcome-secondary-actions {
        width:100%;
        margin-top:0;
        padding-top:1.25rem;
    }
}
