/* ==========================================================
   bonus_widget.css — виджет бонусов за регистрацию
   ========================================================== */

/* ---------- Базовые переменные ---------- */
:root {
    --bw-bg:          linear-gradient(145deg, rgba(44, 30, 21, 0.96), rgba(26, 17, 12, 0.98));
    --bw-border:      #b8860b;
    --bw-border-soft: #8b5a2b;
    --bw-gold:        #ffd966;
    --bw-gold-bright: #ffd700;
    --bw-text:        #f0e6d2;
    --bw-text-dim:    #b8a58e;
    --bw-shadow:      0 10px 30px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,175,55,0.2) inset;
    --bw-radius:      22px;
    --bw-transition:  all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Общий контейнер ---------- */
.bonus-widget {
    position: relative;
    background: var(--bw-bg);
    border: 2px solid var(--bw-border);
    border-radius: var(--bw-radius);
    box-shadow: var(--bw-shadow);
    color: var(--bw-text);
    font-family: 'Philosopher', 'Palatino Linotype', Georgia, serif;
    overflow: hidden;
    box-sizing: border-box;
}

/* Декоративная верхняя полоса (как у dashboard-card) */
.bonus-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    opacity: 0.55;
    pointer-events: none;
}

/* Мягкое свечение по контуру */
.bonus-widget::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px dashed rgba(212, 175, 55, 0.22);
    border-radius: calc(var(--bw-radius) - 8px);
    pointer-events: none;
}

/* ---------- Кнопка закрытия ---------- */
.bw-dismiss {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--bw-border-soft);
    color: var(--bw-gold);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: var(--bw-transition);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bw-dismiss:hover {
    background: var(--bw-border);
    color: #1f140c;
    transform: rotate(90deg);
    border-color: var(--bw-gold-bright);
    box-shadow: 0 0 12px rgba(255,215,0,0.5);
}

/* ---------- Шапка ---------- */
.bw-header {
    position: relative;
    z-index: 1;
    padding: 18px 22px 12px;
    border-bottom: 1px solid rgba(212,175,55,0.18);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bw-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.6));
    animation: bwIconPulse 2.5s ease-in-out infinite;
}

@keyframes bwIconPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1) rotate(-5deg); }
}

.bw-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--bw-gold);
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    letter-spacing: 0.5px;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.bw-subtitle {
    margin: 0;
    flex-basis: 100%;
    font-size: 13px;
    color: var(--bw-text-dim);
    font-style: italic;
    padding-left: 40px; /* под иконку */
    line-height: 1.4;
}

/* ---------- Список бонусов ---------- */
.bw-items {
    list-style: none;
    margin: 0;
    padding: 10px 18px;
    position: relative;
    z-index: 1;
}

.bw-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 8px;
    border-bottom: 1px dashed rgba(139, 90, 43, 0.25);
    transition: background 0.2s;
}

.bw-item:last-child {
    border-bottom: none;
}

.bw-item:hover {
    background: rgba(184, 134, 11, 0.08);
    border-radius: 10px;
}

.bw-item img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(0,0,0,0.4);
    padding: 3px;
    box-shadow: 0 0 8px rgba(255,215,0,0.15);
    transition: var(--bw-transition);
}

.bw-item:hover img {
    border-color: var(--bw-gold-bright);
    box-shadow: 0 0 12px rgba(255,215,0,0.4);
    transform: scale(1.05);
}

.bw-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bw-item-body strong {
    color: var(--bw-gold);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.bw-item-body small {
    color: var(--bw-text-dim);
    font-size: 12px;
    line-height: 1.35;
}

.bw-qty {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    color: #1f140c;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--bw-gold-bright);
    box-shadow: 0 2px 6px rgba(0,0,0,0.5), 0 0 10px rgba(255,215,0,0.25);
    white-space: nowrap;
}

/* ---------- CTA-кнопка ---------- */
.bw-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 18px 18px;
    padding: 14px 22px;
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    border: 2px solid var(--bw-gold-bright);
    border-radius: 40px;
    color: #1f140c;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 5px 0 #5a3e2b, 0 8px 20px rgba(0,0,0,0.5);
    transition: var(--bw-transition);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.bw-cta::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: left 0.5s;
}

.bw-cta:hover {
    background: linear-gradient(145deg, #d4a017, #a0662d);
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #5a3e2b, 0 12px 25px rgba(0,0,0,0.6), 0 0 25px rgba(255,215,0,0.4);
    color: #1f140c;
}

.bw-cta:hover::before {
    left: 100%;
}

.bw-cta:active {
    transform: translateY(1px);
    box-shadow: 0 3px 0 #5a3e2b, 0 6px 15px rgba(0,0,0,0.5);
}

/* ==========================================================
   ВАРИАНТ: BIG — большой блок в потоке
   ========================================================== */
.bonus-widget--big {
    max-width: 720px;
    margin: 25px auto;
}

/* ==========================================================
   ВАРИАНТ: COMPACT — компактный, можно вставить в сайдбар
   ========================================================== */
.bonus-widget--compact {
    max-width: 360px;
    padding: 0;
}

.bonus-widget--compact .bw-header {
    padding: 12px 16px 8px;
}

.bonus-widget--compact .bw-icon {
    font-size: 22px;
}

.bonus-widget--compact .bw-header h3 {
    font-size: 16px;
}

.bonus-widget--compact .bw-subtitle {
    font-size: 11px;
    padding-left: 34px;
}

.bonus-widget--compact .bw-items {
    padding: 6px 12px;
}

.bonus-widget--compact .bw-item {
    padding: 6px 6px;
    gap: 10px;
}

.bonus-widget--compact .bw-item img {
    width: 34px;
    height: 34px;
}

.bonus-widget--compact .bw-item-body strong {
    font-size: 13px;
}

.bonus-widget--compact .bw-item-body small {
    font-size: 11px;
}

.bonus-widget--compact .bw-qty {
    min-width: 30px;
    height: 22px;
    font-size: 11px;
    padding: 0 7px;
}

.bonus-widget--compact .bw-cta {
    margin: 6px 12px 12px;
    padding: 10px 16px;
    font-size: 13px;
}

/* ==========================================================
   ВАРИАНТ: STICKY — плавающий в правом нижнем углу
   Показывается на index.php / news.php / lib.php / top.php
   ========================================================== */
.bonus-widget--sticky {
    position: fixed;
    bottom: 100px;   /* над hor-menu */
    right: 20px;
    width: 300px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 950;    /* ниже hor-menu (1000) и меню (10000), выше основного контента */
    animation: bwSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: #8b5a2b #2b1e0e;
}

.bonus-widget--sticky::-webkit-scrollbar { width: 6px; }
.bonus-widget--sticky::-webkit-scrollbar-track { background: #2b1e0e; border-radius: 3px; }
.bonus-widget--sticky::-webkit-scrollbar-thumb { background: #8b5a2b; border-radius: 3px; }

@keyframes bwSlideIn {
    from { transform: translateX(calc(100% + 40px)); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.bonus-widget--sticky.bw-hide {
    animation: bwSlideOut 0.35s ease forwards;
}

@keyframes bwSlideOut {
    to { transform: translateX(calc(100% + 40px)); opacity: 0; }
}

/* Компактный вид в sticky-режиме */
.bonus-widget--sticky .bw-header {
    padding: 14px 18px 10px;
}

.bonus-widget--sticky .bw-icon {
    font-size: 22px;
}

.bonus-widget--sticky .bw-header h3 {
    font-size: 17px;
}

.bonus-widget--sticky .bw-subtitle {
    font-size: 12px;
    padding-left: 34px;
}

.bonus-widget--sticky .bw-items {
    padding: 8px 14px;
}

.bonus-widget--sticky .bw-item {
    padding: 8px 4px;
    gap: 10px;
}

.bonus-widget--sticky .bw-item img {
    width: 38px;
    height: 38px;
}

.bonus-widget--sticky .bw-item-body strong {
    font-size: 13px;
}

.bonus-widget--sticky .bw-item-body small {
    font-size: 11px;
}

.bonus-widget--sticky .bw-qty {
    min-width: 32px;
    height: 24px;
    font-size: 11px;
    padding: 0 8px;
}

.bonus-widget--sticky .bw-cta {
    margin: 6px 14px 14px;
    padding: 11px 16px;
    font-size: 13px;
}

/* На всякий случай — не перекрываем sticky-виджетом hor-menu tab */
@media (max-width: 1200px) {
    .bonus-widget--sticky {
        bottom: 30px;
        right: 12px;
        width: 280px;
        max-height: 55vh;
    }
}

@media (max-width: 768px) {
    .bonus-widget--sticky {
        bottom: 0px;
        right: 8px;
        left: 8px;
        width: auto;
        max-height: 35vh;
    }
}

/* ==========================================================
   ВАРИАНТ: MODAL — всплывает с оверлеем (для exit-intent)
   ========================================================== */
.bonus-widget--modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    animation: none;
}

.bonus-widget--modal.bw-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.bonus-widget--modal + .bw-overlay,
.bonus-widget--modal.bw-show ~ .bw-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.bonus-widget--modal.bw-show ~ .bw-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================
   АДАПТИВ
   ========================================================== */
@media (max-width: 768px) {
    .bonus-widget--big {
        margin: 15px 10px;
        border-radius: 18px;
    }

    .bw-header {
        padding: 14px 16px 10px;
    }

    .bw-icon {
        font-size: 24px;
    }

    .bw-header h3 {
        font-size: 17px;
    }

    .bw-subtitle {
        padding-left: 0;
        font-size: 12px;
    }

    .bw-items {
        padding: 8px 12px;
    }

    .bw-item {
        padding: 8px 4px;
        gap: 10px;
    }

    .bw-item img {
        width: 40px;
        height: 40px;
    }

    .bw-item-body strong {
        font-size: 14px;
    }

    .bw-item-body small {
        font-size: 11px;
    }

    .bw-qty {
        min-width: 32px;
        height: 24px;
        font-size: 12px;
    }

    .bw-cta {
        margin: 6px 14px 14px;
        padding: 12px 18px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .bonus-widget--big {
        margin: 12px 8px;
        border-radius: 16px;
    }

    .bw-header h3 {
        font-size: 15px;
    }

    .bw-item img {
        width: 36px;
        height: 36px;
    }

    .bw-item-body strong {
        font-size: 13px;
    }

    .bw-cta {
        font-size: 13px;
        padding: 11px 14px;
    }
}

/* ==========================================================
   Печать (не мешать)
   ========================================================== */
@media print {
    .bonus-widget,
    .bonus-widget--sticky,
    .bonus-widget--modal,
    .bw-overlay {
        display: none !important;
    }
}

/* ==========================================================
   Уважаем "reduce motion"
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    .bonus-widget,
    .bonus-widget *,
    .bonus-widget::before,
    .bonus-widget::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Внутри reg-page (лендинг) — не сужаем искусственно */
.reg-page .bonus-widget--big {
    max-width: 100%;
    margin: 20px 0;
}

/* ==========================================================
   БЛОК КОДА ПРОМОАКЦИИ — две строки:
   1) label + value
   2) кнопка "Скопировать" во всю ширину
   ========================================================== */
.bw-code-block {
    display: flex;
    flex-direction: column;      /* ⬅ key: вертикальный стек */
    gap: 8px;
    margin: 4px 18px 12px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(212, 175, 55, 0.45);
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

/* --- Строка 1: label + value --- */
.bw-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;                /* для корректного flex-shrink у value */
}

.bw-code-label {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bw-text-dim);
    white-space: nowrap;
}

.bw-code-value {
    flex: 1;
    min-width: 0;
    padding: 5px 12px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--bw-gold);
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 6px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
    word-break: break-all;       /* длинный код не «выпирает» */
    user-select: all;
}

/* --- Строка 2: кнопка "Скопировать" --- */
.bw-code-copy {
    width: 100%;                 /* ⬅ на всю ширину блока */
    padding: 9px 14px;
    background: linear-gradient(145deg, #b8860b, #8b5a2b);
    border: 1px solid var(--bw-gold-bright);
    border-radius: 8px;
    color: #1f140c;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    transition: var(--bw-transition);
}

.bw-code-copy:hover {
    background: linear-gradient(145deg, #d4a017, #a0662d);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.5);
    transform: translateY(-1px);
}

.bw-code-copy:active {
    transform: translateY(0);
}

.bw-code-copy.bw-code-copied {
    background: linear-gradient(145deg, #27ae60, #1e8449);
    border-color: #2ecc71;
    color: #fff;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.55);
}

.bw-code-copy.bw-code-error {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    border-color: #ff6b6b;
    color: #fff;
}

/* ==========================================================
   ITEM-АРТЕФАКТ (с alt-тултипом)
   ========================================================== */
.bw-item.bw-item-artifact {
    padding: 0;
    border-bottom: 1px dashed rgba(139, 90, 43, 0.25);
}

.bw-item.bw-item-artifact:last-child {
    border-bottom: none;
}

.bw-item-artifact__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 10px 8px;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s;
}

.bw-item-artifact:hover .bw-item-artifact__inner {
    background: rgba(184, 134, 11, 0.08);
}

.bw-item-artifact__img-wrap {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 2px solid var(--bw-border-soft);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.15);
    cursor: help;                       /* ⭐ было pointer */
    transition: var(--bw-transition);
}

.bw-item-artifact__img-wrap:hover {
    border-color: var(--bw-gold-bright);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
    transform: scale(1.05);
}

.bw-item-artifact__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bw-item-artifact__title {
    cursor: pointer;
    transition: color 0.2s;
}

.bw-item-artifact__title:hover {
    text-decoration: underline;
}

/* ==========================================================
   ITEM-ССЫЛКА
   ========================================================== */
.bw-item.bw-item-link {
    padding: 0;
}

.bw-item-link__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 10px 8px;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s;
}

.bw-item-link:hover .bw-item-link__inner {
    background: rgba(184, 134, 11, 0.08);
}

/* ==========================================================
   Стили качеств (если на лендинге не подхвачены из portal.css)
   ========================================================== */
.macros_artifact_quality0 { color: #a5a5a5 !important; }
.macros_artifact_quality1 { color: #5cff69 !important; }
.macros_artifact_quality2 { color: #23b2e9 !important; }
.macros_artifact_quality3 { color: #f11dff !important; }
.macros_artifact_quality4 { color: #ff2e2e !important; }
.macros_artifact_quality5 { color: #2effe2 !important; }
.macros_artifact_quality6 { color: #e09100 !important; }

/* ==========================================================
   Адаптив
   ========================================================== */
@media (max-width: 768px) {
    .bw-code-block { margin: 4px 14px 10px; padding: 8px 10px; gap: 6px; }
    .bw-code-value { font-size: 12px; padding: 4px 8px; letter-spacing: 1px; }
    .bw-code-copy  { font-size: 10px; padding: 6px 10px; }

    .bw-item-artifact__img-wrap { width: 40px; height: 40px; }
    .bw-item-artifact__inner,
    .bw-item-link__inner        { gap: 10px; padding: 8px 4px; }
}

/* ==========================================================
   GAME-ВИДЖЕТ — базовые стили
   Показывается авторизованным в игре (portal / battle / etc.)
   Через класс .bw-pos-* задаётся позиция, через .bw-game-theme-*
   — цветовая схема ('new' = портал, 'old' = классический Dwar).
   ========================================================== */

.bonus-widget--game {
    position: fixed;
    z-index: 1001;              /* выше hor-menu (1000), ниже модалок */
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    animation: bwGameSlideIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: #8b5a2b #2b1e0e;
}

.bonus-widget--game::-webkit-scrollbar { width: 6px; }
.bonus-widget--game::-webkit-scrollbar-track { background: #2b1e0e; border-radius: 3px; }
.bonus-widget--game::-webkit-scrollbar-thumb { background: #8b5a2b; border-radius: 3px; }

/* ---------- Позиции ---------- */
.bonus-widget--game.bw-pos-tr { top: 90px;  right: 20px; }
.bonus-widget--game.bw-pos-tl { top: 90px;  left: 20px; }
.bonus-widget--game.bw-pos-br { bottom: 100px; right: 20px; }
.bonus-widget--game.bw-pos-bl { bottom: 100px; left: 20px; }

.bonus-widget--game.bw-pos-top {
    top: 12px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    max-width: 720px;
}

.bonus-widget--game.bw-pos-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    max-width: calc(100vw - 32px);
}

@keyframes bwGameSlideIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.bonus-widget--game.bw-pos-top.bw-hide,
.bonus-widget--game.bw-pos-center.bw-hide {
    animation: bwGameFadeOut 0.3s ease forwards;
}
@keyframes bwGameFadeOut {
    to { opacity: 0; transform: translateY(-20px) scale(0.94); }
}

/* ---------- Общие внутренние элементы ---------- */
.bonus-widget--game .bw-header { padding: 14px 18px 10px; }
.bonus-widget--game .bw-icon { font-size: 24px; }
.bonus-widget--game .bw-header h3 { font-size: 17px; }
.bonus-widget--game .bw-subtitle { font-size: 12px; padding-left: 36px; }
.bonus-widget--game .bw-items { padding: 8px 14px; }
.bonus-widget--game .bw-item { padding: 8px 4px; gap: 10px; }
.bonus-widget--game .bw-item img { width: 40px; height: 40px; }
.bonus-widget--game .bw-item-body strong { font-size: 13px; }
.bonus-widget--game .bw-item-body small { font-size: 11px; }
.bonus-widget--game .bw-qty { min-width: 32px; height: 24px; font-size: 11px; padding: 0 8px; }
.bonus-widget--game .bw-cta { margin: 6px 14px 14px; padding: 11px 16px; font-size: 13px; }
.bonus-widget--game .bw-code-block { margin: 4px 14px 10px; padding: 8px 12px; gap: 6px; }
.bonus-widget--game .bw-code-value { font-size: 13px; }
.bonus-widget--game .bw-code-copy { font-size: 11px; padding: 8px 12px; }

/* ==========================================================
   ТЕМА 'new' — тёмное фэнтези портала (по умолчанию)
   ========================================================== */
.bonus-widget--game.bw-game-theme-new {
    background: linear-gradient(145deg, rgba(44, 30, 21, 0.98), rgba(26, 17, 12, 0.99));
    border: 2px solid #b8860b;
    color: #f0e6d2;
    border-radius: 18px;
    box-shadow:
            0 15px 40px rgba(0, 0, 0, 0.85),
            inset 0 0 30px rgba(212, 175, 55, 0.08),
            0 0 25px rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(6px);
}

.bonus-widget--game.bw-game-theme-new .bw-header h3 {
    color: #ffd966;
    text-shadow: 0 2px 0 #3f2e22, 0 0 15px rgba(255, 215, 0, 0.35);
}

.bonus-widget--game.bw-game-theme-new .bw-subtitle { color: #b8a58e; }
.bonus-widget--game.bw-game-theme-new .bw-item { border-bottom-color: rgba(139, 90, 43, 0.3); }
.bonus-widget--game.bw-game-theme-new .bw-item:hover { background: rgba(184, 134, 11, 0.12); }
.bonus-widget--game.bw-game-theme-new .bw-item-body strong { color: #ffd966; }
.bonus-widget--game.bw-game-theme-new .bw-item-body small { color: #b8a58e; }

/* ==========================================================
   ТЕМА 'old' — классический Dwar (светлый пергамент)
   ========================================================== */
.bonus-widget--game.bw-game-theme-old {
    background: linear-gradient(180deg, #FFE7C5 0%, #F3D8B2 100%);
    border: 2px solid #C49485;
    color: #49382D;
    border-radius: 6px;
    box-shadow:
            0 8px 20px rgba(73, 56, 45, 0.35),
            inset 0 0 0 1px #FFFBD6;
    font-family: Tahoma, Geneva, Verdana, sans-serif;
}

.bonus-widget--game.bw-game-theme-old::before {
    background: linear-gradient(90deg, transparent, #BB883B, transparent);
    opacity: 0.8;
}

.bonus-widget--game.bw-game-theme-old::after {
    border: 1px dashed rgba(196, 148, 133, 0.5);
    border-radius: 4px;
}

.bonus-widget--game.bw-game-theme-old .bw-header {
    border-bottom-color: #DB9F73;
    background: linear-gradient(180deg, #be4949 0%, #893434 100%);
    border-radius: 4px 4px 0 0;
}

.bonus-widget--game.bw-game-theme-old .bw-icon {
    filter: drop-shadow(0 0 4px rgba(248, 222, 164, 0.6));
}

.bonus-widget--game.bw-game-theme-old .bw-header h3 {
    color: #FFE9BA;
    text-shadow: 1px 1px 2px #3a1010;
    font-family: 'Times New Roman', serif;
    letter-spacing: 0.5px;
}

.bonus-widget--game.bw-game-theme-old .bw-subtitle {
    color: #F8DEA4;
    font-style: italic;
}

.bonus-widget--game.bw-game-theme-old .bw-dismiss {
    background: rgba(255, 251, 214, 0.9);
    border-color: #C49485;
    color: #8D2616;
}

.bonus-widget--game.bw-game-theme-old .bw-dismiss:hover {
    background: #BA0000;
    color: #fff;
    border-color: #8D2616;
}

.bonus-widget--game.bw-game-theme-old .bw-item {
    border-bottom-color: rgba(219, 159, 115, 0.6);
}

.bonus-widget--game.bw-game-theme-old .bw-item:hover {
    background: rgba(255, 251, 214, 0.75);
    border-radius: 4px;
}

.bonus-widget--game.bw-game-theme-old .bw-item img {
    background: #FFFBD6;
    border: 1px solid #DB9F73;
    box-shadow: 0 1px 3px rgba(73, 56, 45, 0.2);
}

.bonus-widget--game.bw-game-theme-old .bw-item-body strong {
    color: #8D2616;
    font-weight: 700;
    font-family: 'Times New Roman', serif;
}

.bonus-widget--game.bw-game-theme-old .bw-item-body small {
    color: #955C4A;
}

.bonus-widget--game.bw-game-theme-old .bw-qty {
    background: linear-gradient(180deg, #D4A548 0%, #6F4A24 100%);
    color: #FFF9E0;
    border-color: #F8DEA4;
    box-shadow: 0 1px 3px rgba(73, 56, 45, 0.3);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.35);
}

.bonus-widget--game.bw-game-theme-old .bw-cta {
    background: linear-gradient(180deg, #be4949 0%, #893434 100%);
    border: 2px solid #F8DEA4;
    color: #FFE9BA;
    border-radius: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.55);
    box-shadow:
            0 3px 0 #3a1e10,
            0 6px 15px rgba(0, 0, 0, 0.4);
}

.bonus-widget--game.bw-game-theme-old .bw-cta:hover {
    background: linear-gradient(180deg, #d95858 0%, #a84444 100%);
    border-color: #FFF3B0;
    color: #FFF3B0;
    box-shadow:
            0 5px 0 #3a1e10,
            0 10px 22px rgba(0, 0, 0, 0.55);
}

.bonus-widget--game.bw-game-theme-old .bw-code-block {
    background: #FFFBD6;
    border-color: #C49485;
}

.bonus-widget--game.bw-game-theme-old .bw-code-label {
    color: #955C4A;
}

.bonus-widget--game.bw-game-theme-old .bw-code-value {
    color: #BA0000;
    background: #FFE7C5;
    border-color: #DB9F73;
    text-shadow: none;
    font-family: 'Courier New', monospace;
}

.bonus-widget--game.bw-game-theme-old .bw-code-copy {
    background: linear-gradient(180deg, #D4A548 0%, #6F4A24 100%);
    border-color: #BB883B;
    color: #FFF9E0;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.35);
}

.bonus-widget--game.bw-game-theme-old .bw-code-copy:hover {
    background: linear-gradient(180deg, #e8b858 0%, #a07a28 100%);
    border-color: #F8DEA4;
}

/* ==========================================================
   АДАПТИВ
   ========================================================== */
@media (max-width: 768px) {
    .bonus-widget--game.bw-pos-tr,
    .bonus-widget--game.bw-pos-tl { top: 70px; }
    .bonus-widget--game.bw-pos-br,
    .bonus-widget--game.bw-pos-bl { bottom: 80px; }
    .bonus-widget--game { width: calc(100vw - 24px); max-width: 340px; }
    .bonus-widget--game.bw-pos-top { width: calc(100vw - 24px); }
}

@media (prefers-reduced-motion: reduce) {
    .bonus-widget--game { animation: none !important; }
}

/* ==========================================================
   MOBILE MODE: sticky guest-виджет
   На мобильных вместо углового блока — плавающая иконка 🎁,
   по клику открывается полноэкранный оверлей с акцией.
   Не влияет на game-виджеты (data-game="1" / style_variant=game).
   ========================================================== */

/* Базовая: скрыт везде, кроме мобильных */
.bw-mobile-trigger {
    display: none;
}

@media (max-width: 768px) {

    /* ---- Триггер-иконка 🎁 ---- */
    .bw-mobile-trigger {
        display: flex;
        position: fixed;
        right: 16px;
        bottom: 80px;                    /* над hor-menu */
        width: 60px;
        height: 60px;
        padding: 0;
        border-radius: 50%;
        background: linear-gradient(145deg, #b8860b, #8b5a2b);
        border: 2px solid #ffd700;
        color: #fff;
        font-size: 28px;
        line-height: 1;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 998;                    /* ниже hor-menu (1000) */
        box-shadow:
                0 6px 20px rgba(0, 0, 0, 0.55),
                0 0 20px rgba(255, 215, 0, 0.5);
        animation: bwGiftPulse 2s ease-in-out infinite;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
    }

    .bw-mobile-trigger::before {
        content: '';
        position: absolute;
        inset: -4px;
        border-radius: 50%;
        border: 2px solid rgba(255, 215, 0, 0.5);
        animation: bwGiftRing 2s ease-out infinite;
        pointer-events: none;
    }

    /* Скрываем триггер, пока открыт оверлей */
    body.bw-mobile-overlay-open .bw-mobile-trigger {
        display: none !important;
    }

    /* ---- Сам sticky-виджет: fullscreen-оверлей ---- */
    .bonus-widget--sticky[data-auth-scope="guest"] {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;      /* iOS safe-area */
        max-width: 100vw !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-width: 0 !important;
        z-index: 10001 !important;
        overflow-y: auto;
        padding-bottom: 24px;
        animation: none !important;
        display: none;
    }

    /* Убираем декоративные полосы в fullscreen-режиме */
    .bonus-widget--sticky[data-auth-scope="guest"]::before,
    .bonus-widget--sticky[data-auth-scope="guest"]::after {
        display: none;
    }

    .bonus-widget--sticky[data-auth-scope="guest"].bw-mobile-open {
        display: block;
        background: linear-gradient(145deg, #2c1e15, #1a110c);
    }

    /* Кнопка закрытия в fullscreen — фиксирована сверху-справа */
    .bonus-widget--sticky[data-auth-scope="guest"].bw-mobile-open .bw-dismiss {
        position: fixed;
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 24px;
        z-index: 10002;
        background: rgba(0, 0, 0, 0.75);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
    }

    /* body: блокируем скролл, пока открыт оверлей */
    body.bw-mobile-overlay-open {
        overflow: hidden !important;
    }
}

@keyframes bwGiftPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
                0 6px 20px rgba(0, 0, 0, 0.55),
                0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.06);
        box-shadow:
                0 8px 25px rgba(0, 0, 0, 0.65),
                0 0 35px rgba(255, 215, 0, 0.9);
    }
}

@keyframes bwGiftRing {
    0%   { transform: scale(1);   opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0;   }
}

@media (prefers-reduced-motion: reduce) {
    .bw-mobile-trigger,
    .bw-mobile-trigger::before {
        animation: none !important;
    }
}