/* ===== SkyCrash Premium UI ===== */
:root {
    --bg: #080b12;
    --bg2: #0f1520;
    --surface: #141c2b;
    --surface2: #1a2438;
    --border: rgba(255,255,255,0.07);
    --text: #eef1f8;
    --muted: #7a869e;
    --gold: #f5c842;
    --gold2: #e8960c;
    --green: #22c55e;
    --green-dim: rgba(34,197,94,0.15);
    --red: #ef4444;
    --blue: #3b82f6;
    --radius: 16px;
    --radius-lg: 22px;
    --font: 'DM Sans', system-ui, sans-serif;
    --font-display: 'Orbitron', monospace;
    --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
}

.hidden { display: none !important; }

.loader {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--bg); gap: 24px;
}
.loader-logo {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 800; letter-spacing: 0.15em;
}
.loader-logo span { color: var(--gold); }
.loader-bar {
    width: 160px; height: 3px; background: var(--surface2); border-radius: 3px; overflow: hidden;
}
.loader-bar-fill {
    height: 100%; width: 40%; background: linear-gradient(90deg, var(--gold), var(--gold2));
    border-radius: 3px; animation: loadSlide 1.2s ease-in-out infinite;
}
@keyframes loadSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.app {
    max-width: 480px; margin: 0 auto;
    height: 100dvh; overflow: hidden;
    position: relative;
}

.view {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    opacity: 0; pointer-events: none;
    transform: translateX(24px);
    transition: opacity 0.28s ease, transform 0.28s ease;
    overflow: hidden;
}
.view-active {
    opacity: 1; pointer-events: auto; transform: none;
    z-index: 2;
}

#screen-lobby {
    overflow-y: auto;
    padding: 16px 20px calc(24px + var(--safe-b));
}
.lobby-bg {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(245,200,66,0.08), transparent),
        radial-gradient(ellipse 50% 40% at 100% 50%, rgba(59,130,246,0.06), transparent),
        var(--bg);
}
.lobby-header, .balance-card, .action-grid, .lobby-stats, .ghost-link { position: relative; z-index: 1; }
.lobby-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; padding-top: 4px;
}
.brand-mark {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0.12em;
}
.network-tag {
    font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 5px 10px; border-radius: 999px;
    background: rgba(59,130,246,0.12); color: #93c5fd;
    border: 1px solid rgba(59,130,246,0.25);
}

.balance-card {
    position: relative; padding: 28px 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #1a2438 0%, #141c2b 100%);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    overflow: visible;
}
.balance-card-glow {
    position: absolute; top: -40px; right: -40px; z-index: 0;
    width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(245,200,66,0.2), transparent 70%);
    pointer-events: none;
}
.balance-card-label {
    position: relative; z-index: 2;
    font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px;
}
.balance-card-balance {
    position: relative; z-index: 2;
    font-family: var(--font), system-ui, sans-serif;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    color: #f5c842;
    margin: 8px 0 12px;
    font-variant-numeric: tabular-nums;
}
.balance-card-balance.is-zero { color: #94a3b8 !important; }
.balance-card-user {
    position: relative; z-index: 2;
    margin-top: 0; font-size: 14px; color: var(--muted);
}

.action-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.action-card {
    display: flex; align-items: center; gap: 16px; padding: 18px 20px;
    border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--surface); color: inherit; cursor: pointer; text-align: left;
    transition: transform 0.15s, border-color 0.15s; width: 100%;
}
.action-card:active { transform: scale(0.985); }
.action-card-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.action-card-icon svg { width: 28px; height: 28px; }
.action-play .action-card-icon { background: linear-gradient(135deg, rgba(245,200,66,0.2), rgba(232,150,12,0.1)); color: var(--gold); }
.action-deposit .action-card-icon { background: rgba(34,197,94,0.12); color: var(--green); }
.action-withdraw .action-card-icon { background: rgba(59,130,246,0.12); color: var(--blue); }
.action-bonus .action-card-icon { background: rgba(168,85,247,0.12); color: #c084fc; }
.action-support .action-card-icon { background: rgba(148,163,184,0.12); color: #94a3b8; }
.action-card-body { flex: 1; }
.action-card-body strong { display: block; font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.action-card-body span { font-size: 13px; color: var(--muted); }
.action-arrow { color: var(--muted); flex-shrink: 0; }
.action-play { border-color: rgba(245,200,66,0.2); }

.lobby-stats {
    display: flex; align-items: center; padding: 16px 20px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); margin-bottom: 16px;
}
.stat-item { flex: 1; text-align: center; }
.stat-label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.stat-value { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

.ghost-link {
    display: block; width: 100%; padding: 14px; background: none; border: none;
    color: var(--muted); font-size: 14px; cursor: pointer; text-align: center;
}

.withdraw-error {
    padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
    background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35);
    color: #fca5a5; font-size: 13px; line-height: 1.5;
}

.sub-header {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: rgba(8,11,18,0.95); border-bottom: 1px solid var(--border);
    flex-shrink: 0; backdrop-filter: blur(12px);
}
.btn-back {
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.zero-balance-notice {
    margin-top: 14px; padding: 12px 14px; border-radius: 12px;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
    font-size: 13px; color: #fca5a5; line-height: 1.5;
}
.zero-balance-notice strong { color: #f87171; }

.zero-balance-bar {
    padding: 10px 16px; text-align: center; font-size: 13px;
    background: rgba(239,68,68,0.12); border-bottom: 1px solid rgba(239,68,68,0.2);
    color: #fca5a5; flex-shrink: 0;
}
.link-btn {
    background: none; border: none; color: var(--gold); font-weight: 700;
    cursor: pointer; text-decoration: underline; font-size: inherit;
}

.btn-music {
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-music.muted { opacity: 0.45; }
.btn-music.muted #music-wave { display: none; }

.sub-header { gap: 8px; }
.sub-header-title { flex: 1; font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; }

.phase-banner {
    position: absolute; inset: 0; z-index: 3;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    pointer-events: none; text-align: center;
    animation: bannerIn 0.35s ease;
}
.phase-banner.phase-crashed {
    background: rgba(127, 29, 29, 0.55);
    backdrop-filter: blur(6px);
}
.phase-banner.phase-betting {
    inset: auto 16px auto 16px;
    top: 12px;
    bottom: auto;
    height: auto;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(245, 200, 66, 0.25);
}
.phase-banner-title {
    font-family: var(--font-display); font-size: 22px; font-weight: 800;
    letter-spacing: 0.12em; text-transform: uppercase;
}
.phase-crashed .phase-banner-title { color: #fca5a5; }
.phase-betting .phase-banner-title { color: var(--gold); font-size: 11px; letter-spacing: 0.06em; }
.phase-banner-sub {
    font-family: var(--font-display); font-size: 48px; font-weight: 800; margin-top: 8px;
}
.phase-crashed .phase-banner-sub { color: #ef4444; text-shadow: 0 0 40px rgba(239,68,68,0.6); }
.phase-betting .phase-banner-sub { color: var(--text); font-size: 14px; font-family: var(--font); font-weight: 600; letter-spacing: 0; }

.crash-stage.is-crashed .crash-overlay { opacity: 1; }

@keyframes bannerIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: none; }
}

.sub-header-balance { font-size: 13px; color: var(--gold); font-weight: 600; }
.sub-header-tag { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.08em; }

#screen-game { background: var(--bg); }
.crash-history {
    display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto;
    scrollbar-width: none; flex-shrink: 0; border-bottom: 1px solid var(--border);
}
.crash-history::-webkit-scrollbar { display: none; }
.hist-pill {
    flex-shrink: 0; min-width: 48px; padding: 5px 10px; border-radius: 8px; text-align: center;
    font-family: var(--font-display); font-size: 12px; font-weight: 600;
    background: var(--surface); border: 1px solid var(--border);
}
.hist-pill.low { color: #f87171; border-color: rgba(239,68,68,0.25); }
.hist-pill.mid { color: #fbbf24; border-color: rgba(251,191,36,0.25); }
.hist-pill.high { color: #4ade80; border-color: rgba(74,222,128,0.25); }

.crash-stage { position: relative; flex: 1; min-height: 240px; background: #0c1018; overflow: hidden; }
#crash-canvas { display: block; width: 100%; height: 100%; }
.crash-overlay {
    position: absolute; inset: 0; z-index: 5;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; pointer-events: none;
}
.crash-status {
    font-size: 11px; font-weight: 700; letter-spacing: 0.2em;
    color: var(--muted); text-transform: uppercase; margin-bottom: 4px;
}
.crash-multiplier {
    font-family: var(--font-display); font-size: clamp(48px, 14vw, 72px);
    font-weight: 800; line-height: 1; color: var(--green);
    text-shadow: 0 0 60px rgba(34,197,94,0.5);
}
.crash-multiplier .mult-x { font-size: 0.55em; opacity: 0.7; margin-left: 2px; }
.crash-multiplier.crashed { color: var(--red); text-shadow: 0 0 60px rgba(239,68,68,0.5); animation: shake 0.4s ease; }
.crash-multiplier.betting { color: var(--muted); text-shadow: none; font-size: clamp(32px, 10vw, 48px); }
.crash-multiplier.running { color: var(--green); text-shadow: 0 0 60px rgba(34,197,94,0.5); font-size: clamp(48px, 14vw, 72px); }
.crash-sub { margin-top: 8px; font-size: 13px; color: var(--muted); }

.crash-countdown { position: absolute; top: 16px; right: 16px; width: 56px; height: 56px; z-index: 6; }
.crash-countdown svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface2); stroke-width: 4; }
.ring-fill { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 226; stroke-dashoffset: 0; transition: stroke-dashoffset 0.9s linear; }
.crash-countdown span {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--gold);
}

.crash-controls {
    flex-shrink: 0; padding: 12px 16px calc(12px + var(--safe-b));
    background: var(--bg2); border-top: 1px solid var(--border);
}
.bet-tabs { display: flex; gap: 4px; margin-bottom: 12px; background: var(--surface); border-radius: 10px; padding: 3px; }
.bet-tab {
    flex: 1; padding: 8px; border: none; border-radius: 8px;
    background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.bet-tab.active { background: var(--surface2); color: var(--text); }

.bet-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.bet-field label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.input-stepper {
    display: flex; align-items: center; background: var(--surface);
    border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.input-stepper input {
    flex: 1; min-width: 0; padding: 12px 8px; background: transparent; border: none;
    color: var(--text); font-size: 16px; font-weight: 600; text-align: center; outline: none;
    font-family: var(--font-display);
}
.step-btn { width: 40px; height: 44px; border: none; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.input-suffix { padding-right: 12px; color: var(--muted); font-size: 14px; }
.quick-chips { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.quick-chips button {
    padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
    background: var(--surface2); color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer;
}

.bet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bet-actions .hidden { display: none; }

.maintenance-banner {
    background: rgba(239,68,68,0.15); border-bottom: 1px solid rgba(239,68,68,0.35);
    color: #fca5a5; text-align: center; padding: 10px 16px; font-size: 13px; font-weight: 600;
}

.live-bets-panel {
    flex-shrink: 0; max-height: 88px; overflow: hidden; padding: 0 16px 8px;
}
.live-bets-head { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.live-bets-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; max-height: 68px; }
.live-bet-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; font-size: 11px; padding: 3px 0; }
.live-bet-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-bet-amt { font-family: var(--font-display); color: var(--text); }
.live-bet-status { color: var(--green); text-align: right; min-width: 64px; }
.live-bet-empty { font-size: 11px; color: var(--muted); }

.bet-panel.hidden { display: none; }
.auto-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.auto-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.auto-rounds-input { width: 56px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.auto-left { color: var(--muted); font-size: 12px; }

.copy-btn { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; width: 100%; margin-bottom: 6px; }
.btn-primary {
    border: none; border-radius: 14px; padding: 14px 12px; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-bet { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; box-shadow: 0 6px 24px rgba(37,99,235,0.35); }
.btn-cashout { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; box-shadow: 0 6px 24px rgba(34,197,94,0.3); }
.btn-label { font-size: 14px; font-weight: 700; }
.btn-sub { font-size: 11px; opacity: 0.75; font-family: var(--font-display); }

.active-bet {
    margin-top: 10px; padding: 12px 14px; border-radius: 12px;
    background: var(--green-dim); border: 1px solid rgba(34,197,94,0.25); font-size: 13px;
}

.page-body { flex: 1; overflow-y: auto; padding: 16px 20px calc(24px + var(--safe-b)); }
.info-banner {
    display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px;
    background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2);
    font-size: 13px; color: #93c5fd; line-height: 1.5;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.form-input {
    width: 100%; padding: 14px 16px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-size: 15px; outline: none;
}
.form-input:focus { border-color: rgba(245,200,66,0.4); }
.btn-primary.full, .btn-secondary.full { width: 100%; padding: 16px; font-size: 15px; font-weight: 700; border-radius: 14px; }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer; margin-top: 8px; }
.balance-inline { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.balance-inline strong { color: var(--gold); font-family: var(--font-display); }
.section-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 24px 0 12px; }

.deposit-box { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid rgba(245,200,66,0.2); font-size: 13px; line-height: 1.7; }
.deposit-box code { display: block; word-break: break-all; padding: 10px; margin: 8px 0; border-radius: 8px; background: var(--bg); color: var(--gold); font-size: 12px; }
.deposit-box .countdown { font-family: var(--font-display); font-size: 28px; color: var(--gold); margin: 8px 0; }

/* ===== Deposit page ===== */
.deposit-page button {
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
}

.deposit-header {
    background: linear-gradient(180deg, rgba(20,28,43,0.98) 0%, rgba(8,11,18,0.95) 100%);
    border-bottom: 1px solid rgba(245,200,66,0.08);
}
.deposit-balance-chip {
    margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
    padding: 6px 12px; border-radius: 12px;
    background: rgba(245,200,66,0.08); border: 1px solid rgba(245,200,66,0.22);
}
.deposit-balance-chip-label {
    font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.deposit-balance-chip-val {
    font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.deposit-steps {
    display: flex; align-items: center; gap: 0; margin-bottom: 20px;
}
.deposit-step-pill {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600; color: var(--muted);
    letter-spacing: 0.04em; transition: color 0.2s;
}
.deposit-step-pill.active { color: var(--gold); }
.deposit-step-pill.active .deposit-step-num {
    background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #0a0e16;
    border-color: transparent;
}
.deposit-step-num {
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
    border: 1px solid var(--border); background: var(--surface);
}
.deposit-step-line {
    flex: 1; height: 1px; margin: 0 10px;
    background: linear-gradient(90deg, var(--border), rgba(245,200,66,0.25), var(--border));
}

.deposit-bonus-pill {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; margin-bottom: 18px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(168,85,247,0.18), rgba(59,130,246,0.12));
    border: 1px solid rgba(168,85,247,0.35); color: #ddd6fe; font-size: 13px; line-height: 1.45;
}
.deposit-bonus-icon { font-size: 18px; flex-shrink: 0; }

.deposit-network-alert,
.deposit-pay-warning {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; margin-bottom: 18px; border-radius: 12px;
    background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.28);
    font-size: 12px; line-height: 1.5; color: #fcd34d;
}
.deposit-pay-warning {
    margin-bottom: 18px; position: relative;
}
.deposit-network-alert svg,
.deposit-pay-warning svg { flex-shrink: 0; margin-top: 1px; color: #f59e0b; }
.deposit-network-alert strong,
.deposit-pay-warning strong { color: #fde68a; }

.deposit-section-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 10px;
}

.deposit-networks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.deposit-network {
    position: relative; display: flex; align-items: center; gap: 10px;
    padding: 14px 12px; border-radius: 16px; cursor: pointer; text-align: left;
    background: var(--surface); border: 1.5px solid var(--border);
    color: var(--text); transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.deposit-network:active { transform: scale(0.98); }
.deposit-network.active {
    border-color: rgba(34,197,94,0.5);
    background: linear-gradient(145deg, rgba(34,197,94,0.1), rgba(20,28,43,0.95));
    box-shadow: 0 4px 20px rgba(34,197,94,0.1);
}
.deposit-network.active[data-network="ton"] {
    border-color: rgba(59,130,246,0.5);
    background: linear-gradient(145deg, rgba(59,130,246,0.1), rgba(20,28,43,0.95));
    box-shadow: 0 4px 20px rgba(59,130,246,0.1);
}
.deposit-network.is-disabled { opacity: 0.35; pointer-events: none; }
.deposit-network-icon {
    width: 42px; height: 42px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; flex-shrink: 0;
}
.deposit-network-icon.usdt { background: rgba(34,197,94,0.18); color: #4ade80; }
.deposit-network-icon.ton { background: rgba(59,130,246,0.18); color: #60a5fa; }
.deposit-network-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.deposit-network-text strong { font-size: 14px; font-weight: 700; }
.deposit-network-text small { font-size: 10px; color: var(--muted); line-height: 1.2; }
.deposit-network-check {
    position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--green); color: #fff; font-size: 10px; font-weight: 800;
    display: none; align-items: center; justify-content: center;
}
.deposit-network.active[data-network="ton"] .deposit-network-check { background: var(--blue); }
.deposit-network.active .deposit-network-check { display: flex; }

.deposit-amount-card {
    position: relative; overflow: hidden;
    padding: 22px 18px; border-radius: 20px; margin-bottom: 14px;
    background: linear-gradient(160deg, var(--surface2), var(--surface));
    border: 1px solid rgba(245,200,66,0.12);
}
.deposit-amount-glow {
    position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
    width: 200px; height: 80px; border-radius: 50%;
    background: radial-gradient(circle, rgba(245,200,66,0.12), transparent 70%);
    pointer-events: none;
}
.deposit-amount-row { display: flex; align-items: baseline; gap: 8px; position: relative; }
.deposit-amount-input {
    flex: 1; min-width: 0; border: none; background: transparent; outline: none;
    font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--text);
    letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.deposit-amount-input::placeholder { color: rgba(122,134,158,0.3); }
.deposit-amount-unit { font-size: 15px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.deposit-amount-hint { margin-top: 10px; font-size: 12px; color: var(--muted); position: relative; }
.deposit-ton-equiv {
    margin-top: 10px; padding: 8px 12px; border-radius: 10px; position: relative;
    font-size: 13px; color: #93c5fd; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
}
.deposit-ton-equiv strong { color: #60a5fa; font-family: var(--font-display); }

.deposit-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 20px; }
.deposit-preset {
    padding: 11px 4px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}
.deposit-preset:active { transform: scale(0.96); }
.deposit-preset.active {
    border-color: rgba(245,200,66,0.55); background: rgba(245,200,66,0.12); color: var(--gold);
}

.deposit-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.deposit-perk {
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    font-size: 10px; color: var(--muted); line-height: 1.3;
    padding: 12px 8px; border-radius: 12px;
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
}
.deposit-perk-icon { font-size: 18px; line-height: 1; }

.deposit-cta {
    display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 16px 20px; border: none; cursor: pointer;
    font-size: 15px; font-weight: 700; border-radius: 16px; color: #0a0e16;
    font-family: var(--font);
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    box-shadow: 0 8px 28px rgba(245,200,66,0.28);
    transition: transform 0.15s, box-shadow 0.15s;
}
.deposit-cta:active { transform: scale(0.98); box-shadow: 0 4px 16px rgba(245,200,66,0.2); }
.deposit-cta svg { opacity: 0.65; flex-shrink: 0; }

.deposit-pay-card {
    position: relative; overflow: hidden; padding: 22px 18px; border-radius: 22px;
    background: linear-gradient(165deg, #141c2b 0%, #0c1019 100%);
    border: 1px solid rgba(245,200,66,0.22);
}
.deposit-pay-card.is-ton {
    border-color: rgba(59,130,246,0.3);
}
.deposit-pay-card.is-ton .deposit-pay-glow {
    background: radial-gradient(circle, rgba(59,130,246,0.18) 0%, transparent 70%);
}
.deposit-pay-card.is-ton .deposit-pay-amount { color: #60a5fa; }
.deposit-pay-card.is-ton .deposit-pay-badge {
    background: rgba(59,130,246,0.15); color: #93c5fd;
}
.deposit-pay-glow {
    position: absolute; top: -60px; right: -40px; width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(245,200,66,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.deposit-pay-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; position: relative; }
.deposit-pay-badge {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 5px 10px; border-radius: 8px; background: rgba(245,200,66,0.12); color: var(--gold);
}
.deposit-pay-status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.pulse-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--green);
    animation: pulseDot 1.4s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}
.deposit-pay-amount-wrap { text-align: center; margin-bottom: 22px; position: relative; }
.deposit-pay-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.deposit-pay-amount { font-family: var(--font-display); font-size: 44px; font-weight: 800; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.deposit-pay-currency { font-size: 14px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.deposit-pay-credit { margin-top: 10px; font-size: 12px; color: #93c5fd; }
.deposit-pay-credit strong { color: #60a5fa; }

.deposit-pay-wallet { margin-bottom: 16px; position: relative; }
.deposit-pay-wallet-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.deposit-pay-address {
    padding: 14px; border-radius: 12px; background: rgba(0,0,0,0.35);
    border: 1px solid var(--border); font-size: 12px; line-height: 1.55;
    word-break: break-all; color: var(--text); font-family: ui-monospace, monospace;
}

.deposit-pay-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; position: relative; }
.deposit-copy-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 13px 10px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer;
    transition: transform 0.1s, border-color 0.15s;
}
.deposit-copy-btn.primary {
    background: rgba(245,200,66,0.12); border-color: rgba(245,200,66,0.35); color: var(--gold);
}
.deposit-pay-card.is-ton .deposit-copy-btn.primary {
    background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.35); color: #93c5fd;
}
.deposit-copy-btn:active { transform: scale(0.97); }

.deposit-pay-timer {
    padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.03);
    border: 1px solid var(--border); margin-bottom: 14px; position: relative;
}
.deposit-pay-timer.is-urgent {
    border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.06);
}
.deposit-pay-timer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.deposit-pay-timer-label { font-size: 12px; color: var(--muted); }
.deposit-pay-timer-val { font-family: var(--font-display); font-size: 22px; color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.deposit-pay-timer.is-urgent .deposit-pay-timer-val { color: #f87171; }
.deposit-timer-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.06); overflow: hidden; }
.deposit-timer-fill {
    height: 100%; width: 100%; border-radius: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold2));
    transition: width 1s linear;
}
.deposit-pay-timer.is-urgent .deposit-timer-fill {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.deposit-pay-note { font-size: 11px; line-height: 1.55; color: var(--muted); position: relative; }

.deposit-cancel-btn {
    display: flex; align-items: center; gap: 14px;
    width: 100%; margin-top: 14px; padding: 14px 16px;
    border-radius: 16px; cursor: pointer; text-align: left;
    font-family: var(--font);
    background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(20,28,43,0.95));
    border: 1px solid rgba(239,68,68,0.3);
    box-shadow: 0 4px 16px rgba(239,68,68,0.08);
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.deposit-cancel-btn:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, rgba(239,68,68,0.16), rgba(20,28,43,0.95));
    border-color: rgba(239,68,68,0.45);
}
.deposit-cancel-icon {
    width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(239,68,68,0.15); color: #f87171;
    border: 1px solid rgba(239,68,68,0.25);
}
.deposit-cancel-text { flex: 1; min-width: 0; }
.deposit-cancel-text strong { display: block; font-size: 14px; font-weight: 700; color: #fca5a5; margin-bottom: 2px; }
.deposit-cancel-text small { display: block; font-size: 11px; color: var(--muted); line-height: 1.35; }
.deposit-cancel-arrow { flex-shrink: 0; color: rgba(248,113,113,0.5); }

.deposit-history { margin-top: 8px; }
.deposit-history-divider {
    height: 1px; margin-bottom: 20px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.deposit-history-head { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.deposit-history-list { display: flex; flex-direction: column; gap: 8px; }
.deposit-history-item {
    display: flex; align-items: center; gap: 12px; padding: 13px 14px;
    border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
    transition: border-color 0.15s;
}
.deposit-history-icon {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
}
.deposit-history-icon.usdt { background: rgba(34,197,94,0.12); color: #4ade80; }
.deposit-history-icon.ton { background: rgba(59,130,246,0.12); color: #60a5fa; }
.deposit-history-body { flex: 1; min-width: 0; }
.deposit-history-body strong { font-size: 14px; display: block; font-variant-numeric: tabular-nums; }
.deposit-history-body .meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.deposit-history-status { font-size: 11px; font-weight: 700; text-transform: capitalize; flex-shrink: 0; padding: 4px 8px; border-radius: 6px; }
.deposit-history-status.status-pending { color: var(--gold); background: rgba(245,200,66,0.1); }
.deposit-history-status.status-approved { color: var(--green); background: rgba(34,197,94,0.1); }
.deposit-history-status.status-rejected,
.deposit-history-status.status-expired,
.deposit-history-status.status-cancelled { color: #f87171; background: rgba(239,68,68,0.1); }

.copy-btn { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; width: 100%; margin-bottom: 6px; }

.record-list { display: flex; flex-direction: column; gap: 8px; }
.record-item { padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.record-item .meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.status-pending { color: #fbbf24; }
.status-approved { color: var(--green); }
.status-rejected, .status-expired { color: var(--red); }

.profile-card { padding: 20px; border-radius: var(--radius); background: linear-gradient(135deg, var(--surface2), var(--surface)); border: 1px solid var(--border); font-size: 14px; }
.profile-card .avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-card .avatar {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 18px; font-weight: 800; color: #0a0e1a;
}
.code-box { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--bg); font-size: 11px; overflow: auto; max-height: 180px; color: var(--muted); }

.toast {
    position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%);
    max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 14px; z-index: 9999;
    background: rgba(20,28,43,0.96); border: 1px solid var(--border);
    font-size: 14px; font-weight: 500; box-shadow: 0 12px 40px rgba(0,0,0,0.5); backdrop-filter: blur(12px);
}

.bonus-card, .support-card {
    padding: 22px; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #1a2438, #141c2b);
    border: 1px solid var(--border);
}
.bonus-badge {
    display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em; background: rgba(168,85,247,0.15); color: #c084fc; margin-bottom: 12px;
}
.bonus-title { font-size: 22px; margin: 0 0 10px; font-family: var(--font-display); color: var(--gold); }
.bonus-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.bonus-rules { margin: 0 0 20px; padding-left: 18px; font-size: 13px; color: var(--text); line-height: 1.7; }
.bonus-rules strong { color: var(--gold); }
.bonus-status {
    padding: 14px 16px; border-radius: 12px; margin-bottom: 16px;
    background: var(--surface); border: 1px solid var(--border); font-size: 13px; line-height: 1.6;
}
.bonus-progress { margin-top: 8px; height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.bonus-progress-fill { height: 100%; background: linear-gradient(90deg, #a855f7, var(--gold)); border-radius: 999px; }
.support-card h2 { font-size: 20px; margin: 0 0 14px; font-family: var(--font-display); }
.support-card p { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0 0 14px; }
.support-card strong { color: var(--text); }
.support-link { display: block; text-align: center; text-decoration: none; margin-top: 8px; color: #fff; }
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
