/* Steam Welcome Bonus — стиль под шаблон never */

.swb-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.swb-modal--open {
    display: flex;
}

body.swb-modal-open {
    overflow: hidden;
}

.swb-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

.swb-modal__box {
    --swb-bg: #220829;
    --swb-bg-2: #17051f;
    --swb-inner: #2a0b33;
    --swb-border: rgba(236, 41, 223, 0.38);
    --swb-border-strong: rgba(236, 41, 223, 0.72);
    --swb-glow: rgba(236, 41, 223, 0.42);
    --swb-text: #ffffff;
    --swb-muted: #d9b8dc;
    --swb-pink: #ec29df;
    --swb-pink-soft: #ff6fc8;

    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--swb-border-strong);
    background:
        linear-gradient(180deg, rgba(44, 13, 53, 0.96), rgba(23, 5, 31, 0.98)),
        var(--swb-bg);
    color: var(--swb-text);
    box-shadow:
        0 0 22px var(--swb-glow),
        inset 0 0 24px rgba(236, 41, 223, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.45);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    overflow: hidden;
}

.swb-modal__box::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(
        90deg,
        #ff007f,
        #8c5cff,
        #ff00b3,
        #00ff9d,
        #ffd447,
        #ff007f
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    animation: swb-rgb-border 3.5s linear infinite;
}

@keyframes swb-rgb-border {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.swb-modal__banner {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--swb-border);
    background: var(--swb-bg-2);
    line-height: 0;
}

.swb-modal__banner-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
}

.swb-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    width: 35px;
    height: 35px;
    border: 0;
    border-radius: 10px;
    background: rgba(162, 29, 29, 0.35);
    color: #e77070;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.swb-modal__close:hover {
    background: rgba(199, 84, 84, 0.35);
    color: #fff;
}

.swb-modal__title {
    position: relative;
    z-index: 1;
    margin: 0 40px 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--swb-text);
    text-transform: uppercase;
}

.swb-modal__text {
    position: relative;
    z-index: 1;
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(163, 255, 0, 0.18);
    border-top-color: rgba(163, 255, 0, 0.55);
    border-left: 4px solid #a3ff00;
    background: linear-gradient(135deg, rgba(90, 120, 70, 0.55), rgba(55, 78, 48, 0.72));
    box-shadow:
        inset 0 1px 0 rgba(163, 255, 0, 0.22),
        0 0 18px rgba(163, 255, 0, 0.08);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: #ffffff;
}

.swb-modal__fields {
    position: relative;
    z-index: 1;
    margin-bottom: 4px;
}

.swb-modal__tip {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 79, 184, 0.22);
    border-top-color: rgba(255, 79, 184, 0.55);
    border-left: 4px solid #ff4fb8;
    background: linear-gradient(135deg, rgba(102, 40, 83, 0.55), rgba(64, 24, 52, 0.78));
    box-shadow:
        inset 0 1px 0 rgba(255, 79, 184, 0.2),
        0 0 18px rgba(255, 79, 184, 0.08);
    color: #ffe8f8;
    overflow: hidden;
}

.swb-modal__tip-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.swb-modal__tip-summary::-webkit-details-marker {
    display: none;
}

.swb-modal__tip-summary::marker {
    content: "";
}

.swb-modal__tip-summary:hover {
    background: rgba(255, 79, 184, 0.08);
}

.swb-modal__tip-quote {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 79, 184, 0.16);
    color: #ff8fd0;
    font-size: 14px;
    line-height: 1;
}

.swb-modal__tip-title {
    flex: 1 1 auto;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    font-style: italic;
}

.swb-modal__tip-chevron {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid #ff8fd0;
    border-bottom: 2px solid #ff8fd0;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -3px;
}

.swb-modal__tip[open] .swb-modal__tip-chevron {
    transform: rotate(-135deg);
    margin-top: 3px;
}

.swb-modal__tip-body {
    padding: 0 14px 14px;
    border-top: 1px dashed rgba(255, 79, 184, 0.22);
}

.swb-modal__tip-list {
    margin: 12px 0 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    color: #f7d7ed;
}

.swb-modal__tip-list li + li {
    margin-top: 4px;
}

.swb-modal__tip-list strong {
    color: #ffffff;
    font-weight: 700;
}

.swb-modal__code {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 6px;
    border: 1px solid rgba(255, 79, 184, 0.35);
    background: rgba(34, 8, 26, 0.72);
    color: #ff8fd0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    font-weight: 700;
    word-break: break-all;
}

.swb-modal__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--swb-muted);
}

.swb-modal__input {
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--swb-border) !important;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 12px;
    background: var(--swb-inner) !important;
    color: var(--swb-text) !important;
}

.swb-modal__input::placeholder {
    color: rgba(217, 184, 220, 0.65);
}

.swb-modal__input:focus {
    outline: none;
    border-color: var(--swb-pink) !important;
    box-shadow: 0 0 16px rgba(236, 41, 223, 0.42) !important;
}

.swb-modal__input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.swb-modal__error {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 13px;
    color: #ff8a8a;
}

.swb-modal__box--success {
    text-align: center;
}

.swb-modal__success {
    position: relative;
    z-index: 1;
    margin: 8px 0 4px;
    padding: 20px 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 95, 70, 0.28) 100%);
    border: 1px solid rgba(52, 211, 153, 0.45);
}

.swb-modal__success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    line-height: 56px;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.45);
}

.swb-modal__success-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #6ee7b7;
}

.swb-modal__success-text {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.5;
    color: #a7f3d0;
}

.swb-modal__success-hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--swb-muted);
}

.swb-modal__actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.swb-modal__btn {
    flex: 1;
    height: 44px;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.swb-modal__btn--primary {
    background: linear-gradient(135deg, #7b2cff 0%, #ec29df 55%, #ff72a8 100%);
    color: #fff;
    border: 1px solid rgba(236, 41, 223, 0.76);
    box-shadow: 0 0 18px rgba(236, 41, 223, 0.35);
}

.swb-modal__btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #8c5cff 0%, #ff6fc8 55%, #ff8ab8 100%);
    box-shadow: 0 0 22px rgba(236, 41, 223, 0.5);
}

.swb-modal__btn--ghost {
    background: #2a0b33;
    color: #f3f3f3;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.swb-modal__btn--ghost:hover:not(:disabled) {
    background: #ff6fc8;
    border-color: #2a0b33;
    color: #fff;
}

.swb-modal__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.swb-modal__btn--loading:disabled {
    cursor: wait;
}

.swb-modal__btn--blocked:disabled {
    cursor: not-allowed;
}

/* Плавающий подарок внизу справа */
.swb-gift {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10040;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 12px;
    border: 1px solid rgba(236, 41, 223, 0.55);
    border-radius: 999px;
    background: linear-gradient(135deg, #7b2cff 0%, #ec29df 55%, #ff4fb8 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(236, 41, 223, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: swb-gift-bounce 2.2s ease-in-out infinite;
}

.swb-gift--visible,
.swb-gift:not([hidden]) {
    display: inline-flex;
}

.swb-gift:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 24px rgba(236, 41, 223, 0.6), 0 12px 28px rgba(0, 0, 0, 0.4);
}

.swb-gift__icon {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.swb-gift__label {
    white-space: nowrap;
}

@keyframes swb-gift-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .swb-modal__box::after,
    .swb-gift {
        animation: none;
    }
}

@media (max-width: 480px) {
    .swb-gift {
        right: 14px;
        bottom: 14px;
        padding: 12px 14px;
    }

    .swb-gift__label {
        display: none;
    }

    .swb-gift {
        width: 52px;
        height: 52px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .swb-gift__icon {
        font-size: 26px;
    }

    .swb-modal__actions {
        flex-direction: column-reverse;
    }
}
