/* Steam Welcome Bonus — стиль под шаблон nevercolor (берёт цвета из текущей темы) */
body.swb-modal-open { overflow: hidden; }

.swb-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: inherit;
}
.swb-modal--open { display: flex; animation: swb-fade .2s ease; }

.swb-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
}

.swb-modal__box {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 24px;
    border-radius: 20px;
    background: var(--bloki, #1e1e1e);
    color: var(--glavnyy-tekst, #fff);
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
    animation: swb-pop .25s ease;
}
.swb-modal__box::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 120px;
    border-radius: 20px 20px 0 0;
    background: radial-gradient(80% 100% at 50% 0%, rgba(243, 131, 62, .22), transparent 70%);
    pointer-events: none;
}

.swb-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: var(--cvet-vnutri-bloka, #2a2a2a);
    color: var(--vtorostepennyy-tekst, #aaa);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: .2s;
}
.swb-modal__close:hover { color: var(--glavnyy-tekst, #fff); background: var(--vtorostepennyy-cvet-bloka, #333); }

.swb-modal__title {
    position: relative;
    margin: 0 44px 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 700;
    color: var(--glavnyy-tekst, #fff);
}
.swb-modal__title::before {
    content: "🎁";
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--akcenti, linear-gradient(180deg, #ffc01b 0%, #f3713e 100%));
    font-size: 19px;
}

.swb-modal__text {
    position: relative;
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--vtorostepennyy-tekst, #aaa);
}
.swb-modal__text:empty { display: none; }

.swb-modal__label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--vtorostepennyy-tekst, #aaa);
}

.swb-modal__input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--cvet-vnutri-bloka, #2a2a2a);
    color: var(--glavnyy-tekst, #fff);
    font-size: 15px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}
.swb-modal__input::placeholder { color: var(--vtorostepennyy-tekst, #aaa); opacity: .6; }
.swb-modal__input:focus {
    border-color: var(--orange, #f3833e);
    box-shadow: 0 0 0 3px rgba(243, 131, 62, .18);
}
.swb-modal__input:disabled { opacity: .5; }

.swb-modal__error {
    margin: 10px 0 0;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(239, 68, 68, .12);
    color: #ff6b6b;
    font-size: 13px;
}

.swb-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.swb-modal__btn {
    flex: 1;
    height: 46px;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, filter .2s, opacity .2s;
}
.swb-modal__btn:active { transform: scale(.98); }
.swb-modal__btn--ghost {
    background: var(--cvet-vnutri-bloka, #2a2a2a);
    color: var(--glavnyy-tekst, #fff);
}
.swb-modal__btn--ghost:hover { background: var(--vtorostepennyy-cvet-bloka, #333); }
.swb-modal__btn--primary {
    background: var(--akcenti, linear-gradient(180deg, #ffc01b 0%, #f3713e 100%));
    color: var(--cvet-na-akcente, #fff);
    box-shadow: 0 6px 18px rgba(243, 113, 62, .35);
}
.swb-modal__btn--primary:hover { filter: brightness(1.08); }
.swb-modal__btn:disabled,
.swb-modal__btn--blocked { opacity: .5; cursor: not-allowed; box-shadow: none; }
.swb-modal__btn--loading { position: relative; color: transparent !important; }
.swb-modal__btn--loading::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 18px; height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: swb-spin .7s linear infinite;
}

/* Успех */
.swb-modal__box--success { text-align: center; }
.swb-modal__box--success .swb-modal__title { justify-content: center; margin-right: 0; }
.swb-modal__box--success .swb-modal__title::before { display: none; }
.swb-modal__success-icon {
    width: 64px;
    height: 64px;
    margin: 6px auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--akcenti, linear-gradient(180deg, #ffc01b 0%, #f3713e 100%));
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(243, 113, 62, .4);
}
.swb-modal__success-title { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: var(--glavnyy-tekst, #fff); }
.swb-modal__success-text { margin: 0 0 8px; font-size: 14px; color: var(--glavnyy-tekst, #fff); }
.swb-modal__success-hint { margin: 0; font-size: 12px; color: var(--vtorostepennyy-tekst, #aaa); }

/* Плавающая кнопка-подарок */
.swb-gift {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10040;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 10px 12px;
    border: 0;
    border-radius: 14px;
    background: var(--akcenti, linear-gradient(180deg, #ffc01b 0%, #f3713e 100%));
    color: var(--cvet-na-akcente, #fff);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(243, 113, 62, .45);
    transition: transform .2s, box-shadow .2s;
    animation: swb-gift-bounce 2.2s ease-in-out infinite;
}
.swb-gift--visible,
.swb-gift:not([hidden]) { display: inline-flex; }
.swb-gift[hidden] { display: none !important; }
.swb-gift:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(243, 113, 62, .55); }
.swb-gift__icon { font-size: 22px; line-height: 1; }
.swb-gift__label { white-space: nowrap; }

@media (max-width: 575.98px) {
    .swb-modal__box { padding: 20px; border-radius: 18px; }
    .swb-modal__title { font-size: 17px; }
    .swb-modal__actions { flex-direction: column-reverse; }
    .swb-gift { right: 12px; bottom: 80px; padding: 10px; }
    .swb-gift__label { display: none; }
}

@keyframes swb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes swb-pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes swb-spin { to { transform: rotate(360deg); } }
@keyframes swb-gift-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
