:root {
    /* Палитра Quake Live + Casino */
    --bg-deep: #030303;
    --bg-panel: rgba(10, 10, 12, 0.85);

    /* Неоновые цвета Quake Live */
    --ql-cyan: #0DEAE1;      /* Оригинальный бирюзовый QL */
    --ql-red: #ff2a4b;       /* Насыщенный красный для врагов/опасности */
    --ql-blue: #4a9eff;      /* Синий для союзников */

    /* Цвета Казино */
    --casino-gold: #f5c542;
    --casino-green: #0a4a2a; /* Глубокий зеленый, как сукно стола */
    --casino-gold-glow: 0 0 10px rgba(245, 197, 66, 0.6);

    /* Текст */
    --text-primary: #e0e0e0;
    --text-muted: #7a7a85;

    /* Шрифты */
    --font-tech: 'Rajdhani', 'Orbitron', sans-serif;
    --font-heading: 'Cinzel', serif;

    /* Панели */
    --panel-bg: #0d0d11;
    --border-dark: #222;
}

/* Базовый фон с текстурой */
body {
    background-color: var(--bg-deep);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(13, 234, 225, 0.08) 0%, transparent 60%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><rect width="4" height="4" fill="%23030303"/><path d="M0 0h1v1H0zM2 2h1v1H2z" fill="%23111115" opacity="0.4"/></svg>'); /* Легкий шум */
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container { width: 100%; max-width: 950px; }

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 25px;
    align-items: start;
}
@media (max-width: 900px) {
    .layout { display: flex; flex-direction: column; }
    .main-content { order: 1; width: 100%; }
    .leaderboards { order: 2; width: 100%; }
}

/* --- Баланс (Казино-стиль) --- */
.balance-header {
    background: linear-gradient(135deg, #111 0%, #050505 100%);
    border: 2px solid var(--casino-gold);
    box-shadow: var(--casino-gold-glow), inset 0 0 20px rgba(0,0,0,0.8);
    border-radius: 4px; /* Легкое скругление для казино */
    padding: 12px 20px;
    text-align: center;
    font-family: var(--font-tech);
    font-size: 22px;
    font-weight: 700;
    color: var(--casino-gold);
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chip-icon {
    height: 26px;
    width: auto;
    filter: drop-shadow(0 0 6px var(--casino-gold));
}

/* --- Заголовок (Quake Live Style) --- */
h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--casino-gold);
    text-align: center;
    margin: 0 0 30px 0;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(245, 197, 66, 0.4);
    position: relative;
}
h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--ql-cyan);
    margin: 10px auto 0;
    box-shadow: 0 0 8px var(--ql-cyan);
}

/* --- Вкладки (Tech + Casino) --- */
.tabs { display: flex; gap: 15px; margin-bottom: 30px; }

.tab-btn {
    flex: 1;
    background: #050505;
    border: 1px solid #333;
    color: var(--text-muted);
    padding: 14px;
    font-family: var(--font-tech);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); /* Срезанные углы QL */
}

.tab-btn.active {
    background: #111;
    border-color: var(--ql-cyan);
    color: var(--ql-cyan);
    box-shadow: 0 0 15px rgba(13, 234, 225, 0.2), inset 0 0 10px rgba(13, 234, 225, 0.1);
}

/* --- Команды (Столы казино) --- */
.teams-wrapper { display: flex; gap: 20px; margin-bottom: 25px; align-items: stretch; }

.team {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid #2a2a30;
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(5px); /* Эффект стекла */
    box-shadow: 0 5px 20px rgba(0,0,0,0.6);
}

.team::before { /* Уголки в стиле QL */
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 15px; height: 15px;
    border-top: 2px solid var(--ql-cyan);
    border-left: 2px solid var(--ql-cyan);
    opacity: 0.5;
}
.team::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 15px; height: 15px;
    border-bottom: 2px solid var(--ql-cyan);
    border-right: 2px solid var(--ql-cyan);
    opacity: 0.5;
}

.team-header {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 1px solid #222;
    padding-bottom: 12px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.red-icon { color: var(--ql-red); margin-right: 10px; text-shadow: 0 0 8px var(--ql-red); }
.blue-icon { color: var(--ql-blue); margin-right: 10px; text-shadow: 0 0 8px var(--ql-blue); }
#red-avg, #blue-avg, #duel-avg {
    font-family: var(--font-tech);
    font-size: 22px;
    margin-left: 5px;
}
#red-avg { color: var(--ql-red); }
#blue-avg { color: var(--ql-blue); }
#duel-avg { color: var(--casino-gold); }

/* --- Кнопки ставок (Фишки + Неон) --- */
.bet-btn {
    width: 100%;
    padding: 15px 10px;
    margin-bottom: 20px;
    font-family: var(--font-tech);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid #333;
    background: linear-gradient(180deg, #1a1a1a 0%, #050505 100%);
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 4px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

/* Эффект блика при наведении */
.bet-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}
.bet-btn:hover:not(:disabled)::after { left: 100%; }

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.btn-text small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-img {
    height: 24px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

/* Состояния кнопок */
.bet-btn:hover:not(:disabled) {
    border-color: var(--casino-gold);
    box-shadow: 0 0 15px rgba(245, 197, 66, 0.2);
}

.red-bet:not(:disabled) { border-bottom: 3px solid var(--ql-red); }
.blue-bet:not(:disabled) { border-bottom: 3px solid var(--ql-blue); }
.gold-bet:not(:disabled) { border-bottom: 3px solid var(--casino-gold); }

.bet-btn.cancel-bet {
    background: rgba(255, 42, 75, 0.1);
    border: 1px solid var(--ql-red);
    color: var(--ql-red);
}
.bet-btn.cancel-bet .btn-img { filter: drop-shadow(0 0 5px var(--ql-red)); }

.bet-btn.bet-placed, .bet-btn.bet-closed {
    background: #020202;
    border: 1px dashed #444;
    cursor: not-allowed;
    opacity: 0.6;
}

/* --- Игроки (Строки таблицы) --- */
.player-list { display: flex; flex-direction: column; gap: 6px; flex-grow: 1;}

.player {
    background: rgba(0,0,0,0.6);
    padding: 10px 12px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #1a1a1a;
    transition: background 0.2s;
}
.player:hover { background: rgba(13, 234, 225, 0.05); }

.player-name { color: var(--text-primary); font-weight: 600; letter-spacing: 0.5px; }
.player-winrate { font-size: 10px; color: var(--text-muted); font-family: var(--font-tech); }
.player-rating { color: var(--casino-gold); font-family: var(--font-tech); font-weight: 700; font-size: 16px; text-shadow: 0 0 5px rgba(245, 197, 66, 0.3);}

.red-team .player { border-left-color: var(--ql-red); }
.blue-team .player { border-left-color: var(--ql-blue); }
.duel-team .player { border-left-color: var(--casino-gold); }

/* --- Карта и Таймер (Табло казино) --- */
.map-section, .time-section { text-align: center; margin-bottom: 25px; }

.map-section h2, .time-section h2, .specs-section h2 {
    font-family: var(--font-tech);
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 10px 0;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.map-name {
    background: #000;
    border: 1px solid #222;
    color: var(--ql-cyan);
    padding: 10px 30px;
    display: inline-flex;
    align-items: center;
    font-family: var(--font-tech);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(13, 234, 225, 0.1), inset 0 0 10px rgba(0,0,0,0.8);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.checkmark { margin-left: 12px; color: var(--casino-gold); font-size: 16px; }

.time-display {
    background: #000;
    border: 2px solid var(--casino-gold);
    padding: 15px;
    font-family: 'Orbitron', monospace; /* Более цифровой шрифт */
    font-size: 32px;
    font-weight: 700;
    color: var(--casino-gold);
    letter-spacing: 5px;
    box-shadow: var(--casino-gold-glow), inset 0 0 20px rgba(0,0,0,0.9);
    border-radius: 4px;
    display: inline-block;
    min-width: 200px;
}

/* --- Спектаторы --- */
.specs-section { margin-top: 30px; opacity: 0.7; text-align: center; }
.specs-section .player-list { max-width: 280px; margin: 0 auto; }

/* --- Ошибка (неон QL) --- */
.error-message {
    margin-top: 25px;
    background: rgba(255, 42, 75, 0.1);
    border: 1px solid var(--ql-red);
    color: var(--ql-red);
    font-family: var(--font-tech);
    font-size: 13px;
    padding: 12px;
    text-align: center;
}

/* --- Auth box (заменяет balance-header) --- */
.top-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.top-bar .auth-box { flex: 1; }

.auth-box {
    background: linear-gradient(135deg, #111 0%, #050505 100%);
    border: 2px solid var(--casino-gold);
    box-shadow: var(--casino-gold-glow), inset 0 0 20px rgba(0,0,0,0.8);
    border-radius: 4px;
    padding: 10px 15px;
    font-family: var(--font-tech);
    font-size: 16px;
    font-weight: 700;
    color: var(--casino-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.auth-box .user-name { color: var(--text-primary); }
.auth-box .balance { color: var(--casino-gold); font-size: 20px; }
.auth-box button {
    background: rgba(245, 197, 66, 0.1);
    border: 1px solid var(--casino-gold);
    color: var(--casino-gold);
    padding: 6px 12px;
    font-family: var(--font-tech);
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 3px;
}
.auth-box button:hover { background: rgba(245, 197, 66, 0.3); }

.auth-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.auth-form input {
    background: #0a0a0a;
    border: 1px solid #333;
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border-radius: 3px;
    flex: 1;
    min-width: 80px;
}
.auth-form input:focus { outline: none; border-color: var(--ql-cyan); }
.auth-form button {
    background: #0a0a0a;
    border: 1px solid var(--ql-cyan);
    color: var(--ql-cyan);
    padding: 8px 14px;
    font-family: var(--font-tech);
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 3px;
    white-space: nowrap;
}
.auth-form button:hover { background: rgba(13, 234, 225, 0.1); }

/* --- Test toggle --- */
.test-toggle {
    background: #050505;
    border: 1px solid var(--ql-cyan);
    color: var(--ql-cyan);
    padding: 8px 16px;
    font-family: var(--font-tech), sans-serif;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    white-space: nowrap;
}
.test-toggle.active {
    background: var(--ql-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(13, 234, 225, 0.5);
}

/* --- Test panel --- */
.test-panel {
    background: rgba(13, 234, 225, 0.05);
    border: 1px dashed var(--ql-cyan);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.test-title { color: var(--ql-cyan); font-family: var(--font-tech), sans-serif; font-weight: 700; margin-bottom: 8px; letter-spacing: 1px; }
.test-hint { color: var(--text-muted); font-size: 12px; margin-bottom: 10px; }
.test-btn {
    display: block; width: 100%; margin: 6px 0;
    padding: 10px; background: #050505; color: var(--text-primary);
    border: 1px solid #333; font-family: var(--font-tech), sans-serif;
    font-weight: 700; cursor: pointer; text-transform: uppercase;
    border-radius: 3px;
}
.test-btn.primary { border-color: var(--ql-cyan); color: var(--ql-cyan); }
.test-btn.red { border-color: var(--ql-red); color: var(--ql-red); }
.test-btn.blue { border-color: var(--ql-blue); color: var(--ql-blue); }
.test-btn.small { font-size: 11px; opacity: 0.7; }
.test-btn:hover:not(:disabled) { filter: brightness(1.3); }

/* --- Pool section --- */
.pool-section { margin-top: 25px; padding: 15px; background: var(--bg-panel); border: 1px solid #2a2a30; border-radius: 4px; }
.pool-section h2 { display: none; }
.pool-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-family: var(--font-tech); font-size: 14px; }
.pool-row strong { color: var(--casino-gold); }
.pool-row.red { border-left: 3px solid var(--ql-red); padding-left: 8px; }
.pool-row.blue { border-left: 3px solid var(--ql-blue); padding-left: 8px; }
.pool-row.duel { border-left: 3px solid var(--casino-gold); padding-left: 8px; }

/* --- Feed section --- */
.feed-section { margin-top: 10px; padding: 15px; background: var(--bg-panel); border: 1px solid #2a2a30; border-radius: 4px; max-height: 200px; overflow-y: auto; }
.feed-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; border-bottom: 1px solid #1a1a1a; }
.feed-user { color: var(--text-primary); font-weight: 600; }
.feed-team { font-family: var(--font-tech); font-weight: 700; text-transform: uppercase; }
.feed-team.red { color: var(--ql-red); }
.feed-team.blue { color: var(--ql-blue); }
.feed-team.duel { color: var(--casino-gold); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* --- Фиксы верхней панели и авторизации --- */
.top-bar {
display: flex;
gap: 10px;
margin-bottom: 20px;
align-items: stretch;
}

.auth-box {
flex: 1;
background: rgba(10, 10, 12, 0.85);
border: 1px solid var(--border-dark, #222);
border-radius: 4px;
padding: 10px 15px;
display: flex;
align-items: center;
justify-content: space-between;
}

.auth-form {
display: flex;
gap: 10px;
width: 100%;
align-items: center;
}

.auth-form input {
flex: 1;
background: #000;
border: 1px solid #333;
color: var(--ql-cyan, #0DEAE1);
padding: 8px 12px;
font-family: var(--font-tech, 'Rajdhani');
outline: none;
}
.auth-form input:focus {
border-color: var(--ql-cyan, #0DEAE1);
box-shadow: 0 0 8px rgba(13, 234, 225, 0.2);
}

.auth-form button {
background: #111;
border: 1px solid #444;
color: #ccc;
padding: 8px 15px;
cursor: pointer;
font-family: var(--font-tech, 'Rajdhani');
font-weight: 700;
transition: 0.2s;
}
.auth-form button:hover {
background: var(--ql-cyan, #0DEAE1);
color: #000;
}

.user-name {
font-family: var(--font-tech, 'Rajdhani');
font-weight: 700;
color: var(--text-primary, #fff);
margin-right: 15px;
}
.balance {
color: var(--casino-gold, #f5c542);
font-family: var(--font-tech, 'Rajdhani');
font-weight: 700;
font-size: 18px;
margin-right: 15px;
}
#logout-btn {
background: transparent;
border: 1px solid #555;
color: #888;
padding: 5px 10px;
cursor: pointer;
font-size: 12px;
}

/* --- Кнопки ставок (чтобы не были пустыми) --- */
.bet-btn .btn-text {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
line-height: 1.2;
}
.bet-btn .btn-text small {
font-size: 11px;
opacity: 0.7;
}

/* --- Блоки Пул и Лента --- */
.pool-section {
background: var(--panel-bg, #0d0d11);
border: 1px solid var(--border-dark, #222);
padding: 15px;
margin-bottom: 20px;
border-radius: 4px;
font-family: var(--font-tech, 'Rajdhani');
}
.pool-row {
display: flex;
justify-content: space-between;
padding: 5px 0;
border-bottom: 1px dashed #333;
font-size: 14px;
color: var(--text-muted);
}
.pool-row strong {
color: var(--text-primary, #fff);
}
.pool-row.red strong { color: var(--ql-red, #ff2a4b); }
.pool-row.blue strong { color: var(--ql-blue, #4a9eff); }
.pool-row.duel strong { color: var(--casino-gold, #f5c542); }

.feed-section {
background: #050505;
border: 1px solid #1a1a1a;
padding: 15px;
margin-bottom: 20px;
max-height: 200px;
overflow-y: auto;
}
.feed-row {
font-size: 13px;
padding: 8px 0;
border-bottom: 1px solid #111;
color: var(--text-muted);
display: flex;
justify-content: space-between;
align-items: center;
}
.feed-user { color: var(--ql-cyan, #0DEAE1); font-weight: 700; }
.feed-team { font-weight: 700; }
.feed-team.red { color: var(--ql-red, #ff2a4b); }
.feed-team.blue { color: var(--ql-blue, #4a9eff); }
.feed-row small { color: #555; font-size: 11px; }

/* --- Leaderboards --- */
.leaderboards { display: flex; flex-direction: column; gap: 20px; }

.leaderboard {
    background: var(--bg-panel);
    border: 1px solid #2a2a30;
    padding: 15px;
    border-radius: 4px;
    position: relative;
    backdrop-filter: blur(5px);
}
.leaderboard::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 15px; height: 15px;
    border-top: 2px solid var(--casino-gold);
    border-left: 2px solid var(--casino-gold);
    opacity: 0.5;
}
.leaderboard h2 {
    font-family: var(--font-tech);
    font-size: 13px;
    color: var(--casino-gold);
    margin: 0 0 12px 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #222;
}

.leader-list { display: flex; flex-direction: column; gap: 4px; }

.leader-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.4);
    border-left: 2px solid transparent;
    transition: all 0.2s;
}
.leader-row:hover {
    background: rgba(245, 197, 66, 0.05);
    border-left-color: var(--casino-gold);
}
.leader-rank {
    font-family: var(--font-tech);
    font-weight: 700;
    color: var(--text-muted);
    width: 22px;
    text-align: center;
    font-size: 12px;
}
.leader-row:nth-child(1) .leader-rank { color: var(--casino-gold); text-shadow: 0 0 6px var(--casino-gold); }
.leader-row:nth-child(2) .leader-rank { color: #c0c0c0; }
.leader-row:nth-child(3) .leader-rank { color: #cd7f32; }

.leader-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leader-value {
    font-family: var(--font-tech);
    font-weight: 700;
    color: var(--casino-gold);
    font-size: 12px;
    white-space: nowrap;
}
.leader-sub {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-tech);
    margin-left: 4px;
}
.leader-empty {
    text-align: center;
    color: #444;
    font-size: 12px;
    padding: 15px;
    font-style: italic;
}

/* team color stripes on players (fix #2) */
.red-team  .player { border-left-color: var(--ql-red); }
.blue-team .player { border-left-color: var(--ql-blue); }
.duel-team .player { border-left-color: var(--casino-gold); }

/* --- Modal --- */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    z-index: 1000;
}
.modal-content {
    background: var(--panel-bg, #0d0d11);
    border: 1px solid #2a2a30;
    border-radius: 6px;
    padding: 24px 28px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    margin-top: -5px;
}
.modal-close:hover { color: var(--text-primary); }
.modal-title {
    font-family: var(--font-tech);
    font-size: 18px;
    font-weight: 700;
    color: var(--casino-gold);
    margin: 0 0 20px 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Cabinet --- */
.cabinet-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #222;
}
.cabinet-section:last-of-type { border-bottom: none; padding-bottom: 0; }
.cabinet-section h3 {
    font-family: var(--font-tech);
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 12px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cabinet-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-primary);
}
.cabinet-row span { color: var(--text-muted); }

/* --- Invite list --- */
.invite-list { display: flex; flex-direction: column; gap: 4px; }
.invite-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(0,0,0,0.4);
    border: 1px solid #222;
    border-radius: 3px;
}
.invite-code {
    font-family: var(--font-tech);
    font-size: 13px;
    color: var(--ql-cyan);
    background: rgba(13, 234, 225, 0.08);
    padding: 3px 8px;
    border-radius: 2px;
    cursor: pointer;
}
.invite-status {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.invited-list { display: flex; flex-direction: column; gap: 4px; }
.invited-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(0,0,0,0.3);
    border-left: 2px solid var(--casino-gold);
    border-radius: 2px;
    font-size: 13px;
}
.invited-name { color: var(--text-primary); font-weight: 600; }
.invited-meta { color: var(--text-muted); font-size: 11px; font-family: var(--font-tech); }
.empty { color: #555; font-style: italic; font-size: 12px; padding: 8px 0; }

/* --- Admin cabinet --- */
.admin-modal-content {
    max-width: 750px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
.stat-cell {
    background: rgba(0,0,0,0.4);
    border: 1px solid #222;
    border-radius: 3px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-cell span {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stat-cell strong {
    font-family: var(--font-tech);
    font-size: 18px;
    color: var(--casino-gold);
    font-weight: 700;
}
.gen-invites-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}
.gen-input {
    background: #0a0a0a;
    border: 1px solid #333;
    color: var(--text-primary);
    padding: 6px 10px;
    font-family: var(--font-tech);
    font-size: 12px;
    width: 60px;
    border-radius: 3px;
}
.gen-input:focus { outline: none; border-color: var(--ql-cyan); }
.gen-result {
    font-size: 12px;
    color: var(--ql-cyan);
    font-family: var(--font-tech);
    min-width: 100px;
}
.admin-invite-list .invite-status { color: var(--ql-cyan); }
.admin-users-list {
    max-height: 300px;
    overflow-y: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.admin-table th, .admin-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #1a1a1a;
    color: var(--text-primary);
}
.admin-table th {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.admin-badge {
    display: inline-block;
    background: rgba(245, 197, 66, 0.15);
    color: var(--casino-gold);
    font-family: var(--font-tech);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 2px;
    letter-spacing: 1px;
    margin-left: 4px;
}
.admin-badge.small { font-size: 8px; padding: 0 4px; }

/* --- Новая сетка на 3 колонки --- */
.layout {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1100px) {
    .layout { grid-template-columns: 240px 1fr; }
    .live-bets-panel { display: none; }
}
@media (max-width: 800px) {
    .layout { display: flex; flex-direction: column; }
    .main-content { width: 100%; }
    .leaderboards { width: 100%; }
}

/* --- Иконка RG --- */
.rg-icon {
    height: 14px;
    vertical-align: middle;
    margin-left: 3px;
    margin-bottom: 2px;
}

/* --- Выбор суммы ставки --- */
.bet-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: var(--font-tech);
    color: var(--text-muted);
}
.bet-controls select {
    background: #000;
    border: 1px solid var(--casino-gold);
    color: var(--casino-gold);
    padding: 5px 10px;
    font-family: var(--font-tech);
    font-size: 16px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

/* --- Live Bets List --- */
.live-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 500px;
    overflow-y: auto;
}
.live-row {
    display: flex;
    justify-content: space-between;
    background: rgba(0,0,0,0.4);
    padding: 6px 8px;
    font-size: 12px;
    border-left: 2px solid transparent;
    font-family: var(--font-tech);
}
.live-row.red { border-left-color: var(--ql-red); }
.live-row.blue { border-left-color: var(--ql-blue); }
.live-row.duel { border-left-color: var(--casino-gold); }
.live-user { color: var(--text-primary); font-weight: 600; }
.live-amount { color: var(--casino-gold); font-weight: 700; }

/* --- Стилизованный статус сервера (вместо красной плашки) --- */
.server-status {
    margin: 15px 0;
    background: rgba(13, 234, 225, 0.05);
    border: 1px solid rgba(13, 234, 225, 0.3);
    color: var(--ql-cyan);
    font-family: var(--font-tech);
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    word-break: break-word;
    white-space: normal;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(13, 234, 225, 0.1);
}

/* Если сервер реально офлайн (ошибка) — включается красный */
.server-status.error {
    border-color: rgba(255, 42, 75, 0.5);
    color: var(--ql-red);
    background: rgba(255, 42, 75, 0.1);
    box-shadow: 0 0 10px rgba(255, 42, 75, 0.1);
}
