/*
 * Spin Wheel - clean dark / gold UI refresh
 * Visual layer only. Reward selection and server-side probabilities are unchanged.
 */

.spin-wheel-page {
    --sw-bg: #0b1020;
    --sw-panel: #101624;
    --sw-panel-soft: #141b2a;
    --sw-border: rgba(255, 255, 255, .075);
    --sw-border-soft: rgba(255, 255, 255, .05);
    --sw-text: #f5f7fb;
    --sw-muted: #8e99ad;
    --sw-gold: #e8b84a;
    --sw-gold-soft: #f1cd72;
    --sw-green: #59b88b;
    position: relative;
    color: var(--sw-text);
    padding: 16px 0 34px;
}

.spin-wheel-page::before {
    content: "";
    position: absolute;
    inset: -18px -24px -38px;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 42%, rgba(232, 184, 74, .045), transparent 31%),
        linear-gradient(180deg, rgba(8, 13, 25, .42), rgba(8, 13, 25, .12));
}

.sw-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--sw-border);
    border-radius: 10px;
    box-shadow: none;
}

.sw-alert-icon {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(255,255,255,.09);
    font-weight: 800;
}

.sw-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 2px 22px;
    border-bottom: 1px solid var(--sw-border-soft);
    margin-bottom: 18px;
}

.sw-eyebrow,
.sw-section-kicker {
    display: block;
    color: var(--sw-gold-soft);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.sw-hero h1,
.sw-card-topline h2,
.sw-side-header h2 {
    margin: 0;
    color: var(--sw-text);
    font-weight: 750;
    letter-spacing: -.02em;
}

.sw-hero h1 {
    margin-top: 5px;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.sw-hero-subtitle {
    margin: 6px 0 0;
    color: var(--sw-muted);
    font-size: .9rem;
}

.sw-balance-card {
    min-width: 145px;
    padding: 10px 13px;
    text-align: right;
    border: 1px solid var(--sw-border);
    border-radius: 10px;
    background: rgba(255,255,255,.025);
}

.sw-balance-label,
.sw-balance-currency {
    color: var(--sw-muted);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sw-balance-label { display: block; }
.sw-balance-value {
    display: inline-block;
    margin: 2px 4px 0 0;
    color: var(--sw-gold-soft);
    font-size: 1.32rem;
    font-weight: 800;
}
.sw-balance-currency { display: inline-block; }

.sw-main-card,
.sw-side-card {
    overflow: hidden;
    border: 1px solid var(--sw-border);
    border-radius: 14px;
    background: rgba(13, 19, 32, .72);
    box-shadow: none;
}

.sw-main-card {
    background: rgba(10, 15, 27, .28);
}

.sw-card-topline,
.sw-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
    border-bottom: 1px solid var(--sw-border);
}

.sw-card-topline h2,
.sw-side-header h2 {
    margin-top: 3px;
    font-size: 1.05rem;
}

.sw-card-body {
    padding: 5px 16px 22px;
}

.sw-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid rgba(89,184,139,.18);
    border-radius: 999px;
    color: #9bd8bb;
    background: rgba(89,184,139,.045);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .1em;
}

.sw-live-badge span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sw-green);
}

.sw-wheel-zone {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 505px;
    padding-top: 2px;
}

.sw-wheel-aura {
    position: absolute;
    width: min(82%, 430px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,184,74,.08), rgba(232,184,74,.025) 46%, transparent 70%);
    filter: blur(18px);
    opacity: .7;
    transition: opacity .2s ease;
}

.sw-wheel-stack {
    position: relative;
    z-index: 1;
    width: min(100%, 434px);
    aspect-ratio: 434 / 500;
    margin-inline: auto;
}

#canvasWheel,
#canvasConfetti {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
}

#canvasWheel {
    z-index: 2;
    filter: drop-shadow(0 15px 18px rgba(0,0,0,.28));
}

#canvasConfetti {
    z-index: 8;
    pointer-events: none;
}

/* Flat outer bezel: dark ring, thin gold line, no oversized fake-3D shine. */
.sw-wheel-rim {
    position: absolute;
    z-index: 4;
    top: 7.55%;
    left: 1.1%;
    width: 97.8%;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    border: 12px solid #151b29;
    box-shadow:
        0 0 0 2px #080c14,
        0 0 0 3px rgba(232,184,74,.88),
        0 0 0 7px rgba(6,9,15,.85),
        0 14px 30px rgba(0,0,0,.28),
        inset 0 0 0 1px rgba(255,255,255,.08);
}

.sw-wheel-rim::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 1px solid rgba(232,184,74,.42);
}

.sw-wheel-rim::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.035);
}

/* Eight understated gold marks around the bezel. */
.sw-wheel-ticks {
    position: absolute;
    z-index: 5;
    top: 7.55%;
    left: 1.1%;
    width: 97.8%;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    opacity: .85;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(232,184,74,.9) 0deg 1.3deg,
        transparent 1.3deg 45deg
    );
    -webkit-mask: radial-gradient(circle, transparent 0 94.1%, #000 94.3% 96.7%, transparent 96.9%);
    mask: radial-gradient(circle, transparent 0 94.1%, #000 94.3% 96.7%, transparent 96.9%);
}

/* Simple pointer inspired by a real mechanical index marker. */
.sw-pointer {
    position: absolute;
    z-index: 7;
    top: 2.15%;
    left: 50%;
    width: 42px;
    height: 51px;
    transform: translateX(-50%);
    transform-origin: 50% 12px;
    pointer-events: none;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,.34));
}

.sw-pointer-gem {
    position: absolute;
    top: 0;
    left: 50%;
    width: 32px;
    height: 32px;
    transform: translateX(-50%);
    border: 3px solid var(--sw-gold);
    border-radius: 50%;
    background: #141b29;
    box-shadow: 0 0 0 2px #080c14;
}

.sw-pointer-gem::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sw-gold);
}

.sw-pointer-tip {
    position: absolute;
    top: 26px;
    left: 50%;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 22px solid var(--sw-gold);
}

.sw-pointer-tip::after {
    content: "";
    position: absolute;
    top: -21px;
    left: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 15px solid #141b29;
}

.sw-wheel-hub {
    position: absolute;
    z-index: 6;
    left: 50%;
    top: 50%;
    width: 92px;
    height: 92px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 50%;
    pointer-events: none;
    background: #121927;
    border: 8px solid #090e17;
    box-shadow:
        0 0 0 1px rgba(232,184,74,.68),
        0 8px 16px rgba(0,0,0,.32),
        inset 0 0 0 1px rgba(255,255,255,.05);
}

.sw-wheel-hub-inner {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: var(--sw-gold);
    background: #111827;
    border: 1px solid rgba(232,184,74,.52);
}

.sw-wheel-hub svg {
    width: 24px;
    height: 24px;
}

.sw-wheel-zone.is-spinning .sw-pointer {
    animation: swPointerTick .15s ease-in-out infinite alternate;
}

.sw-wheel-zone.is-spinning .sw-wheel-aura {
    opacity: .95;
}

.sw-action-zone {
    position: relative;
    z-index: 10;
    margin-top: -22px;
    text-align: center;
}

.sw-spin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 220px;
    min-height: 48px;
    padding: 11px 24px;
    border: 1px solid #ddb14c;
    border-radius: 10px;
    color: #17120a;
    background: #e8b84a;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease, border-color .15s ease;
}

.sw-spin-btn:hover {
    color: #17120a;
    background: #f0c45a;
    border-color: #efc961;
    transform: translateY(-1px);
}

.sw-spin-btn:active {
    transform: translateY(1px);
}

.sw-spin-btn:disabled {
    cursor: wait;
    opacity: .62;
    transform: none;
}

.sw-spin-btn-shine { display: none; }
.sw-spin-icon { font-size: .95rem; }

.sw-action-hint {
    margin: 13px auto 0;
    color: var(--sw-muted);
    font-size: .7rem;
}

.sw-side-body { padding: 8px 10px 11px; }

.sw-count-badge,
.sw-history-icon {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--sw-border);
    border-radius: 8px;
    color: var(--sw-gold-soft);
    background: rgba(255,255,255,.025);
    font-size: .75rem;
    font-weight: 800;
}

.sw-reward-list,
.sw-winner-list {
    display: grid;
    gap: 4px;
    max-height: 430px;
    overflow-y: auto;
    padding: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(232,184,74,.22) transparent;
}

.sw-reward-row,
.sw-winner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 45px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255,255,255,.018);
    transition: background .15s ease, border-color .15s ease;
}

.sw-reward-row:hover,
.sw-winner-row:hover {
    border-color: var(--sw-border);
    background: rgba(255,255,255,.035);
}

.sw-reward-main {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.sw-reward-dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sw-gold);
}

.sw-reward-name {
    overflow: hidden;
    color: #edf1f7;
    font-size: .82rem;
    font-weight: 650;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sw-chance-pill {
    flex: 0 0 auto;
    min-width: 46px;
    padding: 4px 7px;
    border: 1px solid var(--sw-border);
    border-radius: 999px;
    color: #c8d0dd;
    background: rgba(255,255,255,.025);
    font-size: .7rem;
    font-weight: 750;
    text-align: center;
}

.sw-winner-row { justify-content: flex-start; }
.sw-winner-rank {
    flex: 0 0 42px;
    color: #68758a;
    font-size: .68rem;
    font-weight: 800;
}

.sw-winner-info { min-width: 0; flex: 1; }
.sw-winner-info strong,
.sw-winner-info span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.sw-winner-info strong { color: #edf1f7; font-size: .8rem; }
.sw-winner-info span { margin-top: 2px; color: var(--sw-muted); font-size: .7rem; }
.sw-winner-spark { color: var(--sw-gold); font-size: .75rem; }

.sw-empty-state {
    display: grid;
    place-items: center;
    min-height: 360px;
    color: var(--sw-muted);
    text-align: center;
}

.sw-empty-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: -90px;
    border-radius: 50%;
    color: var(--sw-gold);
    background: rgba(232,184,74,.05);
    border: 1px solid rgba(232,184,74,.16);
    font-size: 1.35rem;
}

.sw-empty-inline {
    padding: 24px 12px;
    color: var(--sw-muted);
    text-align: center;
    font-size: .82rem;
}

/* Modals: flatter, closer to the rest of the Azuriom theme. */
.sw-modal .modal-content {
    overflow: hidden;
    position: relative;
    border: 1px solid var(--sw-border);
    border-radius: 14px;
    color: #f5f7fb;
    background: #111725;
    box-shadow: 0 24px 60px rgba(0,0,0,.42);
}

.sw-modal .modal-header,
.sw-modal .modal-footer { border-color: var(--sw-border); }
.sw-modal .modal-header { padding: 15px 17px; }
.sw-modal .modal-body { padding: 24px 20px; }
.sw-modal .modal-footer { padding: 12px 17px 15px; }

.sw-modal-title-wrap { display: flex; align-items: center; gap: 9px; }
.sw-modal-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border: 1px solid rgba(232,184,74,.22);
    border-radius: 8px;
    color: var(--sw-gold);
    background: rgba(232,184,74,.04);
}

.sw-modal-caption,
.sw-prize-label {
    margin: 0 0 7px;
    color: var(--sw-muted);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.sw-price-text {
    margin: 0;
    color: var(--sw-gold-soft);
    font-size: 1.4rem;
    font-weight: 850;
}

.sw-btn-secondary,
.sw-btn-primary {
    min-width: 108px;
    border-radius: 9px;
    font-size: .79rem;
    font-weight: 800;
}

.sw-btn-secondary {
    border: 1px solid var(--sw-border);
    color: #cbd2df;
    background: rgba(255,255,255,.035);
}

.sw-btn-secondary:hover { color: #fff; background: rgba(255,255,255,.065); }
.sw-btn-primary { border: 1px solid #ddb14c; color: #17120a; background: #e8b84a; }
.sw-btn-primary:hover { color: #17120a; background: #f0c45a; }

.sw-prize-crown {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 17px;
    border: 1px solid rgba(232,184,74,.28);
    border-radius: 50%;
    color: var(--sw-gold);
    background: rgba(232,184,74,.045);
    font-size: 1.55rem;
}

.sw-prize-text {
    margin: 0;
    color: #fff1c4;
    font-size: clamp(1.3rem, 4vw, 1.85rem);
    font-weight: 850;
}
.sw-prize-button { min-width: 150px; }

@keyframes swPointerTick {
    from { transform: translateX(-50%) rotate(-1.5deg); }
    to { transform: translateX(-50%) rotate(4deg); }
}

@media (max-width: 991.98px) {
    .sw-hero { align-items: center; }
}

@media (max-width: 575.98px) {
    .spin-wheel-page { padding-top: 8px; }
    .sw-hero { align-items: stretch; flex-direction: column; }
    .sw-balance-card { text-align: left; }
    .sw-card-topline,
    .sw-side-header { padding: 14px; }
    .sw-card-body { padding: 4px 7px 18px; }
    .sw-wheel-zone { min-height: auto; }
    .sw-wheel-stack { width: min(100%, 390px); }
    .sw-wheel-hub { width: 78px; height: 78px; border-width: 7px; }
    .sw-wheel-hub-inner { width: 49px; height: 49px; }
    .sw-wheel-hub svg { width: 20px; height: 20px; }
    .sw-pointer { width: 38px; height: 47px; }
    .sw-pointer-gem { width: 29px; height: 29px; }
    .sw-pointer-gem::after { top: 7px; left: 7px; width: 9px; height: 9px; }
    .sw-pointer-tip { top: 24px; }
    .sw-action-zone { margin-top: -18px; padding-inline: 10px; }
    .sw-spin-btn { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .sw-wheel-zone.is-spinning .sw-pointer { animation: none !important; }
}
