/* ============================================
   ИГРЫ — ОБЩИЕ СТИЛИ
   Чёрно-золотая гамма через переменные темы
   ============================================ */

/* ===== СТРАНИЦА ИГР ===== */
.games-page {
    max-width: 1200px;
    margin: 0 auto;
    animation: gamesPageIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes gamesPageIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== БАЛАНС (виджет сверху) ===== */
.games-balance-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 28px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 32px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.games-balance-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.games-balance-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.games-balance-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 12px var(--accent-glow));
    animation: coinFloat 3s ease-in-out infinite;
}

@keyframes coinFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(6deg); }
}

.games-balance-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.games-balance-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.games-balance-value {
    font-size: 28px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px var(--accent-glow));
    line-height: 1.1;
}

.games-balance-value.flash-up {
    animation: balanceUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.games-balance-value.flash-down {
    animation: balanceDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes balanceUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: var(--green); }
    100% { transform: scale(1); }
}
@keyframes balanceDown {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

.games-balance-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.games-balance-btn {
    padding: 10px 18px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.games-balance-btn:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* ===== ХАБ ИГР — СЕТКА КАРТОЧЕК ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.game-card {
    position: relative;
    display: block;
    padding: 32px 28px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: gameCardIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.1s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.2s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes gameCardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.game-card:hover::before {
    opacity: 0.25;
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transition: transform 0.5s;
    box-shadow: 0 0 12px var(--accent-glow);
}

.game-card:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 48px rgba(212, 175, 55, 0.25);
}

.game-card-icon {
    font-size: 56px;
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

.game-card:hover .game-card-icon {
    transform: scale(1.15) rotate(-8deg);
}

.game-card-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.game-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.game-card-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.12);
    color: var(--accent);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-card-tag.tag-hot {
    background: rgba(240, 71, 71, 0.12);
    color: var(--red);
    border-color: rgba(240, 71, 71, 0.3);
}
.game-card-tag.tag-new {
    background: rgba(67, 181, 129, 0.12);
    color: var(--green);
    border-color: rgba(67, 181, 129, 0.3);
}

/* ===== ИГРОВОЙ ЭКРАН (обёртка для страниц игр) ===== */
.game-screen {
    max-width: 1100px;
    margin: 0 auto;
}

.game-screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.game-screen-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.game-screen-title-icon {
    font-size: 36px;
    filter: drop-shadow(0 0 16px var(--accent-glow));
}

.game-back {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.game-back:hover {
    color: var(--accent);
}

/* ===== ПАНЕЛЬ УПРАВЛЕНИЯ СТАВКОЙ ===== */
.bet-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.bet-panel-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 14px;
}

.bet-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: stretch;
}

.bet-input-wrap {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.3s;
}

.bet-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.bet-currency {
    padding: 0 14px;
    color: var(--accent);
    font-size: 18px;
    user-select: none;
}

.bet-input {
    flex: 1;
    padding: 14px 14px 14px 0;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    outline: none;
    min-width: 0;
}

.bet-input::-webkit-outer-spin-button,
.bet-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.bet-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
    -webkit-appearance: none;
}

.bet-quick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bet-quick-btn {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}

.bet-quick-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* ===== ОСНОВНАЯ КНОПКА ДЕЙСТВИЯ ===== */
.game-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 36px;
    background: var(--gradient-accent);
    color: #0d0b08;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 800;
    font-family: inherit;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 24px var(--accent-glow);
    text-transform: uppercase;
    white-space: nowrap;
}

.game-action-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.game-action-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

.game-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.game-action-btn.btn-cashout {
    background: linear-gradient(135deg, var(--green), #7dd3a0);
    color: #0d0b08;
    box-shadow: 0 4px 24px rgba(127, 176, 105, 0.4);
}

/* ===== РЕЗУЛЬТАТ ===== */
.game-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px;
    margin-top: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    animation: resultIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.game-result-win {
    border-color: rgba(67, 181, 129, 0.5);
    box-shadow: 0 0 40px rgba(67, 181, 129, 0.15);
}

.game-result-lose {
    border-color: rgba(201, 74, 74, 0.5);
    box-shadow: 0 0 40px rgba(201, 74, 74, 0.15);
}

.game-result-icon {
    font-size: 48px;
    animation: resultIcon 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultIcon {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0); }
}

.game-result-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.game-result-amount {
    font-size: 32px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.game-result-amount.positive { color: var(--green); }
.game-result-amount.negative { color: var(--red); }

/* ===== ТОСТ-УВЕДОМЛЕНИЯ ===== */
.toast-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    backdrop-filter: blur(20px);
}

.toast.toast-success {
    border-left-color: var(--green);
    box-shadow: 0 12px 40px rgba(67, 181, 129, 0.2);
}
.toast.toast-error {
    border-left-color: var(--red);
    box-shadow: 0 12px 40px rgba(201, 74, 74, 0.2);
}
.toast.toast-coin {
    border-left-color: var(--accent);
    box-shadow: 0 12px 40px var(--accent-glow);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(120%); }
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .games-balance-bar {
        padding: 16px 18px;
    }

    .games-balance-value {
        font-size: 22px;
    }

    .games-balance-icon {
        font-size: 26px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .game-card {
        padding: 24px 22px;
    }

    .game-card-icon {
        font-size: 44px;
    }

    .game-card-title {
        font-size: 19px;
    }

    .bet-panel {
        padding: 18px;
    }

    .game-action-btn {
        padding: 14px 24px;
        font-size: 14px;
        width: 100%;
    }

    .toast-container {
        top: auto;
        bottom: 20px;
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .games-balance-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .games-balance-actions {
        width: 100%;
    }

    .games-balance-btn {
        flex: 1;
        justify-content: center;
    }

    .bet-input-wrap {
        min-width: 100%;
    }
}
/* ===== ВИДЖЕТ БАЛАНСА В ШАПКЕ ===== */
.user-coins {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 100px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 800;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    flex-shrink: 0;
}

.user-coins:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.user-coins-icon {
    font-size: 16px;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.user-coins-value {
    line-height: 1;
}

@media (max-width: 768px) {
    .user-coins {
        padding: 6px 10px;
        font-size: 12px;
    }

    .user-coins-icon {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .user-coins {
        padding: 5px 8px;
        font-size: 11px;
    }
}
/* ============================================
   РУЛЕТКА — V6 (RustGrade 1-в-1)
   ============================================ */

/* ===== РЕЖИМЫ (кнопки сверху) ===== */
.roulette-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.roulette-mode {
    position: relative;
    padding: 14px 10px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.roulette-mode:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.roulette-mode.active {
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.roulette-mode-chance {
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.roulette-mode-mult {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.bet-limits {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}

/* ===== КОЛЕСО ===== */
.roulette-wheel-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
}

.roulette-wheel {
    position: relative;
    width: 400px;
    height: 400px;
    isolation: isolate;
    filter: drop-shadow(0 0 50px rgba(0, 0, 0, 0.6));
}

.roulette-wheel > * {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.roulette-fill-circle {
    z-index: 1;
}

.roulette-fill-sector {
    transition: stroke-dasharray 0.3s ease, stroke-dashoffset 0.3s ease;
    transform-origin: 162.5px 162.5px;
}

.roulette-outer-ring {
    z-index: 2;
    object-fit: contain;
}

.roulette-inner-mask {
    z-index: 3;
    object-fit: contain;
    border-radius: 50%;
    opacity: 0.85;
    mix-blend-mode: multiply;
}

.roulette-arrow-wrapper {
    transform-origin: 50% center;
    z-index: 1;
    pointer-events: none;
    will-change: transform;
    position: absolute;
    inset: 0px;
}

.roulette-arrow-img {
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(rgba(0, 0, 0, 0.6) 0px 2px 4px);
    width: 32.22%;
    height: auto;
    position: absolute;
    top: 6.67%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.roulette-center {
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.roulette-center-chance {
    font-size: 42px;
    font-weight: 900;
    color: #f2f3f2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
    font-family: 'Inter', sans-serif;
    line-height: 1;
    letter-spacing: -0.02em;
}

.roulette-center-label {
    font-size: 13px;
    font-weight: 700;
    color: #c9ccc9;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.roulette-center-label.status-danger { color: #fa3c1f; }
.roulette-center-label.status-risk { color: #ffdd59; }
.roulette-center-label.status-safe { color: #ffdd59; }
.roulette-center-label.status-very-safe { color: #84b030; }

/* ===== ТАЙМЕР ===== */
.roulette-timer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
}

.roulette-timer-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent-glow);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.roulette-timer-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.roulette-action {
    display: flex;
    justify-content: center;
    margin: 40px 0 24px;
}

.roulette-action .game-action-btn {
    min-width: 260px;
}

/* ===== ИСТОРИЯ ===== */
.roulette-history-wrap {
    margin-top: 32px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.roulette-history-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 14px;
}

.roulette-history {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.roulette-history-empty {
    color: var(--text-dim);
    font-size: 13px;
    font-style: italic;
}

.roulette-history-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 12px;
    animation: historyIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes historyIn {
    from { opacity: 0; transform: scale(0.6); }
    to { opacity: 1; transform: scale(1); }
}

.roulette-history-item.win {
    background: rgba(132, 176, 48, 0.1);
    border-color: rgba(132, 176, 48, 0.4);
    color: #84b030;
}

.roulette-history-item.lose {
    background: rgba(210, 41, 15, 0.1);
    border-color: rgba(210, 41, 15, 0.4);
    color: #ff6b4a;
}

.roulette-history-item .history-amount {
    font-size: 10px;
    opacity: 0.85;
}

/* ===== Mobile ===== */
@media (max-width: 480px) {
    .roulette-wheel {
        width: 320px;
        height: 320px;
    }

    .roulette-center-chance { font-size: 32px; }
    .roulette-center-label { font-size: 11px; }
    .roulette-arrow-img { width: 40px; top: -24px; }
    .roulette-action .game-action-btn { min-width: 100%; }
    .roulette-modes { grid-template-columns: repeat(2, 1fr); }
}
/* ============================================
   АДМИНКА МОНЕТ
   ============================================ */

.admin-coins-page {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-coins-total {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

/* ===== ПАНЕЛЬ ВЫДАЧИ ===== */
.admin-coins-give-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.admin-coins-give-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.admin-coins-give-header {
    margin-bottom: 20px;
}

.admin-coins-give-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.admin-coins-give-hint {
    font-size: 13px;
    color: var(--text-dim);
}

.admin-coins-give-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-coins-input-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 14px;
}

.admin-coins-input-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-coins-input-wrap label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
}

.admin-coins-input-wrap input {
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s;
}

.admin-coins-input-wrap input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-coins-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-coins-btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-coins-btn-give {
    background: linear-gradient(135deg, rgba(127, 176, 105, 0.15), rgba(127, 176, 105, 0.05));
    color: var(--green);
    border-color: rgba(127, 176, 105, 0.5);
}

.admin-coins-btn-give:hover {
    background: linear-gradient(135deg, rgba(127, 176, 105, 0.25), rgba(127, 176, 105, 0.15));
    border-color: var(--green);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 176, 105, 0.3);
}

.admin-coins-btn-take {
    background: linear-gradient(135deg, rgba(201, 106, 106, 0.15), rgba(201, 106, 106, 0.05));
    color: #c96a6a;
    border-color: rgba(201, 106, 106, 0.5);
}

.admin-coins-btn-take:hover {
    background: linear-gradient(135deg, rgba(201, 106, 106, 0.25), rgba(201, 106, 106, 0.15));
    border-color: #c96a6a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 106, 106, 0.3);
}

.admin-coins-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: var(--border);
}

.admin-coins-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* ===== АВТОКОМПЛИТ ===== */
.admin-coins-suggest {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    margin-top: 6px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.admin-coins-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.admin-coins-suggest-item:last-child {
    border-bottom: none;
}

.admin-coins-suggest-item:hover {
    background: rgba(212, 175, 55, 0.08);
}

.admin-coins-suggest-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}

.admin-coins-suggest-info {
    min-width: 0;
    flex: 1;
}

.admin-coins-suggest-name {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-coins-suggest-id {
    font-size: 11px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}

.admin-coins-suggest-balance {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

/* ===== ПОИСК ===== */
.admin-coins-search-panel {
    margin-bottom: 24px;
}

.admin-coins-search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-coins-search input {
    flex: 1;
    min-width: 240px;
    padding: 12px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s;
}

.admin-coins-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-coins-search button {
    padding: 12px 24px;
    background: var(--gradient-accent);
    color: #0d0b08;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.admin-coins-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.admin-coins-reset {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s;
}

.admin-coins-reset:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* ===== ТАБЛИЦА ===== */
.admin-coins-table-wrap {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    overflow-x: auto;
}

.admin-coins-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-coins-table thead {
    background: rgba(212, 175, 55, 0.05);
}

.admin-coins-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-coins-table th.right,
.admin-coins-table td.right {
    text-align: right;
}

.admin-coins-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.admin-coins-table tbody tr:last-child {
    border-bottom: none;
}

.admin-coins-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.04);
}

.admin-coins-table td {
    padding: 12px 16px;
    vertical-align: middle;
}

.admin-coins-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-coins-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}

.admin-coins-avatar-placeholder {
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: #0d0b08;
}

.admin-coins-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.admin-coins-steamid {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.03);
    padding: 3px 8px;
    border-radius: 5px;
    user-select: all;
}

.admin-coins-balance {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    color: var(--accent);
    font-size: 15px;
}

.admin-coins-muted {
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

.admin-coins-row-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.admin-coins-mini-btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid;
    white-space: nowrap;
}

.admin-coins-mini-give {
    background: rgba(127, 176, 105, 0.1);
    color: var(--green);
    border-color: rgba(127, 176, 105, 0.4);
}

.admin-coins-mini-give:hover {
    background: rgba(127, 176, 105, 0.25);
    transform: translateY(-1px);
}

.admin-coins-mini-take {
    background: rgba(201, 106, 106, 0.1);
    color: #c96a6a;
    border-color: rgba(201, 106, 106, 0.4);
}

.admin-coins-mini-take:hover {
    background: rgba(201, 106, 106, 0.25);
    transform: translateY(-1px);
}

/* ===== МОДАЛКА ===== */
.admin-coins-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-coins-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.admin-coins-modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 28px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 80px var(--accent-glow);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.admin-coins-modal-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
}

.admin-coins-modal-sub {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.admin-coins-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.admin-coins-modal-actions .admin-coins-btn {
    padding: 12px 22px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .admin-coins-input-row {
        grid-template-columns: 1fr;
    }

    .admin-coins-table-wrap {
        font-size: 13px;
    }

    .admin-coins-table th,
    .admin-coins-table td {
        padding: 10px 12px;
    }

    .admin-coins-name {
        max-width: 120px;
    }

    .admin-coins-steamid {
        font-size: 10px;
    }

    .admin-coins-row-actions {
        flex-direction: column;
    }
}
/* ============================================
   ТОП ИГРОКОВ
   ============================================ */

.top-table-wrap {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    overflow-x: auto;
}

.top-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.top-table thead {
    background: rgba(212, 175, 55, 0.05);
}

.top-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.top-table th.right,
.top-table td.right {
    text-align: right;
}

.top-row {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s, transform 0.2s;
}

.top-row:last-child {
    border-bottom: none;
}

.top-row:hover {
    background: rgba(212, 175, 55, 0.06);
}

.top-row-gold {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.08), transparent 40%);
}
.top-row-silver {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.08), transparent 40%);
}
.top-row-bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.08), transparent 40%);
}

.top-col-rank {
    width: 60px;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}

.top-col-player {
    padding: 12px 20px;
}

.top-col-stat {
    padding: 12px 20px;
    font-family: 'JetBrains Mono', monospace;
}

.top-player {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.top-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
    flex-shrink: 0;
}

.top-avatar-placeholder {
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #0d0b08;
}

.top-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.top-coins {
    font-weight: 800;
    color: var(--accent);
    font-size: 15px;
}

.top-muted {
    color: var(--text-dim);
    font-size: 13px;
}

@media (max-width: 600px) {
    .top-table th,
    .top-table td {
        padding: 10px 12px;
    }
    .top-name { max-width: 120px; }
    .hide-mobile { display: none; }
    .top-col-rank { width: 44px; font-size: 15px; }
    .top-avatar { width: 32px; height: 32px; }
}

/* ============================================
   ПРАВИЛА ИГР
   ============================================ */

.rules-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 24px;
}

.rules-section-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.rules-subtitle {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin: 24px 0 12px;
}

.rules-text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.rules-text strong {
    color: var(--accent);
}

/* ===== ЛИМИТЫ ===== */
.rules-limits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.rules-limit-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    text-align: center;
    transition: all 0.3s;
}

.rules-limit-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.rules-limit-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.rules-limit-value {
    font-size: 22px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

/* ===== РЕЖИМЫ РУЛЕТКИ ===== */
.rules-modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.rules-mode-card {
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rules-mode-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.rules-mode-chance {
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.rules-mode-mult {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.rules-mode-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-top: 6px;
}

/* ===== СПИСОК ВАЖНОГО ===== */
.rules-section-warning {
    border-color: rgba(212, 175, 55, 0.4);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.05), transparent);
}

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rules-list li {
    position: relative;
    padding-left: 24px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.rules-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 800;
}

.rules-list strong {
    color: var(--accent);
    font-weight: 800;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 600px) {
    .rules-section {
        padding: 20px 18px;
    }
    .rules-section-title {
        font-size: 17px;
    }
    .rules-limits-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .rules-limit-value {
        font-size: 18px;
    }
    .rules-modes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* ============================================
   МАЙНИНГ (MINES)
   ============================================ */

.mines-limit-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    margin-bottom: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.mines-limit-label {
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 11px;
    font-weight: 800;
}

.mines-limit-value {
    color: var(--accent);
    font-weight: 800;
}

.mines-limit-value.danger {
    color: var(--red);
}

/* ===== LAYOUT ===== */
.mines-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .mines-layout {
        grid-template-columns: 1fr;
    }
}

.mines-board-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ===== ПОЛЕ 5x5 ===== */
.mines-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

.mines-cell {
    position: relative;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text);
    font-family: inherit;
    padding: 0;
    aspect-ratio: 1 / 1;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mines-cell:hover:not(:disabled):not(.mines-cell-revealed) {
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.mines-cell:active:not(:disabled):not(.mines-cell-revealed) {
    transform: scale(0.95);
}

.mines-cell:disabled {
    cursor: not-allowed;
}

.mines-cell-revealed {
    cursor: default;
    border-color: transparent;
    transform: none !important;
}

.mines-cell-diamond {
    background: linear-gradient(135deg, rgba(67, 181, 129, 0.2), rgba(67, 181, 129, 0.08));
    border-color: rgba(67, 181, 129, 0.5) !important;
    box-shadow: 0 0 24px rgba(67, 181, 129, 0.25);
    color: #7dd3a0;
}

.mines-cell-bomb {
    background: linear-gradient(135deg, rgba(240, 71, 71, 0.25), rgba(240, 71, 71, 0.1));
    border-color: rgba(240, 71, 71, 0.6) !important;
    box-shadow: 0 0 24px rgba(240, 71, 71, 0.3);
    color: #ff6b6b;
}

.mines-cell-lost {
    animation: minesShake 0.5s ease-in-out;
}

.mines-cell-empty {
    opacity: 0.5;
}

.mines-cell-pop {
    animation: minesPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes minesPop {
    0%   { transform: scale(0.6); opacity: 0.4; }
    60%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes minesShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-4px); }
    75%      { transform: translateX(4px); }
}

/* ===== ИНФО ОБ ИГРЕ ===== */
.mines-game-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 460px;
}

.mines-info-cell {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    text-align: center;
    transition: all 0.3s;
}

.mines-info-cell:hover {
    border-color: var(--accent);
}

.mines-info-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.mines-info-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 16px;
    color: var(--text);
    line-height: 1.2;
}

.mines-info-value.accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== ПАНЕЛЬ ===== */
.mines-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 90px;
}

@media (max-width: 900px) {
    .mines-panel {
        position: static;
    }
}

/* ===== СЛАЙДЕР БОМБ ===== */
.mines-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg,
        var(--green) 0%,
        var(--yellow) 50%,
        var(--red) 100%);
    border-radius: 100px;
    outline: none;
    margin: 12px 0;
    cursor: pointer;
}

.mines-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 12px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--bg-primary);
    transition: transform 0.2s;
}

.mines-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.mines-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 12px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--bg-primary);
}

/* ===== ПРЕСЕТЫ БОМБ ===== */
.mines-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.mines-preset-btn {
    padding: 8px 4px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.mines-preset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.mines-preset-btn.active {
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.mines-bombs-count {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.mines-bombs-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    font-style: italic;
}

/* ===== КНОПКИ ДЕЙСТВИЙ ===== */
.mines-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mines-actions .game-action-btn {
    width: 100%;
}

.mines-actions .btn-cashout {
    background: linear-gradient(135deg, var(--green), #7dd3a0);
    color: #0d0b08;
    box-shadow: 0 4px 24px rgba(127, 176, 105, 0.4);
}

.mines-actions .btn-cashout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== MOBILE ===== */
@media (max-width: 500px) {
    .mines-board {
        gap: 6px;
        max-width: 100%;
    }

    .mines-cell {
        font-size: clamp(20px, 7vw, 32px);
        border-width: 1.5px;
        border-radius: 8px;
    }

    .mines-presets {
        grid-template-columns: repeat(4, 1fr);
    }

    .mines-info-value {
        font-size: 14px;
    }
}
.admin-coins-mini-reset {
    background: rgba(102, 192, 244, 0.1);
    color: var(--steam);
    border-color: rgba(102, 192, 244, 0.4);
}

.admin-coins-mini-reset:hover {
    background: rgba(102, 192, 244, 0.25);
    transform: translateY(-1px);
}
/* ============================================
   КРАШ — СТИЛИ
   ============================================ */

/* ===== ГРАФИК ===== */
.crash-chart-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 460px;
    background: #0a0805;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .crash-chart-wrap {
    background: #fdfbf5;
    box-shadow: 0 20px 60px rgba(90, 70, 20, 0.15);
}

#crash-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ===== МНОЖИТЕЛЬ ПО ЦЕНТРУ ===== */
.crash-multiplier {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
}

.crash-multiplier-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    color: #f5e6c8;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
    line-height: 1;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

html[data-theme="light"] .crash-multiplier-value {
    color: #1a1408;
    text-shadow: 0 2px 20px rgba(255, 255, 255, 0.8);
}

.crash-multiplier-value.win {
    color: var(--green);
    text-shadow: 0 0 30px rgba(127, 176, 105, 0.6);
}

.crash-multiplier-value.lose {
    color: var(--red);
    text-shadow: 0 0 30px rgba(201, 74, 74, 0.6);
}

.crash-multiplier-status {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

/* ===== БЕЙДЖ РАУНДА ===== */
.crash-round-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 800;
    color: var(--accent);
    z-index: 5;
}

/* ===== ТАЙМЕР СТАРТА ===== */
.crash-start-timer {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: rgba(13, 11, 8, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.15);
    min-width: 240px;
    pointer-events: none;
    z-index: 5;
    animation: crashTimerPulse 2s ease-in-out infinite;
}

html[data-theme="light"] .crash-start-timer {
    background: rgba(255, 253, 245, 0.95);
    box-shadow: 0 8px 32px rgba(90, 70, 20, 0.15), 0 0 40px rgba(184, 134, 11, 0.15);
}

@keyframes crashTimerPulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.15);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 60px rgba(212, 175, 55, 0.35);
    }
}

.crash-start-timer-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.crash-start-timer-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.crash-start-timer-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    overflow: hidden;
    margin-top: 4px;
}

html[data-theme="light"] .crash-start-timer-bar {
    background: rgba(0, 0, 0, 0.08);
}

.crash-start-timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--accent), #f0c75e);
    border-radius: 100px;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 0.2s linear;
}

/* ===== КНОПКИ ДЕЙСТВИЙ ===== */
.crash-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.crash-actions .game-action-btn {
    flex: 1;
    min-width: 200px;
}

/* ===== ПАНЕЛЬ СТАВОК ===== */
.crash-bets-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
    animation: crashBetsIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes crashBetsIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.crash-bets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(212, 175, 55, 0.04);
    flex-wrap: wrap;
    gap: 12px;
}

.crash-bets-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text);
}

.crash-bets-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.crash-bets-total {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.crash-bets-total span {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
}

.crash-bets-list {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.crash-bets-list::-webkit-scrollbar {
    width: 8px;
}

.crash-bets-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.crash-bets-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-dim);
    font-style: italic;
    font-size: 14px;
}

/* ===== СТРОКА СТАВКИ ===== */
.crash-bet-item {
    display: grid;
    grid-template-columns: 36px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes crashBetItemIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.crash-bet-item:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.1);
}

.crash-bet-item.is-me {
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.06);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2);
}

.crash-bet-item.cashed {
    border-color: rgba(127, 176, 105, 0.5);
    background: rgba(127, 176, 105, 0.08);
}

.crash-bet-item.lost {
    border-color: rgba(201, 74, 74, 0.5);
    background: rgba(201, 74, 74, 0.08);
    opacity: 0.7;
}

.crash-bet-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
    flex-shrink: 0;
}

.crash-bet-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #0d0b08;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}

.crash-bet-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.crash-bet-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 14px;
    color: var(--accent);
    white-space: nowrap;
}

.crash-bet-status {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.crash-bet-status.waiting {
    color: var(--text-dim);
    font-style: italic;
    font-weight: 600;
}

.crash-bet-status.cashed {
    color: var(--green);
}

.crash-bet-status.lost {
    color: var(--red);
}

.crash-bet-status.flying {
    color: var(--accent);
}

/* ===== АДАПТИВ ===== */
@media (max-width: 600px) {
    .crash-start-timer {
        min-width: 200px;
        padding: 10px 18px;
    }

    .crash-start-timer-value {
        font-size: 26px;
    }

    .crash-actions .game-action-btn {
        width: 100%;
        min-width: 0;
    }

    .crash-bet-item {
        grid-template-columns: 32px 1fr auto;
        gap: 8px;
        padding: 8px 10px;
    }

    .crash-bet-item .crash-bet-status {
        grid-column: 2 / -1;
        text-align: left;
        font-size: 12px;
        min-width: 0;
    }

    .crash-bet-avatar,
    .crash-bet-avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .crash-bets-header {
        padding: 12px 14px;
    }

    .crash-bets-title {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .crash-multiplier-status {
        font-size: 11px;
        letter-spacing: 1px;
    }
}
/* ============================================
   БЛЭКДЖЕК — стили
   ============================================ */

.bj-screen {
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== СТОЛ ===== */
.bj-table {
    position: relative;
    padding: 32px 24px;
    background: radial-gradient(ellipse at center,
                rgba(20, 60, 30, 0.4) 0%,
                rgba(10, 30, 15, 0.7) 70%,
                rgba(5, 15, 8, 0.95) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 200px / 60px;
    margin-bottom: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                inset 0 0 80px rgba(0, 0, 0, 0.4);
    min-height: 400px;
}

html[data-theme="light"] .bj-table {
    background: radial-gradient(ellipse at center,
                rgba(180, 220, 190, 0.5) 0%,
                rgba(120, 170, 140, 0.6) 70%,
                rgba(80, 120, 90, 0.8) 100%);
}

/* ===== ДИЛЕР ===== */
.bj-dealer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.bj-seat-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(245, 230, 200, 0.85);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

html[data-theme="light"] .bj-seat-label {
    color: rgba(40, 60, 40, 0.9);
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.6);
}

.bj-total {
    padding: 3px 12px;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #d4af37;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

/* ===== РУКА ===== */
.bj-hand {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 130px;
    align-items: center;
}

.bj-card-wrap {
    width: 88px;
    height: 128px;
    flex-shrink: 0;
    animation: bjCardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

@keyframes bjCardIn {
    from {
        opacity: 0;
        transform: translateY(-40px) rotate(-15deg) scale(0.7);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0) scale(1);
    }
}

.bj-card-wrap playing-card {
    width: 100%;
    height: 100%;
    display: block;
}

/* рубашка, если Cardmeister не загрузился */
.bj-card-back {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background:
        repeating-linear-gradient(45deg,
            #2a0e0e 0px, #2a0e0e 8px,
            #3a1414 8px, #3a1414 16px);
    border: 2px solid rgba(212, 175, 55, 0.6);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

/* ===== РАЗДЕЛИТЕЛЬ ===== */
.bj-divider {
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(212, 175, 55, 0.4),
        transparent);
    margin: 16px 0;
}

/* ===== ИГРОК ===== */
.bj-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.bj-hands {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.bj-player-hand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bj-player-hand.bj-hand-active {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(212, 175, 55, 0.08);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    transform: translateY(-4px);
}

.bj-hand-info {
    display: flex;
    gap: 12px;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 800;
}

.bj-hand-total {
    color: #d4af37;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

.bj-hand-bet {
    color: rgba(245, 230, 200, 0.7);
}

.bj-hand-result {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.bj-result-win       { background: rgba(127, 176, 105, 0.2); color: #7fb069; border: 1px solid rgba(127, 176, 105, 0.5); }
.bj-result-lose      { background: rgba(201, 74, 74, 0.2);  color: #c94a4a; border: 1px solid rgba(201, 74, 74, 0.5); }
.bj-result-push      { background: rgba(168, 152, 120, 0.2); color: #a89878; border: 1px solid rgba(168, 152, 120, 0.5); }
.bj-result-blackjack { background: rgba(212, 175, 55, 0.2); color: #d4af37; border: 1px solid rgba(212, 175, 55, 0.5); }

/* ===== РЕЗУЛЬТАТ ===== */
.bj-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    animation: bjResultIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bj-result-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 40px;
    background: rgba(13, 11, 8, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.bj-result-win  { border-color: rgba(127, 176, 105, 0.6); box-shadow: 0 20px 60px rgba(127, 176, 105, 0.3); }
.bj-result-lose { border-color: rgba(201, 74, 74, 0.6);  box-shadow: 0 20px 60px rgba(201, 74, 74, 0.3); }
.bj-result-push { border-color: rgba(168, 152, 120, 0.6); }

.bj-result-icon { font-size: 48px; }
.bj-result-title {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.bj-result-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 800;
}
.bj-result-amount.positive { color: #7fb069; }
.bj-result-amount.negative { color: #c94a4a; }

@keyframes bjResultIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ===== КНОПКИ ДЕЙСТВИЙ ===== */
.bj-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.bj-btn {
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bj-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.bj-btn-hit {
    background: linear-gradient(135deg, rgba(102, 192, 244, 0.2), rgba(102, 192, 244, 0.1));
    color: #66c0f4;
    border-color: rgba(102, 192, 244, 0.5);
}
.bj-btn-hit:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(102, 192, 244, 0.35), rgba(102, 192, 244, 0.2));
    border-color: #66c0f4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 192, 244, 0.3);
}

.bj-btn-stand {
    background: linear-gradient(135deg, rgba(240, 71, 71, 0.2), rgba(240, 71, 71, 0.1));
    color: #f04747;
    border-color: rgba(240, 71, 71, 0.5);
}
.bj-btn-stand:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(240, 71, 71, 0.35), rgba(240, 71, 71, 0.2));
    border-color: #f04747;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 71, 71, 0.3);
}

.bj-btn-double {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.1));
    color: #d4af37;
    border-color: rgba(212, 175, 55, 0.5);
}
.bj-btn-double:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.35), rgba(212, 175, 55, 0.2));
    border-color: #d4af37;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.bj-btn-split {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(138, 43, 226, 0.1));
    color: #a86fe8;
    border-color: rgba(138, 43, 226, 0.5);
}
.bj-btn-split:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.35), rgba(138, 43, 226, 0.2));
    border-color: #a86fe8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3);
}

.bj-btn-insurance {
    background: linear-gradient(135deg, rgba(67, 181, 129, 0.2), rgba(67, 181, 129, 0.1));
    color: #43b581;
    border-color: rgba(67, 181, 129, 0.5);
}
.bj-btn-insurance:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(67, 181, 129, 0.35), rgba(67, 181, 129, 0.2));
    border-color: #43b581;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 181, 129, 0.3);
}

.bj-btn-ready {
    background: linear-gradient(135deg, rgba(67, 181, 129, 0.2), rgba(67, 181, 129, 0.1));
    color: #43b581;
    border-color: rgba(67, 181, 129, 0.5);
}
.bj-btn-ready.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.2));
    color: #d4af37;
    border-color: #d4af37;
}

.bj-start-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

/* ===== ОНЛАЙН: МЕСТА ===== */
.bj-table-online {
    border-radius: var(--radius);
    border: 2px solid rgba(212, 175, 55, 0.3);
    padding: 24px;
    min-height: auto;
}

.bj-seats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.bj-seat {
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius);
    padding: 14px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s;
}

html[data-theme="light"] .bj-seat {
    background: rgba(255, 255, 255, 0.5);
}

.bj-seat-empty {
    justify-content: center;
    align-items: center;
    opacity: 0.4;
    border-style: dashed;
}

.bj-seat-empty-icon {
    font-size: 32px;
    opacity: 0.6;
}

.bj-seat-me {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(212, 175, 55, 0.06);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.bj-seat-active {
    border-color: #d4af37;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    animation: bjSeatPulse 1.5s ease-in-out infinite;
}

@keyframes bjSeatPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.5); }
    50%      { box-shadow: 0 0 50px rgba(212, 175, 55, 0.8); }
}

.bj-seat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.bj-seat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.5);
    object-fit: cover;
    flex-shrink: 0;
}

.bj-seat-avatar-ph {
    background: linear-gradient(135deg, #d4af37, #f0c75e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    color: #0d0b08;
}

.bj-seat-name {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.bj-you {
    color: #d4af37;
    font-weight: 800;
    font-size: 11px;
}

.bj-ready-badge {
    color: #43b581;
    font-size: 16px;
    font-weight: 800;
}

.bj-seat-hands {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.bj-seat .bj-hand {
    min-height: 80px;
    gap: 4px;
}

.bj-seat .bj-card-wrap {
    width: 48px;
    height: 70px;
}

.bj-seat .bj-hand-info {
    font-size: 12px;
    gap: 8px;
}

.bj-seat-bet {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #d4af37;
    padding: 4px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
}

/* ===== СТАТУС ПОДКЛЮЧЕНИЯ ===== */
.bj-conn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    width: fit-content;
}

.bj-conn-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bj-conn-ok           { background: #43b581; box-shadow: 0 0 12px #43b581; }
.bj-conn-off          { background: #f04747; box-shadow: 0 0 12px #f04747; }
.bj-conn-connecting   { background: #faa61a; box-shadow: 0 0 12px #faa61a; animation: bjBlink 1s ease-in-out infinite; }

@keyframes bjBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

.bj-table-name {
    margin-left: auto;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.bj-table-name strong { color: #d4af37; }

/* ===== МОИ КНОПКИ (онлайн) ===== */
.bj-my-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
    .bj-seats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bj-table {
        padding: 20px 12px;
        border-radius: 40px;
        min-height: 320px;
    }

    .bj-card-wrap {
        width: 64px;
        height: 94px;
    }

    .bj-seat .bj-card-wrap {
        width: 40px;
        height: 58px;
    }

    .bj-hand { min-height: 100px; }

    .bj-actions,
    .bj-my-actions {
        flex-direction: column;
        width: 100%;
    }

    .bj-btn { width: 100%; justify-content: center; }

    .bj-result-box { padding: 18px 24px; }
    .bj-result-icon { font-size: 36px; }
    .bj-result-title { font-size: 18px; }
    .bj-result-amount { font-size: 22px; }

    .bj-seats {
        grid-template-columns: 1fr;
    }
}
/* ============================================
   ДОПОЛНЕНИЯ (фиксы и новые элементы)
   ============================================ */

/* Игровая рука в блэкджеке — индикация double */
.bj-hand-double {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    margin-left: 6px;
}

/* Активная рука (при split) */
.bj-hand-active {
    outline: 2px solid rgba(212, 175, 55, 0.4);
    outline-offset: 4px;
    border-radius: 8px;
}

/* Кнопка Split */
.bj-btn-split {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(138, 43, 226, 0.1));
    color: #a86fe8;
    border-color: rgba(138, 43, 226, 0.5);
}
.bj-btn-split:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.35), rgba(138, 43, 226, 0.2));
    border-color: #a86fe8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3);
}

/* Индикатор «ждём» на месте */
.bj-seat-waiting::after {
    content: '⏳';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 14px;
    opacity: 0.7;
}

/* Мобильная адаптация кнопок блэкджека */
@media (max-width: 480px) {
    .bj-btn {
        padding: 12px 14px;
        font-size: 12px;
    }
    .bj-hand-double {
        font-size: 9px;
    }
}

/* Кнопка Abandon в офлайне */
.bj-abandon-btn {
    padding: 8px 16px;
    background: rgba(201, 74, 74, 0.1);
    color: #c94a4a;
    border: 1px solid rgba(201, 74, 74, 0.4);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}
.bj-abandon-btn:hover {
    background: rgba(201, 74, 74, 0.25);
    border-color: #c94a4a;
}
/* ============================================
   ЛОББИ БЛЭКДЖЕКА
   ============================================ */

.bj-lobby-error {
    padding: 14px 20px;
    background: rgba(201, 74, 74, 0.1);
    border: 1px solid rgba(201, 74, 74, 0.4);
    border-radius: var(--radius);
    color: #c94a4a;
    font-weight: 700;
    margin-bottom: 20px;
    animation: cardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === СОЗДАНИЕ СТОЛА === */
.bj-lobby-create {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.bj-lobby-create::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.bj-lobby-create-header {
    margin-bottom: 16px;
}

.bj-lobby-create-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.bj-lobby-create-hint {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 600;
}

.bj-lobby-create-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.bj-lobby-create-form input {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s;
}

.bj-lobby-create-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.bj-lobby-create-form .game-action-btn {
    padding: 14px 28px;
    font-size: 14px;
    white-space: nowrap;
}

/* === СПИСОК СТОЛОВ === */
.bj-lobby-tables-wrap {
    margin-bottom: 24px;
}

.bj-lobby-tables-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

.bj-lobby-tables-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.bj-lobby-tables-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 24px;
    padding: 0 8px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.bj-lobby-refresh {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bj-lobby-refresh:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(180deg);
}

.bj-lobby-tables {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.bj-lobby-empty {
    grid-column: 1 / -1;
    padding: 40px 24px;
    text-align: center;
    color: var(--text-dim);
    font-style: italic;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.bj-lobby-card {
    position: relative;
    display: block;
    padding: 18px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    animation: cardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.bj-lobby-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.2);
}

.bj-lobby-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s;
}

.bj-lobby-card:hover::before {
    transform: scaleY(1);
}

.bj-lobby-card-full {
    opacity: 0.55;
    cursor: not-allowed;
}

.bj-lobby-card-full:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.bj-lobby-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.bj-lobby-card-name {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    word-break: break-word;
    flex: 1;
    min-width: 0;
}

.bj-lobby-card-phase {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}

.bj-lobby-phase-waiting {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent);
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.bj-lobby-phase-playing {
    background: rgba(67, 181, 129, 0.15);
    color: var(--green);
    border: 1px solid rgba(67, 181, 129, 0.3);
}
.bj-lobby-phase-finished {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.bj-lobby-card-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

.bj-lobby-card-players {
    color: var(--text-muted);
}

.bj-lobby-card-players strong {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
}

.bj-lobby-card-time {
    color: var(--text-dim);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
}

.bj-lobby-card-creator {
    font-size: 11px;
    color: var(--text-dim);
    font-style: italic;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bj-lobby-card-arrow {
    position: absolute;
    right: 16px;
    bottom: 14px;
    font-size: 20px;
    color: var(--accent);
    opacity: 0.6;
    transition: all 0.3s;
}

.bj-lobby-card:hover .bj-lobby-card-arrow {
    opacity: 1;
    transform: translateX(4px);
}

.bj-lobby-card-full-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 8px;
    background: rgba(201, 74, 74, 0.2);
    color: #c94a4a;
    border: 1px solid rgba(201, 74, 74, 0.4);
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .bj-lobby-create-form {
        flex-direction: column;
    }
    .bj-lobby-create-form .game-action-btn {
        width: 100%;
    }
    .bj-lobby-tables {
        grid-template-columns: 1fr;
    }
}
/* ============================================
   ЛОББИ: аватар создателя + кнопка удаления
   ============================================ */

/* === АВАТАР СОЗДАТЕЛЯ === */
.bj-lobby-card-creator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-dim);
    padding-top: 8px;
    border-top: 1px solid var(--border);
    overflow: hidden;
}

.bj-lobby-creator-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(212, 175, 55, 0.5);
    flex-shrink: 0;
}

.bj-lobby-creator-avatar-ph {
    background: linear-gradient(135deg, #d4af37, #f0c75e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 10px;
    color: #0d0b08;
}

.bj-lobby-creator-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.bj-lobby-creator-you {
    color: var(--accent);
    font-weight: 800;
}

/* === КНОПКА УДАЛЕНИЯ === */
.bj-lobby-card-top-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.bj-lobby-card-delete {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(201, 74, 74, 0.1);
    border: 1px solid rgba(201, 74, 74, 0.3);
    color: #c94a4a;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bj-lobby-card-delete:hover:not(:disabled) {
    background: rgba(201, 74, 74, 0.25);
    border-color: #c94a4a;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(201, 74, 74, 0.3);
}

.bj-lobby-card-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === МОЙ СТОЛ — подсветка === */
.bj-lobby-card-mine {
    border-color: rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.05),
        transparent 60%);
}

.bj-lobby-card-mine::before {
    transform: scaleY(1);
}

/* === ENTER-ЗОНА === */
.bj-lobby-card-enter {
    position: relative;
    min-height: 20px;
    margin-top: 6px;
}

/* === КНОПКА УДАЛЕНИЯ НА СТРАНИЦЕ СТОЛА === */
.bj-conn-delete {
    margin-left: auto;
    padding: 6px 12px;
    background: rgba(201, 74, 74, 0.1);
    border: 1px solid rgba(201, 74, 74, 0.4);
    border-radius: 100px;
    color: #c94a4a;
    font-size: 11px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bj-conn-delete:hover:not(:disabled) {
    background: rgba(201, 74, 74, 0.25);
    border-color: #c94a4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 74, 74, 0.3);
}

.bj-conn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* ============================================
   ЛОББИ: плавные анимации без дёрганья
   ============================================ */

/* Появление новой карточки — один раз */
.bj-lobby-card-enter-anim {
    animation: bjCardFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bjCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Плавное удаление */
.bj-lobby-card-removing {
    animation: bjCardFadeOut 0.3s ease forwards;
    pointer-events: none;
}

@keyframes bjCardFadeOut {
    to {
        opacity: 0;
        transform: scale(0.9);
        margin-bottom: -80px;
    }
}

/* Пульс счётчика игроков при изменении */
.bj-players-count.bj-pop {
    animation: bjCountPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bjCountPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); color: var(--green); }
    100% { transform: scale(1); }
}

/* Убираем старую анимацию cardIn с карточек в лобби,
   чтобы они не дёргались при пересборке */
.bj-lobby-card {
    animation: none !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.3s,
                box-shadow 0.3s,
                opacity 0.3s;
}
/* ============================================
   ЧАТ СТОЛА
   ============================================ */

.bj-online-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    margin-bottom: 24px;
    align-items: start;
}

@media (max-width: 1000px) {
    .bj-online-layout {
        grid-template-columns: 1fr;
    }
}

.bj-online-main {
    min-width: 0;
}

.bj-chat {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    height: 520px;
    position: sticky;
    top: 90px;
    transition: height 0.3s ease;
}

@media (max-width: 1000px) {
    .bj-chat {
        position: static;
        height: 380px;
    }
}

.bj-chat-collapsed {
    height: 48px !important;
}

.bj-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(212, 175, 55, 0.06);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.bj-chat-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
}

.bj-chat-toggle {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: inherit;
}

.bj-chat-toggle:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.bj-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.bj-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.bj-chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.bj-chat-empty {
    color: var(--text-dim);
    font-style: italic;
    font-size: 13px;
    text-align: center;
    padding: 40px 20px;
    line-height: 1.5;
}

.bj-chat-msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    animation: chatMsgIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bj-chat-msg-noanim {
    animation: none;
}

@keyframes chatMsgIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bj-chat-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(212, 175, 55, 0.5);
    object-fit: cover;
    flex-shrink: 0;
}

.bj-chat-avatar-ph {
    background: linear-gradient(135deg, #d4af37, #f0c75e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    color: #0d0b08;
}

.bj-chat-body {
    flex: 1;
    min-width: 0;
}

.bj-chat-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bj-chat-text {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text);
    word-wrap: break-word;
    word-break: break-word;
}

.bj-chat-msg-me .bj-chat-name {
    color: var(--steam);
}

.bj-chat-msg-me .bj-chat-text {
    color: var(--text-muted);
}

.bj-chat-form {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

html[data-theme="light"] .bj-chat-form {
    background: rgba(0, 0, 0, 0.02);
}

#bj-chat-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}

#bj-chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.bj-chat-send {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--gradient-accent);
    border: none;
    color: #0d0b08;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    font-family: inherit;
}

.bj-chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.bj-chat-send:active {
    transform: scale(0.95);
}

.bj-chat-collapsed .bj-chat-messages,
.bj-chat-collapsed .bj-chat-form {
    display: none;
}

@media (max-width: 600px) {
    .bj-chat {
        height: 320px;
    }

    .bj-chat-messages {
        padding: 10px;
    }

    .bj-chat-avatar {
        width: 22px;
        height: 22px;
    }

    .bj-chat-text {
        font-size: 12px;
    }
}
/* ===== ОБЩАЯ ЛЕНТА РУЛЕТКИ ===== */
#global-roulette-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

.global-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

html[data-theme="light"] .global-history-item {
    background: rgba(0, 0, 0, 0.02);
}

.global-history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
}

.global-history-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    object-fit: cover;
    flex-shrink: 0;
}

.global-history-avatar-ph {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: #0d0b08;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.global-history-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-history-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 800;
}

.global-history-amount.win { color: var(--green); }
.global-history-amount.lose { color: var(--red); }

.global-history-time {
    font-size: 11px;
    color: var(--text-dim);
    min-width: 35px;
    text-align: right;
}