body {
    background-color: #f4f6f8;
}
.login-bg {
    background: linear-gradient(135deg, #0d6e3a 0%, #145c33 100%);
}
.card {
    border-radius: 10px;
}
.navbar-brand i {
    color: #ffd700;
}
table td, table th {
    vertical-align: middle;
}

/* Draw order column starts hidden — the "Show draw order" button on the
   group page toggles the .equb-show-draw-order class to reveal it. */
.equb-draw-order-col {
    display: none;
}
#equbMembersTable.equb-show-draw-order .equb-draw-order-col {
    display: table-cell;
}

/* Equb lottery spinning wheel */
#equbWheel {
    display: block;
    border-radius: 50%;
    box-shadow: 0 0 0 6px #ffffff, 0 4px 16px rgba(0, 0, 0, 0.2);
}
.equb-wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 22px solid #145c33;
    z-index: 2;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

/* Draw stage: wraps the wheel + box + button so the whole thing can be
   blown up full screen for a dramatic, audience-facing draw reveal. */
.equb-draw-stage {
    position: relative;
}
.equb-fullscreen-btn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
}
.equb-draw-stage.equb-fullscreen,
.equb-draw-stage:fullscreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, #145c33 0%, #0a2e18 100%);
    color: #fff;
    padding: 2rem;
    overflow: auto;
}
/* When the native Fullscreen API isn't available/allowed, .equb-fullscreen
   is still applied by JS — pin it over the whole viewport by hand instead. */
.equb-draw-stage.equb-fullscreen:not(:fullscreen) {
    position: fixed;
    inset: 0;
    z-index: 2000;
}
.equb-draw-stage.equb-fullscreen .equb-draw-row,
.equb-draw-stage:fullscreen .equb-draw-row {
    gap: 5rem !important;
    margin-bottom: 3rem !important;
}
.equb-draw-stage.equb-fullscreen .equb-draw-label,
.equb-draw-stage:fullscreen .equb-draw-label {
    color: #d7ead9;
    font-size: 0.95rem;
    text-align: center;
}
.equb-draw-stage.equb-fullscreen #equbSpinBtn,
.equb-draw-stage:fullscreen #equbSpinBtn {
    max-width: 420px;
    font-size: 1.25rem;
    padding: 0.85rem 1.5rem;
    margin-top: 2.5rem;
}
.equb-draw-stage.equb-fullscreen #equbWheelResult,
.equb-draw-stage:fullscreen #equbWheelResult {
    max-width: 640px;
    font-size: 1.1rem;
    text-align: center !important;
}
.equb-draw-stage.equb-fullscreen .equb-fullscreen-btn,
.equb-draw-stage:fullscreen .equb-fullscreen-btn {
    top: 1rem;
    right: 1rem;
}

/* Physical-style lottery draw box: shows the eligible members tumbling
   around inside a "drum", then holds the winner's name on screen. */
.equb-draw-box {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.25), transparent 55%),
        linear-gradient(160deg, #8a5a2b 0%, #6b4423 55%, #4e3119 100%);
    border: 6px solid #3f2a14;
    box-shadow: inset 0 0 24px rgba(0,0,0,0.45), 0 4px 16px rgba(0,0,0,0.25);
}

.equb-draw-box::before {
    /* glass-front highlight, purely decorative */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 40%);
    pointer-events: none;
    z-index: 3;
}

.equb-draw-box-tumbler {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.equb-draw-box-tumbler .equb-capsule {
    position: absolute;
    top: 50%;
    left: 50%;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    color: #3f2a14;
    background: #ffe8a3;
    border-radius: 999px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    will-change: transform;
    animation-name: equb-tumble;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    transition: opacity 0.4s ease;
}

.equb-draw-box.is-drawing .equb-capsule {
    animation-duration: 0.5s !important;
}

.equb-draw-box.is-settled .equb-capsule {
    opacity: 0;
}

@keyframes equb-tumble {
    0%   { transform: translate(-50%, -50%) translate(var(--tx1, 0px), var(--ty1, 0px)) rotate(var(--tr1, 0deg)); }
    50%  { transform: translate(-50%, -50%) translate(var(--tx2, 0px), var(--ty2, 0px)) rotate(var(--tr2, 0deg)); }
    100% { transform: translate(-50%, -50%) translate(var(--tx1, 0px), var(--ty1, 0px)) rotate(var(--tr1, 0deg)); }
}

.equb-draw-box-winner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.equb-draw-box-winner .equb-winner-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffe8a3;
    margin-bottom: 4px;
}

.equb-draw-box-winner .equb-winner-name {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.equb-draw-box.is-settled .equb-draw-box-winner {
    opacity: 1;
    transform: scale(1);
}
