#fortune-wheel-modal:not(.hidden) {
    display: flex;
}

.fortune-wheel-overlay {
    backdrop-filter: blur(6px);
}

/* Казино-подсветка позади карточки */
.fortune-wheel-backdrop {
    background:
        radial-gradient(circle at 50% 38%, rgba(34, 211, 238, 0.18), transparent 55%),
        radial-gradient(circle at 50% 38%, rgba(168, 85, 247, 0.12), transparent 70%),
        rgba(0, 0, 0, 0.78) !important;
}

#fortune-wheel-modal:not(.hidden) .fortune-wheel-card {
    animation: fwCardIn 0.55s cubic-bezier(0.18, 0.9, 0.2, 1.08) both;
}

.fortune-wheel-card {
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 50% -10%, rgba(34, 211, 238, 0.10), transparent 60%),
        linear-gradient(180deg, #131b2c, #0c1018) !important;
    border: 1px solid rgba(34, 211, 238, 0.30) !important;
    box-shadow:
        0 30px 80px -28px rgba(34, 211, 238, 0.45),
        0 0 0 1px rgba(251, 191, 36, 0.10) inset,
        0 0 60px -20px rgba(168, 85, 247, 0.4) inset;
}

@keyframes fwCardIn {
    from { opacity: 0; transform: translateY(26px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Переливающийся заголовок */
#fortune-wheel-title {
    background: linear-gradient(90deg, #fbbf24, #67e8f9, #a78bfa, #fbbf24);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fwTitleFlow 5s linear infinite;
    letter-spacing: 0.02em;
}

@keyframes fwTitleFlow {
    to { background-position: 250% center; }
}

.fortune-wheel-close {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    line-height: 0;
    cursor: pointer;
}

.fortune-wheel-stage {
    position: relative;
    width: 280px;
    height: 280px;
}

/* ===== Колесо ===== */
.fortune-wheel-disk {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid #fbbf24;
    box-shadow:
        0 0 0 3px rgba(15, 23, 42, 0.9),
        0 0 28px rgba(251, 191, 36, 0.45),
        0 0 60px rgba(34, 211, 238, 0.28),
        inset 0 0 30px rgba(0, 0, 0, 0.55);
    background: conic-gradient(
        from -90deg,
        #f59e0b 0deg 45deg,
        #0e7490 45deg 90deg,
        #7c3aed 90deg 135deg,
        #0e7490 135deg 180deg,
        #f59e0b 180deg 225deg,
        #0e7490 225deg 270deg,
        #7c3aed 270deg 315deg,
        #0e7490 315deg 360deg
    );
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-transition: -webkit-transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    animation: fwRimBreath 3.2s ease-in-out infinite;
}

/* Глянцевый блик + спицы-разделители поверх секторов */
.fortune-wheel-disk::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.22), transparent 45%),
        repeating-conic-gradient(from -90deg, rgba(0, 0, 0, 0.28) 0deg 0.8deg, transparent 0.8deg 45deg);
}

@keyframes fwRimBreath {
    0%, 100% {
        box-shadow:
            0 0 0 3px rgba(15, 23, 42, 0.9),
            0 0 24px rgba(251, 191, 36, 0.40),
            0 0 50px rgba(34, 211, 238, 0.22),
            inset 0 0 30px rgba(0, 0, 0, 0.55);
    }
    50% {
        box-shadow:
            0 0 0 3px rgba(15, 23, 42, 0.9),
            0 0 38px rgba(251, 191, 36, 0.65),
            0 0 78px rgba(34, 211, 238, 0.42),
            inset 0 0 30px rgba(0, 0, 0, 0.55);
    }
}

.fortune-wheel-disk.is-spinning {
    -webkit-transition-duration: 5s;
    transition-duration: 5s;
    animation: fwSpinGlow 0.6s ease-in-out infinite;
}

@keyframes fwSpinGlow {
    0%, 100% {
        box-shadow:
            0 0 0 3px rgba(15, 23, 42, 0.9),
            0 0 40px rgba(251, 191, 36, 0.75),
            0 0 90px rgba(34, 211, 238, 0.5),
            inset 0 0 30px rgba(0, 0, 0, 0.55);
    }
    50% {
        box-shadow:
            0 0 0 3px rgba(15, 23, 42, 0.9),
            0 0 60px rgba(168, 85, 247, 0.8),
            0 0 120px rgba(34, 211, 238, 0.65),
            inset 0 0 30px rgba(0, 0, 0, 0.55);
    }
}

.fortune-wheel-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.fortune-wheel-label {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform-origin: center center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fffbeb;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 8px rgba(251, 191, 36, 0.5);
    white-space: nowrap;
}

.fortune-wheel-label span {
    display: inline-block;
    transform: translate(-50%, -118px);
    text-align: center;
}

/* ===== Лампочки по ободу (бегущие огни казино) ===== */
.fortune-wheel-bulbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.fortune-wheel-bulb {
    position: absolute;
    width: 11px;
    height: 11px;
    margin: -5.5px 0 0 -5.5px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fffbe6, #fbbf24 55%, #b45309);
    box-shadow: 0 0 8px 2px rgba(251, 191, 36, 0.85), 0 0 2px rgba(0, 0, 0, 0.6);
    animation: fwBulb 1.2s ease-in-out infinite;
}

@keyframes fwBulb {
    0%, 100% {
        opacity: 0.45;
        box-shadow: 0 0 4px 1px rgba(251, 191, 36, 0.4);
        transform: scale(0.82);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 12px 4px rgba(251, 213, 86, 1), 0 0 22px 6px rgba(251, 191, 36, 0.6);
        transform: scale(1.12);
    }
}

.fortune-wheel-disk.is-spinning ~ .fortune-wheel-bulbs .fortune-wheel-bulb,
.fortune-wheel-stage.is-spinning .fortune-wheel-bulb {
    animation-duration: 0.45s;
}

/* ===== Указатель ===== */
.fortune-wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 26px solid #fbbf24;
    z-index: 6;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.9)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.fortune-wheel-stage.is-win .fortune-wheel-pointer {
    animation: fwPointerTick 0.4s ease-in-out 3;
}

@keyframes fwPointerTick {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(-12deg); }
}

/* ===== Ступица ===== */
.fortune-wheel-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 38% 32%, #fde68a, #fbbf24 45%, #b45309 90%);
    border: 3px solid #0f172a;
    z-index: 5;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.7), inset 0 0 10px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fortune-wheel-hub::after {
    content: '★';
    font-size: 22px;
    line-height: 1;
    color: #7c2d12;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

.fortune-wheel-stage.is-win .fortune-wheel-hub {
    animation: fwHubFlash 0.5s ease-in-out 4;
}

@keyframes fwHubFlash {
    0%, 100% { box-shadow: 0 0 16px rgba(251, 191, 36, 0.7), inset 0 0 10px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 0 30px 6px rgba(34, 211, 238, 1), 0 0 50px rgba(168, 85, 247, 0.8), inset 0 0 10px rgba(0, 0, 0, 0.4); }
}

/* ===== Джекпот-кольцо (вспышка при выигрыше) ===== */
.fortune-wheel-win-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 280px;
    margin: -140px 0 0 -140px;
    border-radius: 50%;
    border: 4px solid rgba(34, 211, 238, 0.9);
    pointer-events: none;
    z-index: 5;
    animation: fwWinRing 0.85s ease-out forwards;
}

@keyframes fwWinRing {
    0% { opacity: 0.9; transform: scale(0.6); border-color: rgba(251, 191, 36, 1); }
    100% { opacity: 0; transform: scale(1.5); border-color: rgba(34, 211, 238, 0); }
}

.fortune-wheel-stage.is-win {
    animation: fwWinPulse 0.6s ease-in-out 2;
}

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

/* ===== Конфетти ===== */
.fortune-confetti {
    position: absolute;
    top: -16px;
    width: 9px;
    height: 5px;
    border-radius: 1px;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    animation-name: fwConfetti;
    animation-timing-function: cubic-bezier(0.3, 0.6, 0.5, 1);
    animation-fill-mode: forwards;
}

@keyframes fwConfetti {
    0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
    100% { opacity: 0; transform: translate(var(--xdrift, 0), 460px) rotate(var(--rot, 540deg)); }
}

/* ===== Кнопки ===== */
.fortune-wheel-btn--primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fbbf24, #f59e0b 45%, #22d3ee);
    background-size: 180% 180%;
    color: #0f172a;
    box-shadow: 0 10px 26px -10px rgba(251, 191, 36, 0.9);
    animation: fwBtnFlow 4s ease-in-out infinite;
}

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

.fortune-wheel-btn--primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-18deg);
    animation: fwBtnSheen 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes fwBtnSheen {
    0% { left: -60%; }
    55%, 100% { left: 130%; }
}

.fortune-wheel-btn--primary:not(:disabled) {
    animation: fwBtnFlow 4s ease-in-out infinite, fwBtnPulse 1.8s ease-in-out infinite;
}

@keyframes fwBtnPulse {
    0%, 100% { box-shadow: 0 10px 26px -10px rgba(251, 191, 36, 0.9); transform: translateY(0); }
    50% { box-shadow: 0 14px 34px -8px rgba(34, 211, 238, 1); transform: translateY(-2px); }
}

.fortune-wheel-btn--primary:hover:not(:disabled) {
    opacity: 0.96;
}

.fortune-wheel-btn--primary:disabled {
    animation: none;
    filter: grayscale(0.3);
}

.fortune-wheel-btn--primary:disabled::after {
    display: none;
}

.fortune-wheel-btn--secondary {
    color: #e5e7eb;
}

.fortune-wheel-no-tickets {
    color: #fbbf24;
    line-height: 1.4;
}

.fortune-wheel-no-tickets-slot {
    min-height: 1.4em;
}

.fortune-wheel-no-tickets--placeholder {
    visibility: hidden;
}

/* Результат — крупно и ярко */
#fortune-wheel-result-text {
    background: linear-gradient(90deg, #fbbf24, #67e8f9, #a78bfa);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.25rem;
    animation: fwResultPop 0.5s cubic-bezier(0.18, 0.9, 0.2, 1.3) both, fwTitleFlow 4s linear infinite;
}

@keyframes fwResultPop {
    0% { opacity: 0; transform: scale(0.6); }
    100% { opacity: 1; transform: scale(1); }
}

.fortune-wheel-overlay.is-result #fortune-wheel-title {
    font-size: 1.125rem;
    line-height: 1.4;
}

.fortune-wheel-overlay.is-result #fortune-wheel-subtitle {
    color: #9ca3af;
    margin-bottom: 1.25rem;
}

.fortune-wheel-banner-tickets--zero .fortune-wheel-banner-count {
    color: #9ca3af;
}

.fortune-wheel-banner-tickets--has .fortune-wheel-banner-count {
    color: #67e8f9;
}

.fortune-wheel-banner-tickets-hint {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.35;
    color: #fbbf24;
}

.fortune-wheel-profile-tickets-wrap--zero .fortune-wheel-profile-tickets {
    color: #9ca3af;
}

.fortune-wheel-profile-tickets-wrap--has .fortune-wheel-profile-tickets {
    color: #67e8f9;
}

.fortune-wheel-profile-tickets-hint {
    font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
    .fortune-wheel-disk,
    .fortune-wheel-bulb,
    .fortune-wheel-btn--primary,
    .fortune-wheel-btn--primary::after,
    #fortune-wheel-title,
    #fortune-wheel-result-text {
        animation: none !important;
    }
}

/* Мобилка: фиксированная высота шапки — текст не прыгает при смене состояния */
@media (max-width: 639px) {
    .fortune-wheel-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.5rem;
        transition: color 0.15s ease, background-color 0.15s ease;
    }

    .fortune-wheel-close:hover {
        color: #fff;
        background: rgba(55, 65, 81, 0.6);
    }

    #fortune-wheel-title {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 2.75rem;
        margin-bottom: 0.25rem;
        font-size: 1.125rem;
        line-height: 1.35;
    }

    #fortune-wheel-subtitle {
        min-height: 2.75rem;
        margin-bottom: 1.25rem;
    }

    #fortune-wheel-subtitle.hidden {
        display: block;
        visibility: hidden;
    }

    .fortune-wheel-overlay.is-result #fortune-wheel-title {
        font-size: 1.125rem;
        line-height: 1.35;
    }

    .fortune-wheel-overlay.is-result #fortune-wheel-subtitle {
        margin-bottom: 1.25rem;
    }
}
