/* ============================================================
   NAMEZO CRASH — LUXURY CYBERPUNK 60FPS STYLESHEET (v26)
   ============================================================ */

:root {
    --bg-void: #000000;
    --bg-card: rgba(10, 14, 24, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.20);

    --cyan-glow: #00f2fe;
    --cyan-accent: #38bdf8;
    --purple-glow: #a855f7;
    --purple-deep: #7928ca;
    --gold-star: #fbbf24;
    --gold-glow: #f59e0b;
    --green-win: #10b981;
    --red-crash: #ef4444;

    --font-main: 'Onest', 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', Roboto, sans-serif;
    --font-heading: 'Unbounded', 'Onest', sans-serif;
    --font-mono: 'Unbounded', 'Onest', monospace;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-void);
    color: #ffffff;
    font-family: var(--font-main);
    user-select: none;
    -webkit-user-select: none;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

#crash-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
    background: radial-gradient(ellipse 70% 50% at 50% -5%, rgba(0, 240, 255, 0.07) 0%, transparent 60%), var(--bg-void);
}

/* ============================================================
   TOPBAR
   ============================================================ */

#crash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    padding-top: calc(8px + env(safe-area-inset-top));
    background: rgba(2, 4, 8, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-glass);
    z-index: 25;
    flex-shrink: 0;
    transform: translateZ(0);
}

.btn-top-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-top-back:active {
    transform: scale(0.92);
    background: rgba(0, 242, 254, 0.15);
    color: var(--cyan-glow);
    border-color: var(--cyan-glow);
}

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

.brand-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.brand-accent {
    background: linear-gradient(135deg, var(--cyan-glow), var(--purple-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-live {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--green-win);
}

.live-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-win);
    box-shadow: 0 0 8px var(--green-win);
    animation: pulseRing 1.8s infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(0.9); opacity: 1; }
}

.crash-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 20px;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.12);
    cursor: default;
}

.balance-icon-wrap {
    font-size: 14px;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
}

.balance-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.balance-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #94a3b8;
}

.balance-num {
    font-size: 13px;
    font-weight: 800;
    color: #fef08a;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* ============================================================
   HISTORY STRIP (CAPSULES)
   ============================================================ */

#history-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(3, 5, 10, 0.94);
    border-bottom: 1px solid var(--border-glass);
    overflow: hidden;
    flex-shrink: 0;
    height: 38px;
}

.history-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #64748b;
    flex-shrink: 0;
}

.history-list {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.history-list::-webkit-scrollbar { display: none; }

.history-chip {
    flex-shrink: 0;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    animation: chipSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.2s;
}

.history-chip.green {
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.history-chip.orange {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

.history-chip.red {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

@keyframes chipSlide {
    from { opacity: 0; transform: translateX(-14px) scale(0.85); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ============================================================
   MAIN CRASH FIELD (THE COSMIC ARENA)
   ============================================================ */

#crash-field {
    position: relative;
    flex: 1;
    max-height: 50vh;
    min-height: 265px;
    height: 38vh;
    overflow: hidden;
    background: radial-gradient(ellipse at 85% 15%, rgba(30, 27, 75, 0.5) 0%, transparent 60%),
                radial-gradient(ellipse at 15% 90%, rgba(2, 132, 199, 0.2) 0%, transparent 55%),
                #03050c;
}

#crash-field.shake-field {
    animation: fieldCrashShake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes fieldCrashShake {
    10%, 90% { transform: translate3d(-3px, 2px, 0); }
    20%, 80% { transform: translate3d(3px, -2px, 0); }
    30%, 50%, 70% { transform: translate3d(-5px, 2px, 0); }
    40%, 60% { transform: translate3d(5px, -2px, 0); }
}

/* 60FPS COSMOS STARFIELD CANVAS */
.cosmos-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    transform: translateZ(0);
}

.nebula-bg {
    position: absolute;
    inset: -20%;
    pointer-events: none;
    background: radial-gradient(circle at 65% 35%, rgba(124, 58, 237, 0.16) 0%, transparent 65%),
                radial-gradient(circle at 25% 75%, rgba(6, 182, 212, 0.14) 0%, transparent 60%);
    animation: nebulaPulse 10s ease-in-out infinite alternate;
    z-index: 2;
}

@keyframes nebulaPulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
    50% { transform: scale(1.08) translate(-1%, 2%); opacity: 1; }
    100% { transform: scale(0.95) translate(1%, -1%); opacity: 0.8; }
}

.nebula-aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, transparent 50%, rgba(0, 242, 254, 0.1) 100%);
    opacity: 0.6;
    transition: opacity 0.5s ease, filter 0.5s ease;
    z-index: 2;
}

#crash-field.flying-high .nebula-aurora {
    opacity: 1;
    filter: hue-rotate(35deg);
}

/* CYBER RADAR GRID */
.cyber-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.cyber-scanner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 242, 254, 0.5) 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    animation: scannerSweep 6s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes scannerSweep {
    0% { transform: translate3d(0, 0, 0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translate3d(0, 320px, 0); opacity: 0; }
}

.alt-mark {
    position: absolute;
    left: 0; right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    transition: color 0.3s ease;
}

.alt-mark span {
    font-size: 9px;
    font-weight: 800;
    color: rgba(148, 163, 184, 0.35);
    letter-spacing: 0.5px;
    min-width: 28px;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.alt-mark .grid-line {
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 4px, transparent 4px, transparent 10px);
    transition: all 0.3s ease;
}

.alt-mark.reached span {
    color: #00f2fe;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.9);
    font-weight: 900;
}

.alt-mark.reached .grid-line {
    background: repeating-linear-gradient(90deg, rgba(0, 242, 254, 0.4) 0, rgba(0, 242, 254, 0.4) 8px, transparent 8px, transparent 16px);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

.alt-mark.m10 { bottom: 82%; }
.alt-mark.m5  { bottom: 64%; }
.alt-mark.m3  { bottom: 48%; }
.alt-mark.m2  { bottom: 32%; }
.alt-mark.m15 { bottom: 18%; }

/* FLIGHT TRAIL SVG */
.flight-trail-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    overflow: visible;
}

#trail-path {
    transition: stroke 0.3s ease;
}

#trail-path.trail-gold {
    stroke: url(#trail-gold-grad) !important;
}

#trail-glow {
    transition: stroke 0.3s ease;
}

#trail-glow.trail-gold {
    stroke: rgba(251, 191, 36, 0.35) !important;
}

#trail-area.trail-gold {
    fill: url(#trail-gold-fill) !important;
}

/* LAUNCH PAD */
.launch-pad {
    position: absolute;
    bottom: 12px;
    left: 10px;
    width: 62px;
    height: 9px;
    background: linear-gradient(90deg, rgba(0, 242, 254, 0.4), rgba(147, 51, 234, 0.35));
    border-radius: 5px;
    border: 1px solid rgba(0, 242, 254, 0.5);
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
    z-index: 4;
}

.pad-beacon {
    position: absolute;
    top: -4px;
    left: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan-glow);
    box-shadow: 0 0 8px var(--cyan-glow), 0 0 16px var(--cyan-glow);
    animation: beaconPulse 1.1s infinite alternate;
}

.pad-stripes {
    position: absolute;
    inset: 2px 14px 2px 14px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0, rgba(255, 255, 255, 0.4) 3px, transparent 3px, transparent 7px);
    opacity: 0.65;
    border-radius: 2px;
}

@keyframes beaconPulse {
    0% { opacity: 0.35; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1.15); }
}

/* ============================================================
   HUD TELEMETRY (CENTER MULTIPLIER)
   ============================================================ */

.hud-center {
    position: absolute;
    top: 6%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 8;
    pointer-events: none;
    width: 90%;
    max-width: 320px;
}

.hud-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    margin-bottom: 6px;
}

.hud-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan-glow);
    box-shadow: 0 0 8px var(--cyan-glow);
}

#hud-status-text {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #cbd5e1;
    text-transform: uppercase;
}

.multiplier {
    font-family: var(--font-heading);
    font-size: 52px;
    font-weight: 900;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1.5px;
    line-height: 1;
    text-shadow: 0 0 35px rgba(0, 242, 254, 0.6), 0 0 70px rgba(147, 51, 234, 0.4);
    transition: color 0.15s, text-shadow 0.15s, opacity 0.2s;
    margin-bottom: 12px;
}

.multiplier.hidden-by-crash {
    opacity: 0;
    transition: opacity 0.15s;
}

.progress-wrapper {
    width: 100%;
    padding: 0 20px;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8, #f43f5e);
    border-radius: 4px;
    width: 0%;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    transition: width 0.12s linear;
}

/* ============================================================
   ROCKET (TELEGRAM COLLECTIBLE GIFT ROCKET)
   ============================================================ */

.rocket {
    position: absolute;
    bottom: 12px;
    left: 0;
    z-index: 6;
    width: 180px;
    height: 180px;
    transform: translate3d(0, 0, 0) rotate(0deg);
    transform-origin: 30px 150px;
    will-change: transform;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.rocket.idle-hover:not(.in-flight) {
    transform: translate3d(0, 0, 0) rotate(0deg) !important;
    animation: none !important;
}

.rocket.in-flight {
    animation: none !important;
}

.rocket-lottie {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-28px, 25px) translateZ(0);
    pointer-events: none;
}

.rocket-lottie:empty {
    display: none;
}

.rocket-lottie canvas,
.rocket-lottie svg {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    overflow: visible;
    transform: translateZ(0);
}

.rocket-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-28px, 25px);
    pointer-events: none;
}

.rocket-fallback.hidden {
    display: none !important;
}

.rocket-fallback .rocket-img {
    width: 95%;
    height: 95%;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(0, 168, 255, 0.55));
}

/* Dynamic thruster exhaust halo */
.thruster-halo {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.95) 0%, rgba(30, 130, 255, 0.55) 45%, transparent 75%);
    filter: blur(6px);
    pointer-events: none;
    opacity: 0;
    transform: translate(-20%, 20%);
    transition: opacity 0.25s ease;
}

.rocket.in-flight .thruster-halo {
    opacity: 1;
    animation: thrusterPulse 0.12s infinite alternate ease-in-out;
}

@keyframes thrusterPulse {
    0% { transform: translate(-20%, 20%) scale(0.9); opacity: 0.75; }
    100% { transform: translate(-20%, 20%) scale(1.4); opacity: 1; }
}

/* HIGH-PERFORMANCE SPARKS CANVAS */
.sparks-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    transform: translateZ(0);
}

/* ============================================================
   EXPLOSION & CRASH CARD
   ============================================================ */

.explosion {
    position: absolute;
    width: 160px;
    height: 160px;
    transform: translate(-50%, -50%);
    z-index: 16;
    pointer-events: none;
}
.explosion.hidden { display: none !important; }

.explosion-lottie {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.explosion-lottie svg {
    width: 100% !important;
    height: 100% !important;
}

.explosion-shockwave {
    position: absolute;
    top: 50%; left: 50%;
    width: 90px; height: 90px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 3px solid rgba(255, 130, 40, 0.95);
    box-shadow: 0 0 25px rgba(255, 80, 20, 0.85), inset 0 0 15px rgba(255, 210, 50, 0.7);
    animation: shockwaveExplode 0.75s cubic-bezier(0.12, 0.8, 0.25, 1) forwards;
}

.explosion-flash {
    position: absolute;
    top: 50%; left: 50%;
    width: 220px; height: 220px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 180, 50, 0.7) 25%, rgba(239, 68, 68, 0.4) 55%, transparent 75%);
    animation: flashBurst 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes shockwaveExplode {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

@keyframes flashBurst {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

.crash-card {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 18;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 28px;
    background: rgba(26, 12, 16, 0.92);
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    animation: cardZoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.crash-card.hidden { display: none; }

.crash-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #f87171;
    margin-bottom: 4px;
}

.crash-card-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red-crash);
    box-shadow: 0 0 8px var(--red-crash);
}

.crash-card-mult {
    font-family: var(--font-heading);
    font-size: 54px;
    font-weight: 900;
    color: #ef4444;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1.5px;
    line-height: 1;
    text-shadow: 0 0 35px rgba(239, 68, 68, 0.8);
    margin-bottom: 4px;
}

.crash-card-sub {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #94a3b8;
}

@keyframes cardZoomIn {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.85); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ============================================================
   COUNTDOWN RADAR OVERLAY
   ============================================================ */

.countdown-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 14, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 22;
    animation: fadeIn 0.25s ease;
}
.countdown-overlay.hidden { display: none; }

.countdown-radar {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.ring-fg {
    fill: none;
    stroke: url(#trail-grad);
    stroke: var(--cyan-glow);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.8s ease;
}

.countdown-value {
    font-family: var(--font-heading);
    font-size: 52px;
    font-weight: 900;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(0, 242, 254, 0.8);
    line-height: 1;
    animation: pulseNum 1s ease-in-out infinite;
}

@keyframes pulseNum {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.countdown-label {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
}

.countdown-sub {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}

/* ============================================================
   BETTING CONSOLE
   ============================================================ */

.crash-console {
    background: rgba(3, 5, 10, 0.94);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.8), inset 0 1px 1.5px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    z-index: 10;
    transform: translateZ(0);
}

/* AUTO-CASHOUT PANEL */
.auto-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 6px;
    font-size: 12px;
}

.auto-switch-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0; height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    transition: 0.25s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background: #ffffff;
    border-radius: 50%;
    transition: 0.25s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.switch input:checked + .slider {
    background: linear-gradient(135deg, #0284c7, var(--cyan-glow));
    border-color: var(--cyan-glow);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.switch input:checked + .slider:before {
    transform: translateX(16px);
}

.auto-title {
    font-weight: 700;
    color: #cbd5e1;
    font-size: 11px;
}

.auto-input-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0 8px;
    height: 32px;
    width: 76px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auto-input-container:focus-within {
    border-color: var(--cyan-glow);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.auto-prefix {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    margin-right: 2px;
}

#auto-value {
    width: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    font-family: inherit;
    text-align: left;
    outline: none;
    -moz-appearance: textfield;
}
#auto-value::-webkit-inner-spin-button, 
#auto-value::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
}

.auto-quick-chips {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.auto-pill {
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.auto-pill:active {
    transform: scale(0.92);
    background: rgba(0, 242, 254, 0.15);
    color: var(--cyan-glow);
    border-color: var(--cyan-glow);
}

/* BET CONTROLS BAR */
.bet-controls-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 10px;
}

.bet-math-buttons {
    display: flex;
    gap: 4px;
}

.bet-custom-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    height: 38px;
    padding: 0 8px;
    gap: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.bet-custom-input-wrap:focus-within {
    border-color: var(--cyan-glow, #00d2ff);
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.35);
    background: rgba(0, 210, 255, 0.06);
}

.bet-custom-input {
    width: 50px;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    font-family: var(--font-heading);
    text-align: right;
    -moz-appearance: textfield;
}

.bet-custom-input::-webkit-outer-spin-button,
.bet-custom-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bet-star-symbol {
    font-size: 12px;
}

.math-btn {
    width: 34px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: all 0.15s;
}

.math-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.crash-bets {
    display: flex;
    flex: 1;
    gap: 6px;
    align-items: center;
}

.bet-chip {
    flex: 1;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-radius: 11px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-variant-numeric: tabular-nums;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bet-chip.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(168, 85, 247, 0.3));
    border: 1px solid var(--cyan-glow);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 242, 254, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bet-chip:active { transform: scale(0.94); }

.bet-chip.settings {
    flex: 0 0 38px;
    font-size: 16px;
    color: #94a3b8;
}

/* MAIN ACTION BUTTON */
#crash-actions {
    padding: 0 14px 12px;
}

.btn-main {
    position: relative;
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #0284c7 0%, #6366f1 50%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    animation: shineSweep 4s infinite;
}

@keyframes shineSweep {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.btn-main:active {
    transform: scale(0.97);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-main.cashout {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: cashoutPulse 0.9s infinite alternate;
}

@keyframes cashoutPulse {
    0% { transform: scale(1); box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4); }
    100% { transform: scale(1.02); box-shadow: 0 10px 32px rgba(16, 185, 129, 0.65); }
}

.btn-main.cashed {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.btn-main.waiting {
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #94a3b8;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-main:disabled {
    cursor: not-allowed;
    opacity: 0.95;
}

.btn-action-text {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.6px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    text-align: center;
}

.btn-main.waiting .btn-action-text {
    color: #cbd5e1;
}

.btn-main.cashout .btn-action-text {
    color: #ffffff;
    font-size: 15px;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   LIVE PLAYERS & POOL LEADERBOARD
   ============================================================ */

.crash-top-section {
    padding: 8px 14px 12px;
    background: rgba(8, 10, 22, 0.98);
    border-top: 1px solid var(--border-glass);
    max-height: 110px;
    overflow-y: auto;
    flex-shrink: 0;
}

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

.top-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--cyan-glow);
    box-shadow: 0 0 6px var(--cyan-glow);
}

.top-title {
    font-size: 9px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1.5px;
}

.top-badge {
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
    color: #cbd5e1;
}

.top-pool {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 800;
}

.pool-label {
    color: #64748b;
    font-size: 9px;
    letter-spacing: 1px;
}

.pool-val {
    color: #fef08a;
    font-variant-numeric: tabular-nums;
}

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

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    font-size: 11px;
    transition: all 0.2s;
}

.top-row.me {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.15);
}

.top-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e2e8f0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-row.me .top-name:after {
    content: "ВЫ";
    font-size: 8px;
    font-weight: 900;
    padding: 1px 5px;
    background: var(--cyan-glow);
    color: #04050e;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.top-bet {
    color: #f8fafc;
    font-weight: 800;
    margin: 0 8px;
    font-variant-numeric: tabular-nums;
    min-width: 55px;
    text-align: right;
}

.top-mult {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    min-width: 52px;
    text-align: right;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
}

.top-mult.flying {
    color: var(--cyan-glow);
    background: rgba(0, 242, 254, 0.08);
}

.top-mult.cashed {
    color: var(--green-win);
    background: rgba(16, 185, 129, 0.12);
}

.top-mult.crashed {
    color: var(--red-crash);
    background: rgba(239, 68, 68, 0.08);
}

.top-mult.waiting_bet {
    color: #64748b;
    font-style: italic;
    background: transparent;
}

/* ============================================================
   SETTINGS MODAL (LUXURY GLASS DIALOG)
   ============================================================ */

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.modal.hidden { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 14, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: rgba(14, 18, 44, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: scaleModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-glow {
    position: absolute;
    top: -50px; left: -50px;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-icon {
    font-size: 26px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.modal-sub {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 2px;
}

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-row label {
    font-size: 13px;
    font-weight: 700;
    color: #cbd5e1;
}

.setting-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0 10px;
    height: 38px;
    width: 100px;
}

.setting-input-wrap input {
    width: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    font-family: inherit;
    text-align: right;
    outline: none;
}

.input-star {
    font-size: 12px;
    margin-left: 4px;
}

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

.btn-modal {
    flex: 1;
    height: 42px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: all 0.15s;
}

.btn-modal.primary {
    background: linear-gradient(135deg, #0284c7, #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn-modal:not(.primary) {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.btn-modal:active { transform: scale(0.95); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleModal { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* ============================================================
   CYBER-LUXURY CRASH PRELOADER
   ============================================================ */
.crash-preloader {
    position: absolute;
    inset: 0;
    z-index: 999;
    background: radial-gradient(circle at 50% 30%, #0d122e 0%, #050713 70%, #020308 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}

.crash-preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-glow {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, rgba(168, 85, 247, 0.08) 50%, transparent 70%);
    animation: preloaderPulse 3s ease-in-out infinite alternate;
}

.preloader-card {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    max-width: 300px;
    width: 90%;
}

.preloader-radar {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 242, 254, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: rgba(10, 16, 38, 0.6);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.15);
}

.radar-ping {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(0, 242, 254, 0.4);
    animation: radarPing 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.radar-scan {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border-top: 2px solid #00f2fe;
    border-right: 2px solid transparent;
    animation: spin 1.2s linear infinite;
}

.preloader-rocket {
    font-size: 32px;
    animation: rocketHover 2s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 10px rgba(255, 170, 0, 0.6));
}

.preloader-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2.5px;
    color: #ffffff;
    margin-bottom: 4px;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.preloader-accent {
    background: linear-gradient(135deg, #00f2fe, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.preloader-status {
    font-family: var(--font-main);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #38bdf8;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.preloader-bar-wrap {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.preloader-bar-fill {
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, #00f2fe, #a855f7, #38bdf8);
    border-radius: 4px;
    animation: preloaderScan 1.6s ease-in-out infinite;
}

.preloader-tip {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #64748b;
    text-transform: uppercase;
}

@keyframes preloaderScan {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(50%); }
    100% { transform: translateX(200%); }
}

@keyframes radarPing {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes preloaderPulse {
    0% { transform: scale(0.85); opacity: 0.5; }
    100% { transform: scale(1.15); opacity: 1; }
}

@keyframes rocketHover {
    0% { transform: translateY(2px) rotate(-2deg); }
    100% { transform: translateY(-4px) rotate(3deg); }
}
