/* ─── Variables ─────────────────────────────────────────── */
:root {
    --gold:       #d4a851;
    --gold-light: #f0c97a;
    --purple:     #7c3aed;
    --purple-dim: #4c1d95;
    --bg:         #06060e;
    --bg2:        #0d0d1a;
    --surface:    rgba(255,255,255,0.04);
    --border:     rgba(212,168,81,0.15);
    --text:       #e8e0d0;
    --text-muted: rgba(232,224,208,0.5);
    --danger:     #ef4444;
    --success:    #22c55e;
    --radius:     16px;
    --nav-h:      70px;
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* ─── PRELOADER ─────────────────────────── */
#preloader {
    position: fixed; inset: 0;
    background: radial-gradient(ellipse at 50% 40%, #0d0520 0%, #07010f 60%, #000 100%);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; overflow: hidden;
    transition: opacity .6s ease, visibility .6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* Энергетические сферы фона */
.energy-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); animation: orbFloat 8s ease-in-out infinite; }
.orb-1 { width: 350px; height: 350px; background: rgba(124,58,237,.12); top: -15%; left: -15%; animation-delay: 0s; }
.orb-2 { width: 280px; height: 280px; background: rgba(212,168,81,.08); bottom: -10%; right: -10%; animation-delay: -3s; }
.orb-3 { width: 220px; height: 220px; background: rgba(124,58,237,.08); top: 35%; left: 55%; animation-delay: -6s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%  { transform: translate(25px,-35px) scale(1.1); }
    66%  { transform: translate(-20px, 25px) scale(0.9); }
}

#starsCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.preloader-inner {
    position: relative; z-index: 1;
    display: flex; flex-direction: column;
    align-items: center; gap: 20px;
}

/* ─── Кольца ─── */
.occult-wrap {
    position: relative;
    width: 260px; height: 260px;
    display: flex; align-items: center; justify-content: center;
}

.occult-ring { position: absolute; top: 50%; left: 50%; }
.occult-ring--outer { width: 260px; height: 260px; animation: rotCW 20s linear infinite; transform: translate(-50%,-50%); }
.occult-ring--mid   { width: 200px; height: 200px; animation: rotCCW 13s linear infinite; transform: translate(-50%,-50%); }
.occult-ring--inner { width: 130px; height: 130px; animation: rotCW 8s linear infinite, innerPulse 3s ease-in-out infinite; transform: translate(-50%,-50%); }
.occult-ring--mid polygon {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: drawSigil 3s ease-out forwards;
}
.occult-ring--mid polygon:nth-child(2) { animation-delay: .8s; }
@keyframes drawSigil {
    to { stroke-dashoffset: 0; }
}

@keyframes rotCW  { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes rotCCW { to { transform: translate(-50%,-50%) rotate(-360deg); } }
@keyframes innerPulse {
    0%,100% { opacity: 1; filter: none; }
    50%      { opacity: .7; filter: drop-shadow(0 0 8px rgba(212,168,81,.5)); }
}

/* Орбитальные частицы */
.orbital-canvas {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 130px; height: 130px;
    pointer-events: none;
}

/* ─── Глаз ─── */
.occult-eye-wrap {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    filter: drop-shadow(0 0 14px rgba(212,168,81,.45))
            drop-shadow(0 0 28px rgba(124,58,237,.35));
    animation: eyePulse 4s ease-in-out infinite;
}
@keyframes eyePulse {
    0%,100% {
        filter: drop-shadow(0 0 14px rgba(212,168,81,.45)) drop-shadow(0 0 28px rgba(124,58,237,.35));
        transform: translate(-50%,-50%) scale(1);
    }
    50% {
        filter: drop-shadow(0 0 22px rgba(212,168,81,.75)) drop-shadow(0 0 45px rgba(124,58,237,.55));
        transform: translate(-50%,-50%) scale(1.05);
    }
}
.eye-pupil { animation: pupilPulse 3s ease-in-out infinite; transform-origin: 65px 39px; }
@keyframes pupilPulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(.82); }
}

/* ─── Бренд с шиммером ─── */
.preloader-brand {
    font-family: 'Cinzel', serif;
    font-size: 28px; letter-spacing: .35em;
}
.brand-occul {
    background: linear-gradient(90deg, #b8893a 0%, #f5cc70 40%, #d4a851 60%, #b8893a 100%);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}
.brand-ton {
    background: linear-gradient(90deg, #5b21b6 0%, #a855f7 40%, #7c3aed 60%, #5b21b6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite reverse;
}
@keyframes shimmer { to { background-position: 200% center; } }

/* ─── Прогресс-бар ─── */
.arcane-bar-wrap { width: 220px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.arcane-status {
    font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
    color: rgba(212,168,81,.75); min-height: 16px; text-align: center;
}
.arcane-bar {
    width: 100%; height: 3px;
    background: rgba(212,168,81,.1); border-radius: 2px;
    position: relative; overflow: visible;
}
.arcane-fill {
    height: 100%; width: 0; border-radius: 2px;
    background: linear-gradient(90deg, #5b21b6, #7c3aed, #d4a851, #f5cc70);
    box-shadow: 0 0 10px rgba(212,168,81,.6), 0 0 20px rgba(124,58,237,.4);
    transition: width .65s cubic-bezier(.4,0,.2,1);
    position: relative;
}
.arcane-fill::after {
    content: '';
    position: absolute; right: -4px; top: -4px;
    width: 10px; height: 10px; border-radius: 50%;
    background: #f5cc70;
    box-shadow: 0 0 10px #d4a851, 0 0 20px rgba(212,168,81,.9);
    opacity: 0; transition: opacity .3s;
}
.arcane-fill.active::after { opacity: 1; }

.arcane-runes { display: flex; gap: 16px; }
.arcane-runes span {
    font-size: 14px; font-family: serif;
    color: rgba(212,168,81,.2);
    transition: color .4s, text-shadow .4s, transform .4s;
}
.arcane-runes span.lit {
    color: rgba(212,168,81,.95);
    text-shadow: 0 0 8px rgba(212,168,81,.9), 0 0 20px rgba(212,168,81,.5);
    transform: scale(1.25) translateY(-2px);
}


/* ─── App ────────────────────────────────────────────────── */
#app {
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
}

#appStars {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 0;
    width: 100%; height: 100%;
}
/* ─── Bottom Nav ─────────────────────────────────────────── */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(6,6,14,0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-btn {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 11px;
    font-family: 'Space Grotesk', sans-serif;
    padding: 8px 0;
    transition: color .2s;
}
.nav-btn.active { color: var(--gold); }
.nav-btn svg { stroke: currentColor; transition: stroke .2s; }

/* ─── Tabs ───────────────────────────────────────────────── */
.tab {
    position: absolute; inset: 0;
    padding-bottom: var(--nav-h);
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
    z-index: 1;
}
.tab.active { opacity: 1; pointer-events: all; }

.tab-scroll {
    height: 100%; overflow-y: auto;
    padding: 0 16px 16px;
    scrollbar-width: none;
}
.tab-scroll::-webkit-scrollbar { display: none; }

/* ─── Hero Header ────────────────────────────────────────── */
.hero-header {
    text-align: center;
    padding: 28px 0 16px;
}
.hero-header.small { padding: 20px 0 12px; }

.hero-title {
    text-transform: uppercase;
    font-size: 28px; letter-spacing: 4px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-shadow: none;
}
.hero-title.sm { font-size: 22px; }

.hero-sub { color: var(--text-muted); font-size: 13px; margin-top: 6px; letter-spacing: 2px; }

.profile-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-dim), var(--gold));
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-family: 'Cinzel', serif;
    
}

/* ─── Glass Card ─────────────────────────────────────────── */
.glass-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 12px;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}
.glass-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,168,81,.3), transparent);
}

.card-title {
    font-family: 'Cinzel', serif;
    font-size: 13px; letter-spacing: 2px;
    color: var(--gold); margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}

/* ─── Timer Card ─────────────────────────────────────────── */
.timer-card { display: flex; gap: 16px; align-items: center; }
.timer-section, .pool-section { flex: 1; text-align: center; }
.divider-v { width: 1px; background: var(--border); align-self: stretch; }

.timer-label, .pool-label {
    font-size: 11px; color: var(--text-muted);
    letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px;
}
.timer-display {
    font-family: 'Space Grotesk', monospace;
    font-size: 26px; font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 2px;
}
.timer-note { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

.pool-amount {
    font-size: 24px; font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.pool-currency { font-size: 12px; color: var(--text-muted); }

/* ─── Balance Card ───────────────────────────────────────── */
.balance-row { display: flex; align-items: center; justify-content: space-between; }
.balance-label { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 4px; }
.balance-amount { font-size: 22px; font-weight: 600; color: var(--gold-light); }
.balance-amount span { font-size: 14px; color: var(--text-muted); }
.balance-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ─── Deposit Form ───────────────────────────────────────── */
.deposit-form { display: flex; flex-direction: column; gap: 10px; }

.input-group {
    position: relative;
    display: flex; align-items: center;
}
.input-field {
    width: 100%; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 44px 12px 14px;
    color: var(--text); font-family: 'Space Grotesk', sans-serif;
    font-size: 16px; outline: none;
    transition: border-color .2s;
}
.input-field:focus { border-color: var(--gold); }
.input-field::placeholder { color: var(--text-muted); }
.input-suffix {
    position: absolute; right: 14px;
    font-size: 12px; color: var(--text-muted);
    pointer-events: none;
}

.deposit-presets {
    display: flex; gap: 8px;
}
.preset-btn {
    flex: 1; padding: 8px;
    background: rgba(212,168,81,0.08);
    border: 1px solid var(--border);
    border-radius: 8px; color: var(--gold);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px; cursor: pointer;
    transition: all .2s;
}
.preset-btn:active { background: rgba(212,168,81,0.2); transform: scale(.96); }

.distribution-info {
    font-size: 12px; color: var(--text-muted);
    background: rgba(124,58,237,0.08);
    border-radius: 8px; padding: 10px;
    display: none;
}
.distribution-info.show { display: block; }

/* ─── Live Badge ─────────────────────────────────────────── */
.live-badge {
    font-size: 9px; font-weight: 700; letter-spacing: 1px;
    background: var(--danger); color: white;
    border-radius: 4px; padding: 2px 5px;
    animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ─── Deposits List ──────────────────────────────────────── */
.deposits-list { display: flex; flex-direction: column; gap: 8px; }

.deposit-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
    animation: slideIn .3s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.deposit-pos {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-dim), var(--gold));
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.deposit-name { flex: 1; font-size: 13px; color: var(--text); }
.deposit-amount { font-size: 14px; font-weight: 600; color: var(--gold-light); }
.deposit-time { font-size: 10px; color: var(--text-muted); }

.active-deposit-item {
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(212,168,81,0.1);
    margin-bottom: 8px;
}
.dep-progress { margin-top: 6px; }
.dep-progress-bar {
    height: 4px; background: rgba(255,255,255,0.1);
    border-radius: 99px; overflow: hidden; margin-top: 4px;
}
.dep-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--gold));
    border-radius: 99px;
    transition: width .5s ease;
}

.loading-shimmer {
    height: 60px; border-radius: 10px;
    background: linear-gradient(90deg,
        rgba(255,255,255,.03) 25%,
        rgba(255,255,255,.06) 50%,
        rgba(255,255,255,.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ─── Referral ───────────────────────────────────────────── */
.ref-percent-badge {
    background: linear-gradient(135deg, rgba(212,168,81,.15), rgba(124,58,237,.15));
    border: 1px solid var(--border);
    border-radius: 99px; padding: 8px 18px;
    text-align: center; font-size: 14px; font-weight: 600;
    color: var(--gold); letter-spacing: 1px;
    margin-bottom: 16px;
}
.ref-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ref-stat { text-align: center; padding: 12px; background: rgba(255,255,255,.03); border-radius: 10px; }
.ref-stat-val { font-size: 22px; font-weight: 700; color: var(--gold-light); }
.ref-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.ref-link-box {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,.05); border-radius: 10px;
    padding: 12px; border: 1px solid var(--border);
}
.ref-link-text {
    flex: 1; font-size: 12px; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Stats Grid ─────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat-card { text-align: center; padding: 16px 10px; }
.stat-icon { font-size: 24px; margin-bottom: 6px; }
.stat-val { font-size: 18px; font-weight: 700; color: var(--gold-light); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    border: none; border-radius: 10px; cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600; letter-spacing: .5px;
    transition: all .2s; display: inline-flex;
    align-items: center; justify-content: center; gap: 6px;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(135deg, var(--purple), var(--gold));
    color: white; padding: 14px 20px; font-size: 14px;
}
.btn-outline {
    background: rgba(212,168,81,.08);
    border: 1px solid var(--border) !important;
    color: var(--gold); padding: 10px 16px; font-size: 13px;
}
.btn-outline.danger { color: var(--danger); border-color: rgba(239,68,68,.3) !important; }
.btn-sm { padding: 8px 12px !important; font-size: 12px !important; }
.btn-full { width: 100%; }

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }

/* ─── Modals ─────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(8px);
    display: flex; align-items: flex-end; justify-content: center;
    padding: 16px;
    animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
    width: 100%; max-width: 440px;
    animation: slideUp .3s cubic-bezier(.34,1.56,.64,1);
    position: relative;
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-title {
    font-family: 'Cinzel', serif; font-size: 16px;
    color: var(--gold); letter-spacing: 2px; margin-bottom: 12px;
}
.modal-text { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

.modal-memo {
    background: rgba(124,58,237,.15);
    border: 1px dashed var(--purple);
    border-radius: 8px; padding: 10px 14px;
    font-family: monospace; font-size: 14px;
    color: var(--text); margin-bottom: 8px;
    text-align: center; letter-spacing: 1px;
}
/* ─── Wallet Status ──────────────────────────────────────── */
.wallet-connected-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 10px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    word-break: break-all;
}

.wallet-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}

.wallet-dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
    display: inline-block;
    margin-right: 8px;
}

.wallet-address-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(34,197,94,0.06);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 10px;
    margin-bottom: 4px;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.85); }
}

.modal-wallet {
    background: rgba(255,255,255,.05);
    border-radius: 8px; padding: 10px 14px;
    font-size: 11px; color: var(--text-muted);
    word-break: break-all; margin-bottom: 14px;
}
.modal-note { font-size: 11px; color: var(--text-muted); margin-top: 8px; text-align: center; }

.modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,.08); border: none;
    color: var(--text-muted); cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
/* ─── Bonus ──────────────────────────────────────────────── */
.bonus-balance-line {
    font-size: 12px;
    color: #a78bfa;
    margin-top: 4px;
}
.bonus-balance-line b { color: #c4b5fd; }

.bonus-badge {
    font-size: 11px;
    color: #a78bfa;
    background: rgba(167,139,250,0.12);
    border: 1px solid rgba(167,139,250,0.25);
    border-radius: 6px;
    padding: 2px 6px;
    font-weight: 600;
}

.bonus-info-line {
    color: #a78bfa;
    background: rgba(167,139,250,0.08);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: 12px;
}
/* ─── Top-5 deposit highlight ───────────────────────────── */
.deposit-item--top {
    border-color: rgba(212,168,81,0.3);
    background: rgba(212,168,81,0.05);
}

.deposit-prize {
    font-size: 11px;
    color: var(--gold);
    margin-top: 3px;
}
.deposit-prize b { color: var(--gold-light); }

/* ─── Confetti Particles ─────────────────────────────────── */
@keyframes cf-fall {
    0%   { transform: translateY(0) translateX(0) rotate(var(--rot-start)); opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateY(110vh) translateX(var(--drift)) rotate(var(--rot-end)); opacity: 0; }
}

.cp {
    position: fixed;
    width: 8px; height: 8px;
    z-index: 9000;
    pointer-events: none;
    animation: cf-fall linear forwards;
    will-change: transform;
}
.cp-square { border-radius: 2px; }
.cp-circle { border-radius: 50%; }
.cp-strip  { width: 3px; height: 14px; border-radius: 2px; }

/* ─── Deposit Avatar ─────────────────────────────────────── */
.deposit-avatar-wrap {
    flex-shrink: 0;
    position: relative;
}

.deposit-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.deposit-avatar--letter {
    background: linear-gradient(135deg, var(--purple-dim), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: white;
}

/* ─── Levels ─────────────────────────────────────────────── */
.level-item {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    margin-bottom: 10px;
    transition: all .2s;
}
.level-active {
    border-color: rgba(212,168,81,0.4);
    background: rgba(212,168,81,0.06);
}
.level-done {
    border-color: rgba(34,197,94,0.2);
    background: rgba(34,197,94,0.03);
}
.level-locked { opacity: .5; }
.level-ready {
    border-color: rgba(124,58,237,0.4);
    background: rgba(124,58,237,0.06);
}
.level-header {
    display: flex; align-items: center; gap: 12px;
}
.level-badge { font-size: 22px; flex-shrink: 0; }
.level-name {
    font-size: 14px; font-weight: 600;
    color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.level-limit { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.level-current-badge {
    font-size: 10px; padding: 2px 7px;
    background: rgba(212,168,81,0.15);
    border: 1px solid rgba(212,168,81,0.3);
    border-radius: 99px; color: var(--gold);
    font-weight: 500;
}

/* Квесты */
.level-quests { margin-top: 12px; }
.lq-label {
    font-size: 11px; color: var(--text-muted);
    letter-spacing: 1px; margin-bottom: 8px;
}
.lq-item {
    margin-bottom: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}
.lq-item.done {
    border-color: rgba(34,197,94,0.3);
    background: rgba(34,197,94,0.06);
}
.lq-info {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-muted);
    margin-bottom: 5px;
}
.lq-check { color: var(--success); font-weight: 700; }
.lq-bar {
    height: 3px; background: rgba(255,255,255,0.08);
    border-radius: 99px; overflow: hidden;
}
.lq-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--gold));
    border-radius: 99px;
    transition: width .4s ease;
}
/* ─── Contest ────────────────────────────────────────────── */
.my-contest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.mc-stat {
    text-align: center;
    padding: 10px 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}
.mc-val {
    font-size: 18px; font-weight: 700;
    color: var(--gold-light);
}
.mc-label {
    font-size: 10px; color: var(--text-muted);
    margin-top: 3px;
}

.contest-list { display: flex; flex-direction: column; gap: 8px; }

.contest-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}
.contest-item--me {
    border-color: rgba(212,168,81,0.35);
    background: rgba(212,168,81,0.06);
}

.contest-rank {
    font-size: 18px; width: 28px;
    text-align: center; flex-shrink: 0;
}
.contest-info { flex: 1; min-width: 0; }
.contest-name {
    font-size: 13px; color: var(--text);
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.contest-sub {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
.contest-sum {
    font-size: 14px; font-weight: 600;
    color: var(--gold-light); white-space: nowrap;
}
.contest-me-badge {
    font-size: 9px; padding: 1px 6px;
    background: rgba(212,168,81,0.15);
    border: 1px solid rgba(212,168,81,0.3);
    border-radius: 99px; color: var(--gold);
}
.contest-prize {
    font-size: 11px;
    color: var(--gold);
    margin-top: 3px;
}
/* ─── Modal Deposit TON ──────────────────────────────────── */
.dep-ton-amount-wrap {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dep-ton-presets {
  display: flex;
  gap: 8px;
}

.dep-ton-presets .preset-btn {
  flex: 1;
  padding: 8px;
  background: rgba(212,168,81,0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--gold);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}
.dep-ton-presets .preset-btn:active,
.dep-ton-presets .preset-btn.active-preset {
  background: rgba(212,168,81,0.22);
  border-color: var(--gold);
  transform: scale(.96);
}

.dep-ton-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: .5px;
}

/* Убираем стрелки у number input */
#depositTonAmount::-webkit-outer-spin-button,
#depositTonAmount::-webkit-inner-spin-button { -webkit-appearance: none; }
#depositTonAmount[type=number] { -moz-appearance: textfield; }

/* ══════════════════════════════════════════════
   PREMIUM MAIN TAB
══════════════════════════════════════════════ */

/* ── Хедер ── */
.pm-header {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 22px 2px 18px;
}
.pm-header__left {
    display: flex; align-items: center; gap: 10px;
}
.pm-header__eye {
    filter: drop-shadow(0 0 6px rgba(212,168,81,.5));
}
.pm-header__title {
    font-family: 'Cinzel', serif;
    font-size: 17px; letter-spacing: 3px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    line-height: 1.2;
}
.pm-header__sub {
    font-size: 10px; letter-spacing: 2px;
    color: var(--text-muted); margin-top: 1px;
    text-transform: uppercase;
}
.pm-header__round {
    display: flex; align-items: center; gap: 5px;
    background: rgba(34,197,94,.07);
    border: 1px solid rgba(34,197,94,.18);
    border-radius: 99px; padding: 4px 10px;
    font-size: 10px; color: rgba(34,197,94,.8);
    letter-spacing: 1px;
}
.pm-header__round-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 5px #22c55e;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Универсальная карточка ── */
.pm-card {
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 10px;
    position: relative; overflow: hidden;
}
/* Тонкая золотая линия сверху */
.pm-card::before {
    content: '';
    position: absolute; top: 0; left: 20%; right: 20%; height: 1px;
    background: linear-gradient(90deg,
        transparent, rgba(212,168,81,.4), transparent);
}
/* Карточка с подсветкой */
.pm-card--glow {
    background: rgba(212,168,81,.04);
    border-color: rgba(212,168,81,.12);
    box-shadow: 0 0 30px rgba(212,168,81,.05),
                inset 0 1px 0 rgba(212,168,81,.08);
}
.pm-card--glow::before {
    left: 10%; right: 10%;
    background: linear-gradient(90deg,
        transparent, rgba(212,168,81,.6), rgba(124,58,237,.3), transparent);
}

.pm-card__grid2 {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.pm-card__grid2 > div {
    display: flex;
    flex-direction: column;
}

.pm-card__grid2 > div:last-child {
    align-items: flex-end; /* вместо text-align:right на родителе */
}
.pm-card__between {
    display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
}

/* ── Типографика ── */
.pm-label {
    font-size: 10px; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--text-muted);
    margin-bottom: 6px;
}
.pm-timer {
    font-family: 'Space Grotesk', monospace;
    font-size: 18px; font-weight: 700;
    color: var(--gold-light); letter-spacing: 2px;
    text-shadow: 0 0 16px rgba(212,168,81,.35);
}
.pm-hint {
    font-size: 10px; color: rgba(255,255,255,.25);
    margin-top: 3px; letter-spacing: .5px;
}
.pm-pool-val {
    font-size: 18px; 
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), #a855f7);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.pm-sep {
    width: 1px; align-self: stretch;
    background: linear-gradient(to bottom,
        transparent, rgba(212,168,81,.2), transparent);
}
.pm-balance {
    font-size: 22px; font-weight: 700;
    color: var(--gold-light);
    text-shadow: 0 0 20px rgba(212,168,81,.2);
}
.pm-balance em {
    font-size: 14px; font-style: normal;
    color: var(--text-muted);
}
.pm-balance-actions { display: flex; flex-direction: column; gap: 7px; }

/* ── Кнопки ── */
.pm-btn {
    padding: 8px 14px; border-radius: 9px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--text); font-size: 12px;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer; transition: all .2s;
    white-space: nowrap; letter-spacing: .3px;
}
.pm-btn:active { transform: scale(.95); background: rgba(255,255,255,.1); }
.pm-btn--red {
    background: rgba(239,68,68,.06);
    border-color: rgba(239,68,68,.15);
    color: #f87171;
}
.pm-btn--red:active { background: rgba(239,68,68,.14); }

/* ── Ввод суммы ── */
.pm-input-row {
    position: relative; margin-bottom: 10px;
}
.pm-input {
    width: 100%;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 13px 48px 13px 16px;
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px; outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.pm-input:focus {
    border-color: rgba(212,168,81,.45);
    box-shadow: 0 0 0 3px rgba(212,168,81,.07);
}
.pm-input::placeholder { color: rgba(255,255,255,.2); }
.pm-input::-webkit-outer-spin-button,
.pm-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pm-input[type=number] { -moz-appearance: textfield; }
.pm-input-cur {
    position: absolute; right: 16px; top: 50%;
    transform: translateY(-50%);
    font-size: 11px; color: var(--gold); opacity: .7;
    pointer-events: none; letter-spacing: 1px;
}

/* ── Пресеты ── */
.pm-presets {
    display: grid; grid-template-columns: repeat(4,1fr);
    gap: 7px; margin-bottom: 12px;
}
.pm-preset {
    padding: 8px 0;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 9px; color: var(--text-muted);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px; cursor: pointer; transition: all .2s;
}
.pm-preset:active,
.pm-preset.active-preset {
    background: rgba(212,168,81,.12);
    border-color: rgba(212,168,81,.3);
    color: var(--gold);
}

/* ── CTA кнопка ── */
.pm-cta {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg,
        rgba(76,29,149,.8), rgba(124,58,237,.9), rgba(212,168,81,.2));
    border: 1px solid rgba(212,168,81,.2);
    border-radius: 12px;
    color: rgba(255,255,255,.92);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px; font-weight: 600;
    letter-spacing: 1px; cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 20px rgba(124,58,237,.25);
    position: relative; overflow: hidden;
}
.pm-cta::after {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg,
        transparent, rgba(255,255,255,.07), transparent);
    transition: left .5s ease;
}
.pm-cta:hover::after { left: 150%; }
.pm-cta:active { transform: scale(.98); }
.pm-cta:disabled { opacity: .4; cursor: not-allowed; }
/* ══ OCCULT ACCENTS ══ */

/* Плавающие руны на фоне карточек */
.pm-card { isolation: isolate; }

.pm-card--glow::after {
    content: 'ᚨ  ᚱ  ᚲ  ᚾ  ᛟ  ᛗ  ᚦ  ᛏ';
    position: absolute;
    bottom: 8px; left: 0; right: 0;
    text-align: center;
    font-family: serif; font-size: 10px;
    letter-spacing: 8px;
    color: rgba(212,168,81,.12);
    pointer-events: none;
    z-index: 0;
}

/* Угловые руны на карточке таймера */
.pm-card--glow .pm-card-rune {
    position: absolute;
    font-family: serif; font-size: 11px;
    color: rgba(212,168,81,.22);
    pointer-events: none;
    line-height: 1;
}

/* Мистическая рамка CTA */
.pm-cta {
    /* Добавляем к существующим стилям */
    text-shadow: 0 0 20px rgba(212,168,81,.3);
}
.pm-label--rune {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px; /* явно фиксируем одинаковый отступ */
}
/* Декоративные руны рядом с лейблами */
.pm-label--rune::before {
    content: 'ᚨ ';
    color: rgba(212,168,81,.3);
    font-family: serif;
}
.pm-label--rune::after {
    content: ' ᚱ';
    color: rgba(124,58,237,.3);
    font-family: serif;
}

/* Звёздные точки между секциями */
.pm-divider {
    display: flex; align-items: center;
    gap: 8px; margin: 4px 0 12px;
    opacity: .35;
}
.pm-divider::before,
.pm-divider::after {
    content: '';
    flex: 1; height: 1px;
    background: linear-gradient(90deg,
        transparent, rgba(212,168,81,.4), transparent);
}
.pm-divider__glyph {
    font-family: serif; font-size: 11px;
    color: var(--gold); letter-spacing: 6px;
    white-space: nowrap;
}

/* Сигил на карточке ставки */
.pm-offering-sigil {
    position: absolute;
    top: 14px; right: 16px;
    font-family: serif; font-size: 28px;
    color: rgba(124,58,237,.1);
    pointer-events: none;
    line-height: 1;
    user-select: none;
}

/* Тонкая аура у таймера */
.pm-timer {
    /* дополняем существующий */
    position: relative;
    display: block;
}
.pm-timer::after {
    content: '';
    position: absolute; bottom: -3px;
    left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg,
        transparent, rgba(212,168,81,.3), transparent);
}

.pm-pool-val {
    position: relative;
    display: block;
}
.pm-pool-val::after {
    content: '';
    position: absolute; bottom: -3px;
    left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg,
        transparent, rgba(124,58,237,.5), transparent);
}
/* Пресеты — добавляем рунический символ */
.pm-preset::before {
    content: '◈ ';
    font-size: 9px;
    color: rgba(212,168,81,.3);
}

/* Звёздный орнамент в заголовке скрижали */
.pm-tablet-ornament {
    font-size: 10px;
    color: rgba(212,168,81,.35);
    letter-spacing: 4px;
    text-align: center;
    margin-bottom: 12px;
    font-family: serif;
}

/* Анимированная аура вокруг глаза в хедере */
.pm-header__eye {
    position: relative;
}
.pm-header__eye::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(212,168,81,.12) 0%, transparent 70%);
    animation: eyeAura 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes eyeAura {
    0%,100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.3); opacity: .4; }
}

/* ── Мистические частицы ── */
@keyframes mysticBurst {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 1;
    }
    60% {
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(-50% + var(--dx)),
            calc(-50% + var(--dy))
        ) scale(0.8);
        opacity: 0;
    }
}

@keyframes mysticSpark {
    0% {
        transform: translateX(0) translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(var(--drift)) translateY(-70vh) scale(0);
        opacity: 0;
    }
}

@keyframes mysticFlash {
    0%   { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
    50%  { transform: translate(-50%, -50%) scale(2.5); opacity: .6; }
    100% { transform: translate(-50%, -50%) scale(4);   opacity: 0; }
}
/* ══ PROFILE ══ */

.prof-hero {
    display: flex; flex-direction: row;
    align-items: center; gap: 6px;
    padding: 24px 0 20px;
    text-align: center;
}
.prof-hero__info {
    display: flex; flex-direction: column;
    gap: 4px;
}
.prof-avatar-wrap {
    position: relative;
    width: 80px; height: 80px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 4px;
}
.prof-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* ← это центрирует изображение внутри */
    display: block;
    border-radius: 50%;
}
.prof-avatar-ring {
    position: absolute; inset: 0;
    animation: spinCW 20s linear infinite;
    filter: drop-shadow(0 0 4px rgba(212,168,81,.3));
}
.prof-avatar-wrap .profile-avatar {
    position: relative; z-index: 1;
    width: 56px; height: 56px;
    font-size: 22px;
    box-shadow: 0 0 20px rgba(124,58,237,.3);
}

.prof-name {
    text-align: left;
    font-family: 'Cinzel', serif;
    font-size: 18px; letter-spacing: 3px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.prof-sub {
    text-align: left;
    font-size: 10px; letter-spacing: 3px;
    color: var(--text-muted); text-transform: uppercase;
}

/* ── Статы ── */
.prof-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.prof-stat-card {
    display: flex; flex-direction: column;
    align-items: center; text-align: center;
    padding: 16px 10px; gap: 4px;
    margin-bottom: 0; /* убираем дефолтный margin pm-card */
}
.prof-stat-icon {
    font-size: 20px; margin-bottom: 2px;
    filter: drop-shadow(0 0 4px rgba(212,168,81,.3));
}
.prof-stat-val {
    font-size: 18px; font-weight: 700;
    color: var(--gold-light);
    text-shadow: 0 0 12px rgba(212,168,81,.25);
    line-height: 1.1;
}
.prof-stat-label {
    font-size: 10px; color: var(--text-muted);
    letter-spacing: .5px; line-height: 1.3;
}
.prof-stat-cur {
    font-size: 9px; letter-spacing: 1px;
    color: rgba(212,168,81,.4);
    text-transform: uppercase;
}

/* ── Шапка ── */
.app-header {
    position: relative;
    padding: 14px 0 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Аватар в хедере */
.header-user__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, #f0c97a, #7c3aed);
    box-shadow: 0 0 10px rgba(212,168,81,0.7);
}

.header-user__avatar .prof-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}
/* ── Логотип ── */
.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: visible;
}

.header-logo__icon {
    position: relative;
    width: 52px;   /* было 44 */
    height: 52px;  /* было 44 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; /* ← важно */
}

.header-logo__title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    animation: revealText 1.4s ease forwards;
}

.header-logo__sub {
    display: block;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    animation: revealText 1.8s ease forwards;
    opacity: 0;
}

/* ── Звезда хаоса ── */
.star-ring-outer {
    transform-origin: 30px 30px;
    animation: rotateCW 10s linear infinite;
}

.star-ring-inner {
    transform-origin: 30px 30px;
    animation: rotateCCW 7s linear infinite;
}

.star-group {
    transform-box: fill-box;       /* ← ключевое */
    transform-origin: center;      /* ← центр самого элемента */
    animation: starPulse 3s ease-in-out infinite;
}

/* ── Таймер ── */
.header-round {
    text-align: right;
}

.header-round__label {
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.header-round__timer {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--gold);
    text-shadow: 0 0 12px rgba(212,168,81,0.5);
    letter-spacing: 0.06em;
}

/* ── Разделитель ── */
.header-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
}

.header-divider__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,168,81,0.3), transparent);
}

.header-divider__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(212,168,81,0.9);
    animation: dotPulse 2s ease-in-out infinite;
}

/* ── Анимации ── */
@keyframes rotateCW  { to { transform: rotate(360deg);  } }
@keyframes rotateCCW { to { transform: rotate(-360deg); } }

@keyframes starPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 4px rgba(212,168,81,0.7));
    }
    50% {
        transform: scale(1.12) rotate(22.5deg);
        filter: drop-shadow(0 0 16px rgba(212,168,81,1))
                drop-shadow(0 0 24px rgba(124,58,237,0.5));
    }
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.6); opacity: 0.5; }
}

@keyframes revealText {
    0%   { opacity: 0; letter-spacing: 0.35em; filter: blur(5px); }
    100% { opacity: 1; letter-spacing: 0.12em; filter: blur(0); }
}


@keyframes rotateCW  { to { transform: rotate(360deg);  } }
@keyframes rotateCCW { to { transform: rotate(-360deg); } }
@keyframes eyePulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(212,168,81,0.7)); }
    50%       { filter: drop-shadow(0 0 16px rgba(212,168,81,1)); }
}
/* Анимации */
@keyframes eyePulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(212,168,81,0.8)); }
    50%       { filter: drop-shadow(0 0 14px rgba(212,168,81,1)); }
}
@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.6); opacity: 0.5; }
}
/* ═══════════════════════════════════════════════
   JACKPOT OVERLAY — Occulton
═══════════════════════════════════════════════ */

#jkOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(2, 0, 12, 0);
  transition: background 0.6s ease;
}
#jkOverlay.jk-show {
  background: rgba(2, 0, 12, 0.97);
}
#jkOverlay.jk-active {
  display: flex;
}
/* Canvas частиц */
#jkCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.jk-iris-rim {
  fill: none;
  stroke: rgba(212,168,81,0.65);
  stroke-width: 1.8;
  animation: jkIrisRimGlow 1.8s ease-in-out 2s infinite;
}
@keyframes jkIrisRimGlow {
  0%, 100% { stroke: rgba(212,168,81,0.4); }
  50%       { stroke: rgba(212,168,81,1);
              filter: drop-shadow(0 0 6px #d4a851); }
}

/* Зрачок — вертикальная щель пульсирует */
.jk-pupil {
  fill: #000;
  transform-box: fill-box;        /* ← ключевое исправление */
  transform-origin: center;
  animation: jkPupilSlit 2s ease-in-out 2s infinite;
}
@keyframes jkPupilSlit {
  0%, 100% { transform: scaleX(1); }
  40%       { transform: scaleX(0.4); }
  60%       { transform: scaleX(1.2); }
}
/* Туман */
.jk-fog {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 60% at 50% 50%,
    rgba(80, 30, 120, 0.15) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
#jkOverlay.jk-show .jk-fog { opacity: 1; }

/* ── Контент ── */
.jk-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 20px 28px;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.55s ease 0.4s,
              transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
}
#jkOverlay.jk-show .jk-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#jkOverlay .jk-inner.jk-text-show {
  opacity: 1;
  transform: translateY(0);
}
/* ── SVG: треугольник ── */
.jk-symbol {
  height: 210px;
  overflow: visible; /* ← добавить */
}
#jkSvg {
  width: 100%;
  height: 100%;
  overflow: visible; /* ← добавить если нет */
}

/* Треугольники — рисуются (stroke-dashoffset) */
.jk-tri {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
}
.jk-tri-glow {
  stroke: rgba(212, 168, 81, 0.18);
  stroke-width: 8;
  animation: jkTriDraw 0.9s ease 0.3s forwards;
  filter: blur(3px);
}
.jk-tri-mid {
  stroke: rgba(212, 168, 81, 0.45);
  stroke-width: 2;
  animation: jkTriDraw 0.85s ease 0.35s forwards;
}
.jk-tri-main {
  stroke: #d4a851;
  stroke-width: 1.8;
  animation: jkTriDraw 0.8s ease 0.4s forwards,
             jkTriPulse 2.4s ease-in-out 1.5s infinite;
}
@keyframes jkTriDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes jkTriPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(212,168,81,0.4)); }
  50%       { filter: drop-shadow(0 0 14px rgba(212,168,81,0.9)); }
}

/* Точки в вершинах */
.jk-vertex {
  fill: #d4a851;
  opacity: 0;
  animation: jkFadeIn 0.3s ease 1.1s forwards;
}

/* Руны */
.jk-rune {
  fill: rgba(212, 168, 81, 0.55);
  font-size: 11px;
  font-family: serif;
  letter-spacing: 2px;
  opacity: 0;
  animation: jkFadeIn 0.5s ease 1.3s forwards,
             jkRuneFlicker 3s ease-in-out 2s infinite;
}
.jk-rune-l, .jk-rune-r {
  font-size: 14px;
  animation-delay: 1.4s, 2.1s;
}
@keyframes jkFadeIn  { to { opacity: 1; } }
@keyframes jkRuneFlicker {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}

/* ── Тряска экрана ── */
@keyframes jkShake {
  0%        { transform: translate(0,0)    rotate(0deg); }
  10%       { transform: translate(-7px,-5px) rotate(-0.6deg); }
  20%       { transform: translate(7px, 5px) rotate(0.6deg); }
  30%       { transform: translate(-6px, 3px) rotate(-0.4deg); }
  40%       { transform: translate(5px,-4px) rotate(0.4deg); }
  50%       { transform: translate(-5px, 5px) rotate(-0.5deg); }
  60%       { transform: translate(6px,-3px) rotate(0.5deg); }
  70%       { transform: translate(-4px, 4px) rotate(-0.3deg); }
  80%       { transform: translate(4px,-5px) rotate(0.3deg); }
  90%       { transform: translate(-2px, 2px) rotate(-0.1deg); }
  100%      { transform: translate(0,0)    rotate(0deg); }
}
.jk-shake {
  animation: jkShake 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ── Заголовок ── */
.jk-subtitle {
  color: rgba(212, 168, 81, 0.7);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.jk-subtitle.jk-text-show {
  opacity: 1;
  transform: translateY(0);
}

.jk-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 10px;
  margin: 0;
  background: linear-gradient(135deg, #a07020, #f0d070, #d4a851, #fff8e7, #d4a851);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: jkGoldShimmer 3s ease-in-out infinite;
}
.jk-title.jk-text-show {
  opacity: 1;
  transform: scale(1);
}
@keyframes jkGoldShimmer {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* ── Победители ── */
.jk-winners {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  max-width: 300px;
  min-height: 10px;
}

.jk-winner-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(212, 168, 81, 0.07);
  border: 1px solid rgba(212, 168, 81, 0.2);
  border-radius: 12px;
  padding: 9px 14px;
  opacity: 0;
  transform: translateX(-16px);
  animation: jkWinnerSlide 0.4s ease forwards;
}
@keyframes jkWinnerSlide {
  to { opacity: 1; transform: translateX(0); }
}

.jk-winner-emoji { font-size: 20px; min-width: 24px; }
.jk-winner-label {
  flex: 1;
  font-size: 12px;
  color: rgba(212, 168, 81, 0.7);
  letter-spacing: 1px;
}
.jk-winner-amount {
  font-size: 14px;
  font-weight: 700;
  color: #d4a851;
}

/* ── Кнопка ── */
.jk-btn {
  margin-top: 6px;
  padding: 12px 34px;
  background: linear-gradient(135deg, #c49640, #8a6020);
  border: 1px solid rgba(212,168,81,0.4);
  border-radius: 14px;
  color: #fff8e7;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.15s ease,
              filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 20px rgba(212,168,81,0.15);
}
.jk-btn.jk-btn-show { opacity: 1; }
.jk-btn:active {
  transform: scale(0.95);
  filter: brightness(0.9);
}
.jk-btn:hover {
  box-shadow: 0 0 30px rgba(212,168,81,0.35);
}
.jackpot-meter {
  margin: 10px 0;
  padding: 10px 14px;
  background: rgba(212,168,81,0.05);
  border: 1px solid rgba(212,168,81,0.15);
  border-radius: 12px;
  transition: border-color 0.4s ease;
}
.jm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(212,168,81,0.8);
  margin-bottom: 7px;
}
.jm-pct {
  font-weight: 700;
  color: #d4a851;
}
.jm-track {
  height: 5px;
  background: rgba(212,168,81,0.12);
  border-radius: 10px;
  overflow: hidden;
}
.jm-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #d4a851);
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.jm-hint {
  font-size: 10px;
  color: rgba(212,168,81,0.4);
  margin: 5px 0 0;
  letter-spacing: 0.5px;
}

/* Состояние WARN */
.jm-warn { border-color: rgba(212,168,81,0.35); }
.jm-warn .jm-fill {
  background: linear-gradient(90deg, #d4a851, #f0c040);
}

/* Состояние DANGER — пульс */
.jm-danger {
  border-color: rgba(220,80,50,0.5);
  animation: jmDangerPulse 1.2s ease-in-out infinite;
}
.jm-danger .jm-fill {
  background: linear-gradient(90deg, #d4a851, #ff6030);
}
.jm-danger .jm-pct { color: #ff8060; }
@keyframes jmDangerPulse {
  0%, 100% { box-shadow: 0 0 0   rgba(220,80,50,0); }
  50%       { box-shadow: 0 0 16px rgba(220,80,50,0.4); }
}
/* ─── Toast ──────────────────────────────────────────────── */
.toast {
    position: fixed; bottom: calc(var(--nav-h) + 16px);
    left: 50%; transform: translateX(-50%) translateY(20px);
    background: rgba(13,13,26,.95);
    border: 1px solid var(--border);
    border-radius: 99px; padding: 10px 20px;
    font-size: 13px; color: var(--text);
    opacity: 0; transition: all .3s; z-index: 300;
    white-space: nowrap;
    backdrop-filter: blur(12px);
}
/* Внешнее кольцо — медленное вращение */
.jk-sol-ring-wrap {
  transform-origin: 0 0;
  animation: jkSolRing 35s linear infinite;
}
.jk-sol-ring-wrap line {
  stroke: rgba(212,168,81,0.55);
  stroke-width: 1.5;
  stroke-linecap: round;
}
@keyframes jkSolRing {
  to { transform: rotate(360deg); }
}

/* Треугольник 1 — по часовой, 20s */
.jk-sol-tri1 {
  fill: none;
  stroke: #d4a851;
  stroke-width: 1.8;
  stroke-linejoin: round;
  transform-origin: 0 0;
  animation: jkSolTri1 20s linear infinite,
             jkSolTriGlow 3s ease-in-out 2s infinite;
}
@keyframes jkSolTri1 {
  to { transform: rotate(360deg); }
}

/* Треугольник 2 — против часовой, 15s (быстрее) */
.jk-sol-tri2 {
  fill: none;
  stroke: rgba(167,139,250,0.85);
  stroke-width: 1.8;
  stroke-linejoin: round;
  transform-origin: 0 0;
  animation: jkSolTri2 15s linear infinite,
             jkSolTriGlow 3s ease-in-out 2.5s infinite;
}
@keyframes jkSolTri2 {
  to { transform: rotate(-360deg); }
}
@keyframes jkSolTriGlow {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(212,168,81,0.3)); }
  50%       { filter: drop-shadow(0 0 10px rgba(212,168,81,0.8)); }
}

/* Ромб — пульсирует и немного вращается */
.jk-sol-diamond {
  fill: none;
  stroke: #d4a851;
  stroke-width: 1.5;
  transform-origin: 0 0;
  animation: jkSolDiamond 7s ease-in-out infinite;
}
@keyframes jkSolDiamond {
  0%   { transform: rotate(0deg)   scale(1);    opacity: 0.7; }
  25%  { transform: rotate(45deg)  scale(1.15); opacity: 1; }
  50%  { transform: rotate(90deg)  scale(1);    opacity: 0.7; }
  75%  { transform: rotate(135deg) scale(1.15); opacity: 1; }
  100% { transform: rotate(180deg) scale(1);    opacity: 0.7; }
}

/* Центральное свечение */
.jk-sol-glow {
  transform-origin: 0 0;
  animation: jkSolGlowPulse 2s ease-in-out 2s infinite;
}
@keyframes jkSolGlowPulse {
  0%, 100% { transform: scale(1);   opacity: 0.5; }
  50%       { transform: scale(1.4); opacity: 0.9; }
}

/* Центральная точка */
.jk-sol-dot {
  transform-origin: 0 0;
  animation: jkSolGlowPulse 2s ease-in-out 2s infinite;
}

.profit-info-line {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.profit-info-line b { color: var(--gold); }

.profit-next-tier {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    opacity: 0.75;
}

.activity-bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
    margin: 6px 0 2px;
}
.activity-bar__fill {
    height: 4px;                        /* ← явно, вместо 100% */
    border-radius: 2px;
    transition: width 0.6s ease;
    background: rgba(212,168,81,0.4);   /* ← дефолтный цвет */
}
.activity-bar--low  .activity-bar__fill { background: rgba(212,168,81,0.4); }
.activity-bar--warm .activity-bar__fill { background: var(--gold); }
.activity-bar--hot  .activity-bar__fill { background: linear-gradient(90deg, var(--gold), #f97316); }

.rune-bar {
    display: flex;
    gap: 4px;
    margin: 8px 0 4px;
    justify-content: space-between;
}
.rune-seg {
    flex: 1;
    text-align: center;
    font-size: 14px;
    padding: 3px 0;
    border-radius: 3px;
    color: rgba(212,168,81,0.15);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,168,81,0.08);
    transition: all 0.4s ease;
    user-select: none;
}
.rune-seg--on {
    color: var(--gold);
    background: rgba(212,168,81,0.12);
    border-color: rgba(212,168,81,0.4);
    text-shadow: 0 0 8px rgba(212,168,81,0.8), 0 0 20px rgba(212,168,81,0.4);
    box-shadow: 0 0 6px rgba(212,168,81,0.2);
}
/* Горячее состояние (18%+) */
.rune-bar--hot .rune-seg--on {
    color: #f97316;
    border-color: rgba(249,115,22,0.5);
    text-shadow: 0 0 8px rgba(249,115,22,0.9), 0 0 20px rgba(249,115,22,0.5);
    box-shadow: 0 0 8px rgba(249,115,22,0.3);
}

/* ─── TASKS ───────────────────────────────────────── */
.tasks-group        { margin-bottom: 20px; }
.tasks-group-title  { font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
                      color: var(--gold); opacity: .7; margin-bottom: 10px; padding: 0 2px; }

.task-card          { background: rgba(255,255,255,.04); border: 1px solid rgba(212,168,81,.12);
                      border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
                      transition: border-color .3s; }
.task-card--done    { opacity: .55; border-color: rgba(255,255,255,.06); }
.task-card-body     { margin-bottom: 10px; }
.task-title         { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px;
                      display: flex; align-items: center; gap: 8px; }
.task-desc          { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.task-card-footer   { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.task-reward-badge  { font-size: 12px; font-weight: 700; padding: 4px 10px;
                      border-radius: 20px; white-space: nowrap; }
.task-reward--real  { background: rgba(212,168,81,.15); color: var(--gold); }
.task-reward--bonus { background: rgba(124,58,237,.2); color: #c4b5fd; }

.task-daily-count   { font-size: 11px; background: rgba(212,168,81,.15);
                      color: var(--gold); padding: 2px 7px; border-radius: 10px; font-weight: 600; }

.btn-task           { font-size: 12px; padding: 6px 14px; border-radius: 8px;
                      border: none; cursor: pointer; font-weight: 600; transition: all .2s; }
.btn-task--claim    { background: linear-gradient(135deg,#7c3aed,#d4a851);
                      color: #fff; box-shadow: 0 0 12px rgba(124,58,237,.4); }
.btn-task--claim:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,58,237,.5); }
.btn-task--go       { background: rgba(212,168,81,.12); color: var(--gold);
                      border: 1px solid rgba(212,168,81,.3); }
.btn-task--go:hover { background: rgba(212,168,81,.2); }
.btn-task--done     { background: rgba(255,255,255,.06); color: var(--text-muted);
                      cursor: default; }
.tasks-loading      { text-align: center; color: var(--text-muted);
                      font-size: 13px; padding: 24px; }
 .task-channel-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; font-size: 12px; font-weight: 600;
    color: var(--gold); text-decoration: none;
    background: rgba(212,168,81,.1); border: 1px solid rgba(212,168,81,.25);
    padding: 4px 12px; border-radius: 20px;
    transition: background .2s;
}
.task-channel-link:hover { background: rgba(212,168,81,.2); }
.task-hint {
    margin-top: 8px; font-size: 12px;
    color: rgba(196,181,253,.8);
    background: rgba(124,58,237,.1); border-radius: 8px;
    padding: 6px 10px;
}
.task-symbol-row {
    display: flex; align-items: center; gap: 10px;
    margin-top: 10px;
}
.task-symbol-preview {
    font-size: 22px; line-height: 1;
    filter: drop-shadow(0 0 6px rgba(212,168,81,.6));
}
.task-symbol-copy {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    color: var(--gold); background: rgba(212,168,81,.1);
    border: 1px solid rgba(212,168,81,.3); border-radius: 20px;
    padding: 5px 12px; transition: all .2s;
}
.task-symbol-copy:hover      { background: rgba(212,168,81,.2); }
.task-symbol-copy--ok        { color: #86efac; border-color: rgba(134,239,172,.4);
                                background: rgba(134,239,172,.08); }
                                
/* ── Roulette ── */
/* ════════════════════════════════════════════════════════════
   OCCULTON — ROULETTE MODULE
   ════════════════════════════════════════════════════════════ */

/* ── Заголовок таба ───────────────────────────────────────── */
.rl-tab-header {
  text-align: center;
  padding: 20px 16px 8px;
}
.rl-tab-runes {
  font-size: 13px;
  letter-spacing: .35em;
  color: rgba(212,168,81,.3);
  margin-bottom: 6px;
}
.rl-tab-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .06em;
  background: linear-gradient(135deg, #d4a851 0%, #f0c97a 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 4px;
}
.rl-tab-sub {
  font-size: 12px;
  color: rgba(255,255,255,.28);
  letter-spacing: .04em;
  margin: 0 0 16px;
}

/* ── Карточки столов ──────────────────────────────────────── */
.rl-card {
  background: linear-gradient(145deg, #13112a 0%, #0e0c1e 100%);
  border: 1px solid rgba(212,168,81,.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, transform .15s;
}
.rl-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(124,58,237,.1) 0%, transparent 60%);
  pointer-events: none;
}
.rl-card:active { transform: scale(.985); }
.rl-card--seated { border-color: rgba(212,168,81,.55); }
.rl-card--seated::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4a851, transparent);
}

.rl-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.rl-card-name {
  font-size: 15px;
  font-weight: 800;
  color: #f0e8d0;
  letter-spacing: .02em;
}
.rl-card-rune {
  font-size: 11px;
  color: rgba(212,168,81,.4);
  letter-spacing: .1em;
  margin-top: 1px;
}
.rl-card-price {
  background: linear-gradient(135deg, rgba(212,168,81,.15), rgba(212,168,81,.08));
  border: 1px solid rgba(212,168,81,.3);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 800;
  color: #d4a851;
  white-space: nowrap;
}

.rl-card-stats {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.rl-card-stat {
  flex: 1;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 7px;
  padding: 5px 8px;
  text-align: center;
}
.rl-card-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
}
.rl-card-stat-label {
  font-size: 9px;
  color: rgba(255,255,255,.3);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 1px;
}

.rl-seats-track {
  display: flex;
  gap: 5px;
  margin-bottom: 11px;
  align-items: center;
}
.rl-seat-dot {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.08);
  transition: background .3s;
}
.rl-seat-dot--taken { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.rl-seat-dot--mine  { background: linear-gradient(90deg, #d4a851, #f0c97a); }

.rl-join-btn {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #4a1d96, #7c3aed);
  border: 1px solid rgba(167,139,250,.35);
  border-radius: 10px;
  color: #f0e8d0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  position: relative;
  overflow: hidden;
}
.rl-join-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  transition: left .5s;
}
.rl-join-btn:not(:disabled):hover::before { left: 100%; }
.rl-join-btn:not(:disabled):active { transform: scale(.97); }
.rl-join-btn:disabled {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.06);
  color: rgba(255,255,255,.3);
  cursor: default;
}

/* ── Шапка экрана игры ────────────────────────────────────── */
.rl-game-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 0px 6px;
  gap: 8px;
}
.rl-back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  color: rgba(255,255,255,.6);
  font-size: 12px;
  padding: 7px 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
.rl-back-btn:active { background: rgba(255,255,255,.1); }
.rl-game-title {
  font-size: 15px;
  font-weight: 800;
  color: #d4a851;
  letter-spacing: .04em;
  text-align: center;
  flex: 1;
}
.rl-game-bet-badge {
  background: rgba(212,168,81,.1);
  border: 1px solid rgba(212,168,81,.25);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  color: #d4a851;
  white-space: nowrap;
}

/* ── Статус ────────────────────────────────────────────────── */
.rl-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 4px;
  padding: 8px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 9px;
  width: calc(100% - 0px);
  box-sizing: border-box;
}
.rl-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rl-status-dot--waiting  { background: #d4a851; animation: rlBlink 1.4s ease-in-out infinite; }
.rl-status-dot--spinning { background: #a78bfa; animation: rlBlink .5s ease-in-out infinite; }
.rl-status-dot--done     { background: #40c870; }
@keyframes rlBlink { 0%,100%{opacity:1} 50%{opacity:.15} }
.rl-status-text { font-size: 12px; color: rgba(255,255,255,.45); }
.rl-status-text b { color: rgba(255,255,255,.8); }

/* ── Сцена стола ────────────────────────────────────────────── */
.rl-scene {
  position: relative;
  width: 300px;          /* ← фиксированный размер вместо 100% */
  height: 300px;         /* ← явная высота */
  max-width: 300px;
  margin: 4px auto;
  flex-shrink: 0;        /* ← не сжимается во flex */
}
.rl-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.rl-wheel-canvas {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 10;
  width: 110px;          /* ← визуальный размер */
  height: 110px;
  filter: drop-shadow(0 0 18px rgba(124,58,237,.5));
}

/* ── Места игроков ──────────────────────────────────────────── */
.rl-seat {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.rl-seat-orb {
  width: 40px;           /* ← было 46px, уменьшаем */
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.1);
  background: rgba(14,12,28,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color .3s, box-shadow .3s;
}
/* Пустое место — пульсирующий контур */
.rl-seat:not(.rl-seat--occ) .rl-seat-orb {
  border: 2px dashed rgba(124,58,237,.3);
  background: rgba(124,58,237,.04);
  animation: rlOrbIdle 3s ease-in-out infinite;
}
@keyframes rlOrbIdle {
  0%,100% { border-color: rgba(124,58,237,.3); }
  50%      { border-color: rgba(124,58,237,.6); }
}
.rl-seat-plus {
  font-size: 20px;
  color: rgba(124,58,237,.4);
  font-weight: 200;
  line-height: 1;
}
/* Занято */
.rl-seat--occ .rl-seat-orb {
  border-color: rgba(167,139,250,.45);
  box-shadow: 0 0 0 2px rgba(124,58,237,.12), 0 0 12px rgba(124,58,237,.2);
}
/* Ты */
.rl-seat--me .rl-seat-orb {
  border-color: #d4a851 !important;
  box-shadow: 0 0 0 2px rgba(212,168,81,.2), 0 0 16px rgba(212,168,81,.35) !important;
}
/* Лузер */
.rl-seat--loser .rl-seat-orb {
  border-color: #e04444 !important;
  box-shadow: 0 0 0 3px rgba(224,68,68,.25), 0 0 20px rgba(224,68,68,.45) !important;
  animation: rlLoseShake .4s ease 4 !important;
}
@keyframes rlLoseShake {
  0%,100%{transform:translate(0,0) scale(1)}
  25%{transform:translate(-3px,0) scale(1.05)}
  75%{transform:translate(3px,0) scale(1.05)}
}
/* Победитель */
.rl-seat--winner .rl-seat-orb {
  border-color: #d4a851 !important;
  box-shadow: 0 0 0 3px rgba(212,168,81,.2), 0 0 20px rgba(212,168,81,.5) !important;
  animation: rlWinPulse .8s ease 3 !important;
}
@keyframes rlWinPulse {
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.08)}
}
.rl-seat-orb img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.rl-seat-initial {
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #d4a851);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rl-seat-name {
  font-size: 8px;        /* ← чуть меньше */
  max-width: 44px;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: .03em;
}
.rl-seat--me .rl-seat-name { color: rgba(212,168,81,.8); }

/* ── Легенда ────────────────────────────────────────────────── */
.rl-legend {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  margin-bottom: 12px;
}
.rl-legend-item {
  font-size: 11px;
  letter-spacing: .03em;
  color: rgba(255,255,255,.3);
}
.rl-legend--me  { color: rgba(212,168,81,.7); }
.rl-legend--occ { color: rgba(167,139,250,.6); }
.rl-legend--free{ color: rgba(255,255,255,.25); }

/* ── Result overlay ────────────────────────────────────────── */
.rl-result-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(4,4,14,.88);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.rl-result-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.rl-result-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 320px;
  background: linear-gradient(165deg, #17113a 0%, #0e0c1e 100%);
  border-radius: 22px;
  padding: 28px 22px 24px;
  text-align: center;
  animation: rlCardPop .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes rlCardPop {
  from{transform:scale(.7) translateY(30px);opacity:0}
  to{transform:scale(1) translateY(0);opacity:1}
}
.rl-result-card--win  {
  border: 1.5px solid rgba(212,168,81,.5);
  box-shadow: 0 0 0 6px rgba(212,168,81,.07), 0 24px 60px rgba(0,0,0,.7);
}
.rl-result-card--lose {
  border: 1.5px solid rgba(224,68,68,.4);
  box-shadow: 0 0 0 6px rgba(224,68,68,.06), 0 24px 60px rgba(0,0,0,.7);
}
.rl-result-runes {
  font-size: 12px;
  letter-spacing: .3em;
  margin-bottom: 10px;
  opacity: .5;
  min-height: 18px;
}
.rl-result-card--win  .rl-result-runes { color: #d4a851; }
.rl-result-card--lose .rl-result-runes { color: #e04444; }

.rl-result-emoji {
  font-size: 62px;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 20px currentColor);
}
.rl-result-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .05em;
  margin-bottom: 12px;
}
.rl-result-card--win  .rl-result-title { color: #d4a851; }
.rl-result-card--lose .rl-result-title { color: #e06060; }

.rl-result-amount {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 6px;
}
.rl-result-card--win  .rl-result-amount { color: #f0c97a; text-shadow: 0 0 24px rgba(212,168,81,.5); }
.rl-result-card--lose .rl-result-amount { color: #e04444; text-shadow: 0 0 20px rgba(224,68,68,.4); }

.rl-result-sub {
  font-size: 13px;
  color: rgba(255,255,255,.38);
  margin-bottom: 22px;
  line-height: 1.5;
}
.rl-result-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.rl-result-card--win  .rl-result-btn {
  background: linear-gradient(135deg, #b08020, #d4a851, #f0c97a);
  color: #1a0f00;
}
.rl-result-card--lose .rl-result-btn {
  background: linear-gradient(135deg, #4a1d96, #7c3aed);
  color: #f0e8d0;
  border: 1px solid rgba(167,139,250,.3);
}
.rl-result-btn:active { transform: scale(.96); }

/* ── Confetti keyframe ─────────────────────────────────────── */
@keyframes rlFall {
  0%  { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
  100%{ transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── Roulette Result (Jackpot style) ─────────────────────────── */
/* ── Roulette Result overlay — цветовые темы ──────────────── */
/* Базовые стили (дублируем от #jkOverlay) */
#rlResultOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
    justify-content: center;
  align-items: center;
  flex-direction: column;
  background: rgba(4, 3, 14, 0);
  transition: background .6s ease;
  overflow: hidden;
}

#rlResultCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* Активен — показываем */
#rlResultOverlay.jk-active {
  display: flex;
}

#rlResultOverlay.jk-show .jk-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#rlResultOverlay .jk-inner.jk-text-show {
  opacity: 1;
  transform: translateY(0);
}

/* Затемнение фона (такое же как у джекпота) */
#rlResultOverlay.jk-show {
  background: rgba(4, 3, 14, .93);
}

/* Туман — тот же что в джекпоте */
#rlResultOverlay .jk-fog {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(109, 40, 217, .18) 0%,
    transparent 65%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease .3s;
}
#rlResultOverlay.jk-show .jk-fog {
  opacity: 1;
}

/* SVG — начальное состояние скрыто */
#rlResultOverlay #rlResultSvg {
  opacity: 0;
  transform: scale(.5) rotate(-20deg);
  transition: opacity .5s ease .2s, transform .6s cubic-bezier(.34,1.56,.64,1) .2s;
  display: block;
  width: 100%;
  height: 100%;
}

#rlResultOverlay.jk-show #rlResultSvg {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Subtitle и Title — начальное состояние */
#rlResultOverlay .jk-subtitle,
#rlResultOverlay .jk-title {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s, transform .4s;
}
#rlResultOverlay .jk-subtitle.jk-text-show,
#rlResultOverlay .jk-title.jk-text-show {
  opacity: 1;
  transform: translateY(0);
}

/* Кнопка — начальное состояние */
#rlResultOverlay .jk-btn {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .35s, transform .35s;
}
#rlResultOverlay .jk-btn.jk-btn-show {
  opacity: 1;
  transform: translateY(0);
}

/* Победа — золото */
#rlResultOverlay.rl-result--win .jk-tri-main {
  stroke: #d4a851;
}
#rlResultOverlay.rl-result--win .jk-tri-glow {
  stroke: rgba(212,168,81,.3);
  filter: drop-shadow(0 0 14px rgba(212,168,81,.7));
}
#rlResultOverlay.rl-result--win .jk-title {
  color: #f0c97a;
  text-shadow: 0 0 30px rgba(212,168,81,.6);
}
#rlResultOverlay.rl-result--win .jk-btn {
  background: linear-gradient(135deg, #b08020, #d4a851, #f0c97a);
  color: #1a0f00;
}

/* Поражение — фиолет */
#rlResultOverlay.rl-result--lose .jk-tri-main {
  stroke: #7c3aed;
}
#rlResultOverlay.rl-result--lose .jk-tri-glow {
  stroke: rgba(124,58,237,.3);
  filter: drop-shadow(0 0 14px rgba(124,58,237,.7));
}
#rlResultOverlay.rl-result--lose .jk-vertex {
  fill: #a78bfa;
}
#rlResultOverlay.rl-result--lose .jk-title {
  color: #c4b5fd;
  text-shadow: 0 0 30px rgba(124,58,237,.6);
}
#rlResultOverlay.rl-result--lose .jk-btn {
  background: linear-gradient(135deg, #4a1d96, #7c3aed);
  color: #f0e8d0;
  border: 1px solid rgba(167,139,250,.3);
}
#rlResultOverlay.rl-result--lose #rlSvgGlow {
  fill: rgba(124,58,237,.7);
}
#rlResultOverlay.rl-result--lose #rlSvgDot {
  fill: #a78bfa;
}

/* Карточки результата */
.rl-result-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 10px 14px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity .35s, transform .35s;
}
.rl-result-card-row.jk-text-show {
  opacity: 1;
  transform: translateX(0);
}
.rl-result-card-icon { font-size: 22px; flex-shrink: 0; }
.rl-result-card-info { flex: 1; text-align: left; }
.rl-result-card-label { font-size: 11px; color: rgba(255,255,255,.4); }
.rl-result-card-val   { font-size: 15px; font-weight: 700; }

/* ===== ROULETTE PROFIT DISPLAY ===== */
.rl-profit-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;           /* ← FIX 2: центрируем текст */
    gap: 6px;
    padding: 24px 32px 20px;
    background: rgba(212, 168, 81, 0.07);
    border: 1px solid rgba(212, 168, 81, 0.3);
    border-radius: 20px;
    width: 100%;
    max-width: 300px;
    opacity: 0;
    transform: translateY(12px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 40px rgba(212, 168, 81, 0.1),
                inset 0 1px 0 rgba(212, 168, 81, 0.15);
}

.rl-profit-display.jk-text-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.rl-profit-display--loss {
    background: rgba(124, 58, 237, 0.07);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.1),
                inset 0 1px 0 rgba(167, 139, 250, 0.1);
}
.rl-profit-display--loss .rl-profit-cur {
    -webkit-text-fill-color: rgba(167, 139, 250, 0.65);
}
.rl-profit-label {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(212, 168, 81, 0.6);
    font-family: 'Space Grotesk', sans-serif;
}

.rl-profit-display--loss .rl-profit-label {
    color: rgba(167, 139, 250, 0.6);
}

.rl-profit-amount {
    font-size: 38px;              /* ← FIX 1: было 52px */
    font-weight: 900;
    line-height: 1;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #a07020, #f0d070, #d4a851, #fff8e7, #d4a851);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: jkGoldShimmer 3s ease-in-out infinite;
}

.rl-profit-display--loss .rl-profit-amount {
    background: linear-gradient(135deg, #4c1d95, #c4b5fd, #a78bfa, #ede9fe);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rlPurpleShimmer 3s ease-in-out infinite;
}

.rl-profit-plus {
    font-size: 28px;
    vertical-align: middle;
    margin-right: 2px;
    font-weight: 700;
}

.rl-profit-cur {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    /* ← FIX 3: сбрасываем прозрачность унаследованную от родителя */
    -webkit-text-fill-color: rgba(212, 168, 81, 0.65);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

@keyframes rlPurpleShimmer {
    0%, 100% { background-position: 0 50%; }
    50%       { background-position: 100% 50%; }
}

.ar-badge { font-size:11px; padding:2px 8px; border-radius:20px; font-weight:600; letter-spacing:.04em; }
.ar-badge--on  { background:rgba(212,168,81,.18); color:#d4a851; }
.ar-badge--off { background:rgba(255,255,255,.08); color:rgba(255,255,255,.4); }

.ar-row { display:flex; align-items:center; justify-content:space-between; margin:12px 0 8px; }
.ar-label { font-size:13px; color:rgba(255,255,255,.7); }

.ar-field { display:flex; flex-direction:column; gap:4px; }
.ar-field-label { font-size:12px; color:rgba(255,255,255,.5); }

.ar-toggle-wrap  { position:relative; width:44px; height:24px; cursor:pointer; }
.ar-toggle-input { display:none; }
.ar-toggle-slider {
  position:absolute; inset:0;
  background:rgba(255,255,255,.12);
  border-radius:12px; transition:background .2s;
}
.ar-toggle-input:checked + .ar-toggle-slider { background:#d4a851; }
.ar-toggle-slider::after {
  content:''; position:absolute;
  width:18px; height:18px; border-radius:50%; background:#fff;
  top:3px; left:3px; transition:transform .2s;
}
.ar-toggle-input:checked + .ar-toggle-slider::after { transform:translateX(20px); }

.ar-amount-row { display:flex; align-items:center; gap:8px; margin:4px 0; }
.ar-amount-input { flex:1; }
.ar-amount-suffix { font-size:13px; color:#d4a851; font-weight:600; }
.ar-hint { font-size:11px; color:rgba(255,255,255,.4); margin-top:6px; line-height:1.5; }
.mt-8 { margin-top:8px; }

#rlWebCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 20;
    border-radius: inherit;
}

.level-next-badge {
    font-size: 10px;
    background: rgba(124, 58, 237, 0.3);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.5);
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Компактная статистика профиля ─────────────────────────────────── */
.prof-stats-block {
    margin-bottom: 10px;
    padding: 14px 12px 12px;
}

.prof-stats-title {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    opacity: 0.7;
}

.prof-stats-row3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prof-stat-cell {
    flex: 1;
    text-align: center;
}

.prof-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(212, 168, 81, 0.15);
    flex-shrink: 0;
}

/* Уменьшаем размер значений в компактных блоках */
.prof-stats-block .prof-stat-val {
    font-size: 15px;
    font-weight: 600;
    color: var(--gold);
    line-height: 1.2;
}

.prof-stats-block .prof-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.prof-stats-block .prof-stat-cur {
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: 0.08em;
}

/* P&L: зелёный если > 0, красный если < 0 */
.prof-stat-pnl { color: var(--gold) !important; }
.prof-stat-pnl.positive { color: #4ade80 !important; }
.prof-stat-pnl.negative { color: #f87171 !important; }

/* ── Нижняя строка 2 мини-карточки ──────────────────────────────────── */
.prof-stats-bottom2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.prof-stat-mini {
    padding: 10px 8px;
    text-align: center;
}

.prof-stat-mini .prof-stat-val {
    font-size: 16px;
    font-weight: 600;
    color: var(--gold);
}

.prof-stat-mini .prof-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.prof-stat-mini .prof-stat-cur {
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: 0.08em;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error   { border-color: var(--danger);  color: var(--danger); }
