﻿/* ========================================= */
/* 🔥 ОПТИМИЗИРОВАННЫЙ СТИЛЬ РЕФЕРАЛОВ (БЕЗ ЛАГОВ) 🔥 */
/* ========================================= */

.referral-page {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px 20px 10px !important;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 🔥 ЗАГАДОЧНЫЙ ИЗУМРУДНО-САПФИРОВЫЙ ФОН (ПОД ШАРДЫ) 🔥 */
.ref-dynamic-bg.dynamic-bg {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100dvh;
    z-index: 0;
    /* Глубокий, темный космос с изумрудным отливом */
    background: linear-gradient(135deg, #070f1a 0%, #0d3838 50%, #0a1128 100%) !important;
}

/* Анимация стикеров (Оптимизированная) */
.floating-sticker {
    position: absolute;
    background-image: var(--bg-img);
    background-size: contain; background-repeat: no-repeat; background-position: center;
    background-color: transparent !important;
    opacity: 0.15;
    animation: floatAnimation linear infinite;
    /* Ускоритель для GPU, убирает лаги */
    will-change: transform;
    transform: translateZ(0);
}

.sticker-1 { width: 80px; height: 80px; top: 10%; left: 5%; animation-duration: 35s; }
.sticker-2 { width: 50px; height: 50px; top: 60%; left: 85%; animation-duration: 45s; animation-direction: reverse; }
.sticker-3 { width: 70px; height: 70px; top: 40%; left: 20%; animation-duration: 30s; }
.sticker-4 { width: 120px; height: 120px; top: 85%; left: 10%; animation-duration: 55s; opacity: 0.06; }
.sticker-5 { width: 60px; height: 60px; top: 25%; left: 75%; animation-duration: 38s; animation-direction: reverse; }
.sticker-6 { width: 90px; height: 90px; top: 5%; left: 60%; animation-duration: 42s; opacity: 0.08; }
.sticker-7 { width: 40px; height: 40px; top: 50%; left: 50%; animation-duration: 28s; animation-delay: -5s; }
.sticker-8 { width: 110px; height: 110px; top: 75%; left: 65%; animation-duration: 60s; opacity: 0.05; animation-direction: reverse; }
.sticker-9 { width: 55px; height: 55px; top: 15%; left: 35%; animation-duration: 32s; }

@keyframes floatAnimation {
    0% { transform: translateY(0) rotate(0deg) scale(1) translateZ(0); }
    33% { transform: translateY(-40px) rotate(120deg) scale(1.1) translateZ(0); }
    66% { transform: translateY(20px) rotate(240deg) scale(0.9) translateZ(0); }
    100% { transform: translateY(0) rotate(360deg) scale(1) translateZ(0); }
}

/* ========================================= */
/* 🔥 ТЕМНОЕ СТЕКЛО И НЕОНОВЫЕ АКЦЕНТЫ 🔥 */
/* ========================================= */

.ref-banner-styled, .ref-banner, .ref-info-list, .ref-action-card {
    /* 🔥 МАГИЯ: Убрали backdrop-filter вообще!
       Вместо него используем плотный полупрозрачный градиент */
    background: linear-gradient(145deg, rgba(15, 25, 35, 0.65) 0%, rgba(5, 10, 18, 0.4) 100%) !important;

    border: 1px solid rgba(158, 239, 225, 0.15) !important;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
    margin-bottom: 20px;
    transform: translateZ(0); /* Оставляем аппаратное ускорение */
}

/* Главный Баннер */
.ref-banner-styled { padding: 25px; display: flex; align-items: center; justify-content: space-between; }
.ref-banner-text h1 { font-size: 22px; margin: 0 0 8px 0; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.ref-banner-text p { font-size: 13px; color: rgba(158, 239, 225, 0.8); margin: 0; line-height: 1.4; text-shadow: 0 1px 3px rgba(0,0,0,0.3); } /* Мятный текст */
.ref-banner-visual { font-size: 40px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }

/* Кнопки действий */
.ref-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.ref-action-card { padding: 18px; height: 110px; position: relative; cursor: pointer; transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 20px; }
.ref-action-card:active { transform: scale(0.96); background: rgba(158, 239, 225, 0.1) !important; }
.card-title { font-size: 14px; font-weight: 700; line-height: 1.3; color: #fff; }
.card-icon.bottom-right {
    position: absolute; bottom: 15px; right: 15px;
    background: rgba(158, 239, 225, 0.1); border: 1px solid rgba(158, 239, 225, 0.2);
    width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #9EEFE1; /* Мятная иконка */
}
.card-icon svg { width: 18px; height: 18px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }

/* Инфо-список */
.ref-info-list { padding: 5px 20px; }
.info-item { display: flex; align-items: center; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.info-item:last-child { border-bottom: none; }
.info-icon { width: 40px; height: 40px; background: rgba(158, 239, 225, 0.1); border: 1px solid rgba(158, 239, 225, 0.2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 15px; }
.info-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: #fff; }
.info-desc { font-size: 12px; color: rgba(255, 255, 255, 0.6); }

/* Заголовки секций */
.ref-section-title { font-size: 15px; font-weight: 800; margin-bottom: 12px; margin-top: 25px; color: #9EEFE1; text-shadow: 0 0 15px rgba(158, 239, 225, 0.4); text-transform: uppercase; letter-spacing: 1px; }

/* Плашки со статистикой */
.ref-banner { padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.banner-texts { flex: 1; }
.banner-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: #fff; }
.banner-desc { font-size: 12px; color: rgba(255, 255, 255, 0.6); line-height: 1.4; }

/* Значок счетчика */
.banner-count {
    background: rgba(158, 239, 225, 0.1); border: 1px solid rgba(158, 239, 225, 0.2);
    color: #9EEFE1; padding: 12px 18px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 55px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2); text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.ref-count-value { font-size: 20px; font-weight: 900; }
.banner-count span:last-child, .banner-count svg { margin-top: 4px; opacity: 0.9; width: 16px; height: 16px; }

.my-refs-list { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }