.confetti-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 2px;
    animation: confettiFall linear forwards;
    z-index: 10;
    pointer-events: none;
}

@keyframes confettiFall {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 120px))) rotate(var(--rot, 360deg)) scale(0.3);
        opacity: 0;
    }
}

.bonus-overlay.enhanced {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.bonus-modal.enhanced {
    background: var(--surface);
    border-radius: 32px;
    padding: 0;
    max-width: 900px;
    width: 92%;
    max-height: 90vh;

    box-shadow: 0 24px 70px rgba(0, 10, 25, .45), 0 0 0 1px var(--border);
    position: relative;
    display: flex;
    flex-direction: column;

    align-items: stretch;
    gap: 0;

    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    overflow: hidden;
}

.bonus-overlay.open .bonus-modal.enhanced {
    transform: scale(1);
    opacity: 1;
}

.bonus-modal.enhanced .bonus-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;

    background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
    border-bottom: 1px solid var(--border);
    border-radius: 32px 32px 0 0;
    position: relative;
    z-index: 2;
    flex: none;
}

.bonus-modal.enhanced .bonus-head__icon {
    width: 46px;
    height: 46px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.bonus-modal.enhanced .bonus-head__icon svg {
    width: 22px;
    height: 22px;
}

.bonus-modal.enhanced .bonus-head__text {
    flex: 1;
    min-width: 0;
}

.bonus-modal.enhanced .bonus-content {
    display: flex;
    flex-direction: column;
    width: 100%;

    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (min-width: 851px) {
    .bonus-modal.enhanced .bonus-content {
        flex-direction: row;
    }
}

.bonus-modal.enhanced .bonus-wheel-side {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;

    background: radial-gradient(85% 70% at 50% 42%, var(--surface-2) 0%, var(--surface) 78%);
    position: relative;

}

@media (min-width: 851px) {
    .bonus-modal.enhanced .bonus-wheel-side {
        border-right: 1px solid var(--border-soft);
        padding: 32px;
    }
}

.bonus-modal.enhanced .bonus-wheel-side::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.bonus-modal.enhanced .bonus-info-side {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px;
}

@media (min-width: 851px) {
    .bonus-modal.enhanced .bonus-info-side {
        justify-content: center;
        padding: 32px;
        min-width: 340px;
        max-width: 400px;
    }
}

.bonus-modal.enhanced .floating-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: floatParticle 4s ease-in-out infinite;
}

.bonus-modal.enhanced .floating-particle:nth-child(1) {
    width: 8px; height: 8px;
    background: radial-gradient(circle, var(--surface-accent), transparent);
    top: 10%; left: 15%;
    animation-delay: 0s; animation-duration: 3.5s;
}

.bonus-modal.enhanced .floating-particle:nth-child(2) {
    width: 6px; height: 6px;
    background: radial-gradient(circle, var(--surface-accent), transparent);
    top: 20%; right: 12%;
    animation-delay: 1.2s; animation-duration: 4.2s;
}

.bonus-modal.enhanced .floating-particle:nth-child(3) {
    width: 10px; height: 10px;
    background: radial-gradient(circle, var(--surface-accent), transparent);
    bottom: 25%; left: 10%;
    animation-delay: 0.6s; animation-duration: 3.8s;
}

.bonus-modal.enhanced .floating-particle:nth-child(4) {
    width: 5px; height: 5px;
    background: radial-gradient(circle, var(--surface-accent), transparent);
    bottom: 15%; right: 18%;
    animation-delay: 2s; animation-duration: 4.5s;
}

.bonus-modal.enhanced .floating-particle:nth-child(5) {
    width: 7px; height: 7px;
    background: radial-gradient(circle, var(--surface-accent), transparent);
    top: 50%; left: 8%;
    animation-delay: 0.8s; animation-duration: 3.2s;
}

.bonus-modal.enhanced .floating-particle:nth-child(6) {
    width: 4px; height: 4px;
    background: radial-gradient(circle, var(--surface-accent), transparent);
    top: 40%; right: 8%;
    animation-delay: 1.8s; animation-duration: 4s;
}

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    25% { transform: translateY(-12px) translateX(4px); opacity: 0.7; }
    50% { transform: translateY(-6px) translateX(-3px); opacity: 0.4; }
    75% { transform: translateY(-16px) translateX(2px); opacity: 0.6; }
}

.bonus-modal.enhanced .bonus-title {
    font-size: 20px; font-weight: 800; color: var(--text);
    margin: 0; letter-spacing: -0.3px; font-family: 'Inter', sans-serif;
}

.bonus-modal.enhanced .bonus-desc {
    font-size: 13px; color: var(--text-dim); margin: 0; line-height: 1.5;
}

.bonus-modal.enhanced .bonus-close {
    position: static;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--border);
    font-size: 18px; color: var(--text-dim); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s ease; flex: none;
}

.bonus-modal.enhanced .bonus-close:hover {
    background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger);
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
}

.bonus-modal.enhanced .bonus-spins {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.bonus-modal.enhanced .bonus-spins__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-faint);
}

.bonus-modal.enhanced .bonus-spins__num {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--accent);
}

.bonus-modal.enhanced .bonus-goals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.bonus-modal.enhanced .bonus-goal {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.bonus-modal.enhanced .bonus-goal__icon {
    width: 34px;
    height: 34px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.bonus-modal.enhanced .bonus-goal__icon svg {
    width: 18px;
    height: 18px;
}

.bonus-modal.enhanced .bonus-goal--score .bonus-goal__icon {
    background: var(--surface-accent); color: #2563eb;
}

.bonus-modal.enhanced .bonus-goal--gold .bonus-goal__icon {
    background: var(--warn-soft); color: #d97706;
}

.bonus-modal.enhanced .bonus-goal--diamond .bonus-goal__icon {
    background: var(--violet-soft); color: #7c3aed;
}

.bonus-modal.enhanced .bonus-goal__body {
    flex: 1;
    min-width: 0;
}

.bonus-modal.enhanced .bonus-goal__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.bonus-modal.enhanced .bonus-goal__label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bonus-modal.enhanced .bonus-goal__count {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text);
    flex: none;
}

.bonus-modal.enhanced .bonus-goal__track {
    height: 6px;
    border-radius: 4px;
    background: var(--surface-3);
    overflow: hidden;
}

.bonus-modal.enhanced .bonus-goal__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bonus-modal.enhanced .bonus-goal--score .bonus-goal__fill {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.bonus-modal.enhanced .bonus-goal--gold .bonus-goal__fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.bonus-modal.enhanced .bonus-goal--diamond .bonus-goal__fill {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.bonus-modal.enhanced .bonus-deposit {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--warn-soft) 0%, var(--warn-soft) 100%);
    border: 1px solid var(--warn-border);
    position: relative;
    z-index: 1;
}

.bonus-modal.enhanced .bonus-deposit.done {
    background: linear-gradient(135deg, var(--ok-soft) 0%, var(--ok-soft) 100%);
    border-color: var(--ok-border);
}

.bonus-modal.enhanced .bonus-deposit__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 10px;
}

.bonus-modal.enhanced .bonus-deposit__title {
    font-size: 13px; font-weight: 700; color: var(--warn-strong); line-height: 1.35;
}
.bonus-modal.enhanced .bonus-deposit.done .bonus-deposit__title { color: var(--ok-strong); }

.bonus-modal.enhanced .bonus-deposit__reward {
    flex: none;
    min-width: 38px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--warn);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}
.bonus-modal.enhanced .bonus-deposit.done .bonus-deposit__reward { background: var(--ok); }

.bonus-modal.enhanced .bonus-deposit__track {
    width: 100%; height: 8px; border-radius: 999px;
    background: rgba(0, 0, 0, .16);
    border: 1px solid rgba(0, 0, 0, .06);
    overflow: hidden;
}

.bonus-modal.enhanced .bonus-deposit__fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width .45s cubic-bezier(.16, 1, .3, 1);
}
.bonus-modal.enhanced .bonus-deposit.done .bonus-deposit__fill {
    background: linear-gradient(90deg, #16a34a, #4ade80);
}

.bonus-modal.enhanced .bonus-deposit__foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-top: 8px;
    font-size: 12px; font-weight: 600; color: var(--warn-strong);
}

.bonus-modal.enhanced .bonus-deposit__foot > span:first-child {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bonus-modal.enhanced .bonus-deposit.done .bonus-deposit__foot { color: var(--ok-strong); }

.bonus-modal.enhanced .bonus-deposit__btn {
    flex: none;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--warn);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s ease;
}
.bonus-modal.enhanced .bonus-deposit__btn:hover { background: var(--warn); transform: translateY(-1px); }
.bonus-modal.enhanced .bonus-deposit.done .bonus-deposit__btn { display: none; }

.bonus-modal.enhanced .bonus-wheel-section {
    position: relative; width: 100%; max-width: 420px;
    display: flex; justify-content: center; align-items: center;
    position: relative; z-index: 1;
}

.bonus-modal.enhanced .wheel-bg-glow {
    position: absolute; width: 100%; height: 100%; min-width: 320px; min-height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(59, 130, 246, .30) 0%,
        rgba(59, 130, 246, .10) 42%,
        transparent 70%);
    animation: wheelGlowPulse 3.6s ease-in-out infinite; z-index: 0;
}

@keyframes wheelGlowPulse {
    0%, 100% { transform: scale(1); opacity: .75; }
    50% { transform: scale(1.06); opacity: 1; }
}

.bonus-modal.enhanced .bonus-wheel-wrapper {
    position: relative; width: 100%; aspect-ratio: 1; max-width: 380px; z-index: 1;
}

.bonus-modal.enhanced .bonus-wheel-img {
    position: absolute;
    left: 7.85%;
    top: 7.85%;
    width: 84.3%;
    height: 84.3%;
    object-fit: contain;
    display: block;

    transition: transform 0.1s linear; pointer-events: none;
}

.bonus-modal.enhanced .bonus-wheel-pointer {
    position: absolute;
    top: 48.95%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 102.6%;
    height: 102.6%;
    z-index: 5;
    pointer-events: none;
}

.bonus-modal.enhanced .bonus-wheel__brand {
    position: absolute;

    top: 49.89%;
    left: 49.79%;
    transform: translate(-50%, -50%);
    width: 19.5%;
    aspect-ratio: 1 / 1;
    z-index: 6;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;

    background: linear-gradient(163deg, #f2f3fa 0%, #e6e8f2 46%, #d1d6e9 100%);

    -webkit-mask: radial-gradient(circle, #000 66%, rgba(0, 0, 0, 0) 100%);
    mask: radial-gradient(circle, #000 66%, rgba(0, 0, 0, 0) 100%);

    box-shadow: none;
}

.bonus-modal.enhanced .bonus-wheel__brand img {
    display: block;

    width: 64%;
    height: auto;
    filter: drop-shadow(0 1px 1px rgba(9, 22, 54, .22));
}

.bonus-modal.enhanced .bonus-spin-btn {
    width: 100%; padding: 16px 0; border: none; border-radius: 40px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
    position: relative; z-index: 1; letter-spacing: 0.3px; overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.bonus-modal.enhanced .bonus-spin-btn::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.bonus-modal.enhanced .bonus-spin-btn:hover::before { left: 100%; }

.bonus-modal.enhanced .bonus-spin-btn:hover {
    transform: translateY(-2px); box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
}

.bonus-modal.enhanced .bonus-spin-btn:active { transform: translateY(0); }

.bonus-modal.enhanced .bonus-spin-btn:disabled {
    background: var(--border-strong); cursor: not-allowed; transform: none; box-shadow: none;
}

.bonus-modal.enhanced .bonus-next-spin {
    margin-top: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);

    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bonus-modal.enhanced .bonus-later-btn {
    background: transparent; border: none; padding: 8px 20px;
    color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s ease; text-decoration: none; font-family: 'Inter', sans-serif;
    align-self: center;
}

.bonus-modal.enhanced .bonus-later-btn:hover { text-decoration: underline; color: var(--accent-hover); }

@keyframes bonusResultIn {
    from { opacity: 0; transform: scale(0.9) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.bonus-modal.enhanced .bonus-wheel-wrapper.spinning {
    filter: drop-shadow(0 8px 32px rgba(37, 99, 235, 0.3));
}

@media (max-width: 850px) {

    .bonus-modal.enhanced .bonus-head {
        padding: 14px 16px;
        gap: 12px;

        border-radius: 24px 24px 0 0;
    }

    .bonus-modal.enhanced .bonus-head__icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .bonus-modal.enhanced .bonus-head__icon svg {
        width: 19px;
        height: 19px;
    }

    .bonus-modal.enhanced .bonus-title {
        font-size: 18px;
    }

    .bonus-modal.enhanced .bonus-desc {
        font-size: 12.5px;
    }

    .bonus-modal.enhanced .bonus-wheel-side {
        padding: 18px 16px;
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
    }

    .bonus-modal.enhanced .bonus-wheel-section,
    .bonus-modal.enhanced .bonus-wheel-wrapper {
        width: min(100%, 42dvh, 300px);
        max-width: min(100%, 42dvh, 300px);
    }

    .bonus-modal.enhanced .bonus-info-side {
        padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
        min-width: 0;
        max-width: 100%;
        gap: 12px;
    }

    .bonus-modal.enhanced .bonus-spins {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
    }

    .bonus-modal.enhanced .bonus-spins__num {
        font-size: 28px;
    }

    .bonus-modal.enhanced .bonus-spin-btn {
        padding: 15px 0;
        font-size: 15px;
    }

    .bonus-modal.enhanced .bonus-goal {
        padding: 10px 12px;
        gap: 10px;
    }

    .bonus-modal.enhanced .bonus-goal__icon {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }
}

@media (max-width: 850px) and (max-height: 520px) and (orientation: landscape) {

    .bonus-modal.enhanced .bonus-content {
        flex-direction: row;
    }

    .bonus-modal.enhanced .bonus-wheel-side {
        border-right: 1px solid var(--border-soft);
        border-bottom: none;
    }

    .bonus-modal.enhanced .bonus-wheel-section,
    .bonus-modal.enhanced .bonus-wheel-wrapper {
        width: min(100%, 68dvh);
        max-width: min(100%, 68dvh);
    }
}

.bonus-modal.enhanced .bonus-win {
    border-radius: 0;
    z-index: 3;

    background: rgba(8, 14, 24, .62);
}

.bonus-modal.enhanced .bonus-win .gx-result__mult {
    font-size: clamp(22px, 4.4vw, 36px);
    line-height: 1.15;

    max-width: 100%;
    white-space: normal;
    letter-spacing: -.5px;
}

.bonus-modal.enhanced .bonus-win .gx-result__note {
    max-width: 100%;
    line-height: 1.35;
}

.bonus-modal.enhanced .bonus-win .gx-result__card {

    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;

    width: min(88%, 300px);
    min-width: 0;
    padding: 18px 22px 20px;

    margin: 0 auto;
    text-align: center;
}

.bonus-modal.enhanced .bonus-win .gx-result__rule { display: none; }

.bonus-modal.enhanced .bonus-win.is-hiding {
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.bonus-modal.enhanced .bonus-win.is-hiding .gx-result__card {
    transform: scale(.96);
    transition: transform .3s ease;
}
