

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ── Color Palette ── */
    --bg-primary: #070b14;
    --bg-secondary: #0c1221;
    --bg-card: #111827;
    --bg-card-hover: #1a2235;
    --bg-input: #0f1629;

    --text-primary: #f0f4fc;
    --text-secondary: #8b9dc3;
    --text-muted: #506085;

    --accent-green: #10b981;
    --accent-green-light: #34d399;
    --accent-green-glow: rgba(16, 185, 129, 0.45);
    --accent-blue: #3b82f6;
    --accent-blue-light: #60a5fa;
    --accent-blue-glow: rgba(59, 130, 246, 0.45);
    --accent-purple: #8b5cf6;
    --accent-purple-light: #a78bfa;
    --accent-yellow: #fbbf24;
    --accent-yellow-light: #fcd34d;
    --accent-red: #ef4444;
    --accent-pink: #ec4899;

    /* ── Borders ── */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.10);
    --border-glow: rgba(255, 255, 255, 0.15);

    /* ── Glassmorphism Tokens ── */
    --glass-bg: rgba(255, 255, 255, 0.035);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-bg-active: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-border-top: rgba(255, 255, 255, 0.13);
    --glass-border-left: rgba(255, 255, 255, 0.09);
    --glass-blur: blur(20px) saturate(150%);
    --glass-blur-heavy: blur(24px) saturate(160%);
    --glass-blur-ultra: blur(28px) saturate(170%);
    --glass-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --glass-shadow-elevated:
        0 8px 40px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);

    /* ── Radius ── */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-2xl: 28px;
    --radius-pill: 100px;

    /* ── Layout ── */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --tab-bar-height: 68px;
    --header-height: 0px;

    /* ── Transitions ── */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    text-rendering: optimizeLegibility;
}

#app {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* =============================================
   BACKGROUND — macOS Sonoma Glassmorphism
   ============================================= */

.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 60% at 20% -20%, rgba(59, 130, 246, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 80% 110%, rgba(139, 92, 246, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 55%),
        radial-gradient(ellipse 40% 30% at 90% 20%, rgba(236, 72, 153, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #050810 0%, #080d1a 30%, #0c1221 60%, #0f1628 100%);
}

/* Animated Blobs — macOS Sonoma style */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    will-change: transform;
    mix-blend-mode: screen;
    contain: strict;
}

.bg-blob.blob-1 {
    width: 450px;
    height: 450px;
    top: -15%;
    left: -8%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(99, 102, 241, 0) 70%);
    animation: blobFloat1 22s ease-in-out infinite;
}

.bg-blob.blob-2 {
    width: 400px;
    height: 400px;
    top: 55%;
    right: -12%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(16, 185, 129, 0) 70%);
    animation: blobFloat2 28s ease-in-out infinite;
}

.bg-blob.blob-3 {
    width: 350px;
    height: 350px;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(139, 92, 246, 0.30) 0%, rgba(139, 92, 246, 0) 70%);
    animation: blobFloat3 20s ease-in-out infinite;
}

.bg-blob.blob-4 {
    width: 300px;
    height: 300px;
    bottom: 3%;
    left: 8%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, rgba(236, 72, 153, 0) 70%);
    animation: blobFloat4 24s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, 40px) scale(1.12); }
    50% { transform: translate(25px, 70px) scale(0.93); }
    75% { transform: translate(-25px, 25px) scale(1.07); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-40px, -50px) scale(1.08); }
    50% { transform: translate(-60px, -25px) scale(1.12); }
    75% { transform: translate(-15px, -60px) scale(0.94); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translateX(-50%) translate(0, 0) scale(1); }
    33% { transform: translateX(-50%) translate(35px, -35px) scale(1.1); }
    66% { transform: translateX(-50%) translate(-25px, 25px) scale(0.9); }
}

@keyframes blobFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    30% { transform: translate(35px, -25px) scale(1.12); }
    60% { transform: translate(-25px, -45px) scale(0.93); }
}

/* Noise texture for depth */
.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Dynamic glow (reacts to game state) */
.bg-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    filter: blur(50px);
    opacity: 0;
    transition: opacity 0.8s var(--ease-smooth), background 0.6s var(--ease-smooth);
}

.bg-glow.active {
    opacity: 1;
}

.bg-glow.crashed {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.22) 0%, transparent 70%);
}

/* =============================================
   FLOATING UI — Back Button & Balance Badge
   ============================================= */

/* ── Floating Balance Badge ── */
.floating-balance {
    position: fixed;
    top: calc(12px + var(--safe-top));
    right: 16px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    background: rgba(7, 11, 20, 0.55);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.18),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}



.floating-balance-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    position: relative;
    z-index: 1;
}

.floating-balance .currency-icon {
    position: relative;
    z-index: 1;
}

.currency-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.currency-icon-sm {
    width: 14px;
    height: 14px;
    object-fit: contain;
    vertical-align: -1px;
}

.currency-icon-xs {
    width: 12px;
    height: 12px;
    object-fit: contain;
    vertical-align: -1px;
}

/* =============================================
   GAME HEADER — Compact Frosted Bar (games only)
   ============================================= */

.game-header {
    position: relative;
    z-index: 100;
    padding: 4px 16px;
    padding-top: calc(4px + var(--safe-top));
    background: rgba(7, 11, 20, 0.6);
    backdrop-filter: var(--glass-blur-ultra);
    -webkit-backdrop-filter: var(--glass-blur-ultra);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 1px 24px rgba(0, 0, 0, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    min-height: 40px;
    flex-shrink: 0;
}

.game-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.08) 80%,
        transparent 100%
    );
}

.game-header.hidden {
    display: none;
}

.game-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}

.game-header-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.game-header-back:active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: scale(0.92);
}

.game-header-title {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.4px;
    text-align: center;
}

.game-header-balance {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}



.game-header-balance-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    position: relative;
    z-index: 1;
}

.game-header-balance .currency-icon {
    position: relative;
    z-index: 1;
}

/* =============================================
   VIEW CONTAINER
   ============================================= */

#view-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* =============================================
   TAB BAR — Frosted Glass Navigation
   ============================================= */

.tab-bar {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: rgba(7, 11, 20, 0.65);
    backdrop-filter: var(--glass-blur-ultra);
    -webkit-backdrop-filter: var(--glass-blur-ultra);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 
        0 -2px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    padding: 6px 16px;
    padding-bottom: calc(6px + var(--safe-bottom));
    min-height: var(--tab-bar-height);
    flex-shrink: 0;
    gap: 8px;
}

.tab-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.06) 30%, 
        rgba(255, 255, 255, 0.10) 50%, 
        rgba(255, 255, 255, 0.06) 70%, 
        transparent 100%
    );
}

.tab-bar.hidden {
    display: none;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 0;
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
}

.tab-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 
        0 0 20px rgba(16, 185, 129, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tab-item.active .tab-icon {
    transform: scale(1.05);
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.3));
}

.tab-item:active {
    transform: scale(0.94);
}

.tab-icon {
    font-size: 22px;
    line-height: 1;
    transition: all 0.3s var(--ease-out-expo);
}

.tab-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* =============================================
   NOTIFICATIONS — Glass Pills
   ============================================= */

.notifications {
    position: fixed;
    top: calc(var(--safe-top) + 64px);
    left: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(12, 18, 33, 0.7);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: notificationSlideIn 0.4s var(--ease-out-expo);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.notification.fade-out {
    animation: notificationSlideOut 0.3s var(--ease-smooth) forwards;
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.notification.success .notification-dot {
    background: var(--accent-green);
    box-shadow: 0 0 12px var(--accent-green-glow);
}

.notification.error .notification-dot {
    background: var(--accent-red);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

.notification.info .notification-dot {
    background: var(--accent-blue);
    box-shadow: 0 0 12px var(--accent-blue-glow);
}

.notification-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-text .currency-icon {
    width: 14px;
    height: 14px;
}

@keyframes notificationSlideIn {
    from { transform: translateY(-24px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes notificationSlideOut {
    from { transform: translateY(0) scale(1); opacity: 1; }
    to { transform: translateY(-12px) scale(0.95); opacity: 0; }
}

/* =============================================
   HOME VIEW — Premium Design
   ============================================= */

.home-view {
    padding: 20px 16px;
    padding-top: calc(14px + var(--safe-top));
    padding-bottom: calc(24px + var(--tab-bar-height));
    max-width: 600px;
    margin: 0 auto;
}

/* ── Greeting Section ── */
.home-greeting {
    margin-bottom: 24px;
    padding: 0 2px;
}

.greeting-text {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 6px;
    letter-spacing: -0.6px;
    line-height: 1.2;
}

.greeting-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Balance Card (Home) — Premium Glass ── */
.home-balance-card {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 28px;
    overflow: hidden;
    contain: layout style paint;
    /* Gradient border via background-clip trick */
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.06), rgba(139, 92, 246, 0.05)) padding-box;
    border: 1px solid transparent;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.2),
        0 0 80px rgba(16, 185, 129, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Animated gradient border — маска статична, двигается слой через transform
   (анимация background-position перерисовывала рамку каждый кадр) */
.home-balance-border {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    overflow: hidden;
}

.home-balance-border-gradient {
    position: absolute;
    top: -100%;
    left: 0;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.4),
        rgba(59, 130, 246, 0.3),
        rgba(139, 92, 246, 0.3),
        rgba(16, 185, 129, 0.4)
    );
    animation: gradientSlide 8s ease infinite;
    will-change: transform;
}

/* Shine sweep effect — GPU-accelerated via transform instead of left */
.home-balance-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.04) 40%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 60%,
        transparent 80%
    );
    animation: shineSweep 5s ease-in-out infinite;
    will-change: transform;
    pointer-events: none;
}

@keyframes gradientSlide {
    0% { transform: translateX(0); }
    50% { transform: translateX(-66.67%); }
    100% { transform: translateX(0); }
}

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

/* Inner mesh gradient */
.home-balance-inner {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse 60% 80% at 80% -10%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 10% 90%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.home-balance-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    transform: translateZ(0);
}

.home-balance-value {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    transform: translateZ(0);
}

.home-balance-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    text-shadow: 0 0 40px rgba(16, 185, 129, 0.15);
}

.home-balance-value .currency-icon {
    width: 45px;
    height: 45px;
    position: relative;
    top: -2px;
}

/* ── Recent Wins — Premium Cards ── */
.recent-wins-section {
    margin-bottom: 28px;
}

.recent-wins-section .section-header {
    margin-bottom: 8px;
}

.recent-wins-section .section-title {
    font-size: 14px;
    opacity: 0.55;
}

.recent-wins-section .section-title-icon {
    font-size: 16px;
}

.recent-wins-section .section-title-icon svg {
    width: 18px;
    height: 18px;
}

.recent-wins-ribbon {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Маска — затухание на правом краю, всегда привязана к вьюпорту скролла */
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 40px), transparent 100%);
}

.recent-wins-ribbon::-webkit-scrollbar {
    display: none;
}

/* Fade edge — убрана, чтобы не висела статично при скролле */

.recent-wins-track {
    display: flex;
    gap: 12px;
    width: max-content;
    padding-right: 24px;
}

/* ── Win Card ── */
.win-card {
    width: 190px;
    flex-shrink: 0;
    padding: 14px 16px 14px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.13);
    border-left-color: rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.18),
        0 1px 3px rgba(0, 0, 0, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease;
    contain: layout style paint;
}

.win-card:active {
    transform: scale(0.97);
}

/* Header: user + multiplier */
.win-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.win-card-user {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.win-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Game badge */
.win-card-game {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

/* Mine icon — global utility */
.mine-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 2px;
}

.win-card-game-icon {
    font-size: 13px;
    line-height: 1;
}

.win-card-game-name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Divider */
.win-card-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.08) 70%, transparent);
    margin-bottom: 10px;
}

/* Stats row */
.win-card-stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.win-card-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.win-card-stat-label {
    font-size: 10.5px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.win-card-stat-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.win-card-bet {
    color: var(--text-secondary);
}

.win-card-payout {
    color: var(--accent-green-light);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.win-card-star-sm {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.35));
}

.recent-wins-empty {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Marquee — бесшовная автопрокрутка ленты выигрышей ── */
.recent-wins-ribbon.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 40px), transparent 100%);
}

.recent-wins-marquee {
    display: flex;
    width: max-content;
    animation: winsMarquee 38s linear infinite;
    will-change: transform;
}

.recent-wins-marquee .recent-wins-track {
    padding-right: 12px;
}

/* Пауза при касании/наведении */
.recent-wins-ribbon.marquee:active .recent-wins-marquee,
.recent-wins-ribbon.marquee:hover .recent-wins-marquee {
    animation-play-state: paused;
}

@keyframes winsMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ── Skeleton-карточки во время загрузки ── */
.win-card-skeleton {
    pointer-events: none;
}

.skeleton-line {
    height: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

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

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue-light);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    transition: all 0.25s var(--ease-smooth);
    letter-spacing: -0.2px;
}

.section-link:active {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(0.95);
}

/* ── Game Cards (Home Grid) — Liquid Glass ── */

/*
 * Static color vars per game variant.
 * Every child (icon, badge, label) reads var() for theming.
 * LIQUID GLASS: SVG displacement, chromatic aberration shadows,
 * iridescent border, surface sheen, caustics & iridescence layers.
 */

@property --c-text {
    syntax: '<color>';
    inherits: true;
    initial-value: rgba(255, 255, 255, 0.5);
}

@property --c-border {
    syntax: '<color>';
    inherits: true;
    initial-value: rgba(255, 255, 255, 0.12);
}

@property --c-glow {
    syntax: '<color>';
    inherits: true;
    initial-value: rgba(255, 255, 255, 0.06);
}

@property --c-glow2 {
    syntax: '<color>';
    inherits: true;
    initial-value: rgba(255, 255, 255, 0.03);
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ============================================
   LIQUID GLASS — Shared Layers (Caustics + Iridescence)
   ============================================ */

/* CAUSTICS — pure CSS animation, no JS */
.glass-caustics {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 24;
    overflow: hidden;
    opacity: 0.04;
    mix-blend-mode: overlay;
}

.glass-caustics-inner {
    position: absolute;
    inset: -30%;
    width: 160%;
    height: 160%;
    background:
        radial-gradient(ellipse 22% 28% at 30% 40%, white 0%, transparent 70%),
        radial-gradient(ellipse 25% 16% at 70% 30%, white 0%, transparent 70%),
        radial-gradient(ellipse 16% 24% at 50% 70%, white 0%, transparent 70%),
        radial-gradient(ellipse 18% 20% at 80% 60%, white 0%, transparent 70%);
    animation: causticDrift 10s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.game-card:hover .glass-caustics-inner,
.game-list-card:hover .glass-caustics-inner,
.featured-banner:hover .glass-caustics-inner {
    animation-play-state: running;
}

@keyframes causticDrift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    50%  { transform: translate(4%, -3%) rotate(2deg); }
    100% { transform: translate(-2%, 3%) rotate(-1deg); }
}

/* IRIDESCENCE — hover only, edge-masked */
.glass-iridescence {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 23;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.game-card:hover .glass-iridescence,
.game-list-card:hover .glass-iridescence,
.featured-banner:hover .glass-iridescence {
    opacity: 1;
}

.glass-iridescence-inner {
    position: absolute;
    inset: -1.5px;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(
        135deg,
        rgba(255, 100, 100, 0.12) 0%,
        rgba(255, 200, 100, 0.1) 15%,
        rgba(100, 255, 100, 0.1) 30%,
        rgba(100, 200, 255, 0.12) 45%,
        rgba(150, 100, 255, 0.1) 60%,
        rgba(255, 100, 200, 0.1) 75%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: iriShift 5s linear infinite;
}

@keyframes iriShift {
    from { filter: hue-rotate(0deg); }
    to   { filter: hue-rotate(360deg); }
}

/* ============================================ */

.quick-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

/* ── Base card — LIQUID GLASS + animated color vars ── */
.game-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 18px 16px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1;
    will-change: transform;
    transition: transform 0.4s var(--ease-out-expo), background 0.4s ease;
    /* Noise texture + glass gradient */
    background:
        url('data:image/svg+xml,%3Csvg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)" opacity="0.03"/%3E%3C/svg%3E'),
        radial-gradient(
            ellipse 90% 90% at 50% 50%,
            rgba(255, 255, 255, 0.025) 0%,
            rgba(255, 255, 255, 0.025) 50%,
            rgba(255, 255, 255, 0.09) 85%,
            rgba(255, 255, 255, 0.12) 100%
        );
    /* Chromatic aberration + glass highlights + game glow */
    box-shadow:
        inset 3px 2px 6px -2px rgba(255, 80, 80, 0.04),
        inset -3px -2px 6px -2px rgba(80, 180, 255, 0.04),
        inset 0.75px 0.75px 0.75px rgba(255, 255, 255, 0.32),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 0.03),
        inset -0.75px -0.75px 0.75px rgba(255, 255, 255, 0.05),
        inset 0 -18px 40px -15px var(--c-glow),
        inset 6px 0 28px -14px var(--c-glow2),
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.05);
    /* Liquid glass borders */
    border-top: 0.75px solid rgba(255, 255, 255, 0.28);
    border-left: 0.75px solid rgba(255, 255, 255, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.0);
    border-right: 1px solid rgba(255, 255, 255, 0.0);
    /* Glass blur (SVG displacement removed for performance) */
    backdrop-filter: blur(20px) saturate(1.6) brightness(1.04);
    -webkit-backdrop-filter: blur(20px) saturate(1.6) brightness(1.04);
    contain: layout style paint;
}

/* Iridescent gradient border */
.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 0.75px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(200, 220, 255, 0.18) 10%,
        rgba(255, 200, 255, 0.12) 20%,
        rgba(255, 255, 255, 0.12) 25%,
        rgba(200, 255, 220, 0.06) 35%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(255, 200, 220, 0.02) 65%,
        rgba(255, 255, 255, 0.008) 75%,
        rgba(255, 255, 255, 0.0) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 20;
    pointer-events: none;
}

/* Surface sheen */
.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.025) 0%,
            rgba(255, 255, 255, 0.008) 25%,
            transparent 50%
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.22) 0%,
            rgba(255, 255, 255, 0.0) 1.5px,
            transparent 2.5px
        );
    pointer-events: none;
    z-index: 25;
}

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

/* ── Variants — fixed color themes per game ── */
.game-card.crash {
    --c-text:   #f87171;
    --c-border: rgba(239, 68, 68, 0.28);
    --c-glow:   rgba(239, 68, 68, 0.12);
    --c-glow2:  rgba(239, 68, 68, 0.06);
}
.game-card.mines {
    --c-text:   #fcd34d;
    --c-border: rgba(251, 191, 36, 0.28);
    --c-glow:   rgba(251, 191, 36, 0.12);
    --c-glow2:  rgba(245, 158, 11, 0.06);
}
.game-card.slots {
    --c-text:   #a78bfa;
    --c-border: rgba(139, 92, 246, 0.28);
    --c-glow:   rgba(139, 92, 246, 0.12);
    --c-glow2:  rgba(167, 139, 250, 0.06);
}
.game-card.tower {
    --c-text:   #f472b6;
    --c-border: rgba(236, 72, 153, 0.28);
    --c-glow:   rgba(236, 72, 153, 0.12);
    --c-glow2:  rgba(244, 114, 182, 0.06);
}
.game-card.balloon {
    --c-text:   #38bdf8;
    --c-border: rgba(56, 189, 248, 0.28);
    --c-glow:   rgba(56, 189, 248, 0.12);
    --c-glow2:  rgba(14, 165, 233, 0.06);
}

.game-card.coming-soon {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(0.3);
    animation: none;
    box-shadow: none;
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
}

/* ── Icon Wrapper — reads parent vars ── */
.game-card-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--c-border);
    box-shadow: inset 0 0 12px var(--c-glow2);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 30;
    animation: iconFloat 4s ease-in-out infinite;
}

.game-card-icon {
    font-size: 26px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.game-card-icon-wrapper > img,
.game-card-icon img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.game-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 30;
}

.game-card-name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.game-card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.8;
}

/* =============================================
   GAMES VIEW — Full List
   ============================================= */

.games-view {
    padding: 20px 16px;
    padding-top: calc(14px + var(--safe-top));
    padding-bottom: calc(24px + var(--tab-bar-height));
    max-width: 600px;
    margin: 0 auto;
}

.games-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ── List Card — LIQUID GLASS (softened) ── */
.game-list-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 18px 16px;
    cursor: pointer;
    transition: transform 0.4s var(--ease-out-expo), background 0.4s ease;
    display: flex;
    align-items: center;
    gap: 16px;
    will-change: transform;
    /* Noise texture + glass gradient */
    background:
        url('data:image/svg+xml,%3Csvg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)" opacity="0.03"/%3E%3C/svg%3E'),
        radial-gradient(
            ellipse 90% 90% at 50% 50%,
            rgba(255, 255, 255, 0.025) 0%,
            rgba(255, 255, 255, 0.025) 50%,
            rgba(255, 255, 255, 0.09) 85%,
            rgba(255, 255, 255, 0.12) 100%
        );
    /* Chromatic aberration + glass highlights + game glow */
    box-shadow:
        inset 3px 2px 6px -2px rgba(255, 80, 80, 0.04),
        inset -3px -2px 6px -2px rgba(80, 180, 255, 0.04),
        inset 0.75px 0.75px 0.75px rgba(255, 255, 255, 0.32),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 0.03),
        inset -0.75px -0.75px 0.75px rgba(255, 255, 255, 0.05),
        inset 0 -18px 40px -15px var(--c-glow),
        inset 6px 0 28px -14px var(--c-glow2),
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.05);
    /* Liquid glass borders */
    border-top: 0.75px solid rgba(255, 255, 255, 0.28);
    border-left: 0.75px solid rgba(255, 255, 255, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.0);
    border-right: 1px solid rgba(255, 255, 255, 0.0);
    /* Glass blur (SVG displacement removed for performance) */
    backdrop-filter: blur(20px) saturate(1.6) brightness(1.04);
    -webkit-backdrop-filter: blur(20px) saturate(1.6) brightness(1.04);
    contain: layout style paint;
}

/* Iridescent gradient border */
.game-list-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 0.75px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(200, 220, 255, 0.18) 10%,
        rgba(255, 200, 255, 0.12) 20%,
        rgba(255, 255, 255, 0.12) 25%,
        rgba(200, 255, 220, 0.06) 35%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(255, 200, 220, 0.02) 65%,
        rgba(255, 255, 255, 0.008) 75%,
        rgba(255, 255, 255, 0.0) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 20;
    pointer-events: none;
}

/* Surface sheen */
.game-list-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.025) 0%,
            rgba(255, 255, 255, 0.008) 25%,
            transparent 50%
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.22) 0%,
            rgba(255, 255, 255, 0.0) 1.5px,
            transparent 2.5px
        );
    pointer-events: none;
    z-index: 25;
}

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

/* ── Variants — fixed color themes per game ── */
.game-list-card.crash {
    --c-text:   #f87171;
    --c-border: rgba(239, 68, 68, 0.28);
    --c-glow:   rgba(239, 68, 68, 0.12);
    --c-glow2:  rgba(239, 68, 68, 0.06);
}
.game-list-card.mines {
    --c-text:   #fcd34d;
    --c-border: rgba(251, 191, 36, 0.28);
    --c-glow:   rgba(251, 191, 36, 0.12);
    --c-glow2:  rgba(245, 158, 11, 0.06);
}
.game-list-card.slots {
    --c-text:   #a78bfa;
    --c-border: rgba(139, 92, 246, 0.28);
    --c-glow:   rgba(139, 92, 246, 0.12);
    --c-glow2:  rgba(167, 139, 250, 0.06);
}
.game-list-card.tower {
    --c-text:   #f472b6;
    --c-border: rgba(236, 72, 153, 0.28);
    --c-glow:   rgba(236, 72, 153, 0.12);
    --c-glow2:  rgba(244, 114, 182, 0.06);
}
.game-list-card.balloon {
    --c-text:   #38bdf8;
    --c-border: rgba(56, 189, 248, 0.28);
    --c-glow:   rgba(56, 189, 248, 0.12);
    --c-glow2:  rgba(14, 165, 233, 0.06);
}

.game-list-card.coming-soon {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(0.3);
    animation: none;
    box-shadow: none;
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
}

/* ── List card icon — reads parent vars ── */
.game-list-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--c-border);
    box-shadow: inset 0 0 12px var(--c-glow2);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 30;
    animation: iconFloat 4s ease-in-out infinite;
}

.game-list-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.game-list-icon-wrapper > img,
.game-list-icon img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.game-list-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 30;
}

.game-list-name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.game-list-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    opacity: 0.85;
}

.game-list-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.4s var(--ease-out-expo);
    opacity: 0.6;
    position: relative;
    z-index: 30;
}

.game-list-card:active .game-list-arrow {
    transform: translateX(4px);
    opacity: 1;
    color: var(--text-secondary);
}

/* =============================================
   FEATURED GAME BANNER
   ============================================= */

/* ── Featured Banner — LIQUID GLASS (softened), static red ── */
.featured-banner {
    position: relative;
    border-radius: var(--radius-2xl);
    padding: 22px 20px;
    margin-bottom: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s var(--ease-out-expo), background 0.4s ease;
    will-change: transform;
    /* Static red colors instead of pulse animation */
    --c-text:   #f87171;
    --c-border: rgba(239, 68, 68, 0.28);
    --c-glow:   rgba(239, 68, 68, 0.14);
    --c-glow2:  rgba(239, 68, 68, 0.07);
    /* Noise texture + glass gradient */
    background:
        url('data:image/svg+xml,%3Csvg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)" opacity="0.03"/%3E%3C/svg%3E'),
        radial-gradient(
            ellipse 90% 90% at 50% 50%,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(255, 255, 255, 0.10) 85%,
            rgba(255, 255, 255, 0.13) 100%
        );
    /* Chromatic aberration + glass highlights + game glow */
    box-shadow:
        inset 3px 2px 6px -2px rgba(255, 80, 80, 0.04),
        inset -3px -2px 6px -2px rgba(80, 180, 255, 0.04),
        inset 0.75px 0.75px 0.75px rgba(255, 255, 255, 0.35),
        inset 1.5px 1.5px 3px rgba(255, 255, 255, 0.035),
        inset -0.75px -0.75px 0.75px rgba(255, 255, 255, 0.055),
        inset 0 -22px 50px -18px var(--c-glow),
        inset 8px 0 32px -16px var(--c-glow2),
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.05);
    /* Liquid glass borders */
    border-top: 0.75px solid rgba(255, 255, 255, 0.30);
    border-left: 0.75px solid rgba(255, 255, 255, 0.24);
    border-bottom: 1px solid rgba(255, 255, 255, 0.0);
    border-right: 1px solid rgba(255, 255, 255, 0.0);
    /* Glass blur (SVG displacement removed for performance) */
    backdrop-filter: blur(20px) saturate(1.6) brightness(1.04);
    -webkit-backdrop-filter: blur(20px) saturate(1.6) brightness(1.04);
    contain: layout style paint;
}

/* Iridescent gradient border */
.featured-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 0.75px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.30) 0%,
        rgba(200, 220, 255, 0.20) 10%,
        rgba(255, 200, 255, 0.13) 20%,
        rgba(255, 255, 255, 0.13) 25%,
        rgba(200, 255, 220, 0.07) 35%,
        rgba(255, 255, 255, 0.045) 50%,
        rgba(255, 200, 220, 0.02) 65%,
        rgba(255, 255, 255, 0.008) 75%,
        rgba(255, 255, 255, 0.0) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 20;
    pointer-events: none;
}

/* Surface sheen */
.featured-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.01) 25%,
            transparent 50%
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.24) 0%,
            rgba(255, 255, 255, 0.0) 1.5px,
            transparent 2.5px
        );
    pointer-events: none;
    z-index: 25;
}

.featured-banner:active {
    transform: scale(0.97);
}

.featured-content {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Icon — reads parent vars */
.featured-icon {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--c-border);
    box-shadow: inset 0 0 12px var(--c-glow2);
    flex-shrink: 0;
    overflow: hidden;
    animation: iconFloat 3.5s ease-in-out infinite;
}

.featured-icon img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

/* TGS (Lottie) animation inside featured icon */
.featured-icon svg {
    width: 43px;
    height: 43px;
    display: block;
}

.featured-text {
    flex: 1;
}

/* Label text — reads parent --c-text */
.featured-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--c-text);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.featured-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.4px;
    margin-bottom: 3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.featured-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    opacity: 0.85;
}

.featured-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.featured-banner:active .featured-arrow {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.06) 100%);
    transform: translateX(3px);
    color: var(--text-primary);
}

/* =============================================
   VIEW TRANSITIONS
   ============================================= */

.view-enter {
    animation: viewEnter 0.35s var(--ease-out-expo) forwards;
}

.view-exit {
    animation: viewExit 0.2s var(--ease-smooth) forwards;
}

@keyframes viewEnter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes viewExit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.99);
    }
}

/* ── Каскадное появление контента (stagger) ── */
.view-enter.home-view > *,
.view-enter.games-view .games-list > * {
    opacity: 0;
    animation: viewItemEnter 0.45s var(--ease-out-expo) forwards;
}

.view-enter.home-view > *:nth-child(1) { animation-delay: 0.02s; }
.view-enter.home-view > *:nth-child(2) { animation-delay: 0.07s; }
.view-enter.home-view > *:nth-child(3) { animation-delay: 0.12s; }
.view-enter.home-view > *:nth-child(4) { animation-delay: 0.17s; }
.view-enter.home-view > *:nth-child(5) { animation-delay: 0.22s; }
.view-enter.home-view > *:nth-child(6) { animation-delay: 0.27s; }

.view-enter.games-view .games-list > *:nth-child(1) { animation-delay: 0.04s; }
.view-enter.games-view .games-list > *:nth-child(2) { animation-delay: 0.09s; }
.view-enter.games-view .games-list > *:nth-child(3) { animation-delay: 0.14s; }
.view-enter.games-view .games-list > *:nth-child(4) { animation-delay: 0.19s; }
.view-enter.games-view .games-list > *:nth-child(5) { animation-delay: 0.24s; }

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

/* ── Флэш баланса при изменении (count-up) ── */
.balance-flash-up {
    animation: balanceFlashUp 0.8s ease;
}

.balance-flash-down {
    animation: balanceFlashDown 0.8s ease;
}

@keyframes balanceFlashUp {
    0%, 55% { color: var(--accent-green-light); text-shadow: 0 0 16px rgba(52, 211, 153, 0.55); }
    100% { }
}

@keyframes balanceFlashDown {
    0%, 55% { color: #f87171; text-shadow: 0 0 16px rgba(248, 113, 113, 0.45); }
    100% { }
}

/* =============================================
   STAR RAIN (Win Animation — shared)
   ============================================= */

.star-rain-container {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    overflow: hidden;
}

.star-rain-container.epic-win::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 30%, rgba(251, 191, 36, 0.1) 0%, transparent 60%);
    animation: epicGlow 1.2s ease-in-out;
}

@keyframes epicGlow {
    0% { opacity: 0; }
    40% { opacity: 1; }
    100% { opacity: 0; }
}

.falling-star {
    position: absolute;
    top: -50px;
    /* width/height и animation задаются inline в JS — обход бага
       CSS custom properties в animation shorthand (WebKit/Telegram WebView) */
}

.falling-star img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Вращение вынесено на img, чтобы не конфликтовать с transform (translateX/Y) на родителе */
    animation-name: starSpin;
    animation-duration: var(--spin-duration, 1s);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes starFall {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(var(--drift, 0px)) translateY(110vh);
        opacity: 0;
    }
}

@keyframes starSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =============================================
   SCROLLBAR — Minimal
   ============================================= */

#view-container::-webkit-scrollbar {
    width: 3px;
}

#view-container::-webkit-scrollbar-track {
    background: transparent;
}

#view-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

#view-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* =============================================
   UTILITIES
   ============================================= */

.hidden {
    display: none !important;
}

/* Пауза всех CSS-анимаций, когда webview свёрнут (ставится из app.js) */
body.app-paused *,
body.app-paused *::before,
body.app-paused *::after {
    animation-play-state: paused !important;
}

/* Пауза ленты выигрышей, когда она вне вьюпорта (IntersectionObserver) */
.recent-wins-marquee.paused-offscreen {
    animation-play-state: paused;
}

/* Particle animation (shared) */
@keyframes particleFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(0);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* ── Shimmer utility ── */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

/* ── Loading skeleton ── */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 400px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

/* ── Divider ── */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 20px 0;
}

/* ── Text gradient utility ── */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-green-light), var(--accent-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Glow text ── */
.glow-green {
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.glow-blue {
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* ── Empty state ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* =============================================
   GAME UI KIT (gx-*) — Liquid Glass для игровых экранов
   Акцент задаётся per-game через --ga / --ga-rgb на wrapper'е,
   все компоненты читают эти переменные.
   ============================================= */

.crash-game-wrapper   { --ga: #f87171; --ga-rgb: 248, 113, 113; --ga-deep-rgb: 239, 68, 68; }
.mines-game-wrapper   { --ga: #fcd34d; --ga-rgb: 252, 211, 77;  --ga-deep-rgb: 245, 158, 11; }
.tower-game-wrapper   { --ga: #a78bfa; --ga-rgb: 167, 139, 250; --ga-deep-rgb: 139, 92, 246; }
.balloon-game-wrapper { --ga: #38bdf8; --ga-rgb: 56, 189, 248;  --ga-deep-rgb: 14, 165, 233; }

/* ── Панель — тёмное стекло с акцентным свечением ──
   Без backdrop-filter и pseudo-оверлеев: большие панели с
   анимированными ячейками внутри дают лаги и белые артефакты
   (mask-composite, дробные тени) в Telegram WebView. */
.gx-panel {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background:
        radial-gradient(ellipse 130% 90% at 50% -10%, rgba(var(--ga-rgb), 0.07) 0%, transparent 55%),
        linear-gradient(180deg, rgba(19, 26, 44, 0.78) 0%, rgba(12, 18, 33, 0.82) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.14);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 -18px 44px -20px rgba(var(--ga-rgb), 0.12);
}

.gx-pad {
    padding: 16px;
}

/* ── Заголовок секции внутри панели ── */
.gx-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Поле ставки ── */
.gx-field {
    margin-bottom: 14px;
}

.gx-field-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gx-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.gx-adjust-btn {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.15s ease;
}

.gx-adjust-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.10);
}

.gx-input-wrap {
    flex: 1;
    position: relative;
}

.gx-input {
    width: 100%;
    height: 50px;
    padding: 0 45px 0 16px;
    border-radius: var(--radius-md);
    background: rgba(7, 11, 20, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top-color: rgba(255, 255, 255, 0.06);
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: all 0.15s ease;
}

.gx-input:focus {
    outline: none;
    border-color: rgba(var(--ga-rgb), 0.5);
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.25),
        0 0 20px rgba(var(--ga-rgb), 0.18);
}

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

.gx-input[type="number"] {
    -moz-appearance: textfield;
}

.gx-input-currency {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.gx-quick-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.gx-quick-btn {
    flex: 1;
    padding: 11px 6px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-top-color: rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.15s ease;
}

.gx-quick-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.09);
}

.gx-quick-btn.max-btn {
    background: rgba(var(--ga-rgb), 0.10);
    border-color: rgba(var(--ga-rgb), 0.30);
    color: var(--ga);
}

/* ── Кнопка действия ── */
.gx-action-btn {
    position: relative;
    width: 100%;
    padding: 18px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    font-family: 'Inter', 'SF Pro Display', -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.3s ease, opacity 0.2s ease;
}

.gx-action-btn .btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.gx-action-btn:not(:disabled):hover .btn-shine {
    left: 100%;
}

.gx-action-btn:active:not(:disabled) {
    transform: translateY(1px) scale(0.99);
}

/* Primary — единый синий для всех игр */
.gx-action-btn.start-btn,
.gx-action-btn.bet-btn,
.gx-action-btn.pump-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 60%, #3b82f6 100%);
    background-size: 200% 200%;
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow:
        0 4px 18px rgba(37, 99, 235, 0.40),
        0 0 36px rgba(37, 99, 235, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Cashout — зелёный, единый для всех игр.
   Пульс — через filter (композитится на GPU), а не box-shadow (repaint каждый кадр) */
.gx-action-btn.cashout-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    background-size: 200% 200%;
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow:
        0 4px 20px rgba(16, 185, 129, 0.5),
        0 0 40px rgba(16, 185, 129, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    will-change: filter;
    animation: gxCashoutPulse 1.6s ease-in-out infinite;
}

.gx-action-btn.cashout-btn .cashout-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
}

.gx-action-btn:disabled {
    background: linear-gradient(135deg, #2b3447 0%, #1d2535 100%);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
    border-color: transparent;
    animation: none;
    text-shadow: none;
}

.gx-action-btn:disabled .btn-shine {
    display: none;
}

@keyframes gxCashoutPulse {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0)); }
    50% { filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.4)); }
}

/* ── Статс-бар ── */
.gx-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(22, 30, 50, 0.70) 0%, rgba(14, 20, 36, 0.75) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

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

.gx-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.gx-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.gx-stat-value.multiplier {
    color: var(--ga);
    text-shadow: 0 0 12px rgba(var(--ga-rgb), 0.45);
}

.gx-stat-value.payout {
    color: var(--accent-yellow-light);
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.gx-stat-value .currency-icon {
    width: 16px;
    height: 16px;
}

.gx-stats-divider {
    width: 1px;
    height: 30px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.14), transparent);
}

/* ── Результат (win/lose) ── */
.gx-result-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border-radius: inherit;
    animation: gxOverlayIn 0.3s ease;
    pointer-events: none;
}

.gx-result-overlay.win {
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 65%, transparent 100%);
}

.gx-result-overlay.lose {
    background: radial-gradient(ellipse at center, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.04) 65%, transparent 100%);
}

.gx-result-card {
    text-align: center;
    padding: 12px 34px 20px;
    background: rgba(10, 15, 28, 0.92);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    animation: gxResultBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gx-result-card.win-card {
    border: 1px solid rgba(16, 185, 129, 0.22);
    box-shadow:
        0 8px 40px rgba(16, 185, 129, 0.15),
        0 0 80px rgba(16, 185, 129, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gx-result-card.lose-card {
    border: 1px solid rgba(239, 68, 68, 0.22);
    box-shadow:
        0 8px 40px rgba(239, 68, 68, 0.12),
        0 0 80px rgba(239, 68, 68, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gx-result-duck {
    width: 150px;
    height: 150px;
    margin: 0 auto 4px;
}

.gx-result-card.win-card .gx-result-duck {
    transform: translateX(-3px);
}

.gx-result-duck svg {
    width: 100% !important;
    height: 100% !important;
}

.gx-result-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}

.gx-result-amount.win {
    font-size: 28px;
    color: var(--accent-green-light);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.gx-result-amount.lose {
    color: var(--accent-red);
}

.gx-result-amount .currency-icon {
    width: 24px;
    height: 24px;
}

.gx-result-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

@keyframes gxOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gxResultBounce {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Мобильная адаптация кита ── */
@media (max-width: 480px) {
    .gx-input {
        height: 46px;
        font-size: 18px;
    }

    .gx-adjust-btn {
        width: 46px;
        height: 46px;
    }

    .gx-action-btn {
        padding: 16px 20px;
        font-size: 15px;
    }
}

/* =============================================
   REDUCED MOTION — Accessibility & Performance
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    .bg-blob { animation: none !important; }
    .home-balance-border-gradient { animation: none !important; }
    .home-balance-card::after { animation: none !important; }
    .glass-caustics-inner { animation: none !important; }
    .glass-iridescence-inner { animation: none !important; }
    .game-card-icon-wrapper,
    .game-list-icon-wrapper,
    .featured-icon { animation: none !important; }
    .notification { animation-duration: 0.01ms !important; }
    .view-enter { animation-duration: 0.01ms !important; }
    .view-exit { animation-duration: 0.01ms !important; }
    .view-enter.home-view > *,
    .view-enter.games-view .games-list > * { animation-duration: 0.01ms !important; }
    .falling-star { animation-duration: 0.01ms !important; }
    .skeleton { animation: none !important; }
    .recent-wins-marquee { animation: none !important; }
    .gx-action-btn.cashout-btn { animation: none !important; }
    .balance-flash-up,
    .balance-flash-down { animation: none !important; }
    .balloon-string { animation: none !important; }
    .balloon-wrapper { animation: none !important; }
    .balloon-area::before,
    .balloon-area::after { animation: none !important; }
}
