/* css/profile-extended.css */

/* =================================================================== */
/* ===               0. НАСТРОЙКА КОНТЕЙНЕРА (СКРОЛЛ)              === */
/* =================================================================== */

#profile-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    padding-bottom: 80px;
}

#profile-view::-webkit-scrollbar { width: 6px; }
#profile-view::-webkit-scrollbar-track { background: transparent; }
#profile-view::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.1); border-radius: 4px; }
#profile-view::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.3); }


/* =================================================================== */
/* ===                  1. ГЛАВНАЯ КАРТОЧКА ПРОФИЛЯ                === */
/* =================================================================== */

.profile-header-card {
    /* ЗАМЕНА: Матовое стекло на основе переменных темы */
    background: var(--background-secondary); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); /* Для Safari */
    
    border-radius: 24px; /* Чуть мягче углы */
    padding: 24px;
    margin-bottom: 24px;
    
    /* Граница цвета "иней" */
    border: 1px solid var(--border-color);
    
    /* Мягкая тень для отделения от фона */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    position: relative;
    overflow: visible;
}

/* --- ШАПКА ПРОФИЛЯ (Аватар + Инфо) --- */
.profile-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

/* Аватар */
.profile-avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    cursor: pointer;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Используем акцентный цвет темы (ледяной голубой) */
    border: 3px solid var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: filter 0.3s ease, border-color 0.3s ease;
}

.avatar-edit-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
    backdrop-filter: blur(2px); /* Легкий блюр на аватаре при наведении */
}

.profile-avatar-container:hover .avatar-edit-overlay { opacity: 1; }

/* Текстовая информация */
.profile-text-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-username {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.profile-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6); /* Чуть светлее для контраста на темном стекле */
    display: flex;
    gap: 10px;
    align-items: center;
}

.profile-meta span + span::before {
    content: "•";
    margin-right: 10px;
    opacity: 0.5;
}


/* =================================================================== */
/* ===                      2. УРОВЕНЬ И ПРОГРЕСС                  === */
/* =================================================================== */

.level-progress-container {
    /* Более темный слой стекла для вложенных блоков */
    background: var(--background-tertiary);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); /* Вдавленный эффект */
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.level-badge {
    /* Оставляем оранжевым для контраста с синей темой, либо меняем на var(--accent-color) */
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: #fff;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.xp-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
}

.custom-progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.3); /* Темнее трек */
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.custom-progress-fill {
    height: 100%;
    /* Градиент прогресса */
    background: linear-gradient(90deg, var(--accent-color), #60a5fa); 
    border-radius: 10px;
    position: relative;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--accent-glow);
}


/* =================================================================== */
/* ===                     3. СЕТКА ДОСТИЖЕНИЙ                     === */
/* =================================================================== */

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); 
    gap: 8px;
    margin-bottom: 24px;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 4px; 
    
    /* Стекло */
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    
    border-radius: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.achievement-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.achievement-icon { 
    font-size: 1.4rem; 
    margin-bottom: 4px; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.achievement-value { 
    font-weight: 800; 
    color: #fff; 
    font-size: 0.95rem; 
}
.achievement-label { 
    font-size: 0.6rem; 
    color: rgba(255, 255, 255, 0.6); 
    text-transform: uppercase; 
    font-weight: 600; 
}


/* =================================================================== */
/* ===                    4. ЧЕЛЛЕНДЖИ                             === */
/* =================================================================== */

.challenges-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.challenge-card {
    display: flex;
    align-items: center;
    /* Полупрозрачный фон */
    background: rgba(255, 193, 7, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 16px;
    padding: 16px;
    transition: transform 0.2s;
    backdrop-filter: blur(5px);
}
.challenge-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 193, 7, 0.1);
}

.challenge-card.audio-challenge {
    background: rgba(13, 110, 253, 0.05);
    border-color: rgba(13, 110, 253, 0.2);
}
.challenge-card.audio-challenge:hover {
    background: rgba(13, 110, 253, 0.1);
}

.challenge-icon {
    font-size: 1.5rem;
    margin-right: 16px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    flex-shrink: 0; 
}

.challenge-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.challenge-status {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.challenge-status.active {
    background: #198754;
    color: white;
    box-shadow: 0 0 8px rgba(25, 135, 84, 0.4);
}

.reward-pill {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.75rem;
    color: #ffd700;
    font-weight: 600;
}

.audio-challenge .reward-pill { color: #9ec5fe; }

.btn-telegram-join {
    display: inline-flex;
    align-items: center;
    background-color: #229ED9;
    color: white;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(34, 158, 217, 0.3);
}
.btn-telegram-join:hover {
    background-color: #1b7fb0;
    transform: translateY(-2px);
    color: #fff;
}


/* =================================================================== */
/* ===                         5. КНОПКИ                           === */
/* =================================================================== */

.profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.profile-btn {
    height: 48px;
    border-radius: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    width: 100%;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.profile-btn:active { transform: scale(0.96); }

/* Адаптация цветов кнопок под зимнюю тему */

.btn-topup {
    grid-column: 1 / -1;
    /* Используем акцентный цвет темы для главной кнопки */
    background: linear-gradient(135deg, var(--accent-color) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-topup:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-promo {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.btn-promo:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #fff;
    border-color: #fbbf24;
}

.btn-support {
    background: var(--background-tertiary);
    color: #e2e8f0;
    border: 1px solid var(--border-color);
}
.btn-support:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-history {
    grid-column: 1 / -1;
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
    margin-top: 8px;
}
.btn-history:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #fff;
    border-color: #a78bfa;
}

.admin-logout-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-icon-only { width: 48px; flex-shrink: 0; padding: 0; }

.btn-admin {
    background: rgba(249, 115, 22, 0.1);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.3);
}
.btn-admin:hover { background: #f97316; color: white; }

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    flex-grow: 1;
}
.btn-logout:hover { background: #ef4444; color: white; }

.btn-donate {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    border: none;
}
.btn-donate:hover {
    background: linear-gradient(135deg, #f472b6 0%, #e11d48 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.hover-opacity-100:hover { opacity: 1 !important; text-decoration: underline !important; }


/* =================================================================== */
/* ===                  АДАПТИВНОСТЬ (MOBILE)                      === */
/* =================================================================== */

@media (max-width: 576px) {
    .profile-header-card { padding: 20px; border-radius: 20px; }
    .profile-user-info { gap: 16px; }
    .profile-avatar-container { width: 70px; height: 70px; }
    .profile-username { font-size: 1.3rem; }
    .profile-meta { font-size: 0.8rem; flex-direction: column; align-items: flex-start; gap: 2px; }
    .profile-meta span + span::before { content: ""; margin: 0; }
    .achievements-grid { grid-template-columns: 1fr 1fr; }
    .challenge-card { flex-direction: column; align-items: flex-start; }
    .challenge-card .d-flex.align-items-start { width: 100%; }
    .challenge-card .d-flex.justify-content-between { width: 100%; margin-top: 10px; }
    #profile-view { padding-bottom: 120px; }
    
    .next-level-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px;
    }
    .reward-icon-container { display: none; }
    .reward-header { width: 100%; margin-bottom: 8px; }
    .reward-title { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
    .reward-title::before { content: "🎁"; font-size: 1.2rem; }
    .reward-xp-left { margin-left: auto; font-size: 0.75rem; }
    .reward-prizes { width: 100%; gap: 8px; }
    .reward-prize-item, .reward-vip-badge, .reward-feature-badge {
        flex-grow: 1; justify-content: center; padding: 8px 12px; font-size: 0.85rem;
    }
}


/* =================================================================== */
/* ===                  УВЕДОМЛЕНИЯ / РАССЫЛКА                     === */
/* =================================================================== */

.profile-bell-btn {
    position: absolute;
    top: 20px; right: 20px;
    width: 42px; height: 42px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}
.profile-bell-btn:hover { background: rgba(255, 255, 255, 0.15); transform: translateY(-2px); }
.profile-bell-btn:active { transform: scale(0.95); }

.bell-badge {
    position: absolute; top: -2px; right: -2px;
    width: 12px; height: 12px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--background-secondary);
    display: none;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}
.bell-badge.visible { display: block; animation: pulse-red 2s infinite; }

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* VIP Modal Styling - Обновление под зимнюю тему */
.vip-modal-content {
    /* Темный фон с оттенком синевы */
    background: linear-gradient(165deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 2px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.15), inset 0 0 20px rgba(255, 215, 0, 0.05);
    border-radius: 24px;
    backdrop-filter: blur(10px);
}

.vip-modal-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    animation: float 3s ease-in-out infinite;
}

.text-vip { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }

.vip-benefit-item {
    background: var(--background-tertiary);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex; align-items: center; gap: 15px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: transform 0.2s;
}
.vip-benefit-item:hover {
    background: rgba(255, 215, 0, 0.05);
    transform: translateX(5px);
}

.benefit-text strong { color: #fff; font-size: 0.95rem; }
.benefit-text span { color: #cbd5e1; font-size: 0.8rem; }

.btn-vip-action {
    background: linear-gradient(45deg, #ffd700, #f59e0b);
    color: #000; font-weight: 800; border: none;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-vip-action:hover {
    background: linear-gradient(45deg, #ffed4a, #fbbf24);
    color: #000; transform: translateY(-2px);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.vip-status-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-radius: 16px; margin-bottom: 12px; width: 100%;
}

.vip-status-card.inactive {
    background: var(--background-tertiary);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.btn-vip-gold {
    background: linear-gradient(45deg, #FFD700, #FFA500) !important;
    border: none !important; color: #000 !important;
    font-weight: 800; text-transform: uppercase; font-size: 0.75rem;
    padding: 10px 20px; border-radius: 10px;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s; white-space: nowrap; margin-left: 15px;
}
.btn-vip-gold:hover {
    background: linear-gradient(45deg, #ffe033, #ffb733) !important;
    transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255, 215, 0, 0.4);
}
.btn-vip-gold:active { transform: scale(0.95); }


/* =================================================================== */
/* ===                  6. VIP / PRO СТИЛИЗАЦИЯ                    === */
/* =================================================================== */

.profile-avatar-img.vip-glow {
    border-color: #FFD700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: gold-pulse 3s infinite ease-in-out;
}

@keyframes gold-pulse {
    0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); border-color: #FFD700; }
    50% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.8); border-color: #ffed4a; }
    100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); border-color: #FFD700; }
}

.vip-badge {
    display: inline-block;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000; font-size: 0.6em; font-weight: 800;
    padding: 2px 6px; border-radius: 6px; vertical-align: middle;
    margin-left: 8px; transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); text-shadow: none;
}

.vip-status-card.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(255, 215, 0, 0.5);
    box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.05);
    position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}

.vip-status-card.active::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 60%);
    opacity: 0.5; pointer-events: none;
}

.vip-status-card.active .fw-bold { color: #FFD700 !important; text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }

.profile-header-card.is-vip-profile {
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.05);
}

/* --- Награда за уровень --- */
.next-level-card {
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px; padding: 16px; margin-top: 20px;
    display: flex; align-items: center; gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}
.next-level-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.reward-icon-container {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 215, 0, 0.3); flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
}

.reward-icon {
    font-size: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: reward-bounce 3s infinite ease-in-out;
}

@keyframes reward-bounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(5deg); }
}

.reward-info {
    flex-grow: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}

.reward-header {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}

.reward-title { font-size: 0.95rem; font-weight: 700; color: #fff; white-space: nowrap; }

.reward-xp-left {
    font-size: 0.7rem; color: #cbd5e1;
    background: rgba(255,255,255,0.1);
    padding: 3px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap;
}

.reward-prizes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.reward-prize-item {
    font-size: 0.8rem; color: #FFD700; font-weight: 700;
    background: rgba(255, 215, 0, 0.1); padding: 4px 10px;
    border-radius: 8px; border: 1px solid rgba(255, 215, 0, 0.2);
    display: inline-flex; align-items: center; gap: 4px;
}

.reward-vip-badge {
    font-size: 0.8rem; color: #fbbf24; font-weight: 700;
    background: rgba(251, 191, 36, 0.1); padding: 4px 10px;
    border-radius: 8px; border: 1px solid rgba(251, 191, 36, 0.2);
}

.reward-feature-badge {
    font-size: 0.75rem; background: rgba(74, 222, 128, 0.1);
    color: #4ade80; padding: 4px 10px; border-radius: 8px;
    border: 1px solid rgba(74, 222, 128, 0.2); font-weight: 600;
}

/* --- Выбор тарифа VIP --- */
.vip-tariff-selector {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px;
}
.vip-tariff-option { cursor: pointer; position: relative; }
.vip-tariff-option input { position: absolute; opacity: 0; width: 0; height: 0; }

.tariff-card {
    background: var(--background-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px; padding: 15px 5px; text-align: center;
    transition: all 0.2s ease; position: relative; overflow: hidden;
}

.tariff-duration { font-size: 0.9rem; color: #fff; margin-bottom: 5px; }
.tariff-price { font-size: 1.1rem; font-weight: 800; color: #FFD700; }

.tariff-badge {
    position: absolute; top: 0; left: 0; width: 100%; font-size: 0.6rem;
    font-weight: 700; text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1); color: #fff; padding: 2px 0;
    display: none;
}

.vip-tariff-option input:checked + .tariff-card {
    background: rgba(255, 215, 0, 0.15); border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2); transform: translateY(-2px);
}

.vip-tariff-option:nth-child(2) .tariff-badge { display: block; background: #3b82f6; }
.vip-tariff-option:nth-child(3) .tariff-badge { display: block; background: #10b981; }
.vip-tariff-option:nth-child(3) .tariff-badge.best { background: linear-gradient(45deg, #f59e0b, #d97706); }

/* =================================================================== */
/* ===               7. МОДАЛЬНОЕ ОКНО ИСТОРИИ (ТЕМНОЕ)            === */
/* =================================================================== */

/* Фон самого модального окна */
#userActivityModal .modal-content {
    /* Глубокий темный фон с градиентом */
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 100%);
    /* Эффект стекла */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Тонкая рамка "иней" */
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Заголовок модального окна */
#userActivityModal .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

#userActivityModal .modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #f1f5f9;
}

/* Крестик закрытия (делаем белым) */
#userActivityModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}
#userActivityModal .btn-close:hover { opacity: 1; }

/* Тело модального окна */
#userActivityModal .modal-body {
    padding: 20px;
    /* Кастомный скроллбар для списка, если он длинный */
    max-height: 70vh; 
    overflow-y: auto;
}

/* Скроллбар внутри модалки */
#userActivityModal .modal-body::-webkit-scrollbar { width: 4px; }
#userActivityModal .modal-body::-webkit-scrollbar-track { background: transparent; }
#userActivityModal .modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }


/* --- СПИСОК ТРАНЗАКЦИЙ --- */

.transaction-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    /* Темный полупрозрачный фон для каждой плашки */
    background: rgba(15, 23, 42, 0.6); 
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: transform 0.2s, background 0.2s;
}

.transaction-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

/* Иконка операции */
.transaction-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Текстовая часть */
.transaction-details {
    flex-grow: 1;
    overflow: hidden;
}

.transaction-description {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.transaction-meta {
    font-size: 0.75rem;
    color: #94a3b8; /* Серо-голубой текст */
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.transaction-balance-after {
    color: #64748b;
}

/* Сумма операции */
.transaction-amount {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    margin-left: 10px;
}

/* Цвета для сумм */
.transaction-item.positive .transaction-amount {
    color: #4ade80; /* Зеленый */
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.2);
}

.transaction-item.negative .transaction-amount {
    color: #f87171; /* Красный */
}

/* Спец. стиль для PRO транзакций */
.transaction-item.is-pro-transaction {
    border-color: rgba(255, 215, 0, 0.2); /* Золотая рамка */
}

.transaction-item.is-pro-transaction .transaction-icon {
    background: rgba(255, 215, 0, 0.1);
}