/* Çarx — həftəlik mükafat */
.wheel-promo {
    margin: 0;
    padding: clamp(32px, 5vw, 56px) 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background: #ffffff6b;
    border-radius: 15px;
    backdrop-filter: blur(12px);
    box-shadow: 10px 10px 5px #ff910062;
}

.wheel-promo__inner {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
}

.wheel-promo__visual {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
}

#wheelPreviewMount {
    width: min(100%, 280px);
    aspect-ratio: 1;
    margin: 0 auto;
    flex-shrink: 0;
    position: relative;
}

.wheel-modal__stage {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 4px;
    contain: layout style paint;
}

#wheelModalMount {
    width: 100%;
    max-width: 300px;
    height: var(--wheel-mount-size, min(72vw, 300px));
    margin: 0 auto;
    flex-shrink: 0;
    position: relative;
    contain: strict;
}

#wheelModalMount.is-spinning,
.wheel-modal__stage.is-spinning {
    overflow: hidden;
    border-radius: 50%;
    touch-action: none;
}

/* Wheel core */
.wheel-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: var(--wheel-size, 280px);
    max-height: var(--wheel-size, 280px);
    margin: 0 auto;
    aspect-ratio: 1;
    filter: drop-shadow(0 16px 32px rgba(1, 127, 165, 0.25));
    transform: translateZ(0);
    backface-visibility: hidden;
}

.wheel-wrap--modal {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
}

.wheel-wrap__pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 28px solid #e53935;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
}

.wheel-wrap__pointer::after {
    content: "";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #c62828;
}

.wheel-wrap__disk {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 50%;
    overflow: hidden;
    will-change: transform;
    transform-origin: 50% 50%;
    backface-visibility: hidden;
}

.wheel-wrap__disk.is-intro {
    animation: wheel-intro-spin 3.8s cubic-bezier(0.15, 0.85, 0.25, 1) forwards;
}

.wheel-wrap__disk.is-idle {
    animation: wheel-idle-spin 52s linear infinite;
}

.wheel-wrap__disk.is-spinning {
    animation: none !important;
}

.wheel-wrap__svg {
    display: block;
    width: 100%;
    height: 100%;
}

.wheel-wrap__ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 6px solid #ff9100;
    box-shadow:
        inset 0 0 0 3px #fff,
        0 0 0 2px rgba(255, 145, 0, 0.4);
    pointer-events: none;
    z-index: 2;
}

.wheel-wrap__hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 18%;
    height: 18%;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff 0%, #e8ecf2 100%);
    border: 3px solid #ff9100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.5rem, 2vw, 0.625rem);
    font-weight: 800;
    color: var(--accent, #017fa5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@keyframes wheel-intro-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(1440deg); }
}

@keyframes wheel-idle-spin {
    from { transform: rotate(var(--wheel-start, 0deg)); }
    to { transform: rotate(calc(var(--wheel-start, 0deg) + 360deg)); }
}

/* Content */
.wheel-promo__kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid #bfe6ef;
    background: #eefbff;
    color: var(--mega-accent);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wheel-promo__title {
    margin: 14px 0 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #0f172a;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.wheel-promo__terms {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.wheel-promo__terms-title {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
}

.wheel-promo__terms li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #4b5563;
}

.wheel-promo__terms li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent, #017fa5);
    font-weight: 700;
}

.wheel-promo__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    padding: 14px 26px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9100 0%, #ffb347 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 145, 0, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.wheel-promo__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 145, 0, 0.45);
}

.wheel-promo__btn:active {
    transform: scale(0.98);
}

/* Modal */
.wheel-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wheel-modal[hidden] {
    display: none;
}

.wheel-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.wheel-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    max-height: min(92vh, 640px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 28px 22px 24px;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: wheel-modal-in 0.35s ease;
    overscroll-behavior: contain;
}

.wheel-modal__body {
    width: 100%;
}

@keyframes wheel-modal-in {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.wheel-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.15s;
}

.wheel-modal__close:hover {
    background: var(--border-soft);
}

.wheel-modal__title {
    margin: 0 0 6px;
    font-size: 1.375rem;
    font-weight: 800;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

.wheel-modal__sub {
    margin: 0 0 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.wheel-modal__spin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    margin-top: 20px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #017fa5 0%, #0ea5e9 100%);
    color: #fff;
    font-size: 1.0625rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}

.wheel-modal__spin-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.wheel-modal__spin-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Prize reveal overlay */
.wheel-prize-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 15, 30, 0.82);
    backdrop-filter: blur(8px);
    animation: wheel-prize-fade-in 0.4s ease;
}

.wheel-prize-overlay[hidden] {
    display: none;
}

@keyframes wheel-prize-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wheel-prize-overlay__confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.wheel-confetti__burst {
    position: absolute;
    top: 0;
    left: 50%;
    animation: confetti-burst var(--cf-dur, 1s) var(--cf-delay, 0s) ease-out forwards;
    will-change: transform, opacity;
    pointer-events: none;
}

@keyframes confetti-burst {
    0% {
        transform: translate(-50%, -10px) scale(0.2);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--bx, 0px)), var(--by, 120px)) scale(1.1) rotate(180deg);
        opacity: 0;
    }
}

.wheel-confetti__piece {
    position: absolute;
    top: -24px;
    animation: confetti-fall var(--cf-dur, 3s) var(--cf-delay, 0s) ease-in forwards;
    will-change: transform, opacity;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

@keyframes confetti-fall {
    0% {
        transform: translate3d(0, -20px, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    15% {
        transform: translate3d(calc(var(--cf-drift, 0px) * 0.3), 15vh, 0) rotate(calc(var(--cf-rot, 360deg) * 0.2)) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--cf-drift, 0px), 105vh, 0) rotate(var(--cf-rot, 720deg)) scale(0.6);
        opacity: 0;
    }
}

.wheel-prize-overlay__panel {
    position: relative;
    z-index: 2;
    width: min(100%, 380px);
    padding: 32px 24px 28px;
    border-radius: 24px;
    background: linear-gradient(160deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
    text-align: center;
    animation: wheel-prize-panel-in 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes wheel-prize-panel-in {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.wheel-prize-overlay__kicker {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mega-accent);
}

.wheel-prize-overlay__title {
    margin: 0 0 28px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

/* Gift box */
.gift-box {
    position: relative;
    width: 160px;
    height: 140px;
    margin: 0 auto 28px;
    perspective: 600px;
}

.gift-box__body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 90px;
    background: linear-gradient(145deg, #017fa5 0%, #015a75 100%);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(1, 127, 165, 0.4);
    z-index: 1;
}

.gift-box__body::before,
.gift-box__body::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.25);
}

.gift-box__body::before {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 18px;
    transform: translateX(-50%);
}

.gift-box__body::after {
    left: 0;
    right: 0;
    top: 50%;
    height: 18px;
    transform: translateY(-50%);
}

.gift-box__lid {
    position: absolute;
    bottom: 82px;
    left: 50%;
    width: 140px;
    height: 36px;
    margin-left: -70px;
    background: linear-gradient(145deg, #0ea5e9 0%, #017fa5 100%);
    border-radius: 6px 6px 2px 2px;
    transform-origin: 50% 100%;
    transform: rotateX(0deg);
    transition: transform 0.85s cubic-bezier(0.34, 1.4, 0.64, 1);
    z-index: 3;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.gift-box__lid::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    background: #ff9100;
    border-radius: 4px;
    box-shadow: 0 0 0 3px rgba(255, 145, 0, 0.35);
}

.gift-box__bow {
    position: absolute;
    bottom: 108px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    width: 48px;
    height: 28px;
    transition: transform 0.85s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.4s;
}

.gift-box__bow::before,
.gift-box__bow::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 22px;
    height: 22px;
    border: 5px solid #ff9100;
    border-radius: 50% 50% 0 50%;
}

.gift-box__bow::before {
    left: 0;
    transform: rotate(-30deg);
}

.gift-box__bow::after {
    right: 0;
    transform: rotate(30deg) scaleX(-1);
}

.gift-box__shine {
    position: absolute;
    bottom: 10px;
    left: 50%;
    width: 100px;
    height: 40px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(255, 215, 0, 0.5) 0%, transparent 70%);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.6s 0.5s;
}

.gift-box__sparkles {
    position: absolute;
    inset: -20px;
    pointer-events: none;
    opacity: 0;
    z-index: 5;
    transition: opacity 0.4s 0.6s;
}

.gift-box__sparkles::before,
.gift-box__sparkles::after {
    content: "✨";
    position: absolute;
    font-size: 1.25rem;
    animation: sparkle-pop 1s ease infinite alternate;
}

.gift-box__sparkles::before { top: 10%; left: 5%; }
.gift-box__sparkles::after { top: 5%; right: 8%; animation-delay: 0.3s; }

@keyframes sparkle-pop {
    from { transform: scale(0.8) rotate(0deg); opacity: 0.6; }
    to { transform: scale(1.2) rotate(20deg); opacity: 1; }
}

.gift-box__prize {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(40px) scale(0.5);
    z-index: 2;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.7s cubic-bezier(0.22, 1.2, 0.36, 1) 0.45s,
                opacity 0.5s ease 0.45s;
    pointer-events: none;
}

.gift-box__prize-emoji {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.gift-box__prize-label {
    font-size: 0.9375rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    max-width: 120px;
    line-height: 1.2;
}

.gift-box.is-open .gift-box__lid {
    transform: rotateX(-112deg) translateY(-8px);
}

.gift-box.is-open .gift-box__bow {
    transform: translateX(-50%) translateY(-28px) scale(0.9);
    opacity: 0;
}

.gift-box.is-open .gift-box__prize {
    transform: translateX(-50%) translateY(-72px) scale(1);
    opacity: 1;
}

.gift-box.is-open .gift-box__shine {
    opacity: 1;
}

.gift-box.is-open .gift-box__sparkles {
    opacity: 1;
}

.wheel-prize-overlay__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 260px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9100 0%, #ffb347 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 145, 0, 0.4);
    transition: transform 0.15s;
}

.wheel-prize-overlay__btn:hover {
    transform: translateY(-2px);
}

@media (max-width: 960px) {
    .wheel-promo__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .wheel-promo__kicker {
        margin: 0 auto;
    }

    .wheel-promo__terms {
        text-align: left;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    #wheelPreviewMount {
        width: min(100%, 240px);
    }

    .wheel-modal__stage,
    #wheelModalMount {
        max-width: min(72vw, 280px);
    }

    #wheelModalMount {
        height: min(72vw, 280px);
    }

    .wheel-prize-overlay__panel {
        padding: 24px 18px 22px;
    }

    .gift-box {
        width: 140px;
        height: 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wheel-wrap__disk.is-intro,
    .wheel-wrap__disk.is-idle {
        animation: none;
    }

    .wheel-wrap__disk.is-spinning {
        transition-duration: 0.01ms !important;
    }

    .wheel-confetti__piece,
    .gift-box__lid,
    .gift-box__prize,
    .gift-box__sparkles::before,
    .gift-box__sparkles::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    .gift-box.is-open .gift-box__prize {
        opacity: 1;
        transform: translateX(-50%) translateY(-72px) scale(1);
    }
}
