:root {
    --neon-purple: #bc66ff;
    --light-purple: #352659;
    --btn-purple: #6a1b9a;
    --bg-dark: #05060a;
    --energy: #ffeb3b; 
    --coin: #ff9800;   
}

body {
    margin: 0; padding: 0;
    background: var(--bg-dark);
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

.app-container {
    display: flex; flex-direction: column;
    min-height: 100vh; max-width: 480px; margin: 0 auto;
}

/* --- ВЕРХНЯ ПАНЕЛЬ --- */
.top-status-bar {
    padding: 10px 15px;
    background: var(--light-purple);
    border-bottom: 1px solid var(--neon-purple);
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1001;
}

.tg-user { display: flex; align-items: center; gap: 8px; }
.tg-icon-svg { width: 18px; height: 18px; fill: #24A1DE; }

.online-tag {
    font-size: 10px; font-weight: 800; color: #00ffa3;
    display: flex; align-items: center; gap: 4px;
}

/* --- КОМПАКТНІ БАЛАНСИ --- */
.balance-section {
    padding: 10px 15px;
    background: linear-gradient(180deg, var(--light-purple) 0%, var(--bg-dark) 100%);
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

.balance-box {
    background: var(--btn-purple);
    border: 1px solid var(--neon-purple);
    border-radius: 10px; 
    padding: 8px 5px; /* Зменшена висота */
    display: flex; flex-direction: row; /* В рядок для економії місця */
    align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.balance-box svg { width: 16px; height: 16px; }

.balance-info { display: flex; flex-direction: column; }

.balance-label {
    font-size: 8px; font-weight: 800; color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase; line-height: 1;
}

.balance-value {
    font-size: 15px; font-weight: 900; color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

/* Контент */
.content { flex: 1; padding: 10px 15px 140px; }

/* Нижнє меню */
.bottom-nav-grid {
    position: fixed; bottom: 8px; left: 8px; right: 8px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px;
    padding: 8px; background: rgba(20, 20, 35, 0.95);
    border: 1px solid var(--neon-purple); border-radius: 12px;
    backdrop-filter: blur(10px); z-index: 1000;
}

.nav-btn {
    background: var(--btn-purple); border: 1px solid var(--neon-purple);
    border-radius: 6px; display: flex; align-items: center; justify-content: center;
    padding: 8px 2px; gap: 5px; color: #fff; text-decoration: none; outline: none;
}
.nav-btn svg { width: 14px; height: 14px; stroke: #fff; fill: none; stroke-width: 2.5; }
.nav-btn span { font-size: 9px; font-weight: 800; text-transform: uppercase; }
.nav-btn.active { background: var(--neon-purple); border-color: #fff; }

.page { display: none; }
.page.active { display: block; }

#user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tg-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

/* Контейнер списку (mini-list) */
.mini-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Елемент списку */
.mini-list-item {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px 12px; 
    background: rgba(188, 102, 255, 0.03); /* Дуже слабкий фіолетовий фон */
    border: 1px solid rgba(188, 102, 255, 0.15); /* Фіолетова тонка рамка */
    border-radius: 10px;
    margin-bottom: 6px;
    font-size: 0.85em;
    transition: 0.3s ease;
}

/* Ефект при наведенні або для виділення */
.mini-list-item:hover {
    background: rgba(188, 102, 255, 0.07);
    border-color: rgba(188, 102, 255, 0.3);
    transform: translateX(2px);
}

/* Стиль для імені користувача */
.mini-list-user {
    color: #efedff; /* Світло-бузковий текст */
    font-weight: 500;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    max-width: 110px;
}

/* Стиль для суми */
.mini-list-amount {
    display: flex; 
    align-items: center; 
    gap: 6px; 
    flex-shrink: 0;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Специфічні кольори для валют (якщо хочете залишити акценти) */
.mini-list-amount.silver { color: #00ff88; text-shadow: 0 0 10px rgba(0, 255, 136, 0.2); }
.mini-list-amount.gold { color: #ffb703; text-shadow: 0 0 10px rgba(255, 183, 3, 0.2); }

/* Іконка монети */
.mini-list-coin {
    width: 16px; 
    height: 16px;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.3));
}

/* Аватарка користувача у списку */
.list-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(188, 102, 255, 0.1);
    border: 1px solid rgba(188, 102, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: var(--neon-purple);
    flex-shrink: 0;
    text-transform: uppercase;
    box-shadow: 0 0 8px rgba(188, 102, 255, 0.2);
}

/* Оновлений контейнер імені для вирівнювання з аватаркою */
.user-with-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0; /* Важливо для обрізки тексту */
}