* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --gold: #FFD700;
    --gold-light: #FFE94D;
    --accent: #FF6B35;
    --accent2: #FF3D71;
    --bg-dark: #0A0A0F;
    --bg-card: #13131A;
    --bg-card2: #1A1A25;
    --text: #FFFFFF;
    --text-muted: rgba(255,255,255,0.55);
    --border: rgba(255,255,255,0.08);
    --radius: 16px;
    --radius-sm: 10px;
}

html, body {
    min-height: 100vh;
    background: var(--bg-dark);
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 24px;
}

/* ── HEADER ── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 16px;
    background: linear-gradient(180deg, rgba(10,10,15,0.98) 0%, rgba(10,10,15,0.85) 100%);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-badge {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #000;
    font-weight: 900;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.header-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.online-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,255,100,0.1);
    border: 1px solid rgba(0,255,100,0.2);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #00FF64;
}

.pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00FF64;
    animation: pulse 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── HERO ── */
.hero {
    position: relative;
    padding: 32px 20px 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #0D0D18 0%, #12121F 50%, #0A0A14 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,215,0,0.12);
    border: 1px solid rgba(255,215,0,0.25);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 14px;
}

.hero-title {
    font-size: 34px;
    font-weight: 900;
    line-height: 1.15;
    background: linear-gradient(135deg, #FFFFFF 30%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.hero-sub {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-emoji {
    position: absolute;
    font-size: 24px;
    animation: floatAnim 4s ease-in-out infinite;
    opacity: 0.6;
}

.e1 { top: 15%; right: 15%; animation-delay: 0s; font-size: 28px; }
.e2 { top: 55%; right: 8%; animation-delay: 0.8s; }
.e3 { top: 30%; right: 30%; animation-delay: 1.6s; font-size: 20px; }
.e4 { top: 70%; right: 22%; animation-delay: 2.4s; font-size: 22px; }
.e5 { top: 10%; right: 40%; animation-delay: 3.2s; font-size: 18px; opacity: 0.4; }

@keyframes floatAnim {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(5deg); }
    66% { transform: translateY(4px) rotate(-3deg); }
}

/* ── STATS BAR ── */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 16px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 0;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: var(--border);
}

/* ── SECTION HEADER ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.section-badge {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,215,0,0.12);
    border: 1px solid rgba(255,215,0,0.2);
    color: var(--gold);
    padding: 4px 10px;
    border-radius: 20px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #FF3D71;
}

/* ── GAMES SECTION ── */
.games-section {
    padding: 24px 16px 8px;
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── GAME CARD ── */
.game-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 0.85;
    border: 1px solid var(--border);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    background: var(--bg-card);
}

.game-card:active {
    transform: scale(0.96);
}

.game-card.featured {
    grid-column: span 2;
    aspect-ratio: 2.2;
}

.card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

.game-card:hover .card-bg,
.game-card:active .card-bg {
    opacity: 0.5;
}

.football { background: radial-gradient(ellipse at top right, #1a4a00 0%, #0a1a00 100%); }
.aviator { background: radial-gradient(ellipse at top left, #001a4a 0%, #000a1a 100%); }
.luckyjet { background: radial-gradient(ellipse at bottom right, #1a001a 0%, #0a000f 100%); }
.mines { background: radial-gradient(ellipse at top, #1a0a00 0%, #0f0500 100%); }
.bombucks { background: radial-gradient(ellipse at center, #1a0000 0%, #0a0000 100%); }
.pirates { background: radial-gradient(ellipse at bottom left, #001a1a 0%, #000a0f 100%); }
.penalty { background: radial-gradient(ellipse at top, #0a1a0a 0%, #050f05 100%); }

.card-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,215,0,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.aviator-glow {
    background: linear-gradient(135deg, rgba(100,160,255,0.12) 0%, transparent 60%);
}

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 14px 12px;
}

.featured .card-content {
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.card-emoji {
    font-size: 36px;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}

.featured .card-emoji {
    font-size: 52px;
}

.card-info {
    flex: 1;
}

.card-name {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 4px;
}

.featured .card-name {
    font-size: 22px;
    margin-bottom: 6px;
}

.card-desc {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
}

.featured .card-desc {
    font-size: 13px;
}

.card-meta {
    display: flex;
    align-items: center;
}

.card-mult {
    font-size: 14px;
    font-weight: 900;
    color: var(--gold);
    background: rgba(255,215,0,0.12);
    border: 1px solid rgba(255,215,0,0.25);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
}

.featured .card-mult {
    font-size: 18px;
    padding: 5px 12px;
}

.card-hot {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B35, #FF3D71);
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
    z-index: 3;
    white-space: nowrap;
}

.card-hot.popular {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #000;
}

/* ── LIVE SECTION ── */
.live-section {
    padding: 20px 16px;
}

.live-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.live-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.live-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    font-weight: 700;
    color: #000;
}

.live-info {
    flex: 1;
}

.live-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.live-game {
    font-size: 11px;
    color: var(--text-muted);
}

.live-amount {
    font-size: 14px;
    font-weight: 800;
    color: #00FF64;
}

.live-amount.big {
    color: var(--gold);
    font-size: 15px;
}

/* ── BOTTOM CTA ── */
.bottom-cta {
    margin: 8px 16px 20px;
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(255,215,0,0.08) 0%, rgba(255,107,53,0.08) 100%);
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: var(--radius);
    text-align: center;
}

.cta-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 6px;
}

.cta-sub {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── FOOTER ── */
.footer {
    padding: 16px 20px 32px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-logo {
    font-size: 18px;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.footer-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-warn {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
}

/* ── MODAL ── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: var(--bg-card2);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 24px 20px 40px;
    border-top: 1px solid rgba(255,215,0,0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-emoji {
    font-size: 36px;
}

.modal-game-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.modal-close {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#modal-game-info {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 16px;
    border: 1px solid var(--border);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-play {
    display: block;
    padding: 16px;
    text-align: center;
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #000;
    font-size: 16px;
    font-weight: 800;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
}

.btn-play:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-cancel {
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
}

/* Scrollbar */
::-webkit-scrollbar { width: 0; }

/* Safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
}

/* === Balance pill on main page === */
.balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(255,215,0,0.18), rgba(255,140,0,0.18));
    border: 1px solid rgba(255,215,0,0.35);
    padding: 7px 14px;
    border-radius: 20px;
    font-weight: 800;
    color: #FFD700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.balance-pill:active { transform: scale(0.96); }

/* ─── Header right cluster ─── */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.balance-pill.stars {
    background: linear-gradient(135deg, rgba(255,215,0,0.18), rgba(255,140,0,0.18));
    border-color: rgba(255,215,0,0.35);
    color: #FFD700;
}

.cabinet-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.cabinet-btn:active { transform: scale(0.92); }
.cabinet-btn:hover { background: rgba(255,255,255,0.06); }

/* ─── Cabinet overlay ─── */
.cabinet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.cabinet-overlay.show { display: flex; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.cabinet {
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    background: linear-gradient(180deg, #14141C 0%, #0A0A0F 100%);
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    display: flex; flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.2,0.9,0.3,1);
    overflow: hidden;
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }

.cabinet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}
.cabinet-head h2 { font-size: 17px; font-weight: 800; }
.cab-close {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; font-size: 14px;
}

.cabinet-body {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.cab-loading { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* User card */
.cab-user {
    display: flex; align-items: center; gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.cab-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FF6B35);
    color: #000;
    font-weight: 900; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.cab-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cab-uname { font-weight: 800; font-size: 16px; }
.cab-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cab-id { font-family: monospace; color: var(--gold); }

/* Balance cards */
.cab-bal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.cab-bal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius);
    text-align: center;
}
.cab-bal.stars { border-color: rgba(255,215,0,0.3); background: linear-gradient(135deg, rgba(255,215,0,0.06), rgba(255,140,0,0.04)); }
.cab-bal-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.cab-bal-val { font-size: 24px; font-weight: 900; margin-top: 4px; }
.cab-bal.stars .cab-bal-val { color: #FFD700; }

/* Section title */
.cab-section-title {
    font-size: 13px; font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 18px 0 10px;
}

/* Topup grid */
.cab-topup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.cab-topup-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.15s;
    font-size: 14px;
}
.cab-topup-btn:hover {
    border-color: rgba(255,215,0,0.5);
    background: rgba(255,215,0,0.06);
}
.cab-topup-btn:active { transform: scale(0.95); }
.cab-topup-btn .stars-amt {
    font-size: 18px; color: #FFD700; font-weight: 900;
    display: block;
}
.cab-topup-btn .stars-lbl { font-size: 10px; color: var(--text-muted); }

.cab-topup-pay {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #000;
    border: 0;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
}
.cab-topup-pay:active { transform: scale(0.98); }
.cab-topup-pay:disabled { opacity: 0.5; cursor: wait; }

/* Transactions */
.cab-tx {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}
.cab-tx-icon { font-size: 18px; margin-right: 10px; }
.cab-tx-info { flex: 1; }
.cab-tx-title { font-weight: 700; font-size: 13px; }
.cab-tx-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.cab-tx-amt { font-weight: 900; color: #00FF64; font-size: 14px; }
.cab-empty { color: var(--text-muted); font-size: 13px; padding: 12px; text-align: center; }

.cab-toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: #00FF64; color: #000; padding: 12px 22px; border-radius: 24px;
    font-weight: 800; z-index: 2000; box-shadow: 0 10px 30px rgba(0,255,100,0.4);
    animation: slideUp 0.3s ease;
}
.cab-toast.err { background: #FF3D71; color: #fff; box-shadow: 0 10px 30px rgba(255,61,113,0.4); }

.cab-info-note {
    background: rgba(255,215,0,0.06);
    border: 1px solid rgba(255,215,0,0.18);
    color: var(--text-muted);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.5;
    margin-top: 14px;
}
.cab-info-note b { color: var(--gold); }

/* ─── Cabinet Banner (prominent on main) ─── */
.cabinet-banner {
    margin: 16px 16px 0;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(255,215,0,0.12) 0%, rgba(255,107,53,0.10) 100%);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.cabinet-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 50%, rgba(255,215,0,0.15), transparent 60%);
    pointer-events: none;
}
.cabinet-banner:active { transform: scale(0.98); }
.cab-banner-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FF6B35);
    color: #000;
    font-size: 24px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    z-index: 1;
}
.cab-banner-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cab-banner-info { flex: 1; z-index: 1; }
.cab-banner-title {
    font-size: 16px; font-weight: 800;
    color: var(--text);
}
.cab-banner-sub {
    display: flex; gap: 8px;
    margin-top: 6px;
}
.cab-chip {
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}
.cab-banner-arrow {
    font-size: 28px;
    color: var(--gold);
    font-weight: 300;
    z-index: 1;
}

/* ─── Quick Actions ─── */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 16px 0;
}
.qa-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 6px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
    font-family: inherit;
}
.qa-btn:active { transform: scale(0.95); }
.qa-btn.primary {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #000;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(255,215,0,0.25);
}
.qa-emoji { font-size: 22px; }
.qa-text {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

/* ─── Bottom Tab Bar ─── */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(10,10,15,0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 99;
}
.tab-item {
    flex: 1;
    background: none;
    border: 0;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.15s;
    font-family: inherit;
}
.tab-item:active { transform: scale(0.92); }
.tab-item.active { color: var(--gold); }
.tab-item.topup {
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,140,0,0.12));
    color: #FFD700;
}
.tab-icon { font-size: 20px; }
.tab-label { font-size: 10px; font-weight: 700; }

/* Дополнительное нижнее поле, чтобы контент не скрывался под таб-баром */
#app { padding-bottom: 96px !important; }

/* ═══ ПЕРЕКЛЮЧЕНИЕ СТРАНИЦ ═══ */
.page { display: none; }
.page.active { display: block; animation: pageIn 0.25s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.page-cabinet {
    padding: 16px 16px 24px;
}
.page-title-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
    padding: 6px 4px 4px;
}
.page-title {
    font-size: 22px; font-weight: 900;
}

/* Профиль */
.cab-user {
    display: flex; align-items: center; gap: 14px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,107,53,0.06));
    border: 1px solid rgba(255,215,0,0.25);
    border-radius: var(--radius);
    margin-bottom: 14px;
}
.cab-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FF6B35);
    color: #000; font-weight: 900; font-size: 26px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.cab-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cab-user-info { flex: 1; min-width: 0; }
.cab-uname { font-weight: 800; font-size: 17px; }
.cab-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; word-break: break-all; }
.cab-id { font-family: ui-monospace, monospace; color: var(--gold); }

/* Балансы */
.cab-bal-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin-bottom: 18px;
}
.cab-bal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px 14px;
    border-radius: var(--radius);
    text-align: center;
}
.cab-bal.stars {
    border-color: rgba(255,215,0,0.35);
    background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,140,0,0.05));
}
.cab-bal-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.cab-bal-val { font-size: 26px; font-weight: 900; margin-top: 6px; }
.cab-bal.stars .cab-bal-val { color: #FFD700; }

/* Карточка пополнения */
.cab-topup-card {
    background: linear-gradient(180deg, rgba(255,215,0,0.06), transparent);
    border: 1px solid rgba(255,215,0,0.25);
    padding: 18px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
}
.cab-topup-head { margin-bottom: 14px; }
.cab-topup-title { font-size: 18px; font-weight: 900; color: var(--gold); }
.cab-topup-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.cab-section-title {
    font-size: 12px; font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.8px;
    margin: 14px 0 8px;
}

.cab-topup-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin-bottom: 12px;
}
.cab-topup-btn {
    background: var(--bg-card2);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 14px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.cab-topup-btn:active { transform: scale(0.95); }
.cab-topup-btn.chosen {
    border-color: #FFD700;
    background: rgba(255,215,0,0.12);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.15);
}
.cab-topup-btn .stars-amt { font-size: 20px; color: #FFD700; font-weight: 900; }
.cab-topup-btn .stars-lbl { font-size: 10px; color: var(--text-muted); }

.cab-topup-pay {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #000;
    border: 0;
    border-radius: var(--radius-sm);
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(255,215,0,0.25);
}
.cab-topup-pay:active { transform: scale(0.98); }
.cab-topup-pay:disabled {
    opacity: 0.5; cursor: not-allowed;
    background: var(--bg-card2); color: var(--text-muted);
    box-shadow: none;
}

.cab-info-note {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.5;
    margin-top: 12px;
}
.cab-info-note b { color: var(--gold); }

/* Транзакции */
.cab-tx {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}
.cab-tx-icon { font-size: 20px; }
.cab-tx-info { flex: 1; }
.cab-tx-title { font-weight: 700; font-size: 13px; }
.cab-tx-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.cab-tx-amt { font-weight: 900; color: #00FF64; font-size: 14px; }

.cab-empty, .cab-loading {
    color: var(--text-muted); font-size: 13px;
    padding: 24px 16px; text-align: center;
    background: var(--bg-card); border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
}
.cab-error {
    color: var(--text-muted); font-size: 13px; line-height: 1.6;
    padding: 24px 16px; text-align: center;
    background: rgba(255,61,113,0.08); border: 1px solid rgba(255,61,113,0.25);
    border-radius: var(--radius);
}

.cab-toast {
    position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
    background: #00FF64; color: #000; padding: 12px 22px; border-radius: 24px;
    font-weight: 800; z-index: 2000; box-shadow: 0 10px 30px rgba(0,255,100,0.4);
}
.cab-toast.err { background: #FF3D71; color: #fff; box-shadow: 0 10px 30px rgba(255,61,113,0.4); }

.cab-warn {
    background: rgba(255,193,7,0.12);
    border: 1px solid rgba(255,193,7,0.4);
    color: #FFD700;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}
.cab-warn small { color: var(--text-muted); display: block; margin-top: 4px; }

/* ════════════════════════════════════════════════
   РЕФЕРАЛЬНАЯ СТРАНИЦА «ДРУЗЬЯ» — дизайн в стиле Manus
   ════════════════════════════════════════════════ */
.page-friends { padding: 0 16px 100px; }

.ref-hero {
    position: relative;
    margin: 0 -16px 18px;
    padding: 36px 24px 32px;
    overflow: hidden;
    border-radius: 0 0 32px 32px;
    text-align: center;
    color: #fff;
}
.ref-hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 20%, #FF6B35 0%, transparent 55%),
        radial-gradient(circle at 80% 30%, #FF3D71 0%, transparent 50%),
        linear-gradient(135deg, #6B2EFF 0%, #FF3D71 60%, #FFD700 100%);
    opacity: 0.95;
}
.ref-hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 30% 70%, rgba(255,255,255,0.15) 0%, transparent 30%),
        radial-gradient(circle at 70% 20%, rgba(255,255,255,0.12) 0%, transparent 25%);
}
.ref-hero-content { position: relative; z-index: 1; }
.ref-gift {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 12px;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.35));
    animation: refBounce 2.5s ease-in-out infinite;
}
@keyframes refBounce {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}
.ref-hero-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.ref-hero-sub {
    font-size: 15px;
    opacity: 0.95;
    font-weight: 600;
}
.ref-hero-sub b { color: #FFD700; font-weight: 900; font-size: 17px; }

/* Статистика */
.ref-stats {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 16px;
}
.ref-stat { flex: 1; text-align: center; }
.ref-stat-val {
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 4px;
}
.ref-stat.earned .ref-stat-val { color: #FFD700; }
.ref-stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.ref-stat-sep {
    width: 1px;
    height: 38px;
    background: var(--border);
    margin: 0 4px;
}

/* Карточка с кодом и ссылкой */
.ref-link-card {
    background: linear-gradient(160deg, #1A1A25 0%, #13131A 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
}
.ref-link-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 8px;
}
.ref-code-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ref-code {
    flex: 1;
    background: rgba(255,215,0,0.08);
    border: 1.5px dashed rgba(255,215,0,0.4);
    color: #FFD700;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 4px;
    text-align: center;
    padding: 14px 8px;
    border-radius: var(--radius-sm);
}
.ref-copy {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text);
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.ref-copy:active { transform: scale(0.92); background: rgba(255,255,255,0.12); }
.ref-copy.small { width: 44px; height: 44px; font-size: 18px; }

.ref-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ref-link-input {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: 'SF Mono', 'Menlo', monospace;
    overflow-x: auto;
}
.ref-link-input:focus { outline: 2px solid var(--accent); }

.ref-share-btn {
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF3D71 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255,61,113,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s;
}
.ref-share-btn:active { transform: scale(0.98); }
.ref-share-btn span:first-child { font-size: 20px; }

/* Как это работает */
.ref-how {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 18px;
}
.ref-how-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ref-how-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    color: var(--text-muted);
    font-size: 14px;
}
.ref-how-step b { color: #FFD700; }
.ref-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35, #FF3D71);
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Список друзей */
.ref-section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin: 18px 4px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ref-count-badge {
    background: linear-gradient(135deg, #FF6B35, #FF3D71);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.ref-friends-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ref-friend {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
}
.ref-friend-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6B2EFF, #FF3D71);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ref-friend-info { flex: 1; min-width: 0; }
.ref-friend-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ref-friend-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.ref-friend-bonus {
    font-size: 14px;
    font-weight: 800;
    color: #FFD700;
    flex-shrink: 0;
}

.ref-empty {
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.ref-empty-emoji { font-size: 44px; margin-bottom: 10px; opacity: 0.6; }
.ref-empty-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ref-empty-sub { font-size: 12px; color: var(--text-muted); }

/* ════════════════════════════════════════════════
   LANGUAGE TOGGLE BUTTON (header)
   ════════════════════════════════════════════════ */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.12s, background 0.12s;
}
.lang-toggle:active { transform: scale(0.92); background: rgba(255,255,255,0.12); }
.lang-toggle .lang-flag { font-size: 14px; line-height: 1; }
.lang-toggle .lang-code { letter-spacing: 0.4px; font-size: 11px; }
.header-right { gap: 6px; }
@media (max-width: 380px) {
    .lang-toggle { padding: 5px 8px; font-size: 11px; }
    .lang-toggle .lang-code { display: none; }
}

/* ════════════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════════════ */
.adm-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 12px;
    margin: 0 -16px 12px;
    padding-left: 16px;
    padding-right: 16px;
    scrollbar-width: none;
}
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab {
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.adm-tab.active {
    background: linear-gradient(135deg, #FFB300, #FF8F00);
    color: #000;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255,179,0,0.3);
}

.adm-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.adm-stat {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
}
.adm-stat.accent { background: linear-gradient(135deg, rgba(255,179,0,0.15), rgba(255,143,0,0.05)); border-color: rgba(255,179,0,0.3); }
.adm-stat-val { font-size: 20px; font-weight: 900; color: #fff; line-height: 1.1; }
.adm-stat-lbl { font-size: 10px; color: var(--text-dim); margin-top: 4px; line-height: 1.2; }

.adm-card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.adm-mini-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
}
.adm-mini-card.stars { background: linear-gradient(135deg, rgba(255,179,0,0.18), rgba(255,143,0,0.05)); border-color: rgba(255,179,0,0.4); }
.adm-mini-card.refs { background: linear-gradient(135deg, rgba(120,80,255,0.18), rgba(80,50,200,0.05)); border-color: rgba(120,80,255,0.4); }
.adm-mini-lbl { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.adm-mini-val { font-size: 22px; font-weight: 900; color: #fff; }

.adm-section { margin-top: 18px; }
.adm-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.adm-section-head h3 { font-size: 14px; font-weight: 800; color: #fff; margin: 0; }
.adm-link {
    background: none; border: none; color: #FFB300; font-size: 12px; font-weight: 700;
    cursor: pointer; padding: 4px 6px;
}

.adm-list { display: flex; flex-direction: column; gap: 6px; }
.adm-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.adm-row:active { background: rgba(255,255,255,0.07); }
.adm-row-av {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, #FFB300, #FF8F00);
    color: #000; font-weight: 900; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.adm-row-av.star { background: linear-gradient(135deg, #FFD700, #FFA000); }
.adm-row-av.bad { background: linear-gradient(135deg, #ff5252, #c62828); color: #fff; }
.adm-row-av.medal { background: rgba(255,255,255,0.08); color: #FFD700; font-size: 18px; }
.adm-row-info { flex: 1; min-width: 0; }
.adm-row-name { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-row-uname { color: var(--text-dim); font-weight: 500; font-size: 12px; }
.adm-row-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-pill {
    padding: 4px 10px; border-radius: 10px;
    font-size: 11px; font-weight: 800;
    background: rgba(255,255,255,0.08); color: var(--text);
    flex-shrink: 0;
}
.adm-pill.good { background: rgba(255,179,0,0.2); color: #FFB300; }
.adm-pill.bad { background: rgba(255,82,82,0.2); color: #ff8a80; }
.adm-empty {
    padding: 20px 14px; text-align: center; color: var(--text-dim);
    background: rgba(255,255,255,0.03); border: 1px dashed var(--border); border-radius: 12px;
    font-size: 13px;
}
.adm-counter { font-size: 11px; color: var(--text-dim); margin-bottom: 6px; padding: 0 4px; }

.adm-search-row { margin-bottom: 10px; }
.adm-search-row input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}
.adm-search-row input:focus { border-color: #FFB300; outline: none; }

.adm-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}
.adm-card-title { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.adm-card-sub { font-size: 12px; color: var(--text-dim); margin-bottom: 12px; line-height: 1.4; }
.adm-card textarea, #adm-dm-text {
    width: 100%; box-sizing: border-box;
    padding: 12px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-height: 90px;
    margin-bottom: 10px;
}
.adm-card textarea:focus, #adm-dm-text:focus { border-color: #FFB300; outline: none; }

.adm-btn {
    padding: 11px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.1s;
}
.adm-btn:active { transform: scale(0.96); }
.adm-btn.primary { background: linear-gradient(135deg, #FFB300, #FF8F00); color: #000; border: none; width: 100%; padding: 13px; font-size: 14px; }
.adm-btn.good { background: linear-gradient(135deg, #43a047, #2e7d32); color: #fff; border: none; }
.adm-btn.bad { background: linear-gradient(135deg, #e53935, #c62828); color: #fff; border: none; }
.adm-btn.ghost { background: transparent; }
.adm-btn.small { padding: 7px 12px; font-size: 12px; }
.adm-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-success {
    margin-top: 10px; padding: 12px; border-radius: 12px;
    background: rgba(67,160,71,0.15); border: 1px solid rgba(67,160,71,0.4);
    color: #b9f6ca; font-size: 13px;
}

/* User detail modal */
.adm-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: none;
    align-items: flex-end; justify-content: center;
}
.adm-modal.open { display: flex; }
.adm-modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(6px); }
.adm-modal-card {
    position: relative;
    background: #15151c;
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 20px 16px 80px;
    animation: admModalIn 0.25s ease;
}
@keyframes admModalIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
.adm-modal-close {
    position: sticky; top: 0; float: right;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    font-size: 22px; line-height: 1; cursor: pointer; z-index: 2;
}
.adm-user-head { display: flex; gap: 14px; margin-bottom: 16px; align-items: flex-start; }
.adm-user-av {
    width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #FFB300, #FF8F00);
    color: #000; font-weight: 900; font-size: 24px;
    display: flex; align-items: center; justify-content: center;
}
.adm-user-av.admin { background: linear-gradient(135deg, #FFD700, #FFA000); font-size: 28px; }
.adm-user-name { font-size: 18px; font-weight: 900; color: #fff; }
.adm-user-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.adm-meta-line { font-size: 12px; color: var(--text-dim); margin: 6px 0; }
.adm-meta-line code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; color: #FFB300; }

.adm-bal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.adm-bal {
    padding: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.adm-bal.stars { background: linear-gradient(135deg, rgba(255,179,0,0.15), rgba(255,143,0,0.04)); }
.adm-bal-lbl { font-size: 11px; color: var(--text-dim); margin-bottom: 3px; }
.adm-bal-val { font-size: 22px; font-weight: 900; color: #fff; }

.adm-tx {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    font-size: 12px;
}
.adm-tx-meta { color: var(--text-dim); font-size: 11px; flex: 1; text-align: right; }
.adm-tx-amt { font-weight: 800; color: #FFB300; min-width: 60px; text-align: right; }

/* Admin tab */
.tab-item.admin-only { color: #FFB300; }
.tab-item.admin-only.active .tab-icon { filter: drop-shadow(0 0 6px rgba(255,179,0,0.6)); }
