/* ═══════════════════════════════════════════════════════════════════════════
   SPIN THE BOTTLE (spin-the-bottle-engine.js)
   A ring of player seats around a rotating bottle. Theme-variable driven chrome.
   ═══════════════════════════════════════════════════════════════════════════ */

.sb-stage {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 45%, var(--theme-surface, #f8f9fa) 0%, var(--theme-bg, #eef1f5) 72%);
    border: 3px solid var(--theme-border, #dbe0e6);
    box-shadow: inset 0 4px 24px rgba(0, 0, 0, 0.08);
}

.sb-circle {
    position: absolute;
    inset: 0;
}

/* Each player seat sits on the ring; JS positions left/top as percentages. */
.sb-seat {
    position: absolute;
    transform: translate(-50%, -50%);
    max-width: 30%;
}

.sb-seat-label {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--theme-surface, #fff);
    border: 2px solid var(--theme-accent, #7c3aed);
    color: var(--theme-text, #212529);
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.1;
    white-space: nowrap;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.sb-seat.sb-chosen .sb-seat-label {
    background: var(--theme-accent, #7c3aed);
    color: var(--theme-button-text, #fff);
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
}

/* The bottle — centred, rotates via inline transform from the engine. */
.sb-bottle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22%;
    height: 62%;
    transform: translate(-50%, -50%) rotate(0deg);
    transform-origin: 50% 50%;
    cursor: pointer;
    z-index: 3;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
    -webkit-tap-highlight-color: transparent;
}

.sb-bottle svg { width: 100%; height: 100%; display: block; }

/* Centre hub cap */
.sb-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--theme-accent-hover, #a78bfa), var(--theme-accent, #7c3aed));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
    pointer-events: none;
}

.sb-result {
    min-height: 2.2rem;
    margin-top: 1.25rem;
    text-align: center;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--theme-accent, #7c3aed);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.sb-result.sb-result-show {
    opacity: 1;
    transform: translateY(0);
}

.sb-result.sb-result-show::before { content: "🍾 "; }

@media (prefers-reduced-motion: reduce) {
    .sb-seat-label, .sb-result { transition: none; }
}
