/* ================================================================= */
/* ===        06_REFERRAL.CSS - HUD & WIDGET STYLES              === */
/* ================================================================= */

/* --- 1. ВИДЖЕТ В ПРОФИЛЕ (Мини-версия) --- */
.referral-widget {
    background: linear-gradient(145deg, #151921, #0f1115);
    border: 1px solid rgba(250, 191, 60, 0.15);
    border-radius: 20px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.referral-widget::before {
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(250, 191, 60, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.ref-widget-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}

.ref-widget-title {
    font-size: 0.95rem; font-weight: 800; color: #fff;
    text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 10px;
}

.ref-levels-row {
    display: flex; gap: 8px; margin-bottom: 20px;
}

.ref-level-badge {
    flex: 1; text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px; padding: 10px 5px;
    transition: transform 0.2s;
}
.ref-level-badge:hover { background: rgba(255, 255, 255, 0.06); transform: translateY(-2px); }

.ref-level-percent {
    display: block; font-size: 1.2rem; font-weight: 900; line-height: 1; margin-bottom: 4px;
}
.ref-level-text { font-size: 0.65rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }

/* Цвета уровней */
.lvl-1 .ref-level-percent { color: #fabf3c; text-shadow: 0 0 15px rgba(250, 191, 60, 0.2); }
.lvl-2 .ref-level-percent { color: #38bdf8; }
.lvl-3 .ref-level-percent { color: #a8a29e; }

.ref-link-container {
    display: flex; gap: 10px;
    background: #08080a;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
}

.ref-link-input {
    background: transparent; border: none; color: #aaa;
    padding: 0 12px; font-family: 'Courier New', monospace; font-size: 0.9rem;
    flex-grow: 1; outline: none;
}

.btn-ref-action {
    background: #fabf3c; color: #000; font-weight: 700;
    border: none; border-radius: 10px; padding: 8px 20px;
    cursor: pointer; transition: 0.2s; font-size: 0.85rem;
}
.btn-ref-action:hover { background: #ffcd59; box-shadow: 0 0 15px rgba(250, 191, 60, 0.4); }


/* --- 2. МОДАЛЬНОЕ ОКНО (HUD STYLE) --- */
/* Стили для контента модалки */
.hud-scope .modal-content {
    background-color: #050505;
    background-image: 
        linear-gradient(rgba(20, 20, 20, 0.8), #000),
        url('../img/noise.png'); /* Если есть шум, если нет - просто фон */
    border: 1px solid rgba(250, 191, 60, 0.2);
    box-shadow: 0 0 50px rgba(0,0,0, 0.9);
    border-radius: 20px;
}

.hud-scope .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    padding: 20px 25px;
}

.hud-scope .modal-title {
    font-family: var(--font-family); 
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fabf3c;
    text-shadow: 0 0 10px rgba(250, 191, 60, 0.3);
}

/* Статистика */
.hud-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hud-stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
}

.hud-stat-card.highlight {
    background: rgba(51, 255, 153, 0.05);
    border-color: rgba(51, 255, 153, 0.3);
    box-shadow: inset 0 0 30px rgba(51, 255, 153, 0.05);
}

.hud-stat-val {
    font-size: 2rem; font-weight: 900; color: #fff;
    display: block; margin-bottom: 5px; line-height: 1;
}
.hud-stat-card.highlight .hud-stat-val { color: #33ff99; text-shadow: 0 0 15px rgba(51,255,153,0.4); }

.hud-stat-label {
    font-size: 0.7rem; text-transform: uppercase; color: #666; letter-spacing: 1px; font-weight: 700;
}

/* Действия */
.hud-actions-area {
    padding: 25px;
    background: rgba(0,0,0,0.3);
    display: grid; grid-template-columns: 2fr 1fr; gap: 15px;
    align-items: end;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hud-input-group label {
    display: block; font-size: 0.75rem; color: #888; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}

.hud-input {
    width: 100%;
    background: #0f0f0f; border: 1px solid #333; color: #fabf3c;
    padding: 12px 15px; border-radius: 12px; font-family: monospace; font-size: 1.1rem;
    transition: 0.3s;
}
.hud-input:focus { outline: none; border-color: #fabf3c; box-shadow: 0 0 15px rgba(250, 191, 60, 0.15); }

.btn-hud {
    width: 100%; padding: 13px;
    background: transparent; border: 1px solid #fabf3c; color: #fabf3c;
    text-transform: uppercase; font-weight: 800; font-size: 0.9rem; letter-spacing: 1px;
    border-radius: 12px; cursor: pointer; transition: 0.3s;
}
.btn-hud:hover { background: #fabf3c; color: #000; box-shadow: 0 0 20px rgba(250, 191, 60, 0.5); }

/* Табы */
.hud-tabs {
    display: flex; 
    background: rgba(255,255,255,0.02);
}
.hud-tab {
    flex: 1; padding: 15px; text-align: center;
    background: transparent; border: none; color: #666;
    text-transform: uppercase; font-size: 0.8rem; font-weight: 700;
    cursor: pointer; border-bottom: 2px solid transparent;
    transition: 0.3s;
}
.hud-tab:hover { color: #ddd; background: rgba(255,255,255,0.05); }
.hud-tab.active { color: #fabf3c; border-bottom-color: #fabf3c; background: rgba(250, 191, 60, 0.05); }

/* Таблица */
.hud-table-wrapper {
    max-height: 350px; overflow-y: auto;
}
.hud-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.hud-table th { 
    text-align: left; padding: 15px 25px; color: #666; font-weight: 600; font-size: 0.75rem; text-transform: uppercase;
    position: sticky; top: 0; background: #080808; z-index: 2;
}
.hud-table td { 
    padding: 12px 25px; border-bottom: 1px solid rgba(255,255,255,0.03); color: #ccc; 
}
.hud-table tr:hover td { background: rgba(255,255,255,0.02); }

@media (max-width: 576px) {
    .hud-stats-grid { grid-template-columns: 1fr; gap: 10px; }
    .hud-actions-area { grid-template-columns: 1fr; }
}

/* --- ОБНОВЛЕННАЯ СЕКЦИЯ ДЕЙСТВИЙ (GRID) --- */
.hud-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1fr; /* Лево | Линия | Право */
    gap: 20px;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    align-items: start;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hud-divider-vertical {
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.hud-action-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hud-col-title {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: flex; align-items: center; gap: 8px;
}

/* Кнопка вывода (Отличается цветом) */
.btn-hud-withdraw {
    width: 100%; padding: 11px;
    background: transparent; 
    border: 1px solid #38bdf8; /* Голубой */
    color: #38bdf8;
    text-transform: uppercase; font-weight: 800; font-size: 0.8rem;
    border-radius: 12px; cursor: pointer; transition: 0.3s;
}
.btn-hud-withdraw:hover {
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    color: #fff;
}
.btn-hud-withdraw:disabled {
    border-color: #333; color: #555; cursor: not-allowed; box-shadow: none; background: transparent;
}

/* Блок со ссылкой внутри модалки */
.hud-link-section {
    padding: 15px 20px;
    background: rgba(255,255,255,0.01);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Адаптив для мобильных: одна колонка */
@media (max-width: 768px) {
    .hud-actions-grid {
        grid-template-columns: 1fr; /* Одна колонка */
        gap: 30px;
    }
    .hud-divider-vertical {
        width: 100%; height: 1px; /* Превращаем в горизонтальную линию */
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    }
}

/* Стиль для кнопки-заглушки */
.btn-hud-withdraw.locked {
    border-color: #555;
    color: #777;
    background: transparent;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}
.btn-hud-withdraw.locked:hover {
    background: transparent;
    box-shadow: none;
    transform: none;
    color: #777;
}

/* Описание внутри виджета профиля */
.ref-widget-description {
    font-size: 0.8rem;
    color: #9ca3af; /* Светло-серый, читаемый */
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03); /* Подложка */
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1); /* Пунктирная рамка */
    line-height: 1.4;
}

.ref-widget-description b {
    color: #fff;
    font-weight: 700;
}