/* /var/www/vkpool/frontend/css/referral-gift.css */
/* ============================================================
   ★ REFERRAL GIFT MODAL — КОМПАКТНАЯ ВЕРСИЯ ★
   ============================================================ */

#referral-gift-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 16, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#referral-gift-modal:not(.hidden) {
    opacity: 1;
}

#referral-gift-modal.hidden {
    display: none;
}

.referral-gift-card {
    position: relative;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
        linear-gradient(160deg, #16162a 0%, #12121f 100%);
    border-radius: 20px;
    max-width: 380px;
    width: 100%;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 22px 20px 18px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 60px rgba(99, 102, 241, 0.18),
        0 0 25px rgba(34, 197, 94, 0.06);
    animation: giftAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #fff;
}

@keyframes giftAppear {
    0% { opacity: 0; transform: scale(0.88) translateY(24px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Мягкое свечение */
.referral-gift-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 160px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(18px);
}

/* Кнопка закрытия */
.referral-gift-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 3;
    padding: 0;
    line-height: 1;
    font-family: inherit;
}

.referral-gift-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.35);
    transform: rotate(90deg);
}

/* Иконка */
.referral-gift-icon-big {
    font-size: 44px;
    text-align: center;
    margin-bottom: 4px;
    animation: iconFloat 3.5s ease-in-out infinite;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 6px 22px rgba(99, 102, 241, 0.5));
    line-height: 1;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Заголовок */
.referral-gift-title {
    font-size: 17px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
    color: #fff;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #ffffff 0%, #c7c7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(99, 102, 241, 0.3));
}

/* Подзаголовки */
.referral-gift-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.referral-gift-subtitle-form {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    font-size: 12.5px;
    margin-bottom: 8px;
}

/* Сумма */
.referral-gift-amount {
    font-size: 40px;
    font-weight: 900;
    text-align: center;
    margin: 8px 0;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 24px rgba(34, 197, 94, 0.5));
    line-height: 1;
}

/* Кнопки способа */
.referral-gift-methods {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.referral-gift-method-btn {
    flex: 1;
    padding: 9px 6px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-family: inherit;
}

.referral-gift-method-btn:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.06);
    color: #fff;
}

.referral-gift-method-btn.active {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(99, 102, 241, 0.12));
    color: #fff;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}

.referral-gift-method-btn .method-icon {
    font-size: 16px;
    line-height: 1;
}

.referral-gift-method-btn .method-label {
    font-size: 11px;
    letter-spacing: 0.2px;
}

/* Поле ввода */
.referral-gift-input {
    width: 100%;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 14px;
    margin-bottom: 8px;
    outline: none;
    font-family: inherit;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

.referral-gift-input::placeholder {
    color: rgba(255, 255, 255, 0.32);
    letter-spacing: 0;
    font-size: 12.5px;
}

.referral-gift-input:focus {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

/* Кнопки */
.referral-gift-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: rgba(99, 102, 241, 0.9);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.referral-gift-btn:hover:not(:disabled) {
    transform: translateY(-1.5px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.45);
}

.referral-gift-btn:active:not(:disabled) {
    transform: translateY(0);
}

.referral-gift-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.referral-gift-btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

.referral-gift-btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 26px rgba(34, 197, 94, 0.5);
}

/* Кнопка "Не хочу" */
.referral-gift-btn-cancel {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.35);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
    position: relative;
    z-index: 1;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
}

.referral-gift-btn-cancel:hover {
    color: rgba(239, 68, 68, 0.85);
    text-decoration-color: rgba(239, 68, 68, 0.85);
}

/* Разделитель */
.referral-gift-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.3) 50%, transparent 100%);
    margin: 14px 0;
    position: relative;
    z-index: 1;
}

/* ============================================================
   ★ КОМПАКТНЫЙ ПРОМО-БЛОК ★
   ============================================================ */

.referral-gift-promo-compact {
    text-align: center;
    position: relative;
    z-index: 1;
}

.referral-gift-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    margin-bottom: 10px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.35);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #a5b4fc;
    text-transform: uppercase;
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.15);
}

.referral-gift-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: badgePulse 1.8s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* Формула 👤 → 🤖 → 💰 */
.referral-gift-formula {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    flex-wrap: wrap;
}

.formula-item {
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.formula-arrow {
    font-size: 11px;
    color: #6366f1;
    font-weight: 700;
}

/* Кнопка "Как это работает?" */
.referral-gift-btn-how {
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    border: 1.5px solid rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.06));
    color: #c7c7ff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.referral-gift-btn-how:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(99, 102, 241, 0.12));
    border-color: rgba(99, 102, 241, 0.6);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* ============================================================
   ★ POPUP «КАК ЭТО РАБОТАЕТ?» ★
   ============================================================ */

.referral-gift-how-overlay {
    position: fixed;
    inset: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 16, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.referral-gift-how-overlay.referral-gift-how-visible {
    opacity: 1;
}

.referral-gift-how-card {
    position: relative;
    background: linear-gradient(160deg, #16162a 0%, #12121f 100%);
    border-radius: 20px;
    max-width: 340px;
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    padding: 24px 20px 18px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 60px rgba(99, 102, 241, 0.2);
    color: #fff;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.referral-gift-how-overlay.referral-gift-how-visible .referral-gift-how-card {
    transform: scale(1);
}

.referral-gift-how-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 3;
    padding: 0;
    line-height: 1;
    font-family: inherit;
}

.referral-gift-how-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.35);
    transform: rotate(90deg);
}

.referral-gift-how-icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 6px;
    filter: drop-shadow(0 6px 20px rgba(99, 102, 241, 0.5));
    line-height: 1;
}

.referral-gift-how-title {
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 0.4px;
    background: linear-gradient(135deg, #ffffff 0%, #c7c7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(99, 102, 241, 0.3));
}

.referral-gift-how-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.referral-gift-how-step {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(99, 102, 241, 0.18);
    align-items: flex-start;
}

.how-step-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
}

.how-step-content {
    flex: 1;
    min-width: 0;
}

.how-step-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
    line-height: 1.3;
}

.how-step-desc {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

.how-step-arrow {
    text-align: center;
    color: #6366f1;
    font-size: 14px;
    font-weight: 700;
    margin: -2px 0;
    opacity: 0.7;
}

/* CTA внутри popup */
.referral-gift-btn-cta {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow:
        0 6px 22px rgba(99, 102, 241, 0.4),
        0 0 30px rgba(99, 102, 241, 0.2);
    font-size: 14px;
    padding: 13px;
    margin-bottom: 8px;
}

.referral-gift-btn-cta:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.55), 0 0 40px rgba(99, 102, 241, 0.35);
}

/* Кнопка "Назад" */
.referral-gift-how-back {
    width: 100%;
    padding: 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
}

.referral-gift-how-back:hover {
    color: #a5b4fc;
}

/* Статус (для финального состояния) */
.referral-gift-status-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #22c55e;
    letter-spacing: 0.4px;
    position: relative;
    z-index: 1;
    text-align: center;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

/* Скроллбар */
.referral-gift-card::-webkit-scrollbar,
.referral-gift-how-card::-webkit-scrollbar {
    width: 5px;
}

.referral-gift-card::-webkit-scrollbar-track,
.referral-gift-how-card::-webkit-scrollbar-track {
    background: transparent;
}

.referral-gift-card::-webkit-scrollbar-thumb,
.referral-gift-how-card::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.35);
    border-radius: 3px;
}

/* ============================================================
   ★ РУЛЕТКА ★
   ============================================================ */

.referral-gift-roulette {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 14px 10px;
    margin: 8px 0 4px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 14px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.referral-gift-roulette-value {
    font-size: 52px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #a78bfa 0%, #6366f1 50%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 24px rgba(99, 102, 241, 0.5));
    transition: transform 0.15s ease-out, filter 0.3s ease;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1.5px;
    user-select: none;
}

.referral-gift-roulette-pulse {
    animation: roulettePulse 0.15s ease-out;
}

@keyframes roulettePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 36px rgba(99, 102, 241, 0.9)); }
    100% { transform: scale(1); }
}

.referral-gift-roulette-value.referral-gift-roulette-final {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(34, 197, 94, 0.7));
    animation: finalAmountAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes finalAmountAppear {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.referral-gift-roulette-label {
    margin-top: 8px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    letter-spacing: 0.3px;
    animation: labelPulse 1.5s ease-in-out infinite;
}

@keyframes labelPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.referral-gift-roulette-hide {
    opacity: 0;
    transform: scale(0.9) translateY(-16px);
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.referral-gift-result {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.referral-gift-result.referral-gift-result-appear {
    opacity: 1;
    transform: translateY(0);
}

.referral-gift-result.hidden {
    display: none;
}

/* Конфетти */
.referral-gift-card.referral-gift-confetti::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle, #22c55e 3px, transparent 3px),
        radial-gradient(circle, #6366f1 3px, transparent 3px),
        radial-gradient(circle, #a78bfa 3px, transparent 3px),
        radial-gradient(circle, #f59e0b 3px, transparent 3px),
        radial-gradient(circle, #ef4444 3px, transparent 3px);
    background-size: 50px 50px, 70px 70px, 60px 60px, 80px 80px, 55px 55px;
    background-position: 0 0, 20px 20px, 40px 40px, 10px 30px, 30px 60px;
    border-radius: 20px;
    opacity: 0;
    animation: confettiFall 2s ease-out;
}

@keyframes confettiFall {
    0% { opacity: 0.9; transform: translateY(-30%) scale(0.8); }
    100% { opacity: 0; transform: translateY(110%) scale(1.2); }
}

/* ============================================================
   ★ МОБИЛЬНАЯ АДАПТАЦИЯ ★
   ============================================================ */

/* Узкие экраны: 320×568, 360×640 */
@media (max-width: 400px) {
    #referral-gift-modal {
        padding: 6px;
    }

    .referral-gift-card {
        padding: 18px 16px 14px;
        border-radius: 18px;
        max-height: calc(100vh - 12px);
    }

    .referral-gift-icon-big {
        font-size: 36px;
        margin-bottom: 2px;
    }

    .referral-gift-title {
        font-size: 15px;
        margin-bottom: 2px;
    }

    .referral-gift-subtitle {
        font-size: 11px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .referral-gift-roulette {
        padding: 10px 8px;
        margin: 6px 0 2px;
    }

    .referral-gift-roulette-value {
        font-size: 42px;
    }

    .referral-gift-amount {
        font-size: 34px;
        margin: 6px 0;
    }

    .referral-gift-method-btn {
        padding: 7px 4px;
    }

    .referral-gift-method-btn .method-icon {
        font-size: 14px;
    }

    .referral-gift-method-btn .method-label {
        font-size: 10px;
    }

    .referral-gift-input {
        padding: 9px 11px;
        font-size: 13px;
        margin-bottom: 6px;
    }

    .referral-gift-input::placeholder {
        font-size: 11.5px;
    }

    .referral-gift-btn {
        padding: 10px;
        font-size: 13px;
    }

    .referral-gift-btn-cancel {
        padding: 6px;
        font-size: 10.5px;
    }

    .referral-gift-divider {
        margin: 10px 0;
    }

    .referral-gift-promo-badge {
        font-size: 8.5px;
        padding: 4px 8px;
        margin-bottom: 8px;
        letter-spacing: 0.6px;
    }

    .referral-gift-formula {
        padding: 6px 4px;
        margin-bottom: 8px;
        gap: 4px;
    }

    .formula-item {
        font-size: 10px;
    }

    .formula-arrow {
        font-size: 9px;
    }

    .referral-gift-btn-how {
        padding: 9px;
        font-size: 11.5px;
    }

    /* Popup на мобильном */
    .referral-gift-how-card {
        padding: 20px 16px 14px;
        border-radius: 18px;
    }

    .referral-gift-how-icon {
        font-size: 34px;
        margin-bottom: 4px;
    }

    .referral-gift-how-title {
        font-size: 13.5px;
        margin-bottom: 12px;
    }

    .referral-gift-how-step {
        padding: 8px 10px;
        gap: 8px;
    }

    .how-step-num {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .how-step-title {
        font-size: 12px;
    }

    .how-step-desc {
        font-size: 10.5px;
    }

    .referral-gift-btn-cta {
        padding: 11px;
        font-size: 13px;
    }

    .referral-gift-how-back {
        padding: 6px;
        font-size: 11.5px;
    }
}

/* Очень узкие экраны: 320×568 */
@media (max-width: 340px) {
    .referral-gift-card {
        padding: 16px 14px 12px;
    }

    .referral-gift-icon-big {
        font-size: 32px;
    }

    .referral-gift-title {
        font-size: 14px;
    }

    .referral-gift-subtitle {
        font-size: 10.5px;
    }

    .referral-gift-roulette-value {
        font-size: 38px;
    }

    .referral-gift-amount {
        font-size: 30px;
    }

    .referral-gift-formula {
        gap: 3px;
    }

    .formula-item {
        font-size: 9.5px;
    }

    .referral-gift-how-card {
        padding: 18px 14px 12px;
    }

    .referral-gift-how-step {
        padding: 7px 9px;
    }
}

/* Высота экрана: < 640px — дополнительно сжимаем */
@media (max-height: 640px) {
    .referral-gift-card {
        padding: 18px 18px 14px;
    }

    .referral-gift-icon-big {
        font-size: 38px;
    }

    .referral-gift-roulette {
        padding: 10px 8px;
        margin: 6px 0 2px;
    }

    .referral-gift-roulette-value {
        font-size: 44px;
    }

    .referral-gift-amount {
        font-size: 34px;
    }

    .referral-gift-divider {
        margin: 10px 0;
    }
}

/* Очень низкие экраны */
@media (max-height: 580px) {
    .referral-gift-card {
        padding: 14px 16px 10px;
    }

    .referral-gift-icon-big {
        font-size: 32px;
        margin-bottom: 0;
    }

    .referral-gift-title {
        font-size: 14px;
    }

    .referral-gift-subtitle {
        font-size: 10.5px;
        margin-bottom: 6px;
    }

    .referral-gift-roulette-value {
        font-size: 38px;
    }

    .referral-gift-amount {
        font-size: 30px;
        margin: 4px 0;
    }

    .referral-gift-roulette-label {
        font-size: 10.5px;
        margin-top: 5px;
    }
}