/* ================================================================
   Casino Platform — Dark Premium «Quiet Luxury»
   Palette: Anthracite #0A0C0F, Slate #1A1E24, Champagne #C9B693
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg: #0A0C0F;
  --bg-elevated: #10131A;
  --bg-card: #1A1E24;
  --bg-card-hover: #21262E;
  --surface: #0E1114;
  --border: rgba(255,255,255,0.05);
  --border-strong: rgba(255,255,255,0.09);
  --text: #F0F3F8;
  --text-muted: #9AA4B3;
  --text-dim: #4F5560;
  --accent: #C9B693;
  --accent-hover: #D8C9A8;
  --accent-dim: rgba(201,182,147,0.08);
  --accent-glow: rgba(201,182,147,0.15);
  --nav-active: #C9B693;
  --nav-active-bg: rgba(201,182,147,0.06);
  --btn-primary: #C9B693;
  --btn-primary-hover: #D8C9A8;
  --btn-primary-text: #0E1114;
  --danger: #5A2A2A;
  --danger-text: #E8A0A0;
  --danger-dim: rgba(90,42,42,0.3);
  --success: #1E4A4A;
  --success-text: #A0E8D0;
  --teal: #50AF95;
  --hero-bg: #12161E;
  --glass: rgba(26,30,36,0.75);
  --glass-border: rgba(255,255,255,0.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 40px rgba(201,182,147,0.06);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --transition: 0.25s ease;
  --transition-slow: 0.3s ease;
  --header-h: 64px;
  --winners-bar-h: 56px;
  --sidebar-w: 252px;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  min-height: 100%;
  background: radial-gradient(ellipse at center, #0D0F14 0%, #06080A 100%);
}
[data-theme="light"] html {
  background: #F5F2EE;
}

/* Космос — многослойная атмосфера */
.site-bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.site-bg-layer--hidden { display: none !important; }
body.cosmic-bg-disabled::before { display: none !important; }

/* prefers-reduced-motion — отключение анимаций для пользователей с настройкой «Уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  .cosmos-nebula-1, .cosmos-nebula-2, .cosmos-dust,
  .stars-far, .stars-mid, .stars-near, .comet,
  body::before,
  .winners-scroll-wrap, .winners-card--100 .winners-card-inner,
  .winners-card--200 .winners-card-inner, .winners-card--200 .winners-mult-glow,
  .story-ring, .hf-orb, .hf-grid, .hf-diamond, .hf-diamond-svg,
  .hf-facet-top, .hf-facet-bot, .hf-inner-top, .hf-inner-bot, .hf-core,
  .game-card-img::before, .game-card-img-wrap::before,
  .skeleton-shimmer, .live-badge, .quest-relevant-pulse, .quest-relevant-shimmer,
  .pp-ring-spin, .loyalty-dust-anim, .cog-spin { animation: none !important; }
}

/* Туманности — мягкие космические облака */
.cosmos-nebula {
  position: absolute;
  inset: 0;
  opacity: 0.5;
}
.cosmos-nebula-1 {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(80,60,120,0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(40,80,120,0.12) 0%, transparent 45%);
  animation: nebula-drift 25s ease-in-out infinite;
}
.cosmos-nebula-2 {
  background:
    radial-gradient(ellipse 50% 80% at 70% 15%, rgba(201,182,147,0.06) 0%, transparent 40%),
    radial-gradient(ellipse 70% 60% at 10% 80%, rgba(60,100,140,0.08) 0%, transparent 50%);
  animation: nebula-drift 35s ease-in-out infinite reverse;
}
@keyframes nebula-drift {
  0%, 100% { opacity: 0.4; transform: scale(1) translate(0, 0); }
  50% { opacity: 0.6; transform: scale(1.05) translate(2%, -1%); }
}
[data-theme="light"] .cosmos-nebula-1,
[data-theme="light"] .cosmos-nebula-2 { opacity: 0.2; }

/* Светлая тема — звёздное небо (дневное небо с мягкими звёздами-искрами) */
[data-theme="light"] .site-bg-layer {
  background: linear-gradient(180deg, #E8ECF4 0%, #F0EDE8 25%, #F5F2EE 50%, #F8F6F4 75%, #F5F2EE 100%);
}
[data-theme="light"] .cosmos-nebula-1 {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(139,115,85,0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(100,140,180,0.08) 0%, transparent 45%);
}
[data-theme="light"] .cosmos-nebula-2 {
  background:
    radial-gradient(ellipse 50% 80% at 70% 15%, rgba(201,182,147,0.08) 0%, transparent 40%),
    radial-gradient(ellipse 70% 60% at 10% 80%, rgba(80,120,160,0.06) 0%, transparent 50%);
}

/* Космическая пыль */
.cosmos-dust {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 24px 24px;
  background-repeat: repeat;
  animation: dust-twinkle 8s ease-in-out infinite;
}
@keyframes dust-twinkle {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
[data-theme="light"] .cosmos-dust {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(28,26,24,0.05) 1px, transparent 0),
    radial-gradient(circle at 13px 13px, rgba(139,115,85,0.15) 1.5px, transparent 0);
  background-size: 24px 24px;
  opacity: 0.9;
}

/* Звёзды — три слоя глубины */
.stars {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
}
.stars-far {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 0);
  background-size: 48px 48px;
  opacity: 0.9;
  animation: stars-twinkle 4s ease-in-out infinite;
}
.stars-mid {
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 90px 40px, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 200px 50px, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 250px 180px, rgba(255,255,255,0.22), transparent),
    radial-gradient(2px 2px at 300px 90px, rgba(255,255,255,0.18), transparent),
    radial-gradient(1px 1px at 350px 220px, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 400px 150px, rgba(255,255,255,0.16), transparent),
    radial-gradient(1px 1px at 450px 60px, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 500px 200px, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 550px 100px, rgba(255,255,255,0.24), transparent),
    radial-gradient(1.5px 1.5px at 600px 250px, rgba(255,255,255,0.18), transparent),
    radial-gradient(1px 1px at 50px 200px, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 280px 30px, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 150px 250px, rgba(255,255,255,0.18), transparent);
  background-size: 650px 300px;
  opacity: 0.95;
  animation: stars-twinkle 5s ease-in-out infinite 1s;
}
.stars-near {
  background-image:
    radial-gradient(2.5px 2.5px at 40px 70px, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.4), transparent),
    radial-gradient(2.5px 2.5px at 300px 90px, rgba(255,255,255,0.45), transparent),
    radial-gradient(2px 2px at 450px 60px, rgba(255,255,255,0.35), transparent),
    radial-gradient(2.5px 2.5px at 550px 100px, rgba(255,255,255,0.5), transparent);
  background-size: 650px 300px;
  opacity: 0.9;
  animation: stars-twinkle 3s ease-in-out infinite 0.5s;
}
@keyframes stars-twinkle {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
[data-theme="light"] .stars-far {
  background-image: radial-gradient(circle at 1px 1px, rgba(28,26,24,0.08) 1px, transparent 0);
}
[data-theme="light"] .stars-mid,
[data-theme="light"] .stars-near {
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(28,26,24,0.2), transparent),
    radial-gradient(1.5px 1.5px at 90px 40px, rgba(28,26,24,0.18), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(28,26,24,0.12), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(28,26,24,0.16), transparent),
    radial-gradient(1.5px 1.5px at 200px 50px, rgba(28,26,24,0.1), transparent),
    radial-gradient(1px 1px at 250px 180px, rgba(28,26,24,0.14), transparent),
    radial-gradient(2px 2px at 300px 90px, rgba(28,26,24,0.12), transparent),
    radial-gradient(1px 1px at 350px 220px, rgba(28,26,24,0.16), transparent),
    radial-gradient(1.5px 1.5px at 400px 150px, rgba(28,26,24,0.12), transparent),
    radial-gradient(1px 1px at 450px 60px, rgba(28,26,24,0.14), transparent),
    radial-gradient(2px 2px at 500px 200px, rgba(28,26,24,0.08), transparent),
    radial-gradient(1px 1px at 550px 100px, rgba(28,26,24,0.18), transparent),
    radial-gradient(1.5px 1.5px at 600px 250px, rgba(28,26,24,0.12), transparent),
    radial-gradient(1px 1px at 50px 200px, rgba(28,26,24,0.1), transparent),
    radial-gradient(2px 2px at 280px 30px, rgba(28,26,24,0.06), transparent),
    radial-gradient(1px 1px at 150px 250px, rgba(28,26,24,0.12), transparent);
}
[data-theme="light"] .stars-near {
  background-image:
    radial-gradient(2.5px 2.5px at 40px 70px, rgba(28,26,24,0.3), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(28,26,24,0.22), transparent),
    radial-gradient(2.5px 2.5px at 300px 90px, rgba(28,26,24,0.28), transparent),
    radial-gradient(2px 2px at 450px 60px, rgba(28,26,24,0.2), transparent),
    radial-gradient(2.5px 2.5px at 550px 100px, rgba(28,26,24,0.3), transparent);
}
.comet {
  position: absolute;
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(201,182,147,0.15) 20%, rgba(201,182,147,0.5) 50%, rgba(255,255,255,0.9) 100%);
  border-radius: 2px;
  transform-origin: right center;
  box-shadow: 0 0 8px rgba(201,182,147,0.4);
  animation: comet-fly 12s linear infinite;
  opacity: 0;
}
.comet-1 { top: 12%; left: -150px; animation-delay: 0s; animation-duration: 10s; }
.comet-2 { top: 38%; left: -150px; animation-delay: 4s; animation-duration: 14s; }
.comet-3 { top: 65%; left: -150px; animation-delay: 8s; animation-duration: 11s; }
.comet-4 { top: 88%; left: -150px; animation-delay: 12s; animation-duration: 13s; }
@keyframes comet-fly {
  0% { transform: translateX(0) rotate(var(--comet-rot, 0deg)); opacity: 0; }
  5% { opacity: 0.7; }
  95% { opacity: 0.6; }
  100% { transform: translateX(calc(100vw + 200px)) rotate(var(--comet-rot, 0deg)); opacity: 0; }
}
.comet-1 { --comet-rot: 0deg; }
.comet-2 { --comet-rot: -4deg; }
.comet-3 { --comet-rot: 2deg; }
.comet-4 { --comet-rot: -2deg; }
[data-theme="light"] .comet {
  background: linear-gradient(90deg, transparent 0%, rgba(139,115,85,0.12) 20%, rgba(139,115,85,0.35) 50%, rgba(80,70,60,0.7) 100%);
  box-shadow: 0 0 6px rgba(139,115,85,0.3);
}
/* Верхнее свечение — далёкая галактика/туманность */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 75vh;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(201,182,147,0.2) 0%, rgba(120,100,160,0.06) 25%, transparent 55%),
    radial-gradient(ellipse 100% 60% at 80% 10%, rgba(80,120,180,0.05) 0%, transparent 40%),
    radial-gradient(ellipse 80% 50% at 20% 5%, rgba(100,80,140,0.06) 0%, transparent 35%);
  pointer-events: none;
  z-index: -1;
  animation: bg-glow-pulse 8s ease-in-out infinite;
}
[data-theme="light"] body::before {
  background: radial-gradient(ellipse 140% 100% at 50% -30%, rgba(139,115,85,0.18) 0%, rgba(139,115,85,0.06) 35%, transparent 65%);
  animation: bg-glow-pulse-light 6s ease-in-out infinite;
}
@keyframes bg-glow-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1) translate(0, 0); }
  33% { opacity: 1; transform: scale(1.02) translate(1%, 0.5%); }
  66% { opacity: 0.95; transform: scale(1.01) translate(-0.5%, -0.3%); }
}
@keyframes bg-glow-pulse-light {
  0%, 100% { opacity: 0.9; transform: scale(1) translate(0, 0); }
  33% { opacity: 1; transform: scale(1.02) translate(1%, 0.5%); }
  66% { opacity: 0.95; transform: scale(1.01) translate(-0.5%, -0.3%); }
}
body {
  margin: 0;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
input, button, select, textarea { font-family: inherit; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.center { text-align: center; }

/* Geo-blocked page */
.geo-blocked-page {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); z-index: 99999;
  padding: 24px;
}
.geo-blocked-inner {
  max-width: 480px; text-align: center;
}
.geo-blocked-icon {
  width: 80px; height: 80px; margin: 0 auto 24px;
  color: var(--text-dim); opacity: 0.7;
}
.geo-blocked-icon svg { width: 100%; height: 100%; }
.geo-blocked-title {
  font-size: 1.5rem; font-weight: 600; color: var(--text);
  margin: 0 0 16px; line-height: 1.3;
}
.geo-blocked-desc {
  font-size: 1rem; color: var(--text-muted); line-height: 1.6;
  margin: 0 0 12px;
}
.geo-blocked-hint {
  font-size: 0.875rem; color: var(--text-dim);
  margin: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,182,147,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,182,147,0.35); }
* { scrollbar-width: thin; scrollbar-color: rgba(201,182,147,0.2) transparent; }

.svg-icon { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; vertical-align: -0.125em; flex-shrink: 0; }
.svg-icon svg { width: 100%; height: 100%; }

#casinoApp { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; overflow-x: hidden; transform: none; padding-bottom: env(safe-area-inset-bottom); }
html, body {
  overflow-x: hidden; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-padding-bottom: max(72px, env(safe-area-inset-bottom));
}

/* ================================================================
   HEADER — Glassmorphism (fixed на десктопе — без пустой полосы при скролле)
   ================================================================ */
.casino-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  min-width: 0; max-width: 100%;
  height: var(--header-h);
  background: rgba(10,12,15,0.80);
  backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  transition: background var(--transition-slow);
}

.header-left { display: flex; align-items: center; gap: 24px; min-width: 0; }
.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-nav-wrap { display: flex; align-items: center; flex-wrap: wrap; }
.nav-secondary { display: none; }
.header-nav-extras { display: none; }
.header-quick-actions { display: none; }
.header-menu-btn {
  display: none; background: none; border: none;
  color: var(--text-muted); font-size: 1.3rem; cursor: pointer; padding: 4px;
  transition: color var(--transition);
}
.header-menu-btn:hover { color: var(--text); }

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 32px; width: auto; filter: brightness(1.25) contrast(1.1); }

.nav-main { display: flex; gap: 2px; }
.nav-link {
  padding: 8px 16px; font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); border-radius: var(--radius-sm);
  transition: all var(--transition); text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.nav-link.active { color: var(--accent); background: var(--nav-active-bg); }
.nav-account { display: none; }

/* Theme toggle — header */
.header-theme-wrap {
  display: flex; align-items: center;
}
.theme-toggle {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  color: var(--text-muted); padding: 0;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.theme-toggle:hover { color: var(--accent); border-color: rgba(201,182,147,0.3); background: var(--accent-dim); }
.theme-toggle { position: relative; }
.theme-toggle svg { width: 18px; height: 18px; position: absolute; inset: 0; margin: auto; }
.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

.header-buttons { display: flex; align-items: center; gap: 8px; }

/* ================================================================
   BUTTONS — Minimal, premium
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 22px; font-size: 0.82rem; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition); border: none; font-family: inherit;
  text-decoration: none; white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--btn-primary); color: var(--btn-primary-text);
}
.btn-primary:hover { background: var(--btn-primary-hover); box-shadow: 0 0 24px var(--accent-glow); }
.btn-outline {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 0.76rem; }
.btn-danger { background: var(--danger); color: var(--danger-text); }
.btn-danger:hover { background: rgba(90,42,42,0.6); }

/* Balance — monospace numbers, фиксированная ширина чтобы не съезжал */
.balance-wrap {
  display: flex; align-items: center; gap: 6px; font-size: 0.82rem;
  flex-shrink: 0; min-width: 5.5em; white-space: nowrap;
}
.balance-main {
  font-family: var(--font-mono); font-weight: 700; color: var(--accent); font-size: 0.9rem;
  font-variant-numeric: tabular-nums; /* стабильная ширина цифр — не съезжает */
}
.balance-bonus { font-family: var(--font-mono); font-weight: 500; color: var(--text-dim); font-size: 0.75rem; font-variant-numeric: tabular-nums; }

/* Header boost indicator — active dust boost + timer */
.header-boost-indicator {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(201,182,147,0.15) 0%, rgba(139,115,85,0.1) 100%);
  border: 1px solid rgba(201,182,147,0.25);
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
}
.header-boost-indicator.hidden { display: none !important; }
.header-boost-icon { display: inline-flex; width: 1.1em; height: 1.1em; color: var(--accent); }
.header-boost-icon svg { width: 100%; height: 100%; }
.header-boost-label { white-space: nowrap; }
.header-boost-timer { font-family: var(--font-mono); font-size: 0.85em; color: var(--text-dim); }

/* ================================================================
   WINNERS BAR
   ================================================================ */
.winners-bar {
  position: relative;
  overflow: hidden;
  padding: 10px 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  transition: margin-left var(--transition-slow);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.winners-bar:not(.winners-bar--bottom) {
  min-height: var(--winners-bar-h);
}
.winners-bar--bottom {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  top: auto;
  border-bottom: none;
  border-top: 1px solid var(--border);
  z-index: 100;
  margin-left: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
body.winners-bar-at-bottom {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
.winners-bar-track {
  display: flex;
  gap: 20px;
  padding: 0 24px;
  animation: winners-scroll 80s linear infinite;
  width: max-content;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}
.winners-bar-track:hover { animation-play-state: paused; }
.winners-bar[data-appearance="one_by_one"] { -webkit-mask-image: none; mask-image: none; }
.winners-bar[data-appearance="one_by_one"] .winners-bar-track {
  animation: none; width: 100%; justify-content: center;
  transition: opacity 0.25s ease;
}
.winners-bar[data-appearance="animated"] .winners-bar-item { opacity: 0; }
.winners-bar[data-appearance="animated"] .winners-bar-item--mult-100 {
  animation: winners-item-enter 0.5s ease-out forwards, winners-card-pulse-100 2.5s ease-in-out 0.5s infinite;
}
.winners-bar[data-appearance="animated"] .winners-bar-item--mult-200 {
  animation: winners-item-enter 0.5s ease-out forwards, winners-card-pulse-200 1.8s ease-in-out 0.5s infinite;
}
.winners-bar[data-appearance="animated"] .winners-bar-item:not(.winners-bar-item--mult-100):not(.winners-bar-item--mult-200) {
  animation: winners-item-enter 0.5s ease-out forwards;
}
@keyframes winners-item-enter {
  from { opacity: 0; transform: scale(0.95) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.winners-bar-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
  padding: 7px 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
}
.winners-bar-item-glow { display: none; }
.winners-bar {
  --winners-mult100: #C9B693;
  --winners-mult200: #D8C9A8;
}
.winners-bar-item--mult-100 {
  border-color: rgba(201,182,147,0.3);
  box-shadow: 0 0 12px rgba(201,182,147,0.1), inset 0 0 16px rgba(201,182,147,0.03);
  animation: winners-card-pulse-100 2.5s ease-in-out infinite;
  will-change: transform;
}
.winners-bar-item--mult-100 .winners-bar-item-mult {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(201,182,147,0.3);
}
.winners-bar-item--mult-100 .winners-bar-item-glow {
  display: block; position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(201,182,147,0.08) 50%, transparent 60%);
  background-size: 200% 100%; animation: winners-shimmer 3s ease-in-out infinite; pointer-events: none;
}
.winners-bar-item--mult-200 {
  border-color: rgba(201,182,147,0.5);
  box-shadow: 0 0 20px rgba(201,182,147,0.15), 0 0 40px rgba(201,182,147,0.05), inset 0 0 24px rgba(201,182,147,0.04);
  animation: winners-card-pulse-200 1.8s ease-in-out infinite;
  will-change: transform;
}
.winners-bar-item--mult-200 .winners-bar-item-mult {
  color: var(--accent-hover);
  text-shadow: 0 0 12px rgba(201,182,147,0.5);
  animation: winners-mult-glow 1.8s ease-in-out infinite;
}
.winners-bar-item--mult-200 .winners-bar-item-glow {
  display: block; position: absolute; inset: -2px; border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(201,182,147,0.15) 50%, transparent 65%);
  background-size: 200% 100%; animation: winners-shimmer 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes winners-card-pulse-100 { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }
@keyframes winners-card-pulse-200 { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes winners-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes winners-mult-glow { 0%, 100% { opacity: 1; filter: brightness(1); } 50% { opacity: 1; filter: brightness(1.15); } }
.winners-bar-item-img { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-elevated); }
.winners-bar-item-name { color: var(--text); font-weight: 600; }
.winners-bar-item-mult { color: var(--accent); font-family: var(--font-mono); font-weight: 700; }
.winners-bar-item-win { color: var(--text-muted); font-size: 0.73rem; }
@keyframes winners-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ================================================================
   LAYOUT (sidebar + main)
   ================================================================ */
.casino-layout {
  display: flex; flex: 1; min-height: 0;
  margin-left: var(--sidebar-w);
  transition: margin-left var(--transition-slow);
}

/* Sidebar — expanded state, фиксирован на десктопе (под хедером) */
.casino-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: fixed !important; left: 0; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  z-index: 100;
  transition: width var(--transition-slow), padding var(--transition-slow);
}
.sidebar-backdrop {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0;
  backdrop-filter: none !important;
}
.sidebar-backdrop.open {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
  opacity: 1;
}
/* Мобильный хедер сайдбара — скрыт на десктопе */
.sidebar-mobile-header { display: none; }

/* Демо-баннер в сайдбаре (только мобильные) — показывает навигацию по слайдам */
.sidebar-hero-demo { display: none; }

/* Collapse button */
.sidebar-collapse-btn {
  display: flex; align-items: center; justify-content: flex-end;
  width: 100%; padding: 6px 10px; margin-bottom: 2px;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); transition: color var(--transition);
}
.sidebar-collapse-btn svg { width: 18px; height: 18px; transition: transform var(--transition-slow); }
.sidebar-collapse-btn:hover { color: var(--text); }

/* Collapsed state */
.casino-sidebar.collapsed { width: 64px; padding: 12px 6px; }
.casino-sidebar.collapsed .sidebar-collapse-btn { justify-content: center; }
.casino-sidebar.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
.casino-sidebar.collapsed .sidebar-loyalty-dashboard { display: none; }
.casino-sidebar.collapsed .sidebar-nav-label,
.casino-sidebar.collapsed .sidebar-nav-title,
.casino-sidebar.collapsed .sidebar-badge,
.casino-sidebar.collapsed .sidebar-divider { display: none; }
.casino-sidebar.collapsed .sidebar-nav-item {
  justify-content: center; padding: 10px 0;
}
.casino-sidebar.collapsed .sidebar-nav-item .sidebar-nav-icon { width: auto; margin: 0; }
.casino-sidebar.collapsed .sidebar-bottom-item .sidebar-bottom-label,
.casino-sidebar.collapsed .sidebar-lang-chevron,
.casino-sidebar.collapsed .sidebar-support-badge,
.casino-sidebar.collapsed .sidebar-bottom-card-text { display: none; }
.casino-sidebar.collapsed .sidebar-lang-flag { flex-shrink: 0; }
.casino-sidebar.collapsed .sidebar-bottom-item,
.casino-sidebar.collapsed .sidebar-support-link,
.casino-sidebar.collapsed .sidebar-bottom-card { justify-content: center; padding: 9px 0; }
.casino-sidebar.collapsed .sidebar-social-row { justify-content: center; padding: 8px 0; }
.casino-sidebar.collapsed .sidebar-bottom-row { flex-direction: column; }
.casino-sidebar.collapsed + .sidebar-backdrop + .casino-main { }

/* Sidebar collapsed layout */
body.sidebar-collapsed .casino-layout { margin-left: 64px; }
body.sidebar-collapsed .winners-bar:not(.winners-bar--bottom) { margin-left: 64px; }
body.sidebar-collapsed .casino-footer { margin-left: 64px; }
body.sidebar-collapsed .casino-header { left: 64px; }

/* Loyalty dashboard */
.sidebar-loyalty-dashboard {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 14px; border: 1px solid var(--border);
  transition: opacity var(--transition);
}
.sidebar-guest-promo .sidebar-promo-mini-title { font-weight: 600; font-size: 0.8rem; color: var(--accent); }
.sidebar-guest-promo p { font-size: 0.74rem; color: var(--text-muted); margin: 4px 0 8px; }
.sidebar-guest-promo .sidebar-promo-mini-link { font-size: 0.74rem; color: var(--accent); font-weight: 600; }

.sidebar-loyalty-dash { display: flex; flex-direction: column; gap: 10px; }
.sidebar-dash-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; transition: opacity var(--transition);
}
.sidebar-dash-link:hover { opacity: 0.85; }
.sidebar-dash-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #4F5560, #6B7280);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; color: var(--text); flex-shrink: 0;
  border: 2px solid rgba(201,182,147,0.3);
  overflow: hidden;
}
.sidebar-dash-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-dash-info { flex: 1; min-width: 0; }
.sidebar-dash-level { font-weight: 700; font-size: 0.76rem; color: var(--text); }
.sidebar-dash-title { font-size: 0.68rem; color: var(--text-muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-dash-xp-bar { height: 3px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.sidebar-dash-xp-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.6s ease; }
.sidebar-dash-currencies { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sidebar-dash-currency {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; background: rgba(255,255,255,0.03); border-radius: var(--radius-sm);
  font-size: 0.68rem; font-weight: 600; white-space: nowrap;
}
.sidebar-dash-currency.loyalty-xp { color: var(--accent); }

/* Sidebar navigation */
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; font-size: 0.82rem; color: var(--text-muted);
  border-radius: var(--radius-sm); transition: all var(--transition);
  text-decoration: none; position: relative;
  white-space: nowrap; overflow: hidden;
}
.sidebar-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar-nav-item.active { color: var(--accent); background: var(--nav-active-bg); }
.sidebar-nav-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-nav-icon svg { width: 20px; height: 20px; stroke-width: 1.5; }
.sidebar-nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sidebar-badge {
  background: #5A2A2A; color: #E8A0A0; font-size: 0.58rem; font-weight: 700;
  padding: 2px 7px; border-radius: 10px; min-width: 18px; text-align: center;
  flex-shrink: 0;
}

.sidebar-nav-title {
  font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-dim); padding: 16px 14px 6px; margin: 0;
}
.sidebar-nav-title:first-child { padding-top: 4px; }

.sidebar-divider {
  height: 1px; background: var(--border); margin: 8px 14px;
}

/* Sidebar bottom — чётко, понятно, лаконично */
.sidebar-bottom {
  margin-top: auto; display: flex; flex-direction: column; gap: 10px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.sidebar-bottom-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 14px; background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 0.82rem; font-family: inherit;
  border-radius: var(--radius-sm); transition: all var(--transition);
  text-decoration: none; text-align: left;
}
.sidebar-bottom-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar-bottom-icon {
  flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; position: relative;
}
.sidebar-bottom-icon svg { width: 18px; height: 18px; }
.sidebar-bottom-icon .theme-icon-sun,
.sidebar-bottom-icon .theme-icon-moon { position: absolute; }
.sidebar-bottom-label { flex: 1; }

/* Карточки-кнопки (Поддержка, Тема, Язык) */
.sidebar-bottom-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text); cursor: pointer; font-size: 0.82rem; font-weight: 500;
  text-decoration: none; transition: all var(--transition);
}
.sidebar-bottom-card:hover {
  background: rgba(255,255,255,0.1); border-color: rgba(201,182,147,0.25);
  color: var(--text);
}
.sidebar-support-card {
  background: linear-gradient(135deg, rgba(201,182,147,0.12), rgba(139,115,85,0.08));
  border-color: rgba(201,182,147,0.2);
}
.sidebar-support-card:hover { background: linear-gradient(135deg, rgba(201,182,147,0.18), rgba(139,115,85,0.12)); }
.sidebar-theme-card, .sidebar-lang-btn {
  flex: 1; min-width: 0; flex-basis: 0; justify-content: center;
}
.sidebar-bottom-row {
  display: flex; gap: 8px; align-items: stretch;
}
.sidebar-bottom-card-icon {
  flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; position: relative;
}
.sidebar-bottom-card-icon svg { width: 18px; height: 18px; }
.sidebar-bottom-card-icon .theme-icon-sun,
.sidebar-bottom-card-icon .theme-icon-moon { position: absolute; }
.sidebar-bottom-card-text { flex: 1; min-width: 0; }
.sidebar-support-badge {
  background: var(--accent); color: #0A0C0F; font-size: 0.6rem; font-weight: 700;
  padding: 3px 8px; border-radius: 10px; flex-shrink: 0;
}

/* Выбор языка — попап справа */
.sidebar-lang { position: relative; flex: 1; min-width: 0; }
.sidebar-lang-btn { min-width: 0; }
.sidebar-lang-flag { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.sidebar-lang-chevron { font-size: 0.55rem; opacity: 0.5; margin-left: auto; flex-shrink: 0; }
.sidebar-lang-popup {
  position: fixed; z-index: 10000;
  width: 280px; max-height: 400px;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  overflow: hidden; display: flex; flex-direction: column;
}
.sidebar-lang-popup.hidden { display: none !important; }
.sidebar-lang-popup-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #eee;
}
.sidebar-lang-popup-title { font-size: 1rem; font-weight: 600; color: #1a1a1a; }
.sidebar-lang-popup-close {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: #666; font-size: 1.2rem; cursor: pointer;
  border-radius: 6px; transition: background 0.2s, color 0.2s;
}
.sidebar-lang-popup-close:hover { background: #f0f0f0; color: #1a1a1a; }
.sidebar-lang-popup-body { padding: 12px; overflow-y: auto; flex: 1; }
.sidebar-lang-popup-section { margin-bottom: 16px; }
.sidebar-lang-popup-section:last-child { margin-bottom: 0; }
.sidebar-lang-popup-section-title {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: #888; padding: 0 4px 8px;
}
.sidebar-lang-list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-lang-option {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; text-align: left; background: none; border: none;
  color: #1a1a1a; cursor: pointer; font-size: 0.9rem; font-family: inherit;
  border-radius: 8px; transition: background 0.2s;
}
.sidebar-lang-option:hover { background: #f5f5f5; }
.sidebar-lang-option.selected { background: rgba(201,182,147,0.15); color: #8B7355; }
.sidebar-lang-option .lang-flag { font-size: 1.25rem; flex-shrink: 0; }
.sidebar-lang-option .lang-name { flex: 1; }
.sidebar-lang-option .lang-check { color: #C9B693; font-size: 1rem; flex-shrink: 0; }

.sidebar-support-link { min-width: 0; }
.sidebar-social-row {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0;
}
.sidebar-social-btn {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: #fff; background: var(--social-color, #666);
  transition: opacity var(--transition), transform var(--transition);
}
.sidebar-social-btn:hover { opacity: 0.9; transform: scale(1.05); }
.sidebar-social-btn svg { width: 18px; height: 18px; }

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.casino-main {
  flex: 1; min-width: 0; min-height: 0; padding: 24px 28px;
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.casino-main.game-active { padding: 0; position: relative; overflow: hidden; }
.page { }
.page-head { margin-bottom: 24px; }
.games-page-head { padding: 0; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700; margin: 0 0 12px;
  letter-spacing: 0.04em;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700; margin: 0;
  letter-spacing: 0.03em;
}

/* ================================================================
   HERO BANNER
   ================================================================ */
.home-banner-row { display: grid; grid-template-columns: 1fr 320px; gap: 18px; margin-bottom: 28px; align-items: stretch; }
.home-hero-banner {
  background: var(--hero-bg);
  border-radius: var(--radius-xl); padding: 44px 40px;
  position: relative; overflow: hidden; min-height: 280px;
  display: flex; align-items: center;
  box-shadow: var(--shadow-card);
}
.home-hero-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(201,182,147,0.05), transparent 55%),
              radial-gradient(ellipse at 80% 20%, rgba(201,182,147,0.03), transparent 50%);
  pointer-events: none;
}
.home-hero-visual,
.home-hero-visual--dark { position: absolute; inset: 0; pointer-events: none; }

/* ── Hero Fallback Banner (animated, no image) ── */
.hero-fallback {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl);
  min-height: 320px; aspect-ratio: 3 / 1;
  display: flex; align-items: center;
  background: #0E1118;
}
.hero-fallback-bg {
  position: absolute; inset: 0; overflow: hidden;
}
.hero-fallback-orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0;
  animation: hf-orb-float 8s ease-in-out infinite;
}
.hero-fallback-orb--1 {
  width: 300px; height: 300px; top: -80px; left: -40px;
  background: radial-gradient(circle, rgba(201,182,147,0.12), transparent 70%);
  animation-delay: 0s;
}
.hero-fallback-orb--2 {
  width: 200px; height: 200px; bottom: -60px; right: 10%;
  background: radial-gradient(circle, rgba(139,115,85,0.1), transparent 70%);
  animation-delay: -3s;
}
.hero-fallback-orb--3 {
  width: 150px; height: 150px; top: 20%; right: 25%;
  background: radial-gradient(circle, rgba(201,182,147,0.08), transparent 70%);
  animation-delay: -5s;
}
@keyframes hf-orb-float {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.8); }
  30%  { opacity: 1; }
  50%  { opacity: 1; transform: translate(20px, -15px) scale(1.1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-10px, 10px) scale(0.8); }
}
.hero-fallback-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,182,147,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,182,147,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  animation: hf-grid-pulse 4s ease-in-out infinite;
}
@keyframes hf-grid-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
/* Animated logo assembly */
/* --hf-delay: offset so animation starts AFTER preloader fades (≈2.2s) */
.hero-fallback-logo {
  position: absolute; right: 6%; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 24px;
  pointer-events: none; z-index: 3;
}
.hf-diamond {
  width: 110px; height: 132px; flex-shrink: 0;
  opacity: 0;
  animation: hf-diamond-in 1.2s ease forwards 2.4s, hf-float 5s ease-in-out 5s infinite;
}
.hf-diamond svg { width: 100%; height: 100%; display: block; }
@keyframes hf-diamond-in {
  0% { opacity: 0; transform: scale(0.4) rotate(-12deg); filter: blur(6px); }
  50% { opacity: 1; transform: scale(1.06) rotate(2deg); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0); }
}
@keyframes hf-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.hf-outline {
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: hf-draw 1.4s ease-out 2.5s forwards;
}
@keyframes hf-draw { to { stroke-dashoffset: 0; } }
.hf-facet-top { opacity: 0; animation: hf-fade 0.6s ease forwards 3.5s; }
.hf-facet-bot { opacity: 0; animation: hf-fade2 0.6s ease forwards 3.7s; }
@keyframes hf-fade { to { opacity: 0.1; } }
@keyframes hf-fade2 { to { opacity: 0.05; } }
.hf-inner-top { opacity: 0; animation: hf-fade3 0.5s ease forwards 3.8s; }
.hf-inner-bot { opacity: 0; animation: hf-fade3 0.5s ease forwards 4.0s; }
@keyframes hf-fade3 { to { opacity: 0.3; } }
.hf-core { opacity: 0; animation: hf-fade4 0.4s ease forwards 4.1s; }
@keyframes hf-fade4 { to { opacity: 0.7; } }

.hf-brandname {
  font-family: var(--font-display); font-size: 4rem; font-weight: 700;
  color: #C9B693; letter-spacing: 0.06em;
  opacity: 0;
  animation: hf-name-in 1s ease forwards 4.2s;
}
@keyframes hf-name-in {
  from { opacity: 0; transform: translateX(-20px); letter-spacing: 0.25em; }
  to { opacity: 1; transform: translateX(0); letter-spacing: 0.06em; }
}
.hero-fallback-content {
  position: relative; z-index: 2;
  padding: 44px 40px; max-width: 500px;
}
.hero-fallback-tagline {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--accent); margin: 0 0 10px;
  opacity: 0; animation: hf-fade-up 0.8s ease forwards 0.3s;
}
.hero-fallback-title {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 800; color: var(--text);
  margin: 0 0 10px; line-height: 1.2; letter-spacing: 0.02em;
  opacity: 0; animation: hf-fade-up 0.8s ease forwards 0.5s;
}
.hero-fallback-desc {
  font-size: 0.9rem; color: var(--text-muted); margin: 0 0 22px; line-height: 1.5;
  opacity: 0; animation: hf-fade-up 0.8s ease forwards 0.7s;
}
.hero-fallback-cta {
  padding: 12px 32px; font-size: 0.9rem; font-weight: 700;
  opacity: 0; animation: hf-fade-up 0.8s ease forwards 0.9s;
}
@keyframes hf-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .hero-fallback { min-height: 220px; aspect-ratio: auto; }
  .hero-fallback-content { padding: 24px 20px; }
  .hero-fallback-title { font-size: 1.3rem; }
  .hero-fallback-desc { font-size: 0.82rem; }
  .hero-fallback-logo { right: 4%; gap: 10px; }
  .hf-diamond { width: 50px; height: 60px; }
  .hf-brandname { font-size: 1.6rem; }
  .hero-fallback-cta { padding: 12px 28px; font-size: 0.86rem; border-radius: 24px; min-height: 44px; }
}
/* ── End Hero Fallback ── */
.home-hero-content { position: relative; z-index: 2; max-width: 480px; }
.home-hero-tagline {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--accent); margin: 0 0 10px;
}
.home-hero-title {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 800; margin: 0 0 12px; line-height: 1.25;
  color: var(--text);
  letter-spacing: 0.02em;
}
.home-hero-desc { font-size: 0.88rem; color: var(--text-muted); margin: 0 0 20px; line-height: 1.6; }
.home-hero-cta { padding: 11px 32px; font-size: 0.88rem; }
.home-hero-balance {
  font-family: var(--font-mono);
  font-size: 2rem; font-weight: 700; color: var(--accent); margin: 0 0 4px;
}
.home-hero-balance--bonus { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 4px; }
.currency { font-size: 0.82rem; color: var(--text-dim); margin: 0 0 18px; }
.actions { display: flex; gap: 10px; }
.home-hero-illustration { position: absolute; right: 20px; bottom: 10px; width: 160px; height: 160px; opacity: 0.4; }
.home-hero-illustration svg { width: 100%; height: 100%; }

/* Hero Slider (CMS) */
.home-hero-slider-wrap {
  position: relative; border-radius: var(--radius-xl);
  overflow: hidden;
}
.home-hero-slider-wrap:empty {
  min-height: 260px; background: var(--hero-bg);
}
.hero-slider {
  position: relative; width: 100%;
  border-radius: var(--radius-xl); overflow: hidden;
}
.hero-slider-track { position: relative; width: 100%; touch-action: pan-y; }
.hero-slide {
  position: absolute; inset: 0;
  background-color: var(--hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex; align-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s ease;
}
.hero-slide.active {
  position: relative; opacity: 1; pointer-events: auto; z-index: 1;
  min-height: 320px; aspect-ratio: 3 / 1;
}
/* Fallback-слайд: hero-fallback заполняет слайд, анимации логотипа и фона работают */
.hero-slide--fallback {
  display: flex; align-items: stretch; justify-content: center;
}
.hero-slide--fallback .hero-fallback {
  flex: 1; width: 100%; min-height: 100%;
  border-radius: inherit;
}
/* Бонусный слайд — фон при отсутствии изображения */
.hero-slide-content--bonus {
  background: linear-gradient(135deg, rgba(20,18,25,0.9) 0%, rgba(30,25,35,0.85) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 28px !important;
}
/* Кнопки prev/next убраны — только индикатор точек */
.hero-slider-prev,
.hero-slider-next { display: none !important; }

/* Индикатор слайдов — красивый дизайн */
.hero-slider-dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  z-index: 10; padding: 10px 20px;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(12px);
  border-radius: 24px; border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hero-slider-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.3); border: none;
  cursor: pointer; padding: 0;
  transition: all 0.3s ease;
}
.hero-slider-dot:hover {
  background: rgba(255,255,255,0.5); transform: scale(1.15);
}
.hero-slider-dot.active {
  width: 24px; border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), #D8C9A8);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: scale(1);
}
.hero-slider--controls-on-hover .hero-slider-prev,
.hero-slider--controls-on-hover .hero-slider-next,
.hero-slider--controls-on-hover .hero-slider-dots { opacity: 0; transition: opacity var(--transition); }
.hero-slider--controls-on-hover:hover .hero-slider-prev,
.hero-slider--controls-on-hover:hover .hero-slider-next,
.hero-slider--controls-on-hover:hover .hero-slider-dots { opacity: 1; }
.hero-slide-content { position: relative; z-index: 2; max-width: 480px; padding: 44px 40px; }
.hero-slide-content--left { text-align: left; }
.hero-slide-content--center { text-align: center; margin: 0 auto; }
.hero-slide-content--right { text-align: right; margin-left: auto; }
.hero-slide-content--bottom { align-self: flex-end; margin-top: auto; padding-bottom: 64px; }

/* Stories + Preview row (истории слева, турнир и розыгрыш справа) */
.home-stories-preview-row {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; margin-bottom: 24px; align-items: start;
}
.home-stories-preview-row > .home-stories-row { min-width: 0; }
.home-preview-blocks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  width: 580px; max-width: 100%;
  align-items: stretch;
}
.home-preview-blocks:not(:has(.home-tournament-block:not(:empty))):not(:has(.home-raffle-block:not(:empty))) { display: none; }
.home-tournament-block { min-width: 0; min-height: 0; display: flex; }
.home-tournament-block:empty { display: none; }
.home-raffle-block { min-width: 0; min-height: 0; display: flex; }
.home-raffle-block:empty { display: none; }
.home-preview-blocks:has(.home-tournament-block:not(:empty)):not(:has(.home-raffle-block:not(:empty))) .home-tournament-block { grid-column: 1 / -1; }
.home-preview-blocks:not(:has(.home-tournament-block:not(:empty))):has(.home-raffle-block:not(:empty)) .home-raffle-block { grid-column: 1 / -1; }

/* ===== БЛОК 1: ТУРНИР ===== */
.home-tournament-block a {
  display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; width: 100%; height: 100%;
  text-decoration: none; color: inherit;
  background:
    radial-gradient(ellipse 80% 100% at 100% 0%, rgba(201,182,147,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(201,182,147,0.04) 0%, transparent 50%),
    linear-gradient(160deg, #1c1722 0%, #0f0d12 40%, #13111a 100%);
  border: 1px solid rgba(201,182,147,0.22);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-sizing: border-box;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s ease, border-color 0.35s ease;
  overflow: hidden; position: relative;
  animation: home-block-in 0.5s ease-out;
}
.home-tournament-block a::before {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(201,182,147,0.15) 0%, transparent 40%, transparent 70%, rgba(201,182,147,0.08) 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;
  padding: 1px; pointer-events: none; opacity: 0.6;
}
.home-tournament-block a::after {
  content: ''; position: absolute; top: -50%; right: -30%; width: 80%; height: 80%;
  background: radial-gradient(circle, rgba(201,182,147,0.06) 0%, transparent 70%);
  pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
  filter: blur(30px);
}
.home-tournament-block a:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,182,147,0.25), 0 0 30px rgba(201,182,147,0.06);
  border-color: rgba(201,182,147,0.45);
}
.home-tournament-block a:hover::after { opacity: 1; }
@keyframes home-block-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.home-tournament-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px;
}
.home-tournament-title {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin: 0;
  text-shadow: 0 0 20px rgba(201,182,147,0.3);
}
.home-tournament-provider {
  font-size: 0.65rem; padding: 3px 10px; border-radius: 20px;
  background: rgba(201,182,147,0.1); color: var(--text-muted);
  border: 1px solid rgba(201,182,147,0.12);
  backdrop-filter: blur(8px);
}
.home-tournament-middle {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px;
}
.home-tournament-timer-wrap {
  display: flex; flex-direction: column; gap: 3px;
}
.home-tournament-timer-label { font-size: 0.66rem; color: var(--text-dim); font-weight: 500; margin: 0; text-transform: uppercase; letter-spacing: 0.06em; }
.home-tournament-timer {
  font-size: 1.3rem; font-weight: 800; font-family: var(--font-mono);
  color: var(--text); margin: 0; letter-spacing: 0.04em; white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
.home-tournament-prize {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(201,182,147,0.15) 0%, rgba(139,115,85,0.08) 100%);
  border: 1px solid rgba(201,182,147,0.28);
  font-size: 1.05rem; font-weight: 800; font-family: var(--font-mono);
  color: var(--accent); margin: 0; white-space: nowrap;
  box-shadow: 0 2px 12px rgba(201,182,147,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
  text-shadow: 0 0 12px rgba(201,182,147,0.25);
}
.home-tournament-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto;
}
.home-tournament-meta {
  font-size: 0.7rem; color: var(--text-muted); margin: 0; display: flex; gap: 14px; white-space: nowrap;
}
.home-tournament-meta span { display: inline-flex; align-items: center; gap: 4px; opacity: 0.8; }
.home-tournament-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; font-size: 0.8rem; font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #b8a272 100%);
  color: var(--btn-primary-text);
  transition: all var(--transition); white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(201,182,147,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 0 1px 1px rgba(0,0,0,0.15);
  letter-spacing: 0.02em;
}
.home-tournament-block a:hover .home-tournament-btn {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #c9b683 100%);
  box-shadow: 0 4px 16px rgba(201,182,147,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

/* ===== БЛОК 2: РОЗЫГРЫШ ===== */
.home-raffle-block > div {
  display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0; height: 100%;
  background:
    radial-gradient(ellipse 80% 100% at 0% 0%, rgba(80,175,149,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(80,175,149,0.03) 0%, transparent 50%),
    linear-gradient(160deg, #151a1e 0%, var(--bg-card) 40%, #12161c 100%);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-sizing: border-box;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
}
.home-raffle-block > div::before {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(80,175,149,0.12) 0%, transparent 40%, transparent 70%, rgba(80,175,149,0.06) 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;
  padding: 1px; pointer-events: none; opacity: 0.5;
}
.home-raffle-block > div::after {
  content: ''; position: absolute; top: -50%; left: -30%; width: 80%; height: 80%;
  background: radial-gradient(circle, rgba(80,175,149,0.05) 0%, transparent 70%);
  pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
  filter: blur(30px);
}
.home-raffle-block > div:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(80,175,149,0.15), 0 0 30px rgba(80,175,149,0.04);
}
.home-raffle-block > div:hover::after { opacity: 1; }
.home-raffle-block .home-raffle--open {
  border-color: rgba(80,175,149,0.22);
}
.home-raffle-block .home-raffle--open::before {
  background: linear-gradient(135deg, rgba(80,175,149,0.15) 0%, transparent 40%, transparent 70%, rgba(80,175,149,0.08) 100%);
}
.home-raffle-block .home-raffle--progress {
  background:
    radial-gradient(ellipse 80% 100% at 100% 0%, rgba(201,182,147,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(201,182,147,0.03) 0%, transparent 50%),
    linear-gradient(160deg, #1a1720 0%, var(--bg-card) 40%, #16131e 100%);
  border-color: rgba(201,182,147,0.22);
}
.home-raffle-block .home-raffle--progress::before {
  background: linear-gradient(135deg, rgba(201,182,147,0.15) 0%, transparent 40%, transparent 70%, rgba(201,182,147,0.08) 100%);
}
.home-raffle-block .home-raffle--progress:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,182,147,0.2), 0 0 30px rgba(201,182,147,0.04);
}
.home-raffle-block .home-raffle--completed {
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(155,107,204,0.05) 0%, transparent 60%),
    linear-gradient(160deg, #181520 0%, var(--bg-card) 40%, #14121e 100%);
  border-color: rgba(155,107,204,0.2);
}
.home-raffle-block .home-raffle--completed::before {
  background: linear-gradient(135deg, rgba(155,107,204,0.12) 0%, transparent 40%, transparent 70%, rgba(155,107,204,0.06) 100%);
}
.home-raffle-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px;
}
.home-raffle-title {
  font-size: 0.82rem; font-weight: 700; color: var(--text); margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
.home-raffle--progress .home-raffle-title {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(201,182,147,0.25);
}
.home-raffle--completed .home-raffle-title { color: var(--text-muted); }
.home-raffle-middle {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.home-raffle-progress {
  display: flex; align-items: center; gap: 10px;
}
.home-raffle-progress > div { text-align: left; }
.home-raffle-progress-ring {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0deg calc(var(--pct, 0) * 3.6deg), rgba(255,255,255,0.06) 0);
  box-shadow: 0 0 12px rgba(80,175,149,0.15), inset 0 0 6px rgba(80,175,149,0.1);
}
.home-raffle-progress-text { font-size: 0.8rem; font-weight: 600; color: var(--text); display: block; margin-bottom: 2px; }
.home-raffle-progress-hint { font-size: 0.7rem; color: var(--text-muted); margin: 0; line-height: 1.3; }
.home-raffle-bank {
  font-size: 0.9rem; font-weight: 700; font-family: var(--font-mono);
  color: var(--teal); white-space: nowrap; margin-left: auto;
  text-shadow: 0 0 10px rgba(80,175,149,0.2);
}
.home-raffle--progress .home-raffle-bank {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(201,182,147,0.2);
}
.home-raffle-winners { font-size: 0.78rem; color: var(--text-muted); }
.home-raffle-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto;
}
.home-raffle-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; font-size: 0.8rem; font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal) 0%, #3da88e 100%);
  color: #0E1114;
  cursor: pointer; border: none; transition: all var(--transition); white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(80,175,149,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  letter-spacing: 0.02em;
}
.home-raffle-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5fc4a8 0%, #4fb99e 100%);
  box-shadow: 0 4px 16px rgba(80,175,149,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-1px);
}
.home-raffle-btn:disabled {
  background: rgba(255,255,255,0.06); color: var(--text-dim); cursor: not-allowed; opacity: 0.8;
  box-shadow: none; border: 1px solid rgba(255,255,255,0.06);
}
.home-raffle-participants-inline {
  display: flex; align-items: center;
}
.home-raffle-participants-inline .home-raffle-avatar-sm {
  width: 30px; height: 30px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  border: 2px solid rgba(201,182,147,0.2);
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  margin-left: -8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.home-raffle-participants-inline .home-raffle-avatar-sm:first-child { margin-left: 0; }
.home-raffle-participants-inline .home-raffle-avatar-sm img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.home-raffle-participants-inline .home-raffle-avatar-letter-sm {
  font-size: 0.65rem; font-weight: 700; color: var(--accent);
}
.home-raffle-participants-inline .home-raffle-avatar-more {
  font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
  background: var(--bg-elevated); border-color: rgba(255,255,255,0.08);
}

/* Leaders block */
/* Stories row (как в Telegram/Instagram) */
.home-stories-row {
  display: flex; gap: 16px; overflow-x: auto; padding: 16px 0;
  scrollbar-width: none; -ms-overflow-style: none;
}
.home-stories-row::-webkit-scrollbar { display: none; }
.story-item {
  flex-shrink: 0; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; text-decoration: none; color: inherit; transition: transform var(--transition);
}
.story-item:hover { transform: scale(1.05); }
.story-item.story-item--unviewed:hover .story-ring { box-shadow: 0 0 0 1px var(--accent), 0 0 6px var(--accent-glow); }
.story-ring {
  width: 72px; height: 72px; border-radius: 50%; padding: 1px; background: var(--bg-elevated);
  transition: box-shadow var(--transition);
}
.story-item--viewed .story-ring { box-shadow: none; border: 1px solid var(--border); }
.story-item--unviewed .story-ring {
  border: 1px solid rgba(201,182,147,0.5);
  box-shadow: 0 0 0 1px transparent;
  animation: story-ring-pulse 2s ease-in-out infinite;
}
@keyframes story-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(201,182,147,0.4), 0 0 4px var(--accent-glow); }
  50% { box-shadow: 0 0 0 1px rgba(201,182,147,0.7), 0 0 8px var(--accent-glow); }
}
.story-ring-inner {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
}
.story-ring-inner img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  min-width: 100%; min-height: 100%;
}
.story-item-title { font-size: 0.75rem; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; color: var(--text-muted); }
.story-viewer {
  position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: story-viewer-in 0.4s ease;
}
@keyframes story-viewer-in { from { opacity: 0; } to { opacity: 1; } }
.story-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-md); }
.story-viewer-close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border: none; background: rgba(255,255,255,0.1); border-radius: 50%; color: #fff; font-size: 1.5rem; cursor: pointer; }
.story-viewer-close:hover { background: rgba(255,255,255,0.2); }
.story-viewer-title { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 1rem; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }

.home-leaders-block {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 18px; border: 1px solid var(--border);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.home-leaders-title { font-size: 0.88rem; font-weight: 700; margin: 0 0 10px; color: var(--text); }
.home-leaders-tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.home-leaders-tabs::-webkit-scrollbar { display: none; }
.home-leaders-tab {
  padding: 5px 8px; font-size: 0.65rem; font-weight: 600;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-elevated); color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap; flex-shrink: 0;
}
.home-leaders-tab:hover { color: var(--text); }
.home-leaders-tab.active { background: var(--accent); color: var(--btn-primary-text); border-color: var(--accent); }
.home-leaders-tab .tab-short { display: none; }
.home-leaders-content { flex: 1; min-height: 0; overflow-y: auto; }
.home-leaders-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 6px; font-size: 0.78rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.home-leaders-row:last-child { border-bottom: none; }

/* Top-3 highlighting */
.home-leaders-row--gold {
  background: linear-gradient(90deg, rgba(201,182,147,0.1) 0%, rgba(201,182,147,0.02) 100%);
  border-bottom-color: rgba(201,182,147,0.08);
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}
.home-leaders-row--silver {
  border-left: 2px solid rgba(154,164,179,0.4);
  padding-left: 10px;
}
.home-leaders-row--bronze {
  border-left: 2px solid rgba(139,115,85,0.4);
  padding-left: 10px;
}

.home-leaders-rank {
  width: 18px; font-family: var(--font-mono); font-weight: 700;
  color: var(--text-dim); flex-shrink: 0; text-align: center;
}
.home-leaders-row--gold .home-leaders-rank { color: var(--accent); }
.home-leaders-row--silver .home-leaders-rank { color: #9AA4B3; }
.home-leaders-row--bronze .home-leaders-rank { color: #8B7355; }

.home-leaders-row--gold .home-leaders-name { color: var(--text); font-weight: 700; }
.home-leaders-row--silver .home-leaders-name { color: var(--text); font-weight: 600; }
.home-leaders-row--bronze .home-leaders-name { font-weight: 600; }

.home-leaders-row--gold .home-leaders-value { color: var(--accent); font-weight: 700; }
.home-leaders-row--silver .home-leaders-value { color: #9AA4B3; }
.home-leaders-row--bronze .home-leaders-value { color: #8B7355; }

.home-leaders-row--gold .home-leaders-avatar,
.home-leaders-row--gold .home-leaders-avatar--placeholder {
  border: 1.5px solid rgba(201,182,147,0.45);
}
.home-leaders-row--silver .home-leaders-avatar,
.home-leaders-row--silver .home-leaders-avatar--placeholder {
  border: 1.5px solid rgba(154,164,179,0.3);
}
.home-leaders-row--bronze .home-leaders-avatar,
.home-leaders-row--bronze .home-leaders-avatar--placeholder {
  border: 1.5px solid rgba(139,115,85,0.3);
}

/* Crown icon for #1 */
.leaders-crown {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; color: var(--accent);
}
.leaders-crown svg { width: 100%; height: 100%; }

.home-leaders-avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; background: var(--bg-elevated);
}
.home-leaders-avatar--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; color: var(--text-muted); background: var(--bg-elevated);
}
.home-leaders-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-leaders-value { font-family: var(--font-mono); font-weight: 600; color: var(--accent); flex-shrink: 0; font-size: 0.76rem; }
.home-leaders-empty { font-size: 0.76rem; margin: 0; padding: 8px 0; }

/* ================================================================
   GAME SECTIONS
   ================================================================ */
.home-games-block { margin-bottom: 32px; }
.home-games-block-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.home-all-games-link { font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-left: auto; }
/* Блок навигации по играм: десктоп — одна строка (категории | поиск/вид), мобайл — две строки */
.games-nav-block {
  display: flex; flex-direction: column; gap: 0; margin-bottom: 20px;
  padding: 0; background: transparent; border: none; border-radius: 0;
}
.games-nav-row { display: flex; align-items: center; gap: 10px; }
.games-nav-row--actions {
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.games-nav-row--actions .games-toolbar,
.games-nav-row--actions .home-slots-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; width: 100%; }
.games-nav-row--categories { min-width: 0; }
.games-nav-row--categories .home-catalog-tabs,
.games-nav-row--categories .catalog-tabs-scroll { flex: 1; min-width: 0; }
.games-nav-row--categories .catalog-tabs-scroll { margin: 0; }
.games-page-head { margin-bottom: 0; }

/* Десктоп (≥1024px): старая раскладка — одна строка, категории слева, поиск/вид справа */
@media (min-width: 1024px) {
  .games-nav-block {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }
  .games-nav-row--categories { order: 1; flex: 1; min-width: 0; }
  .games-nav-row--actions { order: 2; margin-bottom: 0; padding: 0; background: transparent; border: none; box-shadow: none; flex-shrink: 0; }
  .games-nav-row--actions .games-toolbar,
  .games-nav-row--actions .home-slots-toolbar { margin: 0; width: auto; }
}
.home-strip-nav { display: flex; gap: 6px; }
.home-strip-nav-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.home-strip-nav-btn:hover { color: var(--accent); border-color: rgba(201,182,147,0.3); }

/* Game card grid — 6 слотов в ряду, иконки крупнее */
:root {
  --slot-aspect: 277 / 183;
}
.home-slots-grid, .games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
/* Вид с названием — тот же принцип */
.home-slots-grid.games-grid--detailed,
.games-grid.games-grid--detailed {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.home-slots-load-more-wrap {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0 8px;
}
.home-slots-count { font-size: 0.82rem; color: var(--text-dim); margin: 0; }
.btn-home-slots-more {
  padding: 12px 36px; font-size: 0.92rem; font-weight: 600;
  background: var(--accent); color: var(--btn-primary-text);
  border: none; border-radius: var(--radius-md); cursor: pointer;
  transition: all var(--transition);
}
.btn-home-slots-more:hover { background: var(--accent-hover); box-shadow: 0 0 20px var(--accent-glow); }

/* Game card — "sunken" with hover float */
.game-card {
  background: var(--bg-card); border-radius: 16px;
  overflow: hidden; cursor: pointer;
  min-width: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  contain: layout style paint;
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}
.game-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  border-color: rgba(201,182,147,0.1);
}

.game-card--has-hover { position: relative; }
.game-card--has-hover .game-card-inner { position: relative; }
.game-card-hover {
  position: absolute; inset: 0; z-index: 2;
  background: rgba(10,12,15,0.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 16px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.game-card--has-hover:hover .game-card-hover { opacity: 1; visibility: visible; }
/* Тач-устройства: оверлей всегда виден (hover не работает) */
@media (hover: none) {
  .game-card--has-hover .game-card-hover {
    opacity: 1;
    visibility: visible;
    background: rgba(10,12,15,0.92);
  }
  .game-card--has-hover .game-card:hover { transform: none; }
}
.game-card-btn {
  width: 100%; max-width: 160px;
  padding: 10px 20px; font-size: 0.88rem; font-weight: 600;
  border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.15s ease, box-shadow 0.15s ease; font-family: inherit; border: none;
}
.game-card-btn--play { background: var(--accent); color: var(--btn-primary-text); }
.game-card-btn--play:hover { background: var(--accent-hover); box-shadow: 0 0 16px var(--accent-glow); }
/* Заблокированный слот при активном бонусе */
.game-card--blocked { pointer-events: auto; }
.game-card--blocked .game-card-btn--play { cursor: not-allowed; opacity: 0.6; }
.game-card-blocked-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.75);
  color: var(--text-muted);
  font-size: 0.8rem; font-weight: 600; text-align: center;
  padding: 12px; border-radius: inherit;
}
.game-card-btn--demo {
  background: transparent; color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
}
.game-card-btn--demo:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); }
.game-card-btn-icon { font-size: 0.75em; }
.game-card-fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 36px; height: 36px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); border: none; border-radius: 50%;
  color: var(--text-muted); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.game-card-fav-btn:hover { background: rgba(0,0,0,0.6); color: var(--text); }
.game-card-fav-btn svg { width: 18px; height: 18px; }
.game-card-fav-btn.active { color: var(--accent); }
.game-card-fav-btn.active svg { fill: var(--accent); stroke: var(--accent); }
.game-card {
  width: 100%;
  aspect-ratio: var(--slot-aspect);
  min-height: 0;
}
.game-card-inner { height: 100%; display: block; }
.game-card-img {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
  background: var(--bg-elevated);
}
.game-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  vertical-align: top;
}
.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  vertical-align: top;
}
.game-card.game-card--pinko img,
.game-card.game-card--pinko .game-card-img { width: 100% !important; height: 100% !important; }
.game-card-info { padding: 10px 12px; min-width: 0; overflow: hidden; }
.game-card-name {
  font-size: 0.76rem; font-weight: 600; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 1;
}
.game-card:hover .game-card-name { opacity: 0.7; }
.game-card-provider {
  font-size: 0.66rem; color: var(--text-dim); margin: 2px 0 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-card-badges { display: flex; gap: 4px; margin-top: 4px; }
.game-card-badges span {
  font-size: 0.58rem; padding: 1px 5px; border-radius: 4px;
  background: var(--accent-dim); color: var(--accent); font-weight: 600;
}

/* Pinko mode — вид без названия: 6 в ряду, крупные иконки */
.games-grid.games-grid--pinko,
.home-slots-grid.games-grid--pinko {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 10px !important;
}
.game-card.game-card--pinko { border-radius: 12px; border: none; }
.game-card.game-card--pinko .game-card-inner { position: relative; height: 100%; }
.game-card.game-card--pinko .game-card-img,
.game-card.game-card--pinko .game-card-inner .game-card-img {
  width: 100% !important; height: 100% !important; border-radius: 12px; overflow: hidden;
}
.game-card.game-card--pinko .game-card-img img {
  width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 12px;
}
.game-card.game-card--pinko .game-card-info,
.game-card.game-card--pinko .game-card-name,
.game-card.game-card--pinko .game-card-provider,
.game-card.game-card--pinko .game-card-meta,
.game-card.game-card--pinko .game-card-rtp-badge { display: none !important; }
/* Мобильная версия: показывать название под иконкой в режиме pinko */
@media (max-width: 768px) {
  .game-card.game-card--pinko .game-card-info.game-card-info--pinko,
  .game-card.game-card--pinko .game-card-info.game-card-info--pinko .game-card-name { display: block !important; }
  .game-card.game-card--pinko .game-card-info.game-card-info--pinko {
    padding: 6px 8px 0; text-align: center;
  }
  .game-card.game-card--pinko .game-card-info.game-card-info--pinko .game-card-name {
    font-size: 0.68rem; font-weight: 600; margin: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--text); line-height: 1.2;
  }
}

/* Detailed mode */
.game-card-img-wrap { position: relative; }
.game-card-rtp-badge {
  position: absolute; top: 8px; right: 8px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  padding: 3px 8px; background: rgba(10,12,15,0.85);
  color: var(--accent); border-radius: 6px; white-space: nowrap;
}
.game-card--detailed .game-card-info { padding: 10px 12px; }
.game-card--detailed .game-card-name {
  font-size: 0.78rem; font-weight: 600; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Games toolbar */
.games-toolbar { display: flex; gap: 8px; align-items: center; }
.games-search-input {
  padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text); font-size: 0.84rem;
  font-family: inherit; outline: none; transition: all var(--transition);
}
.games-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.games-search-btn {
  display: flex; align-items: center; gap: 8px; flex: 1;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-dim); font-size: 0.84rem; cursor: pointer;
  font-family: inherit; transition: all var(--transition); white-space: nowrap;
}
.games-search-btn:hover { border-color: var(--accent); color: var(--text); background: var(--accent-dim); }
.games-display-btn,
.games-provider-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted); font-size: 0.82rem; cursor: pointer;
  font-family: inherit; transition: all var(--transition); white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.games-display-btn:hover,
.games-provider-btn:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-dim);
  box-shadow: 0 2px 8px rgba(201,182,147,0.1);
}
.games-search-btn-icon,
.games-display-icon,
.games-provider-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0;
}
.games-search-btn-icon svg,
.games-display-icon svg,
.games-provider-icon svg { width: 100%; height: 100%; }

/* Search popup — glassmorphism */
.search-popup { position: fixed; inset: 0; z-index: 600; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.search-popup.hidden { display: none !important; }
.search-popup-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); }
.search-popup-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 500px; max-height: 80vh;
  background: var(--glass); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); display: flex; flex-direction: column; overflow: hidden;
}
/* Кнопка поиска в хедере — только на мобильных */
/* Поиск в шапке — только для авторизованных (гостям не нужен) */
.header-search-btn {
  display: none; width: 40px; height: 40px; padding: 0;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-muted);
  cursor: pointer; flex-shrink: 0;
  align-items: center; justify-content: center;
}
.header-search-btn svg { width: 20px; height: 20px; }
.header-search-btn:hover { color: var(--accent); border-color: var(--accent); }

.search-popup-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px; border-bottom: 1px solid var(--border);
}
.search-popup-head h3 { margin: 0; font-size: 1rem; }
.search-popup-tabs {
  display: flex; gap: 4px; padding: 12px 18px;
  background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border);
}
.search-popup-tab {
  flex: 1; padding: 10px 16px; font-size: 0.88rem; font-weight: 600;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-md); color: var(--text-muted);
  cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.search-popup-tab:hover { color: var(--text); }
.search-popup-tab.active {
  background: var(--bg-card); color: var(--accent);
  border-color: var(--border);
}
.search-popup-input-wrap {
  position: relative; display: flex; align-items: center;
  margin: 14px 18px; padding: 0 14px 0 44px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-md); min-height: 44px;
}
.search-popup-input-icon {
  position: absolute; left: 14px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.search-popup-input-icon svg { width: 18px; height: 18px; }
.search-popup-input-wrap .search-popup-input {
  flex: 1; margin: 0; padding: 10px 0; border: none; background: transparent;
  min-height: 42px;
}
.search-popup-input-clear {
  position: absolute; right: 8px; width: 28px; height: 28px;
  padding: 0; background: rgba(255,255,255,0.08);
  border: none; border-radius: 50%; color: var(--text-muted);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.search-popup-input-clear:hover { color: var(--text); background: rgba(255,255,255,0.12); }
.search-popup-input-clear.hidden { display: none !important; }
.search-popup-show-more {
  padding: 16px 18px; border-top: 1px solid var(--border);
  text-align: center;
}
.search-popup-show-more.hidden { display: none !important; }
.search-popup-show-more .btn { min-width: 160px; }
.search-popup-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.search-popup-close:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.search-popup-input {
  margin: 16px; padding: 11px 16px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text); font-size: 0.88rem;
  font-family: inherit; outline: none; transition: all var(--transition);
}
.search-popup-input-wrap .search-popup-input { margin: 0; border: none; background: transparent; box-shadow: none; }
.search-popup-input:focus { outline: none; }
.search-popup-input-wrap:hover { border-color: rgba(255,255,255,0.15); }
.search-popup-input-wrap:focus-within {
  border-color: rgba(201,182,147,0.5);
  box-shadow: 0 0 0 2px rgba(201,182,147,0.12);
}
.search-popup-results { flex: 1; overflow-y: auto; padding: 0 16px 16px; min-height: 120px; }
.search-popup-results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.search-popup-game-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md); border: 1px solid var(--border);
  transition: all var(--transition);
}
.search-popup-game-card:hover:not(.guest-only) { border-color: rgba(201,182,147,0.3); }
.search-popup-game-card.guest-only { opacity: 0.5; cursor: not-allowed; }
.search-popup-game-img {
  width: 56px; height: 42px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0; background: var(--bg-card);
}
.search-popup-game-img img { width: 100%; height: 100%; object-fit: cover; }
.search-popup-game-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.search-popup-game-name { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-popup-game-provider { font-size: 0.7rem; color: var(--text-muted); }
/* Категории и провайдеры в поиске */
.search-popup-section { margin-bottom: 20px; }
.search-popup-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; padding: 0 4px;
}
.search-popup-section-title { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.search-popup-section-link {
  font-size: 0.78rem; color: var(--accent); text-decoration: none;
}
.search-popup-section-link:hover { text-decoration: underline; }
.search-popup-results-count { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; padding: 0 4px; }
.search-popup-providers-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.search-popup-provider-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--transition);
}
.search-popup-provider-card:hover { border-color: rgba(201,182,147,0.3); background: rgba(255,255,255,0.05); }
.search-popup-provider-card img { width: 56px; height: 56px; object-fit: contain; border-radius: var(--radius-sm); }
.search-popup-provider-card span { font-size: 0.8rem; font-weight: 500; color: var(--text); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* Catalog tabs */
.catalog-tabs-scroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.catalog-tabs-scroll::-webkit-scrollbar { display: none; }
.catalog-tabs { display: flex; gap: 6px; padding: 2px 0; }
.catalog-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: all var(--transition);
  font-family: inherit;
}
.catalog-tab:hover { color: var(--text); border-color: var(--border-strong); }
.catalog-tab.active {
  background: var(--accent); color: var(--btn-primary-text);
  border-color: var(--accent); font-weight: 600;
}
.catalog-tab-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; flex-shrink: 0;
}
.catalog-tab-icon svg { width: 100%; height: 100%; }

.home-catalog-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0;
}
.home-catalog-tabs::-webkit-scrollbar { display: none; }
.home-catalog-tabs:empty { display: none; }
.catalog-tab--sm { padding: 6px 14px; font-size: 0.76rem; }

/* Provider filter popup */
.provider-popup { position: fixed; inset: 0; z-index: 600; display: flex; }
.provider-popup.hidden { display: none !important; }
.provider-popup-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.provider-popup-panel {
  position: relative; z-index: 1;
  width: 360px; max-width: 90vw; height: 100vh;
  margin-left: auto; background: var(--bg-elevated);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
  animation: provSlideIn 0.25s ease;
}
@keyframes provSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.provider-popup-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px; border-bottom: 1px solid var(--border);
}
.provider-popup-head h3 { margin: 0; font-size: 1rem; }
.provider-popup-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.provider-popup-close:hover { color: var(--text); background: var(--bg-card); }
.provider-list {
  flex: 1; overflow-y: auto; padding: 0 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.provider-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
  border: 1px solid transparent;
}
.provider-item-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.provider-item:hover { background: var(--bg-card); }
.provider-item.selected { background: var(--accent-dim); border-color: rgba(201,182,147,0.25); }
.provider-item-name { flex: 1; font-size: 0.84rem; font-weight: 500; }
.provider-item-count { font-size: 0.73rem; color: var(--text-dim); }
.provider-item-check {
  width: 20px; height: 20px; border-radius: 5px;
  border: 1.5px solid var(--border-strong); display: flex;
  align-items: center; justify-content: center;
  font-size: 0.75rem; color: transparent; flex-shrink: 0;
  transition: all var(--transition);
}
.provider-item.selected .provider-item-check {
  border-color: var(--accent); background: var(--accent); color: var(--btn-primary-text);
}
.provider-popup-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 18px; border-top: 1px solid var(--border);
}

/* Game strip (horizontal scroll) */
.home-slots-categories-wrap { display: block; }
.home-slots-categories-wrap .home-games-block { margin-bottom: 28px; }
.home-slots-categories-wrap .home-games-block:last-child { margin-bottom: 0; }
.home-games-strip-wrap { overflow: hidden; position: relative; }
.home-games-strip {
  display: flex; gap: 14px; overflow-x: auto;
  scroll-behavior: smooth; padding-bottom: 4px; scrollbar-width: none;
}
.home-games-strip::-webkit-scrollbar { display: none; }
.home-games-strip .game-card { min-width: 185px; max-width: 225px; flex-shrink: 0; }
.home-games-strip .game-card--strip .game-card-img,
.home-games-strip .game-card--strip .game-card-img img { aspect-ratio: 4/3; object-fit: cover; }
.home-games-hint { font-size: 0.82rem; color: var(--text-dim); margin-top: 10px; }

/* ================================================================
   PROMO SECTIONS
   ================================================================ */
/* Золотая карусель провайдеров */
.home-carousel-block {
  margin-bottom: 32px; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, #1a1520 0%, #251a30 50%, #1a1520 100%);
  border: 1px solid rgba(201,182,147,0.15); box-shadow: var(--shadow-card), 0 0 60px rgba(201,182,147,0.06);
}
.home-carousel-inner { padding: 28px 32px; position: relative; }
.home-carousel-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.home-carousel-desc { font-size: 0.88rem; color: var(--text-muted); margin: 0 0 16px; }
.home-carousel-progress { font-size: 0.9rem; font-weight: 600; color: var(--accent); margin-bottom: 16px; }
.home-carousel-btn {
  padding: 12px 28px; font-size: 0.95rem; font-weight: 600; border-radius: var(--radius-md);
  background: var(--btn-primary); color: var(--btn-primary-text); border: none; cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.home-carousel-btn:hover { background: var(--btn-primary-hover); transform: translateY(-1px); }
.home-carousel-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Carousel participants modal — premium styling */
.carousel-participants-modal {
  max-width: 460px !important;
  padding: 0 !important;
  background: linear-gradient(165deg, var(--bg-card) 0%, var(--bg-elevated) 100%) !important;
  border: 1px solid var(--border-strong) !important;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(201,182,147,0.06) !important;
  overflow: hidden;
}
.carousel-modal-header {
  padding: 24px 24px 20px;
  background: linear-gradient(180deg, rgba(201,182,147,0.08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}
.carousel-modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.carousel-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.carousel-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.carousel-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.carousel-progress-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 60px;
  text-align: right;
}
.carousel-roadmap {
  display: flex;
  justify-content: space-between;
  padding: 20px 24px;
  gap: 4px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.carousel-roadmap-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
}
.carousel-roadmap-step--active .carousel-roadmap-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--btn-primary-text);
  box-shadow: 0 4px 12px rgba(201,182,147,0.25);
}
.carousel-roadmap-step--active .carousel-roadmap-label {
  color: var(--accent);
  font-weight: 600;
}
.carousel-roadmap-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  padding: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  transition: all var(--transition);
}
.carousel-roadmap-icon svg {
  width: 100%;
  height: 100%;
}
.carousel-roadmap-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.2;
}
.carousel-roadmap-connector {
  position: absolute;
  top: 18px;
  left: calc(50% + 24px);
  width: calc(100% - 48px);
  height: 2px;
  background: var(--border);
  z-index: -1;
}
.carousel-next-info {
  padding: 16px 24px;
  background: rgba(201,182,147,0.04);
  border-left: 3px solid var(--accent);
  margin: 16px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.carousel-next-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.carousel-next-desc strong { color: var(--accent); font-weight: 600; }
.carousel-invite-section {
  padding: 20px 24px;
  margin: 0 24px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.carousel-invite-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text);
}
.carousel-invite-actions { display: flex; flex-direction: column; gap: 12px; }
.carousel-invite-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.carousel-invite-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--accent);
  color: var(--accent);
}
.carousel-invite-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.carousel-invite-by-id {
  display: flex;
  gap: 10px;
  align-items: center;
}
.carousel-invite-by-id .input {
  flex: 1;
  max-width: 120px;
}
.carousel-participants-wrap {
  padding: 0 24px 20px;
}
.carousel-participants-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.carousel-participants { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
.carousel-participant {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.carousel-participant:hover {
  border-color: rgba(201,182,147,0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.carousel-participant-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
}
.carousel-participant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-participant-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.carousel-modal-close-btn {
  margin: 0 24px 24px;
  width: calc(100% - 48px);
  padding: 14px;
  font-weight: 600;
}
.carousel-vote-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.carousel-vote-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); background: var(--bg-elevated); }
.carousel-vote-item img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; }
.carousel-vote-item span { flex: 1; font-size: 0.9rem; }
.carousel-vote-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; min-width: 60px; }
.carousel-vote-fill { height: 100%; background: var(--accent); transition: width 0.3s; }

.home-promo-zone { margin-bottom: 32px; }
.home-tournament-promo-wrap { margin-bottom: 18px; }
.home-tournament-promo-wrap.hidden { display: none !important; }
.home-tournament-promo {
  display: block; border-radius: var(--radius-lg); padding: 28px 32px; text-decoration: none; color: #fff;
  min-height: 140px; transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(255,255,255,0.1); box-shadow: var(--shadow-card);
}
.home-tournament-promo:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: #fff; }
.home-tournament-promo-content { position: relative; z-index: 1; }
.home-tournament-promo-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 8px; }
.home-tournament-promo-subtitle { font-size: 0.9rem; opacity: 0.9; margin: 0 0 8px; }
.home-tournament-promo-countdown { font-size: 0.85rem; opacity: 0.85; margin: 0 0 12px; }
.home-tournament-promo-prize { font-size: 1.1rem; font-weight: 700; margin: 0 0 16px; }
.home-tournament-promo-btn {
  display: inline-block; padding: 12px 24px; font-size: 0.95rem; font-weight: 600;
  border-radius: var(--radius-md); border: none; cursor: pointer; transition: opacity var(--transition);
}
.home-tournament-promo-btn:hover { opacity: 0.9; }

.tournament-lobby { max-width: 1100px; margin: 0 auto; padding: 0 16px 48px; }
.tournament-lobby--royal .tournament-hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 32px; padding: 48px 32px; text-align: center;
  background: linear-gradient(135deg, #1a0b2e 0%, #2d1b4e 40%, #1a0b2e 100%);
  border: 1px solid rgba(201,182,147,0.2);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}
.tournament-lobby--royal .tournament-hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(201,182,147,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.tournament-hero-content { position: relative; z-index: 1; }
.tournament-hero-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 6px 14px;
  border-radius: 20px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.08em;
}
.tournament-hero-badge--active { background: rgba(80,175,149,0.25); color: #50af95; }
.tournament-hero-badge--upcoming { background: rgba(201,182,147,0.2); color: var(--accent); }
.tournament-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700; margin: 0 0 20px;
  color: #fff; letter-spacing: 0.02em;
}
.tournament-hero-prize {
  margin-bottom: 20px;
}
.tournament-hero-prize-label {
  display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.6); margin-bottom: 4px;
}
.tournament-hero-prize-value {
  font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800;
  color: #ffd700; text-shadow: 0 0 24px rgba(255,215,0,0.3);
}
.tournament-hero-timer {
  margin-bottom: 24px;
}
.tournament-hero-timer-label {
  display: block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.5); margin-bottom: 4px;
}
.tournament-hero-timer-value {
  font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: #fff;
}
.tournament-hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.tournament-hero-join { padding: 14px 32px; font-size: 1rem; font-weight: 600; }
.tournament-hero-dust { padding: 14px 24px; }
.tournament-main-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px;
}
@media (max-width: 768px) {
  .tournament-main-grid { grid-template-columns: 1fr; }
  .tournament-lobby--royal .tournament-hero { padding: 32px 20px; }
}
.tournament-header { padding: 32px 24px; border-radius: var(--radius-lg); margin-bottom: 24px; text-align: center; }
.tournament-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 8px; }
.tournament-prize { font-size: 1.1rem; margin: 0 0 8px; opacity: 0.9; }
.tournament-countdown { font-size: 0.95rem; font-weight: 600; margin: 0; }
.tournament-section-title {
  font-size: 0.78rem; font-weight: 700; margin: 0 0 16px; letter-spacing: 0.08em;
  color: var(--text-muted);
}
.tournament-leaderboard-section { }
.tournament-leaderboard-wrap { overflow-x: auto; margin-bottom: 0; }
.tournament-leaderboard { width: 100%; border-collapse: collapse; }
.tournament-leaderboard th, .tournament-leaderboard td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.tournament-leaderboard th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.tournament-leaderboard-section, .tournament-prizes-section {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 20px; border: 1px solid var(--border);
}
.tournament-lb-rank--1 td:first-child { font-weight: 700; }
.tournament-lb-rank--2 td:first-child, .tournament-lb-rank--3 td:first-child { font-weight: 600; }
.tournament-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.tournament-prizes-section { }
.tournament-prizes-table-inner { width: 100%; border-collapse: collapse; }
.tournament-prizes-table-inner th, .tournament-prizes-table-inner td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.tournament-prizes-table-inner th { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.tournament-prizes-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.tournament-prize-item { padding: 12px 20px; background: var(--bg-card); border-radius: var(--radius-md); font-weight: 600; }
.tournament-rules-section { margin-bottom: 32px; }
.tournament-rules-content { font-size: 0.95rem; line-height: 1.6; color: var(--text-muted); }
.tournament-games-section { margin-bottom: 32px; }
.tournament-games-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.tournament-game-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px; background: var(--bg-card); border-radius: var(--radius-md);
  border: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: all var(--transition);
}
.tournament-game-card:hover {
  background: var(--bg-card-hover); border-color: rgba(201,182,147,0.3);
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.tournament-game-card img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px;
}
.tournament-game-card span {
  font-size: 0.8rem; font-weight: 500; text-align: center; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.tournament-game-card img { background: var(--bg-elevated, #1a1d21); }
#pageTournament .tournament-page-inner { padding: 24px 0 48px; }
.tournament-winners-page { padding: 24px 16px; }
.tournaments-archive-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.tournament-archive-item { display: block; padding: 16px; background: var(--bg-card); border-radius: var(--radius-md); text-decoration: none; color: var(--text); }
.tournament-archive-item:hover { background: var(--bg-card-hover); }

/* Страница «Список турниров» */
.tournaments-list-page { padding: 0 16px 48px; max-width: 820px; margin: 0 auto; }
.tournaments-list-page-header {
  padding: 32px 0 28px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.tournaments-list-page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.tournaments-list-page-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}
.tournaments-list-page-content { display: flex; flex-direction: column; gap: 40px; }
.tournaments-section { }
.tournaments-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 16px;
  padding-bottom: 8px;
}
.tournaments-empty { color: var(--text-muted); margin: 0; }
.tournaments-empty a { color: var(--accent); }
.tournaments-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.tournament-list-item {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: var(--bg-card); border-radius: var(--radius-md); text-decoration: none; color: var(--text);
  border: 1px solid var(--border); transition: all var(--transition);
}
.tournament-list-item:hover { background: var(--bg-card-hover); border-color: rgba(201,182,147,0.2); }
.tournament-list-item-body { flex: 1; }
.tournament-list-item-body strong { display: block; margin-bottom: 4px; }
.tournament-list-item-meta { font-size: 0.85rem; color: var(--text-muted); }
.tournament-list-item-arrow { color: var(--accent); font-size: 1.2rem; }
.tournament-status-badge {
  font-size: 0.7rem; font-weight: 600; padding: 4px 10px; border-radius: 6px;
}
.tournament-status-badge--active { background: rgba(80,175,149,0.2); color: var(--teal); }
.tournament-status-badge--upcoming { background: rgba(201,182,147,0.15); color: var(--accent); }
.tournaments-archive-link { margin-top: 20px; }
.tournaments-archive-link a { color: var(--accent); }
.promotions-actions { margin-bottom: 20px; }

.home-promo-large-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.home-promo-large-card {
  position: relative; border-radius: var(--radius-lg); padding: 32px 28px;
  text-decoration: none; color: var(--text); overflow: hidden;
  min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-card);
}
.home-promo-large-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.home-promo-large-card--1 { background: linear-gradient(135deg, #121A2E 0%, #1A2840 100%); }
.home-promo-large-card--2 { background: linear-gradient(135deg, #1A1220 0%, #2A1838 100%); }
.home-promo-large-label {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--accent); margin-bottom: 8px;
}
.home-promo-large-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; }
.home-promo-large-card p { font-size: 0.78rem; color: var(--text-muted); margin: 0 0 14px; }
.home-promo-large-cta {
  display: inline-block; font-size: 0.76rem; font-weight: 600;
  color: var(--accent); border-bottom: 1px solid rgba(201,182,147,0.3);
  padding-bottom: 1px; transition: all var(--transition);
}
.home-promo-large-cta:hover { border-color: var(--accent); }

/* ================================================================
   CATEGORY TABS
   ================================================================ */
.category-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; }
.tab-link {
  padding: 7px 18px; font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); border-radius: var(--radius-sm);
  border: 1px solid transparent; text-decoration: none;
  transition: all var(--transition);
}
.tab-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.tab-link.active { color: var(--accent); background: var(--nav-active-bg); border-color: rgba(201,182,147,0.15); }

/* ================================================================
   BONUSES PAGE — Reference Design (gradients, gift icons)
   ================================================================ */
.bonuses-page-head { margin-bottom: 28px; }
.bonuses-page-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 8px; color: var(--accent); letter-spacing: 0.02em; }
.bonuses-page-desc { font-size: 0.9rem; color: var(--text-muted); margin: 0; line-height: 1.5; }
.bonuses-layout { display: flex; flex-direction: column; gap: 28px; }
.bonuses-section {
  background: rgba(18,16,14,0.6);
  border-radius: var(--radius-lg); padding: 24px;
  border: 1px solid rgba(139,115,85,0.2);
}
.bonuses-section-title {
  font-size: 1.05rem; font-weight: 700; margin: 0 0 18px;
  color: var(--text);
}
/* Welcome bonuses — horizontal scroll */
.bonus-welcome-row {
  display: flex; gap: 16px; overflow-x: auto;
  padding: 8px 0; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.bonus-welcome-row::-webkit-scrollbar { height: 6px; }
.bonus-welcome-row::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
.bonus-welcome-row::-webkit-scrollbar-thumb { background: rgba(201,182,147,0.3); border-radius: 3px; }
/* Bonus cards — gradient variants */
.bonus-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: bonusCardFadeIn 0.5s ease backwards;
  flex-shrink: 0;
}
.bonus-card--welcome {
  width: 220px; min-width: 220px;
  scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.bonus-card--orange {
  background: linear-gradient(165deg, #e85d04 0%, #f48c06 40%, #ffba08 100%);
  box-shadow: 0 8px 24px rgba(232,93,4,0.3);
}
.bonus-card--purple {
  background: linear-gradient(165deg, #5a189a 0%, #7b2cbf 40%, #9d4edd 100%);
  box-shadow: 0 8px 24px rgba(90,24,154,0.3);
}
.bonus-card--blue {
  background: linear-gradient(165deg, #0369a1 0%, #0284c7 40%, #38bdf8 100%);
  box-shadow: 0 8px 24px rgba(3,105,161,0.3);
}
.bonus-card--magenta {
  background: linear-gradient(165deg, #9d174d 0%, #be185d 40%, #ec4899 100%);
  box-shadow: 0 8px 24px rgba(157,23,77,0.3);
}
.bonus-card--welcome:hover { transform: translateY(-4px) scale(1.02); }
.bonus-card--available {
  background: linear-gradient(165deg, #e85d04 0%, #f48c06 50%, #ffba08 100%);
  box-shadow: 0 8px 32px rgba(232,93,4,0.35);
  padding: 28px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto auto auto;
  gap: 12px; align-items: start;
}
.bonus-card--available .bonus-card-gift--large { grid-column: 2; grid-row: 1 / 4; }
.bonus-card--available .bonus-card-value--large { grid-column: 1; grid-row: 1; }
.bonus-card--available .bonus-card-desc { grid-column: 1; grid-row: 2; }
.bonus-card--available .bonus-card-wager { grid-column: 1; grid-row: 3; justify-content: flex-start; }
.bonus-card--available .bonus-card-timer { grid-column: 1; grid-row: 4; }
.bonus-card--available .btn { grid-column: 1 / -1; grid-row: 5; margin-top: 8px; }
.bonus-card--available.bonus-card--purple { background: linear-gradient(165deg, #5a189a 0%, #7b2cbf 50%, #9d4edd 100%); box-shadow: 0 8px 32px rgba(90,24,154,0.35); }
.bonus-card--available.bonus-card--blue { background: linear-gradient(165deg, #0369a1 0%, #0284c7 50%, #38bdf8 100%); box-shadow: 0 8px 32px rgba(3,105,161,0.35); }
.bonus-card--available.bonus-card--magenta { background: linear-gradient(165deg, #9d174d 0%, #be185d 50%, #ec4899 100%); box-shadow: 0 8px 32px rgba(157,23,77,0.35); }
.bonus-card--available:hover { transform: translateY(-4px); }
@keyframes bonusCardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.bonus-card-gift {
  width: 56px; height: 56px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.25); border-radius: 50%;
  font-size: 1.8rem; transition: transform 0.3s ease;
}
.bonus-card-gift--large { width: 72px; height: 72px; font-size: 2.2rem; align-self: flex-end; }
.bonus-card:hover .bonus-card-gift { transform: scale(1.1); }
.bonus-card-value {
  font-size: 1.05rem; font-weight: 800; margin: 0;
  color: #0E1114; line-height: 1.2; text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}
.bonus-card-value--large { font-size: 1.25rem; }
.bonus-card-deposit-tier {
  font-size: 0.78rem; color: rgba(14,17,20,0.8); margin: 4px 0 0;
}
.bonus-card-desc {
  font-size: 0.88rem; color: rgba(14,17,20,0.85); margin: 0;
  line-height: 1.4;
}
.bonus-card-wager {
  font-size: 0.76rem; color: rgba(14,17,20,0.75); margin: 8px 0 0;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.bonus-info-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; font-size: 0.7rem; font-weight: 700;
  background: rgba(14,17,20,0.2); border-radius: 50%;
  cursor: help; font-style: normal;
}
.bonus-card-timer {
  font-size: 0.7rem; color: rgba(14,17,20,0.7); margin: 8px 0 12px;
}
.bonus-card .btn {
  width: 100%; padding: 12px 20px; margin-top: auto;
  font-weight: 700; border-radius: var(--radius-md);
  background: #fff !important; color: #0E1114 !important;
  border: none; transition: all 0.25s ease;
}
.bonus-card .btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.95) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}
.bonus-card .btn-bonus-get-xp {
  background: rgba(14,17,20,0.2) !important; color: #fff !important;
  border: 2px solid rgba(255,255,255,0.5);
}
.bonus-card .btn-bonus-get-xp:hover:not(:disabled) {
  background: rgba(14,17,20,0.35) !important;
  border-color: rgba(255,255,255,0.8);
}
.bonus-card .btn:disabled { opacity: 0.6; cursor: not-allowed; }
.bonus-available-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.bonus-active-list { display: flex; flex-direction: column; gap: 12px; }
.bonus-active-item {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 14px 18px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color var(--transition);
}
.bonus-active-item:hover { border-color: rgba(201,182,147,0.25); }
.bonus-active-item-value { font-weight: 700; font-size: 0.95rem; color: var(--accent); }
.bonus-active-item-meta { font-size: 0.8rem; color: var(--text-muted); }
.promo-list { display: flex; flex-direction: column; gap: 10px; }
.promo-list-item { padding: 12px 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 0.88rem; }
.promo-list-item .promo-code { font-weight: 600; color: var(--accent); font-family: monospace; }
@media (max-width: 600px) { .promo-grid { grid-template-columns: 1fr !important; } }
.bonuses-faq-text { font-size: 0.84rem; margin: 0; }
.bonuses-section-subtitle { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 16px; }

/* ================================================================
   PROMOTIONS
   ================================================================ */
.promotions-list { display: flex; flex-direction: column; gap: 16px; }
.promo-article {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 24px 28px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition);
}
.promo-article:hover { border-color: var(--border-strong); }
.promo-article h2 { font-size: 0.98rem; font-weight: 700; margin: 0 0 8px; }
.promo-article p { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 10px; line-height: 1.6; }
.promo-date { font-size: 0.73rem; color: var(--text-dim); font-weight: 500; }

/* ================================================================
   HOME FAQ BLOCK (accordion, two columns)
   ================================================================ */
.home-faq-block {
  margin-top: 24px; margin-bottom: 0;
}
.home-faq-title {
  font-size: 1.1rem; font-weight: 700; margin: 0 0 16px;
  color: var(--text);
}
.home-faq-grid {
  display: flex; gap: 10px; align-items: flex-start;
}
.home-faq-col {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px;
}
.home-faq-item {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
}
.home-faq-item.open {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1);
}
.home-faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 14px 16px; background: none; border: none;
  color: var(--text); font-size: 0.88rem; font-weight: 600; font-family: inherit;
  text-align: left; cursor: pointer; transition: background var(--transition);
}
.home-faq-question:hover { background: rgba(255,255,255,0.03); }
.home-faq-q-text { flex: 1; min-width: 0; }
.home-faq-chevron {
  flex-shrink: 0; font-size: 0.7rem; opacity: 0.6;
  transition: transform var(--transition);
}
.home-faq-item.open .home-faq-chevron { transform: rotate(180deg); }
.home-faq-answer {
  max-height: 0; overflow: hidden; padding: 0 16px;
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.65;
  transition: max-height 0.35s ease;
}
.home-faq-item.open .home-faq-answer {
  max-height: 300px; padding: 0 16px 16px;
}
@media (max-width: 900px) {
  .home-faq-grid { flex-direction: column; }
}

/* ================================================================
   SEO BLOCK
   ================================================================ */
.home-seo-block {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 32px 28px; margin-top: 16px; border: 1px solid var(--border);
}
.home-seo-title { font-size: 0.98rem; font-weight: 700; margin: 0 0 14px; }
.home-seo-content p { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 10px; line-height: 1.7; }
.home-seo-content h1, .home-seo-content h2, .home-seo-content h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin: 12px 0 8px; }
.home-seo-content ul, .home-seo-content ol { margin: 8px 0 10px; padding-left: 1.2em; color: var(--text-muted); font-size: 0.82rem; }
.home-seo-content li { margin-bottom: 4px; line-height: 1.6; }
.home-seo-content strong { font-weight: 600; color: var(--text); }
.home-seo-content a { color: var(--accent); text-decoration: none; }
.home-seo-content a:hover { text-decoration: underline; }
.home-seo-content.collapsed { max-height: 120px; overflow: hidden; position: relative; }
.home-seo-content.collapsed::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40px; background: linear-gradient(transparent, var(--bg-card)); pointer-events: none; }
.home-seo-show-more { margin-top: 12px; font-size: 0.82rem; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; }
.home-seo-show-more:hover { color: var(--accent-hover); }

/* ================================================================
   FOOTER — Современный дизайн
   ================================================================ */
.casino-footer {
  background: linear-gradient(180deg, rgba(12,14,18,0.98) 0%, rgba(8,10,14,0.99) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 28px max(72px, env(safe-area-inset-bottom));
  margin-left: var(--sidebar-w);
  transition: margin-left var(--transition-slow);
  margin-top: auto;
  position: relative;
  overflow: hidden;
  scroll-margin-bottom: max(72px, env(safe-area-inset-bottom));
}
.casino-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,182,147,0.15), transparent);
  opacity: 0.6;
}
.footer-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.footer-trust {
  display: flex; gap: 16px; margin-bottom: 32px; flex-wrap: wrap;
  padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-trust-item {
  font-size: 0.78rem; color: var(--text-dim); font-weight: 500; letter-spacing: 0.05em;
  text-decoration: none; transition: color var(--transition);
}
.footer-trust-item:hover { color: var(--text); }
.footer-trust-item--age {
  color: var(--danger-text); font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
  background: rgba(180,60,60,0.12); border: 1px solid rgba(180,60,60,0.25);
}
.footer-main-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
  margin-bottom: 32px;
}
.footer-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  min-width: 180px;
}
.footer-partner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 40px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color var(--transition), background var(--transition);
}
.footer-partner-item:hover {
  border-color: rgba(201,182,147,0.3);
  background: rgba(255,255,255,0.06);
}
.footer-partner-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.footer-partner-name { font-size: 0.7rem; color: var(--text-dim); font-weight: 600; }
.footer-col-title {
  font-size: 0.7rem; font-weight: 700; color: var(--accent); margin: 0 0 14px;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.footer-col-links { list-style: none; padding: 0; margin: 0; }
.footer-col-links li { margin-bottom: 8px; }
.footer-col-links a {
  font-size: 0.8rem; color: var(--text-dim); transition: color var(--transition), transform var(--transition);
  text-decoration: none; display: inline-block;
}
.footer-col-links a:hover { color: var(--accent); transform: translateX(2px); }
.footer-social-row {
  display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap;
}
.footer-social-row .sidebar-social-btn {
  width: 42px; height: 42px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; color: #fff; background: var(--social-color, #666);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  border: none;
}
.footer-social-row .sidebar-social-btn:hover {
  opacity: 0.95; transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.footer-social-row .sidebar-social-btn svg { width: 20px; height: 20px; }

/* Footer promo blocks: affiliate, app Windows, app Android — Quiet Luxury style */
.footer-promo-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.footer-promo-block {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 18px; border-radius: var(--radius-md);
  text-decoration: none; color: var(--text);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  position: relative; overflow: hidden;
}
.footer-promo-block:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}
.footer-promo-title {
  font-size: 1rem; font-weight: 700; margin: 0;
  color: var(--text); letter-spacing: 0.02em;
}
.footer-promo-block:hover .footer-promo-title { color: var(--accent); }
.footer-promo-desc {
  font-size: 0.8rem; line-height: 1.45; margin: 0;
  color: var(--text-muted);
}
.footer-promo-email {
  font-size: 0.85rem; font-weight: 600; color: var(--text);
}
.footer-promo-btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: auto; padding: 10px 18px;
  background: var(--accent-dim); border-radius: 10px;
  font-size: 0.88rem; font-weight: 600;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.footer-promo-block:hover .footer-promo-btn {
  background: rgba(201,182,147,0.12);
  border-color: rgba(201,182,147,0.25);
  color: var(--accent-hover);
}
.footer-promo-icon {
  display: inline-flex; width: 28px; height: 28px;
  color: var(--accent); flex-shrink: 0;
}
.footer-promo-icon svg {
  width: 100%; height: 100%;
}

.footer-payments { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.footer-payment-icon {
  padding: 8px 16px; font-size: 0.75rem; font-weight: 600;
  background: rgba(255,255,255,0.04); border-radius: 10px;
  color: var(--text-dim); border: 1px solid rgba(255,255,255,0.08);
  transition: border-color var(--transition), color var(--transition);
}
.footer-payment-icon:hover { border-color: rgba(201,182,147,0.2); color: var(--text-muted); }
.footer-age-block { display: flex; align-items: flex-start; gap: 14px; padding-top: 18px; border-top: 1px solid var(--border); }
.footer-age-badge {
  flex-shrink: 0; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.76rem; font-weight: 800; color: var(--danger-text);
  border: 1.5px solid rgba(90,42,42,0.5); border-radius: 50%;
}
.footer-bottom-text { flex: 1; min-width: 0; }
.footer-legal { font-size: 0.7rem; color: var(--text-dim); margin: 0 0 6px; line-height: 1.6; }
.footer-copyright { font-size: 0.68rem; color: var(--text-muted); margin: 0; line-height: 1.5; }
.footer-loading { padding: 24px; text-align: center; color: var(--text-muted); font-size: 0.88rem; }

/* ================================================================
   MODALS — Glassmorphism
   ================================================================ */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px 20px; overflow-y: auto; }
#accountModal:not(.hidden),
#depositPageModal:not(.hidden) { z-index: 1100; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(8px); }
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(8px);
}
.modal-overlay .modal-dialog {
  position: relative; z-index: 1; width: 100%;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-md);
}
.modal-dialog { position: relative; z-index: 1; width: 100%; }
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-muted); font-size: 1.2rem; cursor: pointer;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.08); border-color: var(--border-strong); }

/* Auth Modal */
.auth-modal-box {
  max-width: 680px; max-height: 90vh; display: flex; border-radius: var(--radius-xl);
  background: var(--bg-card); border: 1px solid var(--border);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.auth-modal-box--login { max-width: 340px; }
.auth-modal-form { flex: 1; padding: 24px 28px; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.auth-modal-form:has(#loginForm:not(.hidden)) { overflow: visible; }
.auth-modal-form:has(#registerForm:not(.hidden)) { overflow: hidden; padding: 20px 24px; }
.auth-modal-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin: 0 0 10px; letter-spacing: 0.03em; }
.auth-tabs { display: flex; gap: 2px; margin-bottom: 12px; flex-shrink: 0; }
.auth-tabs .tab {
  flex: 1; padding: 8px; font-size: 0.78rem; font-weight: 600;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); cursor: pointer; transition: all var(--transition);
}
.auth-tabs .tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-tabs .tab:hover { color: var(--text); }

.auth-form { display: flex; flex-direction: column; gap: 8px; }
#regFullForm { display: flex; flex-direction: column; gap: 8px; }
#regFullForm .reg-field-wrap[data-field="password"] { display: flex; flex-direction: column; gap: 4px; }
#regFullForm .reg-field-wrap[data-field="password"] .reg-field-wrap { margin: 0; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 14px; color: var(--text-dim); pointer-events: none; display: flex; }
.input-icon--select { left: 14px; }
/* Кастомный выпадающий список валют с символами */
.auth-currency-select { position: relative; }
.auth-currency-trigger {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 14px; text-align: left;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.82rem;
  cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.auth-currency-trigger:hover { border-color: var(--border-strong); }
.auth-currency-trigger:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.auth-currency-symbol {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,182,147,0.12); border: 1px solid rgba(201,182,147,0.25);
  border-radius: 8px; font-size: 1.1rem; font-weight: 700; color: var(--accent);
}
.auth-currency-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-currency-chevron { font-size: 0.6rem; color: var(--text-dim); transition: transform 0.2s; }
.auth-currency-select.open .auth-currency-chevron { transform: rotate(180deg); }
.auth-currency-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  padding: 6px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); z-index: 100;
  list-style: none; max-height: 220px; overflow-y: auto;
}
.auth-currency-select.open .auth-currency-dropdown { display: block; }
.auth-currency-option {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 6px; cursor: pointer; transition: background var(--transition);
}
.auth-currency-option:hover { background: rgba(255,255,255,0.06); }
.auth-currency-option.selected { background: var(--accent-dim); color: var(--accent); }
.auth-currency-option-symbol {
  width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,182,147,0.1); border-radius: 6px;
  font-size: 1rem; font-weight: 700; color: var(--accent);
}
.auth-currency-option-text { flex: 1; font-size: 0.85rem; }
.input-icon--flag { position: absolute; left: 14px; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.auth-input, .auth-select {
  width: 100%; padding: 9px 14px 9px 42px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.82rem; transition: all var(--transition);
}
.auth-input:focus, .auth-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.auth-submit {
  width: 100%; padding: 10px; font-size: 0.85rem; font-weight: 700;
  background: var(--btn-primary); color: var(--btn-primary-text);
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition);
}
.auth-submit:hover { background: var(--btn-primary-hover); box-shadow: 0 0 20px var(--accent-glow); }
.auth-submit:disabled { opacity: 0.7; cursor: not-allowed; pointer-events: none; }
.auth-submit--loading { position: relative; color: transparent !important; }
.auth-submit--loading::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px; border: 2px solid transparent;
  border-top-color: var(--btn-primary-text); border-radius: 50%;
  animation: auth-spin 0.6s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-submit--register { background: var(--btn-primary); }
.auth-close-btn {
  width: 100%; padding: 8px; font-size: 0.82rem; font-weight: 600;
  background: transparent; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; margin-top: 4px;
  transition: all var(--transition);
}
.auth-close-btn:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,0.03); }
@media (min-width: 1024px) {
  .auth-close-btn { display: none !important; }
}
.error-msg { color: var(--danger-text); font-size: 0.78rem; min-height: 1.2em; margin: 0; }
.auth-switch { font-size: 0.78rem; color: var(--text-muted); text-align: center; }
.auth-switch-link { background: none; border: none; color: var(--accent); cursor: pointer; font-weight: 600; font-size: inherit; }
.auth-divider { text-align: center; color: var(--text-dim); font-size: 0.72rem; margin: 2px 0; flex-shrink: 0; }
.auth-social { display: flex; gap: 6px; justify-content: center; }
.auth-social-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.auth-social-btn:hover { border-color: rgba(201,182,147,0.3); color: var(--accent); }
.auth-promo { font-size: 0.78rem; color: var(--text-muted); }
.auth-promo-link { background: none; border: none; color: var(--accent); cursor: pointer; font-weight: 500; }
.auth-checkbox { display: flex; align-items: flex-start; gap: 6px; font-size: 0.72rem; color: var(--text-muted); }
.auth-checkbox input { margin-top: 2px; accent-color: var(--accent); }
.auth-link { color: var(--accent); }
.password-requirements { font-size: 0.68rem; color: var(--text-dim); margin: 0; padding-left: 14px; list-style: disc; }

/* Input with toggle/clear buttons */
.input-wrap--with-toggle .auth-input { padding-right: 72px; }
.input-wrap--with-toggle:has(.auth-password-toggle) .auth-input { padding-right: 72px; }
.input-wrap--with-toggle:has(.auth-clear-field):not(:has(.auth-password-toggle)) .auth-input { padding-right: 36px; }
.auth-password-toggle, .auth-clear-field {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; padding: 0; border: none; background: transparent;
  color: var(--text-dim); font-size: 1.1rem; cursor: pointer; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition), background var(--transition);
}
.auth-password-toggle:hover, .auth-clear-field:hover { color: var(--accent); background: rgba(255,255,255,0.06); }
.auth-clear-field { font-size: 1.3rem; line-height: 1; }
.auth-clear-field.hidden { display: none !important; }

/* Password strength */
.password-strength-wrap { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.password-strength-bar {
  flex: 1; height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden;
}
.password-strength-fill {
  display: block; height: 100%; width: 0%; border-radius: 2px;
  transition: width var(--transition), background var(--transition);
}
.password-strength-fill.weak { width: 33%; background: var(--danger); }
.password-strength-fill.medium { width: 66%; background: #B8860B; }
.password-strength-fill.strong { width: 100%; background: var(--teal); }
.password-strength-text { font-size: 0.72rem; color: var(--text-dim); min-width: 4em; }

/* Auth keyboard hints (desktop) */
.auth-keyboard-hints {
  font-size: 0.68rem; color: var(--text-dim); margin-top: 4px; text-align: center;
}
.auth-keyboard-hints kbd { padding: 2px 6px; background: rgba(255,255,255,0.06); border-radius: 4px; font-family: inherit; font-size: 0.85em; }
@media (max-width: 1023px) {
  .auth-keyboard-hints { display: none !important; }
}

/* Auth promo sidebar */
.auth-modal-promo.auth-modal-promo--hidden { display: none; }
.auth-modal-promo {
  width: 240px; flex-shrink: 0;
  background: linear-gradient(180deg, #12161E 0%, #0E1114 100%);
  padding: 24px 18px; display: flex; flex-direction: column;
  align-items: center; text-align: center; justify-content: center;
  border-left: 1px solid var(--border);
}
.auth-promo-illu { position: relative; margin-bottom: 12px; }
.auth-promo-badge {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 800; color: var(--accent); display: block;
}
.auth-promo-amount { font-size: 0.95rem; font-weight: 700; color: var(--text); display: block; margin-top: 2px; }
.auth-promo-freespins { font-size: 0.78rem; color: var(--accent); display: block; margin-top: 4px; }
.auth-promo-coins { display: flex; gap: 4px; justify-content: center; margin: 6px 0; }
.coin { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0.3; }
.auth-promo-title { font-size: 0.9rem; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.auth-promo-desc { font-size: 0.72rem; color: var(--text-muted); margin: 0; }

/* Account Modal — tabbed dashboard */
.account-modal-box {
  position: relative;
  max-width: 1000px; background: var(--bg-card);
  border-radius: var(--radius-xl); padding: 0;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  overflow: hidden;
  height: min(780px, 92vh); max-height: 92vh;
  display: flex; flex-direction: column;
}
.account-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 30;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 50%; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
}
.account-modal-close:hover { color: var(--text); background: rgba(255,255,255,0.08); border-color: var(--border-strong); }
.account-modal-close svg { width: 20px; height: 20px; }
.account-modal-body {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.account-test-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 56px 10px 16px;
  background: linear-gradient(135deg, rgba(201,182,147,0.25) 0%, rgba(201,182,147,0.12) 100%);
  border-bottom: 1px solid rgba(201,182,147,0.3);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.account-test-banner.hidden { display: none !important; }
.account-test-banner-icon { width: 20px; height: 20px; flex-shrink: 0; stroke-linecap: round; stroke-linejoin: round; }
.account-guest { padding: 40px; text-align: center; }
.account-auth {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr;
}
.account-auth .acc-sidebar { grid-column: 1; grid-row: 1; }
.account-auth .acc-panels { grid-column: 2; grid-row: 1; }

/* Account sidebar nav */
.acc-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 24px 0;
}
.acc-sidebar-user {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px 20px; border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.acc-sidebar-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 2px solid rgba(201,182,147,0.3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; color: var(--accent); flex-shrink: 0;
  overflow: hidden;
}
.acc-sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-sidebar-info { min-width: 0; }
.acc-sidebar-name { font-weight: 700; font-size: 0.88rem; display: block; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-sidebar-email { font-size: 0.7rem; color: var(--text-dim); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.acc-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; flex: 1; }
.acc-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); border-radius: var(--radius-sm);
  background: none; border: none; cursor: pointer;
  font-family: inherit; transition: all var(--transition);
  text-align: left; width: 100%;
}
.acc-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-linecap: round; stroke-linejoin: round; }
.acc-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.acc-nav-item.active { color: var(--accent); background: var(--accent-dim); }

.acc-sidebar-meta { padding: 12px 20px 0; font-size: 0.68rem; border-top: 1px solid var(--border); margin-top: auto; }
.acc-sidebar-meta p { margin: 2px 0; }
.acc-sidebar-logout {
  margin: 0 20px 20px;
  padding: 16px 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.acc-sidebar-logout:hover { color: var(--danger-text, #E8A0A0); border-color: rgba(90,42,42,0.5); }
.profile-logout-wrap .acc-sidebar-logout { margin: 0; width: 100%; max-width: 200px; }

/* Account panels */
.acc-panels { flex: 1; overflow-y: auto; padding: 28px 32px; }
.acc-panel { display: none; }
.acc-panel.active { display: block; }
.acc-panel-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin: 0 0 20px; letter-spacing: 0.02em; }

/* Balance panel */
.acc-wallets-block { margin-bottom: 16px; padding: 14px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: var(--radius-md); }
.acc-wallets-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.acc-wallets-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.acc-wallet-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.85rem; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.acc-wallet-chip:hover { border-color: var(--accent); background: rgba(201,182,147,0.06); }
.acc-wallet-chip.active { border-color: var(--accent); background: rgba(201,182,147,0.1); color: var(--accent); }
.acc-wallet-chip-balance { font-weight: 600; color: var(--text); }
.acc-wallets-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-wallets-add select { padding: 8px 12px; font-size: 0.85rem; }
.acc-balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.acc-balance-card {
  padding: 18px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.acc-balance-card--bonus { opacity: 0.75; }
.acc-balance-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 6px; }
.acc-balance-amount { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--text); }
.acc-balance-amount strong { color: var(--accent); }
.acc-balance-cur { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.acc-balance-hint { font-size: 0.73rem; margin: 0 0 18px; }
.acc-balance-actions { display: flex; gap: 10px; }

/* Security panel */
.acc-security-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.acc-security-item:last-child { border-bottom: none; }
.acc-security-info h3 { font-size: 0.88rem; font-weight: 600; margin: 0 0 3px; }
.acc-security-info p { font-size: 0.76rem; margin: 0; }
.acc-security-status {
  font-size: 0.7rem; color: var(--text-dim); padding: 4px 10px;
  background: rgba(255,255,255,0.03); border-radius: 6px; white-space: nowrap;
}

/* Beta panel */
.beta-intro { margin-bottom: 24px; }
.beta-intro p { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.beta-rewards, .beta-surveys, .beta-features { margin-bottom: 24px; }
.beta-section-title { font-size: 0.9rem; font-weight: 600; margin: 0 0 8px; }
.beta-surveys .btn { margin-top: 10px; }
.beta-surveys-placeholder { font-size: 0.82rem; margin-top: 8px; }
.beta-feature-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.beta-feature-item:last-child { border-bottom: none; }
.beta-feature-info { display: flex; flex-direction: column; gap: 2px; }
.beta-feature-name { font-size: 0.88rem; font-weight: 600; }
.beta-feature-desc { font-size: 0.76rem; }
.beta-toggle {
  position: relative; display: inline-block; width: 44px; height: 24px;
  flex-shrink: 0; cursor: pointer;
}
.beta-toggle input { opacity: 0; width: 0; height: 0; }
.beta-toggle-slider {
  position: absolute; inset: 0; background: rgba(255,255,255,0.08);
  border-radius: 12px; border: 1px solid var(--border);
  transition: var(--transition);
}
.beta-toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: var(--text-muted); border-radius: 50%; transition: var(--transition);
}
.beta-toggle input:checked + .beta-toggle-slider {
  background: var(--accent-dim); border-color: var(--accent);
}
.beta-toggle input:checked + .beta-toggle-slider::before {
  transform: translateX(20px); background: var(--accent);
}

/* Keep old balance classes for JS compatibility */
.balance-label { color: var(--text-muted); }
.balance-value { font-family: var(--font-mono); color: var(--accent); font-weight: 700; }
.balance-hint { font-size: 0.73rem; margin: 8px 0 14px; }

.profile-form { }
.profile-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-additional-details { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.profile-additional-summary {
  padding: 12px 16px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; list-style: none; background: rgba(255,255,255,0.02);
  transition: color var(--transition), background var(--transition);
}
.profile-additional-summary::-webkit-details-marker { display: none; }
.profile-additional-summary::after { content: '▾'; float: right; opacity: 0.6; transition: transform var(--transition); }
.profile-additional-details[open] .profile-additional-summary::after { transform: rotate(180deg); }
.profile-additional-summary:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.profile-additional-grid { padding: 16px; margin: 0; border-top: 1px solid var(--border); }
.profile-field { display: flex; flex-direction: column; gap: 5px; }
.profile-field--full { grid-column: span 2; }
.profile-label { font-size: 0.7rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.profile-input {
  padding: 9px 14px; font-size: 0.82rem;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  transition: all var(--transition);
}
.profile-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.profile-input--readonly { opacity: 0.5; cursor: default; }
.profile-form-actions { margin-top: 18px; }
.profile-telegram-block { background: rgba(0,136,204,0.06); border-radius: var(--radius-md); padding: 20px !important; border: 1px solid rgba(0,136,204,0.2); }
.profile-telegram-linked { color: var(--success, #4ade80); }
.profile-telegram-unlinked { color: var(--text-dim); }
.profile-telegram-link-wrap iframe { border-radius: var(--radius-sm); }
.profile-phone-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-phone-row .profile-input { flex: 1; min-width: 140px; }
.profile-phone-badge { font-size: 0.8rem; color: var(--success, #4ade80); font-weight: 600; }
.profile-phone-badge--verified { display: inline-flex; align-items: center; gap: 4px; }
.profile-phone-verify-prompt { flex-shrink: 0; }
.profile-field-hint { font-size: 0.76rem; margin-top: 4px; }
.profile-message { padding: 8px 14px; border-radius: var(--radius-sm); font-size: 0.82rem; }
.profile-meta { margin-top: 16px; font-size: 0.76rem; }
.profile-meta p { margin: 2px 0; }
.history-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.history-table th {
  font-size: 0.68rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border);
}
.history-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); }

/* Deposit Modals — Premium Design */
.deposit-modal-backdrop { backdrop-filter: blur(8px); }
.deposit-page-modal-box, .deposit-modal-box {
  width: 100%; max-width: 720px; min-width: 320px;
  background: linear-gradient(165deg, var(--bg-card) 0%, #151920 100%);
  border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-md), 0 0 0 1px rgba(255,255,255,0.02);
}
.deposit-modal-header {
  display: flex; align-items: center; gap: 14px;
  padding: 24px 28px; background: linear-gradient(135deg, rgba(201,182,147,0.06) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
}
.deposit-modal-header-icon {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); border-radius: var(--radius-md);
  color: var(--accent);
}
.deposit-page-modal-title, .deposit-modal-title {
  flex: 1; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin: 0;
  letter-spacing: -0.02em;
}
.deposit-modal-close {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: var(--radius-sm);
  color: var(--text-muted); cursor: pointer; transition: all var(--transition);
}
.deposit-modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.deposit-page-modal-body { padding: 28px 32px 32px; }
.deposit-form { display: flex; flex-direction: column; gap: 18px; }
.deposit-field, .deposit-amount-wrap, .deposit-select-wrap { display: flex; flex-direction: column; gap: 6px; }
.deposit-field--half { flex: 1; min-width: 0; }
.deposit-row { display: flex; gap: 14px; }
.deposit-label { font-size: 0.7rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.deposit-input, .deposit-select, .deposit-select-styled {
  padding: 12px 16px; font-size: 0.9rem;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text);
  transition: all var(--transition);
}
.deposit-input:focus, .deposit-select:focus, .deposit-select-styled:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.deposit-amount-row { display: flex; flex-direction: column; gap: 10px; }
.deposit-amount-input { font-family: var(--font-mono); font-weight: 600; }
.deposit-amount-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.deposit-chip {
  padding: 8px 14px; font-size: 0.8rem; font-weight: 600;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
}
.deposit-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.deposit-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent); }
.deposit-hint { font-size: 0.72rem; color: var(--text-dim); }
.deposit-payment-method-wrap { margin-bottom: 18px; }
.deposit-payment-method-wrap.hidden { display: none; }
.deposit-payment-method-wrap .deposit-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.deposit-payment-method-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.deposit-payment-method-chip {
  padding: 10px 18px; font-size: 0.875rem; font-weight: 500;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text);
  cursor: pointer; transition: all var(--transition);
}
.deposit-payment-method-chip:hover { border-color: var(--border-light); background: var(--bg-elevated); }
.deposit-payment-method-chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-text); }
.deposit-payway-wrap { margin-bottom: 18px; }
.deposit-payway-wrap.hidden { display: none; }
.deposit-payway-wrap .deposit-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.deposit-payway-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.deposit-payway-chip {
  padding: 10px 18px; font-size: 0.875rem; font-weight: 500;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text);
  cursor: pointer; transition: all var(--transition);
}
.deposit-payway-chip:hover { border-color: var(--border-light); background: var(--bg-elevated); }
.deposit-payway-chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-text); }

/* Deposit method cards grid — десктоп: карточки слева, форма справа */
.deposit-method-layout {
  display: flex; gap: 24px; align-items: flex-start;
  flex-wrap: wrap;
}
@media (min-width: 768px) {
  .deposit-method-layout { flex-wrap: nowrap; }
  .deposit-method-cards-col {
    flex: 0 0 280px; max-width: 320px;
  }
  .deposit-method-form-col {
    flex: 1; min-width: 320px;
  }
}
.deposit-method-cards-col {
  flex: 1 1 280px; min-width: 0;
}
.deposit-method-form-col {
  flex: 1 1 320px; min-width: 0;
  opacity: 0.5; pointer-events: none; transition: opacity var(--transition);
}
.deposit-method-form-col.deposit-form-col-visible {
  opacity: 1; pointer-events: auto;
}
.deposit-form-content { min-height: 200px; }
.deposit-invoice-block {
  display: flex; flex-direction: column; gap: 20px;
  min-height: 200px;
}
.deposit-invoice-block.hidden { display: none !important; }
.deposit-intro-cards { margin-bottom: 14px; font-size: 0.9rem; color: var(--text-muted); }
.deposit-method-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; max-height: 400px; overflow-y: auto;
}
.deposit-method-card {
  display: flex; flex-direction: column; align-items: stretch;
  padding: 14px; text-align: center;
  background: var(--bg-input); border: 2px solid var(--border);
  border-radius: var(--radius-md); color: var(--text);
  cursor: pointer; transition: all var(--transition);
  min-height: 100px;
}
.deposit-method-card:hover {
  border-color: var(--border-light); background: var(--bg-elevated);
}
.deposit-method-card.active {
  border-color: var(--accent); background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent);
}
.deposit-card-tags {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-bottom: 8px;
}
.deposit-card-tag {
  font-size: 0.65rem; padding: 2px 6px; border-radius: 4px;
  background: rgba(201,182,147,0.15); color: var(--accent);
  border: 1px solid rgba(201,182,147,0.3);
}
.deposit-card-body {
  display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1;
}
.deposit-card-icon {
  width: 40px; height: 40px; border-radius: 8px; object-fit: contain;
}
.deposit-card-icon-placeholder {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--accent-dim); color: var(--accent);
  font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.deposit-card-name {
  font-size: 0.82rem; font-weight: 600; line-height: 1.2;
}
.deposit-card-limit {
  font-size: 0.7rem; color: var(--text-dim);
}

.deposit-piastrix-form.hidden { display: none; }
.deposit-intro { font-size: 0.88rem; color: var(--text-muted); margin: 0 0 18px; line-height: 1.5; }
.deposit-error { color: var(--danger-text); font-size: 0.8rem; padding: 10px 14px; background: var(--danger-dim); border-radius: var(--radius-sm); }
.deposit-submit-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px 20px; margin-top: 4px;
  font-size: 0.95rem; font-weight: 600;
  background: linear-gradient(135deg, var(--accent) 0%, #B8A67A 100%);
  color: var(--btn-primary-text); border: none; border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(201,182,147,0.25);
}
.deposit-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,182,147,0.35); }
.deposit-submit-btn:active { transform: translateY(0); }
.deposit-submit-icon { display: flex; opacity: 0.9; }

.deposit-tabs { display: flex; gap: 4px; margin-bottom: 18px; }
.deposit-tab {
  flex: 1; padding: 11px; text-align: center;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted);
  cursor: pointer; font-size: 0.82rem; font-weight: 600;
  transition: all var(--transition);
}
.deposit-tab.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.deposit-tab-icon { margin-right: 4px; }
.deposit-selects { display: flex; gap: 10px; margin-bottom: 12px; }
.deposit-select-wrap--with-icon { position: relative; }
.deposit-token-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 1rem; color: var(--teal); }
.deposit-select-wrap--with-icon .deposit-select { padding-left: 30px; }
.deposit-select-chevron { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 0.6rem; color: var(--text-dim); pointer-events: none; }
.deposit-select-wrap--full { width: 100%; }

/* Custom crypto select with icons */
.deposit-custom-select { position: relative; overflow: visible; }
.deposit-custom-select-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.85rem; cursor: pointer; text-align: left;
  transition: all var(--transition);
}
.deposit-custom-select-trigger:hover { border-color: var(--text-dim); }
.deposit-custom-select-trigger:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.deposit-custom-select-chevron { margin-left: auto; font-size: 0.6rem; color: var(--text-dim); transition: transform 0.2s; }
.deposit-custom-select.open .deposit-custom-select-chevron { transform: rotate(180deg); }
.deposit-crypto-icon { width: 24px; height: 24px; border-radius: 50%; object-fit: contain; flex-shrink: 0; }
.deposit-custom-select-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  list-style: none; padding: 6px; margin: 0; z-index: 100;
  max-height: 220px; overflow-y: auto;
  display: none;
}
.deposit-custom-select.open .deposit-custom-select-dropdown { display: block; }
.deposit-custom-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 0.85rem;
  transition: background 0.15s;
}
.deposit-custom-option:hover { background: rgba(255,255,255,0.06); }
.deposit-custom-option.selected { background: var(--accent-dim); color: var(--accent); }
.deposit-custom-option .deposit-crypto-icon { width: 22px; height: 22px; }
.deposit-min-text { font-size: 0.82rem; font-weight: 600; margin: 0 0 2px; }
.deposit-min-text--top { margin-bottom: 4px; }
.deposit-min-hint { font-size: 0.7rem; margin: 0 0 12px; }
.deposit-static-wrap, .deposit-checkbox { accent-color: var(--accent); }
.deposit-static-wrap { display: flex; align-items: flex-start; gap: 8px; font-size: 0.76rem; color: var(--text-muted); margin-bottom: 12px; }
.deposit-address-box { margin-bottom: 18px; }
.deposit-qr-row { display: flex; gap: 18px; margin: 16px 0; }
.deposit-qr-wrap { width: 120px; height: 120px; flex-shrink: 0; background: #fff; border-radius: var(--radius-sm); padding: 6px; }
.deposit-qr-img { width: 100%; height: 100%; object-fit: contain; }
.deposit-address-block { flex: 1; }
.deposit-address-label { font-size: 0.7rem; color: var(--text-dim); margin: 0 0 4px; }
.deposit-address-value { font-family: var(--font-mono); font-size: 0.76rem; word-break: break-all; margin: 0 0 10px; }
.deposit-copy-btn { font-size: 0.76rem; }
.deposit-copy-icon { vertical-align: middle; }
.deposit-dest-tag { font-size: 0.82rem; margin: 8px 0; }
.deposit-instruction-link { font-size: 0.76rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.deposit-instruction-icon { vertical-align: middle; }
.deposit-bonus-section {
  margin: 18px 0; padding: 16px;
  background: rgba(255,255,255,0.02); border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.deposit-bonus-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.deposit-bonus-title { font-size: 0.82rem; font-weight: 600; }
.deposit-bonus-toggle { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--text-muted); cursor: pointer; }
.deposit-bonus-checkbox { accent-color: var(--accent); }
.deposit-bonus-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  transition: all var(--transition);
}
.deposit-bonus-card--active { border-color: rgba(201,182,147,0.3); background: var(--accent-dim); }
.deposit-bonus-card-check { color: var(--accent); font-weight: 700; }
.deposit-bonus-card-content { flex: 1; }
.deposit-bonus-card-value { font-weight: 700; font-size: 0.88rem; margin: 0; }
.deposit-bonus-card-desc { font-size: 0.76rem; color: var(--text-muted); margin: 2px 0 0; }
.deposit-bonus-card-icon { font-size: 1.5rem; }
.deposit-invoice-wrap { display: flex; flex-direction: column; gap: 20px; }
.deposit-invoice-card {
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; overflow: hidden;
}
.deposit-invoice-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-bottom: 12px;
}
.deposit-invoice-badge {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); padding: 6px 12px; background: var(--accent-dim);
  border-radius: var(--radius-sm);
}
.deposit-invoice-order {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim);
  padding: 4px 10px; background: rgba(255,255,255,0.04); border-radius: var(--radius-sm);
}
.deposit-invoice-desc { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 20px; line-height: 1.5; }
.deposit-invoice-content { display: flex; gap: 20px; align-items: flex-start; }
.deposit-qr-card {
  position: relative; flex-shrink: 0;
  width: 140px; height: 140px; padding: 10px; background: #fff;
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.deposit-qr-glow {
  position: absolute; inset: -8px; border-radius: calc(var(--radius-md) + 8px);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.5; pointer-events: none;
}
.deposit-qr-img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.deposit-invoice-addr-block { flex: 1; min-width: 0; }
.deposit-invoice-addr-row { margin-bottom: 14px; }
.deposit-invoice-addr-row:last-child { margin-bottom: 0; }
.deposit-invoice-addr-wrap {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 6px;
  flex-wrap: wrap;
}
.deposit-invoice-label { font-size: 0.7rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.deposit-invoice-value {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  word-break: break-all; line-height: 1.5; color: var(--text);
}
.deposit-copy-btn {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 8px 14px; font-size: 0.78rem; font-weight: 600;
  background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(201,182,147,0.3);
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition);
}
.deposit-copy-btn:hover { background: rgba(201,182,147,0.15); border-color: var(--accent); }
.deposit-copy-btn.copied { background: var(--success); color: var(--success-text); border-color: transparent; }
.deposit-copy-btn .deposit-copy-icon { display: flex; }
.deposit-new-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 20px;
  font-size: 0.88rem; font-weight: 600;
  background: transparent; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition);
}
.deposit-new-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.deposit-success-wrap { text-align: center; padding: 20px 0; }
.deposit-success-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700; color: var(--success-text);
  background: rgba(160,232,208,0.12); border-radius: 50%;
}
.deposit-success-msg { font-size: 0.92rem; color: var(--text); margin: 0 0 20px; line-height: 1.5; font-weight: 500; }
.deposit-invoice-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 0.82rem;
}

/* ================================================================
   SKELETON LOADERS
   ================================================================ */
/* Skeleton shimmer */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}
.skeleton {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}
.skeleton-card { aspect-ratio: 4/3; }

/* Game card image shimmer while loading */
.game-card-img {
  position: relative; overflow: hidden;
  background: var(--bg-elevated);
}
.game-card-img::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, transparent 0%, rgba(201,182,147,0.04) 30%, rgba(201,182,147,0.08) 50%, rgba(201,182,147,0.04) 70%, transparent 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  will-change: background-position;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.game-card-img.loaded::before { opacity: 0; animation: none; will-change: auto; }
.game-card-img.loaded.placeholder::before {
  opacity: 1;
  background: linear-gradient(90deg, transparent 0%, rgba(201,182,147,0.03) 30%, rgba(201,182,147,0.06) 50%, rgba(201,182,147,0.03) 70%, transparent 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 2.5s ease-in-out infinite;
}
.game-card-img img {
  opacity: 0; transition: opacity 0.35s ease;
}
.game-card-img.loaded img { opacity: 1; }

/* Game card image wrap (detailed mode) */
.game-card-img-wrap {
  position: relative; overflow: hidden;
  width: 100%; height: 100%;
  background: var(--bg-elevated);
}
.home-slots-grid .game-card-img-wrap,
.games-grid .game-card-img-wrap {
  aspect-ratio: unset;
}
.game-card-img-wrap .game-card-img {
  width: 100%; height: 100%;
}
.game-card-img-wrap::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, transparent 0%, rgba(201,182,147,0.04) 30%, rgba(201,182,147,0.08) 50%, rgba(201,182,147,0.04) 70%, transparent 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  will-change: background-position;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.game-card-img-wrap.loaded::before { opacity: 0; animation: none; will-change: auto; }
.game-card-img-wrap img { opacity: 0; transition: opacity 0.35s ease; }
.game-card-img-wrap.loaded img { opacity: 1; }

/* Section loading skeleton grid */
.skeleton-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.skeleton-slot {
  background: var(--bg-elevated); border-radius: var(--radius-md);
  aspect-ratio: var(--slot-aspect); position: relative; overflow: hidden;
}
.skeleton-slot::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(201,182,147,0.05) 50%, transparent 100%);
  background-size: 200% 100%; animation: skeleton-shimmer 1.6s ease-in-out infinite;
}
@media (max-width: 768px) {
  .skeleton-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* LIVE pulse */
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.live-dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--danger-text); border-radius: 50%;
  animation: live-pulse 1.5s ease infinite;
  margin-right: 4px; vertical-align: middle;
}

/* ================================================================
   MOBILE BOTTOM TAB BAR (hidden on desktop)
   ================================================================ */
.mobile-tab-bar { display: none; }

/* ================================================================
   WIDESCREEN — Широкоформатные мониторы (≥1400px)
   ================================================================ */
@media (min-width: 1400px) {
  .casino-main { padding: 28px 36px; max-width: 100%; }
  .home-banner-row {
    grid-template-columns: 1fr 360px;
    gap: 24px;
    margin-bottom: 32px;
  }
  .home-hero-banner { min-height: 320px; padding: 48px 48px; }
  .home-hero-content,
  .hero-slide-content { max-width: 560px; padding: 48px 48px; }
  .home-hero-title { font-size: 1.95rem; margin-bottom: 14px; }
  .home-hero-desc { font-size: 0.95rem; margin-bottom: 24px; }
  .home-hero-cta { padding: 12px 36px; font-size: 0.95rem; }
  .home-hero-illustration {
    width: 200px; height: 200px;
    right: 40px; bottom: 20px;
    opacity: 0.5;
  }
  .hero-slide.active { min-height: 360px; aspect-ratio: 3.2 / 1; }
  .hero-fallback { min-height: 360px; aspect-ratio: 3.2 / 1; }
  .hero-fallback-content { max-width: 560px; padding: 48px 48px; }
  .hero-fallback-title { font-size: 2rem; }
  .home-stories-preview-row {
    grid-template-columns: 1fr auto;
    gap: 24px;
    margin-bottom: 28px;
  }
  .home-preview-blocks { width: 620px; }
  .home-leaders-block { padding: 20px; }
  .home-games-strip .game-card { min-width: 200px; max-width: 240px; }
  .home-promo-large-grid { gap: 22px; margin-top: 20px; }
  .home-promo-large-card { padding: 36px 32px; }
  .home-promo-large-card h3 { font-size: 1.2rem; }
  .home-promo-large-card p { font-size: 0.85rem; }
  .footer-inner { max-width: 1400px; }
  .home-slots-grid,
  .games-grid { gap: 16px; }
}

@media (min-width: 1800px) {
  .casino-main { padding: 32px 48px; }
  .home-banner-row {
    grid-template-columns: 1fr 400px;
    gap: 28px;
    margin-bottom: 36px;
  }
  .home-hero-banner { min-height: 360px; padding: 56px 56px; }
  .home-hero-content,
  .hero-slide-content { max-width: 640px; padding: 56px 56px; }
  .home-hero-title { font-size: 2.2rem; margin-bottom: 16px; }
  .home-hero-desc { font-size: 1rem; margin-bottom: 28px; }
  .home-hero-illustration {
    width: 240px; height: 240px;
    right: 60px; bottom: 30px;
    opacity: 0.55;
  }
  .hero-slide.active { min-height: 400px; aspect-ratio: 3.5 / 1; }
  .hero-fallback { min-height: 400px; aspect-ratio: 3.5 / 1; }
  .hero-fallback-content { max-width: 640px; padding: 56px 56px; }
  .hero-fallback-title { font-size: 2.2rem; }
  .home-stories-preview-row {
    grid-template-columns: 1fr auto;
    gap: 28px;
  }
  .home-preview-blocks { width: 680px; }
  .home-promo-large-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
  }
  .home-games-strip .game-card { min-width: 220px; max-width: 260px; }
  .footer-inner { max-width: 1600px; }
}

/* ================================================================
   RESPONSIVE — Tablet (≤1023px)
   ================================================================ */
@media (max-width: 1023px) {
  /* Снижение нагрузки на мобильных — отключение тяжёлых анимаций для предотвращения перегрева */
  .cosmos-nebula-1,
  .cosmos-nebula-2,
  .cosmos-dust,
  .stars-far,
  .stars-mid,
  .stars-near,
  .comet,
  body::before { animation: none !important; }
  .winners-scroll-wrap { animation: none !important; }
  .winners-card--100 .winners-card-inner,
  .winners-card--200 .winners-card-inner,
  .winners-card--200 .winners-mult-glow,
  .story-ring { animation: none !important; }
  .hf-orb,
  .hf-grid,
  .hf-diamond,
  .hf-diamond-svg,
  .hf-facet-top,
  .hf-facet-bot,
  .hf-inner-top,
  .hf-inner-bot,
  .hf-core { animation: none !important; }
  .game-card-img::before,
  .game-card-img-wrap::before,
  .skeleton-shimmer,
  .live-badge { animation: none !important; }
  .quest-relevant-pulse,
  .quest-relevant-shimmer { animation: none !important; }
  .pp-ring-spin { animation: none !important; }
  .loyalty-dust-anim { animation: none !important; }
  /* Уменьшение blur на мобильных — снижает нагрузку на GPU */
  .casino-header,
  .mobile-guest-bar,
  .modal-backdrop,
  .search-popup-backdrop,
  .provider-popup-backdrop { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .winners-bar { margin-left: 0; }
  .winners-bar--bottom { left: 0; }
  .casino-layout { margin-left: 0; }
  .casino-footer { margin-left: 0; }
  .casino-sidebar {
    position: fixed; top: var(--header-h); left: 0; bottom: 0;
    width: var(--sidebar-w); min-width: var(--sidebar-w);
    z-index: 300; transform: translateX(-100%);
    overflow-y: auto; overflow-x: hidden;
  }
  .casino-sidebar.open { transform: translateX(0); }
  .casino-sidebar .sidebar-nav-item { min-height: 44px; }
  .casino-sidebar .sidebar-nav-icon { flex-shrink: 0; }
  .casino-sidebar.collapsed { width: var(--sidebar-w); min-width: var(--sidebar-w); padding: 12px 10px; }
  .casino-sidebar.collapsed .sidebar-nav-label,
  .casino-sidebar.collapsed .sidebar-nav-title,
  .casino-sidebar.collapsed .sidebar-badge,
  .casino-sidebar.collapsed .sidebar-divider { display: block; }
  .casino-sidebar.collapsed .sidebar-nav-item { justify-content: flex-start; padding: 9px 14px; }
  .casino-sidebar.collapsed .sidebar-nav-item .sidebar-nav-icon { width: 22px; margin-right: 12px; }
  .casino-sidebar.collapsed .sidebar-loyalty-dashboard { display: block; }
  .casino-sidebar.collapsed .sidebar-bottom-item .sidebar-bottom-label,
  .casino-sidebar.collapsed .sidebar-lang-chevron,
  .casino-sidebar.collapsed .sidebar-support-badge { display: block; }
  .casino-sidebar.collapsed .sidebar-bottom-item,
  .casino-sidebar.collapsed .sidebar-support-link { justify-content: flex-start; padding: 9px 14px; }
  .sidebar-backdrop.open {
    display: block; position: fixed; inset: 0; z-index: 250;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .header-menu-btn { display: block; }
  .nav-account { display: block; }
  .casino-main { padding: 18px; }
  .home-banner-row { grid-template-columns: 1fr; }
  .home-stories-preview-row { grid-template-columns: 1fr; }
  .home-preview-blocks { grid-template-columns: 1fr; }
  .home-promo-large-grid { grid-template-columns: 1fr; }
  .footer-main-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-columns { grid-template-columns: 1fr 1fr; }
  .footer-partners { justify-content: flex-start; }
  .auth-modal-promo { display: none; }
  .auth-modal-box { max-width: 440px; }
  .auth-modal-box--login { max-width: 340px; }
  .home-slots-grid, .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .games-grid.games-grid--pinko,
  .home-slots-grid.games-grid--pinko { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .deposit-qr-row { flex-direction: column; align-items: center; }
}

/* ================================================================
   MOBILE APP INTERFACE (≤640px)
   ================================================================ */
@media (max-width: 640px) {
  :root { --header-h: 52px; --sidebar-w: 280px; --mob-bottom: 60px; --radius-sm: 12px; --radius-md: 16px; --radius-lg: 20px; --radius-xl: 24px; }
  body { font-size: 15px; padding-bottom: var(--mob-bottom); }
  /* Скролл на уровне body, чтобы футер был прокручиваем до конца (не в casino-main) */
  html, body { scroll-padding-bottom: calc(var(--mob-bottom) + env(safe-area-inset-bottom) + 24px); }
  .casino-layout { flex: 1 1 auto; min-height: 0; }
  .casino-main { overflow-y: visible; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
  .casino-header {
    height: var(--header-h); padding: 0 14px; gap: 8px;
    padding-top: env(safe-area-inset-top);
    height: calc(var(--header-h) + env(safe-area-inset-top));
    background: rgba(10,12,15,0.92); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .nav-main { display: none; }
  .header-menu-btn { display: none; }
  .header-search-btn { display: flex !important; }
  /* Скрыть поиск и кнопки Войти/Регистрация для гостей — они только в нижней панели */
  .header-right:has(#headerGuest:not(.hidden)) .header-search-btn,
  .header-right:has(#headerGuest:not(.hidden)) .header-guest-btn { display: none !important; }
  /* Смена темы перенесена в меню (сайдбар) */
  .header-theme-wrap { display: none !important; }
  .logo-img { height: 26px; flex-shrink: 0; filter: brightness(1.35) contrast(1.15); }
  .header-right { gap: 8px; flex-shrink: 0; }
  .header-buttons { gap: 6px; flex-shrink: 0; }
  .header-buttons .btn { padding: 8px 16px; font-size: 0.8rem; font-weight: 600; border-radius: 20px; min-height: 36px; }
  /* Кнопка Профиль скрыта на мобильных — есть в нижнем меню */
  .header-btn-profile { display: none !important; }
  /* Депозит — удобная кнопка: крупнее, фиксированная ширина */
  .header-btn-deposit {
    min-height: 40px; padding: 10px 20px; font-size: 0.88rem; font-weight: 700;
    border-radius: 22px; min-width: 110px; flex-shrink: 0;
  }
  .balance-wrap { font-size: 0.82rem; min-width: 5em; }
  .balance-main { font-size: 0.9rem; }
  /* Нижняя панель для гостей — WOW-эффект: премиум, глубина, свечение */
  .mobile-guest-bar {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
    padding: 24px 20px; padding-bottom: calc(24px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(8,10,14,0.4) 0%, rgba(12,14,20,0.98) 40%, rgba(10,12,18,0.99) 100%);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border-top: 1px solid rgba(201,182,147,0.2);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,182,147,0.06) inset,
                0 -1px 0 0 rgba(255,255,255,0.03) inset;
    overflow: hidden;
  }
  .mobile-guest-bar::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 120% 80% at 50% 100%, rgba(201,182,147,0.12) 0%, transparent 60%);
    opacity: 0.8;
  }
  .mobile-guest-bar::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(201,182,147,0.4), transparent);
    opacity: 0.6;
  }
  .mobile-guest-bar.visible { display: block; }
  .mobile-guest-bar-inner {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; gap: 18px;
    max-width: 380px; margin: 0 auto;
  }
  .mobile-guest-bar-tagline {
    font-size: 0.78rem; font-weight: 600; color: var(--accent);
    text-align: center; margin: 0; letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(201,182,147,0.3);
  }
  .mobile-guest-bar-buttons {
    display: flex; gap: 12px; align-items: stretch;
  }
  .mobile-guest-btn {
    flex: 1; min-height: 54px; font-size: 1rem; font-weight: 700;
    border-radius: 16px; transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .mobile-guest-btn--login {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(201,182,147,0.25);
    color: var(--text-muted);
  }
  .mobile-guest-btn--login:hover,
  .mobile-guest-btn--login:active {
    background: rgba(255,255,255,0.08); color: var(--text);
    border-color: rgba(201,182,147,0.4);
  }
  .mobile-guest-btn--register {
    flex: 1.4; min-height: 56px; position: relative; overflow: hidden;
    background: linear-gradient(135deg, #C9B693 0%, #D8C9A8 35%, #E5D8B8 70%, #D4C4A0 100%);
    border: none; color: var(--btn-primary-text);
    box-shadow: 0 4px 24px rgba(201,182,147,0.4), 0 0 0 1px rgba(255,255,255,0.2) inset,
                0 -2px 0 0 rgba(0,0,0,0.1);
  }
  .mobile-guest-btn--register::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, transparent 50%, rgba(255,255,255,0.15) 100%);
    pointer-events: none;
  }
  .mobile-guest-btn--register:hover,
  .mobile-guest-btn--register:active {
    background: linear-gradient(135deg, #D8C9A8 0%, #E5D8B8 35%, #EDE2CC 70%, #D8C9A8 100%);
    box-shadow: 0 6px 32px rgba(201,182,147,0.5), 0 0 0 1px rgba(255,255,255,0.25) inset;
    transform: scale(1.02);
  }
  @keyframes guest-bar-glow {
    0%, 100% { box-shadow: 0 4px 24px rgba(201,182,147,0.4), 0 0 0 1px rgba(255,255,255,0.2) inset; }
    50% { box-shadow: 0 6px 32px rgba(201,182,147,0.55), 0 0 0 1px rgba(255,255,255,0.25) inset; }
  }
  .mobile-guest-btn--register { animation: guest-bar-glow 3s ease-in-out infinite; }
  .mobile-guest-btn--register:hover,
  .mobile-guest-btn--register:active { animation: none; }
  body:has(#headerGuest:not(.hidden)) .mobile-tab-bar { display: none !important; }
  body:has(#headerGuest:not(.hidden)) .mobile-guest-bar { display: block !important; }
  body:has(#headerGuest:not(.hidden)) { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

  .mobile-tab-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
    height: var(--mob-bottom); background: rgba(10,12,15,0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border); padding: 0 4px; padding-bottom: env(safe-area-inset-bottom);
    align-items: center; justify-content: space-around;
  }
  .mob-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 6px 0; min-width: 52px; color: var(--text-dim);
    text-decoration: none; font-size: 0.6rem; font-weight: 500; letter-spacing: 0.02em;
    transition: color 0.2s; background: none; border: none; cursor: pointer;
    font-family: inherit; -webkit-tap-highlight-color: transparent;
  }
  .mob-tab svg { width: 22px; height: 22px; stroke-linecap: round; stroke-linejoin: round; }
  .mob-tab.active { color: var(--accent); }
  .mob-tab:active { transform: scale(0.92); }
  /* Кнопка Меню: при открытом меню — иконка X и текст «Закрыть» */
  .mob-tab--menu .mob-tab-icon,
  .mob-tab--menu .mob-tab-label { display: block; }
  .mob-tab--menu .mob-tab-icon.hidden,
  .mob-tab--menu .mob-tab-label.hidden { display: none !important; }
  .mob-tab--menu.mob-tab--menu-open { color: var(--accent); }
  .casino-sidebar {
    width: 100%; max-width: 320px; padding: 16px 14px;
    top: 0; height: 100vh; height: 100dvh;
    border-right: none; box-shadow: 8px 0 40px rgba(0,0,0,0.5);
    gap: 0; overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar-collapse-btn { display: none; }
  /* Мобильный хедер: заголовок + кнопка закрытия */
  .sidebar-mobile-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0 16px; margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-mobile-title {
    font-size: 1rem; font-weight: 700; color: var(--text);
  }
  .sidebar-mobile-close {
    width: 44px; height: 44px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-muted);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background 0.2s, color 0.2s;
  }
  .sidebar-mobile-close:hover,
  .sidebar-mobile-close:active { background: rgba(255,255,255,0.1); color: var(--text); }
  .sidebar-mobile-close svg { width: 22px; height: 22px; }
  /* Улучшенная читаемость сайдбара на мобильных */
  .casino-sidebar .sidebar-loyalty-dashboard { padding: 18px; border-radius: var(--radius-lg); }
  .casino-sidebar .sidebar-guest-promo .sidebar-promo-mini-title { font-size: 0.88rem; }
  .casino-sidebar .sidebar-guest-promo p { font-size: 0.85rem; margin: 6px 0 10px; line-height: 1.35; }
  .casino-sidebar .sidebar-guest-promo .sidebar-promo-mini-link { font-size: 0.85rem; }
  .casino-sidebar .sidebar-nav { gap: 2px; }
  .casino-sidebar .sidebar-nav-title {
    font-size: 0.72rem; padding: 20px 16px 10px;
    letter-spacing: 0.12em; color: var(--text-muted);
  }
  .casino-sidebar .sidebar-nav-item {
    min-height: 52px; padding: 12px 16px;
    font-size: 0.92rem; font-weight: 500;
    gap: 14px; border-radius: var(--radius-md);
  }
  .casino-sidebar .sidebar-nav-icon { width: 26px; height: 26px; }
  .casino-sidebar .sidebar-nav-icon svg { width: 24px; height: 24px; }
  .casino-sidebar .sidebar-nav-label { font-size: 0.92rem; line-height: 1.3; }
  .casino-sidebar .sidebar-divider { margin: 12px 0 4px; }
  .casino-sidebar .sidebar-bottom-item,
  .casino-sidebar .sidebar-support-link,
  .casino-sidebar .sidebar-bottom-card {
    min-height: 48px; padding: 12px 16px;
    font-size: 0.88rem; gap: 12px;
  }
  .casino-sidebar .sidebar-bottom-icon svg,
  .casino-sidebar .sidebar-support-link .sidebar-bottom-icon svg,
  .casino-sidebar .sidebar-bottom-card .sidebar-bottom-card-icon svg { width: 22px; height: 22px; }
  /* Демо-слайдер в сайдбаре — компактный на мобильных */
  .sidebar-hero-demo {
    display: block; margin-bottom: 14px;
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border); overflow: hidden;
  }
  .sidebar-hero-slider { position: relative; min-height: 110px; }
  .sidebar-hero-track { position: relative; min-height: 110px; }
  .sidebar-hero-slide {
    position: absolute; inset: 0;
    padding: 14px 40px 14px 14px;
    display: flex; flex-direction: column; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s;
  }
  .sidebar-hero-slide.active { opacity: 1; visibility: visible; z-index: 1; }
  .sidebar-hero-tagline {
    font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.15em; color: var(--accent); margin: 0 0 6px;
  }
  .sidebar-hero-title {
    font-size: 1rem; font-weight: 700; color: var(--text);
    margin: 0 0 12px; line-height: 1.25;
  }
  .sidebar-hero-cta {
    display: inline-block; padding: 10px 20px; font-size: 0.82rem; font-weight: 600;
    background: var(--accent); color: var(--btn-primary-text);
    border-radius: var(--radius-md); text-align: center;
    transition: background var(--transition); align-self: flex-start;
  }
  .sidebar-hero-cta:hover { background: var(--accent-hover); color: var(--btn-primary-text); }
  .sidebar-hero-dots {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    padding: 10px 16px; position: relative; z-index: 5;
    background: rgba(0,0,0,0.35); backdrop-filter: blur(12px);
    border-radius: 20px; margin: 0 12px 12px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  }
  .sidebar-hero-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.3); border: none;
    cursor: pointer; transition: all 0.3s ease;
  }
  .sidebar-hero-dot:hover {
    background: rgba(255,255,255,0.5); transform: scale(1.15);
  }
  .sidebar-hero-dot.active {
    width: 20px; border-radius: 10px;
    background: linear-gradient(90deg, var(--accent), #D8C9A8);
    box-shadow: 0 0 10px var(--accent-glow);
  }
  .winners-bar {
    margin-left: 0; padding: 7px 0; font-size: 0.72rem;
    width: 100%; max-width: 100%; left: 0; right: 0;
    box-sizing: border-box;
  }
  .winners-bar--bottom {
    left: 0; right: 0; bottom: var(--mob-bottom); padding-bottom: 0;
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }
  .winners-bar-item { padding: 5px 10px; gap: 8px; }
  .winners-bar-item-img { width: 30px; height: 30px; border-radius: 8px; }
  .casino-layout { margin-left: 0; }
  .casino-main { padding: 14px 16px; padding-bottom: calc(var(--mob-bottom) + 16px); }
  .home-banner-row { grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
  .home-stories-preview-row { grid-template-columns: 1fr; gap: 12px; }
  .home-stories-preview-row > .home-preview-blocks { width: 100%; min-width: 0; max-width: none; }
  .home-preview-blocks { grid-template-columns: 1fr; gap: 12px; width: 100%; min-width: 0; }
  .home-tournament-block, .home-raffle-block { width: 100%; min-width: 0; flex: 1 1 100%; }
  /* Турнир и розыгрыш — компактная раскладка без пустого места */
  .home-tournament-block a {
    width: 100%; padding: 14px 16px; min-height: auto; box-sizing: border-box;
  }
  .home-tournament-top { margin-bottom: 10px; flex-wrap: wrap; gap: 6px; }
  .home-tournament-title { font-size: 0.7rem; letter-spacing: 0.1em; }
  .home-tournament-middle {
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px;
  }
  .home-tournament-timer-wrap { flex-direction: row; align-items: baseline; gap: 6px; }
  .home-tournament-timer-label { font-size: 0.6rem; }
  .home-tournament-timer { font-size: 1rem; white-space: nowrap; }
  .home-tournament-prize { font-size: 0.82rem; padding: 5px 10px; white-space: nowrap; }
  .home-tournament-bottom {
    flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  }
  .home-tournament-meta { flex-wrap: wrap; gap: 6px 10px; flex: 1; min-width: 0; }
  .home-tournament-meta span { white-space: nowrap; }
  .home-tournament-btn {
    flex-shrink: 0; justify-content: center; padding: 10px 18px; font-size: 0.82rem;
    min-height: 42px; -webkit-tap-highlight-color: transparent;
  }
  .home-raffle-block > div {
    width: 100%; padding: 14px 16px; min-height: auto; box-sizing: border-box;
  }
  .home-raffle-top { margin-bottom: 10px; flex-wrap: wrap; gap: 6px; }
  .home-raffle-title { font-size: 0.78rem; }
  .home-raffle-middle {
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px;
  }
  .home-raffle-bank { margin-left: 0; white-space: nowrap; }
  .home-raffle-progress { flex-wrap: nowrap; gap: 8px; }
  .home-raffle-progress-ring { width: 36px; height: 36px; flex-shrink: 0; }
  .home-raffle-bottom {
    flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  }
  .home-raffle-progress-hint { font-size: 0.68rem; flex: 1; min-width: 0; }
  .home-raffle-btn {
    flex-shrink: 0; justify-content: center; padding: 10px 18px; font-size: 0.82rem;
    min-height: 42px; -webkit-tap-highlight-color: transparent;
  }
  .home-hero-slider-wrap { border-radius: var(--radius-lg); }
  .hero-slide.active { min-height: 200px; aspect-ratio: 2.5 / 1; }
  .home-hero-banner { padding: 24px 20px; min-height: 180px; border-radius: var(--radius-lg); }
  .home-hero-title { font-size: 1.2rem; line-height: 1.3; }
  .home-hero-tagline { font-size: 0.68rem; letter-spacing: 0.16em; margin-bottom: 8px; }
  .home-hero-desc { font-size: 0.82rem; margin-bottom: 16px; }
  .home-hero-cta { padding: 12px 28px; font-size: 0.88rem; font-weight: 700; border-radius: 24px; min-height: 44px; }
  .home-hero-illustration { display: none; }
  .hero-slide-content { padding: 24px 20px; padding-bottom: 52px; }
  /* На мобильных точки и стрелки слайдера всегда видны (нет hover) */
  .hero-slider--controls-on-hover .hero-slider-prev,
  .hero-slider--controls-on-hover .hero-slider-next,
  .hero-slider--controls-on-hover .hero-slider-dots { opacity: 1; }
  /* Адаптация переключателя слайдов под мобильные — не наложен на контент */
  .home-hero-slider-wrap { position: relative; }
  .hero-slider-prev, .hero-slider-next {
    width: 40px; height: 40px; font-size: 1.2rem;
    background: rgba(10,12,15,0.85); backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm);
    left: 10px; right: auto;
  }
  .hero-slider-next { left: auto; right: 10px; }
  .hero-slider-dots {
    bottom: 14px; padding: 10px 18px;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(12px);
    border-radius: 24px; gap: 10px;
  }
  .hero-slider-dot {
    width: 10px; height: 10px;
    background: rgba(255,255,255,0.35);
  }
  .hero-slider-dot.active {
    width: 22px; border-radius: 11px;
    background: linear-gradient(90deg, var(--accent), #D8C9A8);
    box-shadow: 0 0 10px var(--accent-glow);
  }
  /* Блок лидеров — полная пересборка под смартфоны */
  .home-leaders-block {
    border-radius: var(--radius-lg); padding: 16px;
    display: flex; flex-direction: column; gap: 16px;
  }
  .home-leaders-title { font-size: 1rem; margin: 0 0 4px; }
  .home-leaders-tabs {
    display: flex; gap: 0; margin-bottom: 0; overflow: visible;
    background: var(--bg-elevated); border-radius: 12px; padding: 4px;
    border: 1px solid var(--border); -webkit-tap-highlight-color: transparent;
  }
  .home-leaders-tab {
    flex: 1; padding: 12px 8px; font-size: 0.78rem; font-weight: 600;
    border: none; border-radius: 10px; min-height: 44px;
    background: transparent; color: var(--text-muted);
    white-space: nowrap; justify-content: center; display: flex; align-items: center;
  }
  .home-leaders-tab .tab-full { display: none; }
  .home-leaders-tab .tab-short { display: inline; }
  .home-leaders-tab.active {
    background: var(--accent); color: var(--btn-primary-text);
    box-shadow: 0 2px 8px rgba(201,182,147,0.25);
  }
  .home-leaders-content {
    display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px 8px;
    grid-auto-rows: auto; min-height: 0;
  }
  .home-leaders-content > .loading,
  .home-leaders-content > .home-leaders-empty,
  .home-leaders-content > .muted { grid-column: 1 / -1; }
  .home-leaders-row {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 12px 10px; border-radius: 12px; border: none;
    border-bottom: none; background: rgba(255,255,255,0.03);
    min-height: 72px; font-size: 0.8rem;
    -webkit-tap-highlight-color: transparent;
  }
  .home-leaders-row:nth-child(1) { order: 2; grid-column: 2; grid-row: 1; }
  .home-leaders-row:nth-child(2) { order: 1; grid-column: 1; grid-row: 1; }
  .home-leaders-row:nth-child(3) { order: 3; grid-column: 3; grid-row: 1; }
  .home-leaders-row:nth-child(n+4) { grid-column: 1 / -1; order: 4; flex-direction: row; justify-content: flex-start; padding: 12px 14px; min-height: 52px; }
  .home-leaders-row--gold { padding: 14px 10px; min-height: 82px; background: linear-gradient(180deg, rgba(201,182,147,0.12) 0%, rgba(201,182,147,0.04) 100%); border: 1px solid rgba(201,182,147,0.2); border-left: none; }
  .home-leaders-row--silver { background: linear-gradient(180deg, rgba(154,164,179,0.08) 0%, rgba(154,164,179,0.02) 100%); border-left: none; }
  .home-leaders-row--bronze { background: linear-gradient(180deg, rgba(139,115,85,0.08) 0%, rgba(139,115,85,0.02) 100%); border-left: none; }
  .home-leaders-rank {
    width: auto; font-size: 0.7rem; order: 1;
  }
  .leaders-crown { width: 18px; height: 18px; }
  .home-leaders-row:nth-child(n+4) .home-leaders-rank { order: 0; width: 22px; flex-shrink: 0; }
  .home-leaders-avatar, .home-leaders-avatar--placeholder {
    width: 36px; height: 36px; order: 2;
  }
  .home-leaders-row:nth-child(n+4) .home-leaders-avatar,
  .home-leaders-row:nth-child(n+4) .home-leaders-avatar--placeholder { width: 32px; height: 32px; order: 0; }
  .home-leaders-avatar--placeholder { font-size: 0.82rem; }
  .home-leaders-name {
    order: 3; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  }
  .home-leaders-row:nth-child(n+4) .home-leaders-name { order: 0; text-align: left; flex: 1; }
  .home-leaders-value {
    order: 4; font-size: 0.82rem; flex-shrink: 0;
  }
  .home-leaders-row:nth-child(n+4) .home-leaders-value { order: 0; }
  .home-leaders-empty { padding: 16px; text-align: center; }
  .section-title { font-size: 1.05rem; }
  .home-all-games-link { font-size: 0.78rem; }
  .home-games-block { margin-bottom: 24px; }
  .home-slots-grid, .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .games-grid.games-grid--pinko, .home-slots-grid.games-grid--pinko { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .game-card { border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
  .game-card-info { padding: 8px 10px; }
  .game-card-name { font-size: 0.72rem; }
  .game-card-rtp-badge { font-size: 0.58rem; padding: 2px 6px; top: 5px; right: 5px; border-radius: 6px; }
  .game-card-hover { padding: 12px; gap: 10px; border-radius: 14px; }
  .game-card-btn { padding: 12px 20px; font-size: 0.85rem; font-weight: 700; border-radius: 20px; min-height: 44px; max-width: none; width: 100%; }
  /* Смартфоны: кнопки и иконки крупнее для удобного тапа */
  .game-card-fav-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    top: 6px;
    right: 6px;
  }
  .game-card-fav-btn svg { width: 22px; height: 22px; }
  .game-card-btn { min-height: 48px; padding: 14px 20px; gap: 8px; -webkit-tap-highlight-color: transparent; }
  .game-card-btn:active { transform: scale(0.98); }
  .game-card-fav-btn:active { transform: scale(0.95); }
  .game-card-hover { gap: 12px; padding: 14px; }
  /* Блок навигации по играм — мобильная адаптация (отдельный экран навигации) */
  .games-nav-block {
    margin-bottom: 20px;
  }
  .games-nav-row--actions {
    padding: 14px; margin-bottom: 10px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(26,30,36,0.95) 0%, rgba(16,19,26,0.98) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255,255,255,0.03) inset;
  }
  .games-nav-row--actions .games-toolbar,
  .games-nav-row--actions .home-slots-toolbar {
    display: flex; gap: 8px; flex-wrap: nowrap; width: 100%;
  }
  .games-nav-row--actions .games-search-btn {
    flex: 1; min-width: 0; justify-content: flex-start;
  }
  .games-nav-row--actions .games-display-btn,
  .games-nav-row--actions .games-provider-btn {
    flex-shrink: 0;
  }
  .games-search-btn {
    padding: 14px 16px; font-size: 0.9rem; border-radius: 14px;
    min-height: 52px;
    background: var(--surface);
    border-color: rgba(255,255,255,0.08);
    color: var(--text-dim);
    -webkit-tap-highlight-color: transparent;
  }
  .games-display-btn, .games-provider-btn {
    padding: 14px 16px; font-size: 0.88rem; border-radius: 14px;
    min-height: 52px; min-width: 52px;
    background: var(--bg-elevated);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
  }
  .games-search-btn:active, .games-display-btn:active, .games-provider-btn:active {
    transform: scale(0.96);
  }
  .games-search-btn-icon, .games-display-icon, .games-provider-icon {
    width: 22px; height: 22px; flex-shrink: 0;
  }
  .games-nav-row--categories .catalog-tabs-scroll {
    margin: 0 -4px; padding: 6px 0;
    -webkit-overflow-scrolling: touch;
  }
  .games-nav-row--categories .home-catalog-tabs {
    padding: 4px 0;
  }
  .catalog-tabs { gap: 8px; padding: 4px 0; }
  .catalog-tab {
    padding: 12px 18px; font-size: 0.86rem; font-weight: 600;
    border-radius: 22px; min-height: 46px;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  }
  .catalog-tab:active { transform: scale(0.97); }
  .home-catalog-tabs .catalog-tab { padding: 11px 16px; font-size: 0.82rem; min-height: 44px; }
  .home-games-strip .game-card { min-width: 140px; max-width: 160px; }
  .home-strip-nav { display: none; }
  .home-promo-large-grid { grid-template-columns: 1fr; gap: 10px; }
  .home-promo-large-card { min-height: 130px; padding: 22px 20px; border-radius: var(--radius-lg); }
  .modal { padding: 0; align-items: flex-end; }
  .modal-backdrop { background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
  .modal-dialog { border-radius: 20px 20px 0 0; max-height: 92vh; overflow: hidden; }
  .modal-close { width: 36px; height: 36px; top: 12px; right: 12px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); font-size: 1.3rem; }
  .auth-modal-box { max-width: 100%; border-radius: 20px 20px 0 0; flex-direction: column; }
  .auth-modal-promo { display: none; }
  .auth-modal-form { padding: 28px 20px; }
  .auth-input, .auth-select { padding: 13px 14px 13px 42px; font-size: 0.9rem; min-height: 48px; border-radius: 14px; }
  .auth-submit { padding: 14px; font-size: 0.95rem; min-height: 50px; border-radius: 14px; }
  .auth-social-btn { width: 48px; height: 48px; }
  .account-modal-box { max-width: 100%; border-radius: 20px 20px 0 0; height: 92vh; max-height: 92vh; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  .account-modal-close { top: 12px; right: 12px; width: 44px; height: 44px; }
  .account-modal-box .account-modal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .account-modal-box .account-auth {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    max-height: 100%;
  }
  .account-auth .acc-sidebar { grid-row: 1; }
  .account-auth .acc-panels { grid-row: 2; min-height: 0; }
  .acc-sidebar { width: 100%; flex-shrink: 0; border-right: none; border-bottom: 1px solid var(--border); padding: 16px 0 0; }
  .acc-sidebar-user { padding: 0 16px 12px; }
  .acc-nav {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
    padding: 0 12px 12px; flex: none;
  }
  .acc-nav-item {
    white-space: nowrap; padding: 10px 12px; font-size: 0.78rem;
    border-radius: 12px; min-height: 44px; box-sizing: border-box;
    display: flex; align-items: center; gap: 8px; width: 100%;
  }
  .acc-sidebar-meta { display: none; }
  .acc-sidebar-logout { margin: 0 16px 16px; padding: 16px; }
  .acc-panels { padding: 20px; overflow-y: auto; }
  .acc-balance-grid { grid-template-columns: 1fr; }
  .acc-balance-actions .btn { flex: 1; min-height: 48px; font-size: 0.88rem; border-radius: 14px; }
  .deposit-page-modal-box, .deposit-modal-box { max-width: 100%; border-radius: 20px 20px 0 0; padding: 24px 20px; }
  .deposit-input, .deposit-select { padding: 13px 14px; font-size: 0.9rem; min-height: 48px; border-radius: 14px; }
  .deposit-tab { padding: 12px; font-size: 0.85rem; min-height: 48px; border-radius: 14px; }
  .deposit-qr-row { flex-direction: column; align-items: center; }
  .deposit-qr-wrap { width: 120px; height: 120px; }
  .profile-form-grid { grid-template-columns: 1fr; gap: 10px; }
  .profile-field--full { grid-column: span 1; }
  .profile-input { padding: 12px 14px; font-size: 0.88rem; min-height: 46px; border-radius: 14px; }
  .profile-form-actions .btn { min-height: 50px; font-size: 0.92rem; border-radius: 14px; }
  .provider-popup-panel { width: 100%; max-width: 100%; border-radius: 0; }
  .provider-popup-head { padding: 20px 16px; }
  .provider-popup-head h3 { font-size: 1.15rem; }
  .provider-popup-close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .provider-popup-close svg { width: 22px; height: 22px; }
  #providerSearch {
    margin: 0 16px 16px !important;
    padding: 14px 18px !important;
    font-size: 1rem !important;
    min-height: 52px !important;
    border-radius: 14px !important;
  }
  .provider-list { padding: 0 16px 16px; gap: 8px; }
  .provider-item {
    min-height: 56px;
    padding: 14px 18px;
    gap: 14px;
    border-radius: 14px;
    -webkit-tap-highlight-color: transparent;
  }
  .provider-item:active { transform: scale(0.98); }
  .provider-item-name { font-size: 0.95rem; font-weight: 600; }
  .provider-item-count { font-size: 0.85rem; }
  .provider-item-check {
    width: 26px; height: 26px;
    min-width: 26px; min-height: 26px;
    border-radius: 8px;
    border-width: 2px;
  }
  .provider-item-check svg { width: 14px; height: 14px; }
  .provider-popup-foot {
    padding: 18px 16px;
    gap: 12px;
    border-top: 1px solid var(--border);
  }
  .provider-popup-foot .btn {
    flex: 1;
    min-height: 52px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 14px;
  }
  .search-popup { padding: 0; align-items: flex-end; }
  .search-popup-panel { max-height: 92vh; max-width: 100%; width: 100%; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; }
  .search-popup-head { padding: 16px 18px; }
  .search-popup-head h3 { font-size: 1.1rem; }
  .search-popup-tabs { padding: 10px 16px; gap: 6px; }
  .search-popup-tab { padding: 12px 14px; font-size: 0.9rem; }
  .search-popup-input-wrap { margin: 12px 16px; min-height: 48px; padding: 0 44px 0 48px; border-radius: 14px; }
  .search-popup-input-wrap .search-popup-input { font-size: 0.95rem; }
  .search-popup-results { flex: 1; min-height: 120px; }
  .search-popup-results-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .search-popup-game-card { flex-direction: column; align-items: stretch; padding: 8px; }
  .search-popup-game-img { width: 100%; height: 80px; aspect-ratio: 4/3; }
  .search-popup-game-info { padding: 4px 0 0; }
  .search-popup-game-name { font-size: 0.72rem; white-space: normal; line-height: 1.2; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .search-popup-providers-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .search-popup-provider-card { padding: 14px; text-align: center; }
  .search-popup-provider-card img { width: 48px; height: 48px; object-fit: contain; }
  .search-popup-provider-card span { font-size: 0.78rem; }
  .search-popup-show-more { padding: 16px; text-align: center; }
  .search-popup-show-more .btn { width: 100%; max-width: 280px; min-height: 48px; }
  .btn { min-height: 44px; border-radius: 14px; font-size: 0.85rem; padding: 10px 20px; }
  .btn-primary { min-height: 48px; }
  .home-seo-block { padding: 22px 18px; border-radius: var(--radius-lg); }
  .promo-article { padding: 20px; border-radius: var(--radius-lg); }
  .bonus-cards-row { grid-template-columns: 1fr; gap: 10px; }
  .casino-footer { margin-left: 0; padding: 28px 16px calc(var(--mob-bottom) + 20px); }
  .footer-main-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-columns { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-partners { justify-content: flex-start; min-width: 0; }
  .footer-partner-item { width: 70px; height: 36px; padding: 4px 8px; }
  .game-frame-header { padding: 8px 12px; gap: 8px; }
  .game-frame-back { padding: 8px 14px; font-size: 0.78rem; border-radius: 12px; min-height: 38px; }
  .game-frame-title { font-size: 0.78rem; }
}
@media (max-width: 390px) {
  .casino-header { padding: 0 10px; }
  .header-btn-deposit { min-width: 100px; padding: 10px 16px; font-size: 0.82rem; }
  .balance-wrap { min-width: 4.5em; font-size: 0.78rem; }
  .header-buttons .btn { padding: 7px 12px; font-size: 0.74rem; }
  .home-slots-grid, .games-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .games-grid.games-grid--pinko, .home-slots-grid.games-grid--pinko { grid-template-columns: repeat(2, 1fr) !important; gap: 5px !important; }
  .footer-columns { grid-template-columns: 1fr; }
  .footer-partner-item { width: 60px; height: 32px; }
  .footer-promo-row { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  :root { --header-h: 40px; --winners-bar-h: 0; }
  .mobile-tab-bar { display: none; }
  body { padding-bottom: 0; }
  .winners-bar { display: none; }
  .game-frame-header { padding: 4px 10px; }
  .game-frame-back { padding: 4px 8px; font-size: 0.73rem; min-height: 30px; }
}
@media (hover: none) and (pointer: coarse) {
  * { -webkit-tap-highlight-color: transparent; }
  .game-card:hover { transform: none; box-shadow: 0 2px 10px rgba(0,0,0,0.25); border-color: transparent; }
  .game-card:active { transform: scale(0.97); transition: transform 0.1s; }
  .game-card--has-hover .game-card-hover { opacity: 0; visibility: hidden; }
  .game-card--has-hover:active .game-card-hover { opacity: 1; visibility: visible; }
  .game-card-btn { min-height: 48px; }
  .btn { min-height: 44px; }
  .btn:active { transform: scale(0.96); transition: transform 0.1s; }
  .sidebar-nav-item { min-height: 48px; }
  .provider-item { min-height: 48px; }
  .catalog-tab:active { transform: scale(0.95); }
  .mob-tab:active { transform: scale(0.88); }
  .home-promo-large-card:active { transform: scale(0.98); }
}
@supports (padding: env(safe-area-inset-top)) {
  .casino-header { padding-top: env(safe-area-inset-top); height: calc(var(--header-h) + env(safe-area-inset-top)); }
  .casino-sidebar { top: calc(var(--header-h) + env(safe-area-inset-top)); }
  .provider-popup-panel { padding-bottom: env(safe-area-inset-bottom); }
  .mobile-tab-bar { padding-bottom: env(safe-area-inset-bottom); height: calc(60px + env(safe-area-inset-bottom)); }
}

/* ================================================================
   Game Frame (iframe) — полноразмерный в основной области
   ================================================================ */
.game-frame-overlay {
  flex: 1; min-height: 400px; display: flex; flex-direction: column;
  background: #060810; border-radius: var(--radius-lg);
  overflow: hidden;
}
/* Полноэкранный режим: фрейм заполняет область справа от сайдбара, под хедером и winners-bar */
body.game-active .game-frame-overlay:not(.hidden) {
  position: fixed;
  left: var(--sidebar-w);
  top: calc(var(--header-h) + var(--winners-bar-h));
  right: 0;
  bottom: 0;
  min-height: 0;
  z-index: 150;
  border-radius: 0;
}
body.game-active.sidebar-collapsed .game-frame-overlay:not(.hidden) {
  left: 64px;
}
body.game-active .casino-footer,
body.game-active .mobile-tab-bar { display: none; }
.game-frame-overlay.hidden { display: none !important; }
.game-frame-header {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 22px; background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.game-frame-back {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-size: 0.82rem; font-weight: 600;
  color: var(--text); background: transparent;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition); font-family: inherit;
}
.game-frame-back:hover { background: var(--bg-card); border-color: var(--accent); color: var(--accent); }
.game-frame-back-icon { font-size: 1.1em; }
.game-frame-title {
  flex: 1; font-size: 0.88rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.game-frame-report-btn {
  flex-shrink: 0; font-size: 0.75rem; padding: 6px 12px;
}

/* ================================================================
   Play Page — многофункциональный раздел игры
   ================================================================ */
body.play-page-active .casino-header,
body.play-page-active .winners-bar,
body.play-page-active .casino-sidebar,
body.play-page-active .sidebar-backdrop { display: none !important; }
body.play-page-active .casino-layout { margin-left: 0; }
body.play-page-active .casino-footer,
body.play-page-active .mobile-tab-bar { display: none !important; }

.page-play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: #060810;
  z-index: 5;
}
body.play-page-active .page-play {
  position: fixed; inset: 0; z-index: 1000;
}
.play-page-bg {
  position: absolute; inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(24px) brightness(0.35);
  transform: scale(1.05);
}
.play-page-bg--space {
  background-image: none !important;
  filter: none;
  background:
    radial-gradient(ellipse 90% 60% at 30% 20%, rgba(80,60,120,0.35) 0%, transparent 50%),
    radial-gradient(ellipse 70% 80% at 75% 70%, rgba(40,60,100,0.3) 0%, transparent 45%),
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(60,80,140,0.15) 0%, transparent 40%),
    radial-gradient(ellipse 140% 120% at 50% -20%, #1a1d38 0%, #0f1120 40%, #080a14 80%, #050710 100%);
}
.play-page-bg--space::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.25) 1px, transparent 0);
  background-size: 32px 32px;
  background-repeat: repeat;
  opacity: 1;
}
.play-page-bg--space::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2.5px 2.5px at 8% 15%, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 25% 8%, rgba(255,255,255,0.6), transparent),
    radial-gradient(2.5px 2.5px at 45% 25%, rgba(255,255,255,0.65), transparent),
    radial-gradient(2px 2px at 70% 12%, rgba(255,255,255,0.55), transparent),
    radial-gradient(2.5px 2.5px at 88% 28%, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 15% 55%, rgba(255,255,255,0.5), transparent),
    radial-gradient(2.5px 2.5px at 35% 70%, rgba(255,255,255,0.55), transparent),
    radial-gradient(2px 2px at 60% 85%, rgba(255,255,255,0.5), transparent),
    radial-gradient(2.5px 2.5px at 85% 65%, rgba(255,255,255,0.55), transparent),
    radial-gradient(2px 2px at 5% 85%, rgba(255,255,255,0.45), transparent),
    radial-gradient(2.5px 2.5px at 92% 90%, rgba(255,255,255,0.5), transparent);
  background-size: 100% 100%;
  pointer-events: none;
}

/* Header: отдельные блоки на фоне */
.play-page-header {
  position: relative; z-index: 10;
  flex-shrink: 0;
  display: flex; align-items: stretch; justify-content: space-between; gap: 10px;
  padding: 10px 12px;
  background: transparent;
}
.play-page-header-block {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(145deg, rgba(22,26,34,0.95) 0%, rgba(14,18,26,0.95) 50%, rgba(10,14,20,0.98) 100%);
  border: 1px solid rgba(201,182,147,0.2);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.02) inset, 0 1px 0 rgba(201,182,147,0.06);
  backdrop-filter: blur(16px);
}
.play-page-header-left { flex-shrink: 0; }
.play-page-header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex: 0 0 auto;
  justify-content: center;
  min-width: 0;
  width: fit-content;
}
.play-page-header-right { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
.play-page-actions-toggle { display: none; }
.play-page-header-right-icons { display: flex; align-items: center; gap: 6px; }
.play-page-menu-btn {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
  transition: all var(--transition);
}
.play-page-menu-btn:hover { background: var(--bg-card); border-color: var(--accent); color: var(--accent); }
.play-page-menu-btn svg { width: 1.4em; height: 1.4em; }
.play-page-menu-btn-icon { display: flex; align-items: center; justify-content: center; }
.play-page-menu-btn-icon.hidden { display: none !important; }
body.play-page-menu-open .play-page-menu-btn-icon--open { display: none !important; }
body.play-page-menu-open .play-page-menu-btn-icon--close { display: flex !important; }

/* Отдельное меню для страницы игры — выезжающий блок */
.play-page-menu-backdrop {
  position: fixed; inset: 0; z-index: 2050;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
body.play-page-menu-open .play-page-menu-backdrop {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.play-page-menu {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 2100;
  width: min(320px, 85vw);
  max-width: 320px;
  background: linear-gradient(180deg, rgba(18,22,28,0.98) 0%, rgba(10,14,20,0.99) 100%);
  border-right: 1px solid rgba(201,182,147,0.15);
  box-shadow: 8px 0 40px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
body.play-page-menu-open .play-page-menu {
  transform: translateX(0);
}
.play-page-menu-header {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.play-page-menu-title {
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.play-page-menu-close {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
  transition: all var(--transition);
}
.play-page-menu-close:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}
.play-page-menu-close svg { width: 1.2em; height: 1.2em; }
.play-page-menu-section-title {
  margin: 0 0 8px;
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent);
}
.play-page-menu-favorites-block,
.play-page-menu-recent-block {
  flex-shrink: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.1);
}
.play-page-menu-favorites-list,
.play-page-menu-recent-list {
  max-height: 120px; overflow-y: auto;
  font-size: 0.82rem;
  display: flex; flex-direction: column; gap: 6px;
}
.play-page-menu-empty { color: var(--text-dim); font-size: 0.8rem; padding: 8px 0; }
.play-page-menu-game-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  transition: all var(--transition);
}
.play-page-menu-game-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.play-page-menu-game-link img {
  width: 36px; height: 28px;
  object-fit: cover;
  border-radius: 4px;
}
.play-page-menu-game-link span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-page-menu-quests-block {
  flex-shrink: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
}
.play-page-menu-quests-title {
  margin: 0 0 10px;
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent);
}
.play-page-menu-quests-list {
  max-height: 320px; overflow-y: auto;
  font-size: 0.82rem;
  padding: 4px 10px;
}
.play-page-menu-quests-list .play-page-quest-item { margin-bottom: 8px; }
.play-page-menu-quests-list .play-page-quest-item:last-child { margin-bottom: 0; }
.play-page-menu-nav {
  flex: 1; overflow-y: auto;
  padding: 12px 0;
}
.play-page-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.play-page-menu-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--accent);
}
.play-page-menu-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.play-page-menu-icon svg { width: 20px; height: 20px; }

.play-page-profile-dropdown-wrap { position: relative; }
.play-page-profile-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
  font-size: 0.85rem; font-family: inherit;
}
.play-page-profile-trigger:hover { border-color: var(--accent); }
.play-page-profile-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #4F5560, #6B7280);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
}
.play-page-profile-dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 6px 0;
  z-index: 100;
}
.play-page-profile-dropdown.hidden { display: none !important; }
.play-page-profile-item {
  display: block; padding: 10px 16px;
  color: var(--text); text-decoration: none; font-size: 0.85rem;
  width: 100%; text-align: left; background: none; border: none;
  cursor: pointer; font-family: inherit;
}
.play-page-profile-item:hover { background: var(--bg-card); color: var(--accent); }
.play-page-profile-logout {
  width: 100%; text-align: left; background: none; border: none;
  cursor: pointer; font-family: inherit; font-size: inherit;
  color: var(--text-muted);
}
.play-page-profile-logout:hover { color: var(--danger, #e53e3e); }
.play-page-profile-login {
  width: 100%; text-align: left; background: none; border: none;
  cursor: pointer; font-family: inherit; font-size: inherit;
}

.play-page-deposit-btn { flex-shrink: 0; padding: 8px 16px; font-size: 0.82rem; }
.play-page-balance-block {
  display: flex; align-items: center; gap: 8px;
  align-self: center;
}
.play-page-balance-card {
  display: flex; flex-direction: row; align-items: center; gap: 6px;
  padding: 6px 12px;
  height: 36px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}
.play-page-balance-card::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
.play-page-balance-card--bonus::before {
  background: linear-gradient(180deg, var(--teal) 0%, var(--success-text) 100%);
}
.play-page-balance-card--bonus {
  border-color: rgba(80,175,149,0.2);
  background: rgba(30,74,74,0.15);
}
.play-page-balance-label {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted);
  white-space: nowrap;
}
.play-page-balance-value {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem;
  color: var(--accent);
}
.play-page-balance-card--bonus .play-page-balance-value {
  color: var(--success-text);
}
.play-page-wagering {
  display: flex; align-items: center; gap: 8px;
  min-width: 120px;
}
.play-page-wagering.hidden { display: none !important; }
.play-page-wagering-label { font-size: 0.72rem; color: var(--text-muted); }
.play-page-wagering-bar {
  flex: 1; height: 6px; background: rgba(255,255,255,0.1);
  border-radius: 3px; overflow: hidden;
}
.play-page-wagering-fill {
  height: 100%; background: var(--accent);
  border-radius: 3px; transition: width 0.3s ease;
}

.play-page-frame-controls {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
}
.play-page-icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
  transition: all var(--transition);
}
.play-page-icon-btn:hover { background: var(--bg-card); border-color: var(--accent); color: var(--accent); }
.play-page-icon-btn svg { width: 1.2em; height: 1.2em; }

@media (max-width: 768px) {
  .play-page-header { flex-wrap: wrap; gap: 8px; }
  .play-page-header-block { flex-wrap: wrap; }
  .play-page-theme-btn { display: flex; }
  .play-page-toolbar-left { flex-wrap: wrap; }
  .play-page-slot-info { flex: 1 1 100%; font-size: 0.7rem; }
  .play-page-menu-favorites-list,
  .play-page-menu-recent-list { max-height: 100px; }
  .play-page-header-block { padding: 6px 10px; }
  .play-page-header-center { flex: 1 1 100%; order: 3; }
  .play-page-header-left { order: 1; }
  .play-page-header-right { order: 2; }
}

/* Страница игры — полная адаптация под смартфоны */
@media (max-width: 640px) {
  body.play-page-active .page-play {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .play-page-header {
    flex-wrap: nowrap;
    padding: 8px 10px;
    gap: 8px;
    background: rgba(10,12,15,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }
  .play-page-header-block {
    padding: 6px 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .play-page-header-left {
    order: 1;
    flex-shrink: 0;
  }
  .play-page-header-center {
    position: static !important;
    transform: none !important;
    order: 2;
    flex: 1;
    min-width: 0;
    justify-content: flex-end;
    gap: 6px;
  }
  .play-page-header-right {
    order: 3;
    flex-shrink: 0;
    gap: 4px;
  }
  .play-page-profile-dropdown-wrap { display: none; }
  .play-page-deposit-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
  .play-page-balance-block { gap: 4px; }
  .play-page-balance-card {
    padding: 4px 8px;
    height: 32px;
    font-size: 0.75rem;
  }
  .play-page-balance-label { display: none; }
  .play-page-balance-value { font-size: 0.8rem; }
  .play-page-wagering { display: none; }
  /* Мобильная версия: скрыть реальный баланс, показывать только бонусный при активном бонусе */
  .play-page-balance-card--main { display: none !important; }
  .play-page-balance-block:not(:has(.play-page-balance-card--bonus:not(.hidden))) { display: none !important; }
  /* Правое меню: раскрываемое по нажатию — кнопка ⋮ по умолчанию, иконки скрыты */
  .play-page-actions-toggle { display: flex !important; }
  .play-page-header-right-icons {
    display: none;
    gap: 4px;
  }
  .play-page-header-right.expanded .play-page-header-right-icons { display: flex !important; }
  .play-page-header-right.expanded .play-page-actions-toggle-icon--dots { display: none !important; }
  .play-page-header-right.expanded .play-page-actions-toggle-icon--close { display: flex !important; }
  .play-page-actions-toggle-icon--close { display: none !important; }
  .play-page-actions-toggle-icon { display: flex; align-items: center; justify-content: center; }
  .play-page-actions-toggle-icon svg { width: 1.2em; height: 1.2em; }
  .play-page-theme-btn,
  .play-page-winners-btn,
  .play-page-stats-btn,
  .play-page-fullscreen {
    width: 36px;
    height: 36px;
    padding: 0;
  }
  .play-page-menu-btn {
    width: 40px;
    height: 40px;
  }
  .play-page-body {
    padding: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .play-page-frame-wrap {
    border-radius: var(--radius-md);
  }
  .play-page-toolbar {
    padding: 6px 10px;
  }
  .play-page-frame-title {
    font-size: 0.78rem;
  }
  .play-page-favorite-btn {
    width: 32px;
    height: 32px;
  }
  .play-page-menu {
    width: min(300px, 90vw);
    padding-top: env(safe-area-inset-top);
  }
  .play-page-winners:not(.hidden) {
    position: fixed !important;
    top: auto !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: none !important;
    height: 60vh !important;
    max-height: 400px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
    z-index: 2200;
  }
  .play-page-stats-modal .play-page-stats-dialog {
    max-height: 85vh;
    margin: 16px;
  }
  .play-page-center {
    min-height: 0;
    overflow: hidden;
  }
  .play-page-header-center {
    overflow: hidden;
  }
  .play-page-iframe-wrap {
    min-height: 200px;
  }
}

/* Body: фрейм слота по центру, победители поверх справа (квесты в меню) */
.play-page-body {
  position: relative; z-index: 1;
  flex: 1; min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overflow-x: hidden;
}
@media (max-width: 900px) {
  .play-page-body { flex-direction: column; align-items: stretch; }
  .play-page-winners {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: 220px;
  }
}

/* Блок квестов слева — превью активных квестов в слоте */
.play-page-quests {
  min-width: 0; max-width: 100%; min-height: 160px;
  background: linear-gradient(180deg, rgba(14,18,24,0.96) 0%, rgba(10,14,20,0.98) 100%);
  border: 1px solid rgba(201,182,147,0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex !important; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
}
.play-page-quests-title {
  flex-shrink: 0;
  margin: 0; padding: 14px 16px;
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--accent);
}
.play-page-quests-list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 12px;
}
.play-page-quests-loading, .play-page-winners-loading {
  padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 0.875rem;
  line-height: 1.5;
}
.play-page-quests-login-cta {
  display: block; margin-top: 12px; padding: 10px 14px;
  font-size: 0.82rem; font-weight: 600;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(201,182,147,0.25);
  border-radius: var(--radius-md);
  cursor: pointer; text-align: center;
  transition: all var(--transition);
}
.play-page-quests-login-cta:hover {
  background: rgba(201,182,147,0.15);
  border-color: var(--accent);
}

/* Превью квеста — карточка с прогрессом */
.play-page-quest-item {
  padding: 12px; margin-bottom: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  transition: border-color var(--transition);
}
.play-page-quest-item:hover { border-color: rgba(255,193,7,0.4); }
.play-page-quest-item--completed { border-color: var(--accent); background: rgba(255,193,7,0.06); }
.play-page-quest-item--relevant {
  border-color: rgba(201,182,147,0.5);
  background: linear-gradient(135deg, rgba(201,182,147,0.08) 0%, rgba(201,182,147,0.04) 100%);
  box-shadow: 0 0 16px rgba(201,182,147,0.15);
  animation: quest-relevant-pulse 2.5s ease-in-out infinite;
}
.play-page-quest-item--relevant .play-page-quest-item-bar-fill {
  animation: quest-relevant-shimmer 2s ease-in-out infinite;
}
@keyframes quest-relevant-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(201,182,147,0.15); transform: scale(1); }
  50% { box-shadow: 0 0 24px rgba(201,182,147,0.25); transform: scale(1.008); }
}
@keyframes quest-relevant-shimmer {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.2); }
}
.play-page-quest-item-title { font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.play-page-quest-item-progress { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }
.play-page-quest-item-bar {
  height: 4px; background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden; margin-top: 6px;
}
.play-page-quest-item-bar-fill {
  height: 100%; min-width: 0;
  background: var(--accent);
  border-radius: 2px; transition: width 0.3s ease;
}
.play-page-quest-claim-btn {
  margin-top: 10px; padding: 8px 14px; width: 100%;
  font-size: 0.8rem; font-weight: 600;
  background: var(--accent); color: var(--btn-primary-text);
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: opacity var(--transition);
}
.play-page-quest-claim-btn:hover { opacity: 0.9; }

.play-page-theme-btn svg { width: 1.1em; height: 1.1em; }
.play-page-winners {
  position: absolute;
  top: 76px; right: 12px;
  width: min(260px, 22vw);
  height: 280px;
  background: rgba(10,12,15,0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 2;
}
.play-page-winners-header {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.play-page-winners-title {
  margin: 0;
  font-size: 0.95rem; font-weight: 700;
}
.play-page-winners-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.play-page-winners-close:hover {
  border-color: var(--accent); color: var(--accent);
}
.play-page-winners-close svg { width: 1em; height: 1em; }
.play-page-winners-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.play-page-bg-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.play-page-winners-list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 10px;
}

.play-page-winner-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 6px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}
.play-page-winner-item-img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.play-page-winner-item-name { font-weight: 600; }
.play-page-winner-item-mult { color: var(--accent); font-weight: 700; }
.play-page-winner-item-win { color: var(--text-muted); }

.play-page-center {
  flex: 1; min-width: 0; min-height: 0;
  align-self: stretch;
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.play-page-frame-wrap {
  position: relative; flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  width: 100%; max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8,12,18,0.95) 0%, rgba(4,8,14,0.95) 100%);
  border: 1px solid rgba(201,182,147,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.02);
}
.play-page-toolbar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid var(--border);
}
.play-page-toolbar-left {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.play-page-slot-info {
  font-size: 0.75rem; color: var(--text-muted);
}
.play-page-slot-info:not(.hidden)::before { content: ' · '; }
.play-page-iframe-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  background: rgba(6,8,16,0.95);
  color: var(--text-muted);
  font-size: 0.9rem;
  z-index: 2;
  transition: opacity 0.3s ease;
}
.play-page-iframe-loading.hidden { opacity: 0; pointer-events: none; }
.play-page-loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: play-page-spin 0.8s linear infinite;
}
@keyframes play-page-spin { to { transform: rotate(360deg); } }
.play-page-toolbar-actions {
  display: flex; align-items: center; gap: 8px;
}
.play-page-stats-btn {
  width: 36px; height: 36px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
  transition: all var(--transition);
}
.play-page-stats-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}
.play-page-stats-btn svg { width: 1.1em; height: 1.1em; }
.play-page-frame-title {
  font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.play-page-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; font-size: 0.8rem; font-weight: 600;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
  transition: all var(--transition); font-family: inherit;
}
.play-page-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}
.play-page-btn svg { width: 1.1em; height: 1.1em; }
.play-page-favorite-btn {
  width: 36px; height: 36px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text); cursor: pointer;
  transition: all var(--transition);
}
.play-page-favorite-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}
.play-page-favorite-btn svg { width: 1.2em; height: 1.2em; }
.play-page-favorite-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}
.play-page-favorite-btn.active svg { fill: var(--accent); stroke: var(--accent); }
.play-page-title {
  flex: 1; font-size: 0.85rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.play-page-iframe-wrap {
  flex: 1; min-height: 0; position: relative;
}
.play-page-iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none; background: #060810;
}
.game-frame-body { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #060810; }
.game-frame-iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none; background: #060810;
}

/* Модальное окно: история ставок и статистика */
.play-page-stats-modal {
  position: fixed; inset: 0; z-index: 2200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.play-page-stats-modal:not(.hidden) {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.play-page-stats-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.play-page-stats-dialog {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px; max-height: 85vh;
  background: linear-gradient(180deg, rgba(18,22,28,0.98) 0%, rgba(10,14,20,0.99) 100%);
  border: 1px solid rgba(201,182,147,0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.play-page-stats-header {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
}
.play-page-stats-title {
  margin: 0; font-size: 1.1rem; font-weight: 700;
  color: var(--accent);
}
.play-page-stats-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--text-muted); cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.play-page-stats-close:hover { color: var(--accent); background: rgba(255,255,255,0.05); }
.play-page-stats-close svg { width: 1.2em; height: 1.2em; }
.play-page-stats-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 20px;
}
.play-page-stats-summary {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.play-page-stats-card {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}
.play-page-stats-label {
  display: block; font-size: 0.72rem; color: var(--text-muted);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em;
}
.play-page-stats-value {
  font-size: 1rem; font-weight: 700;
  color: var(--text);
}
.play-page-stats-value.positive { color: #22c55e; }
.play-page-stats-value.negative { color: #ef4444; }
.play-page-stats-tabs {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.play-page-stats-tab {
  padding: 10px 18px; font-size: 0.85rem; font-weight: 600;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition); font-family: inherit;
}
.play-page-stats-tab:hover { border-color: var(--accent); color: var(--accent); }
.play-page-stats-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
.play-page-stats-content { margin-top: 0; }
.play-page-stats-content.hidden { display: none !important; }
.play-page-stats-table-wrap {
  max-height: 240px; overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.play-page-stats-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem;
}
.play-page-stats-table th,
.play-page-stats-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.play-page-stats-table th {
  background: rgba(0,0,0,0.3);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.play-page-stats-table tr:last-child td { border-bottom: none; }
.play-page-stats-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.play-page-stats-empty {
  padding: 24px; text-align: center; color: var(--text-muted);
  font-size: 0.875rem;
}

/* ================================================================
   CMS Page Blocks
   ================================================================ */
.cms-page { max-width: 960px; margin: 0 auto; padding: 28px 0; }
.cms-page--full-width { max-width: 100%; }
.cms-page--sidebar { display: grid; grid-template-columns: 1fr 280px; gap: 28px; max-width: 1100px; }
.cms-page-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 0 0 28px; }
.cms-page-error { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.cms-block { margin-bottom: 28px; }
.cms-text-content { font-size: 0.9rem; line-height: 1.8; color: var(--text); }
.cms-text-content h2 { font-size: 1.25rem; font-weight: 700; margin: 28px 0 12px; }
.cms-text-content h3 { font-size: 1.05rem; font-weight: 600; margin: 22px 0 10px; }
.cms-text-content p { margin: 0 0 14px; }
.cms-text-content ul, .cms-text-content ol { padding-left: 20px; margin: 0 0 14px; }
.cms-text-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cms-image-block { margin: 18px 0; }
.cms-image-block img { max-width: 100%; height: auto; border-radius: var(--radius-md); display: block; }
.cms-image-block--center { text-align: center; }
.cms-image-block--left img { margin-right: auto; }
.cms-image-block--right img { margin-left: auto; }
.cms-gallery { display: grid; gap: 10px; }
.cms-gallery-item img { width: 100%; height: auto; border-radius: var(--radius-sm); display: block; }
.cms-banner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  min-height: 200px; display: flex; align-items: flex-end;
  background-size: cover; background-position: center; background-color: var(--bg-elevated);
}
.cms-banner-content {
  padding: 36px 28px; width: 100%;
  background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff;
}
.cms-banner-content h2 { font-size: 1.25rem; margin: 0 0 8px; }
.cms-banner-content p { font-size: 0.82rem; margin: 0 0 14px; opacity: 0.85; }
.cms-faq { display: flex; flex-direction: column; gap: 6px; }
.cms-faq-item { background: var(--bg-card); border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; }
.cms-faq-question {
  padding: 15px 18px; cursor: pointer; font-weight: 600; font-size: 0.88rem;
  display: flex; align-items: center; gap: 8px; user-select: none;
  transition: background var(--transition);
}
.cms-faq-question:hover { background: rgba(255,255,255,0.02); }
.cms-faq-arrow { transition: transform var(--transition); display: inline-block; font-size: 1.1em; }
.cms-faq-item.open .cms-faq-arrow { transform: rotate(90deg); }
.cms-faq-answer {
  max-height: 0; overflow: hidden; padding: 0 18px;
  font-size: 0.84rem; color: var(--text-muted); line-height: 1.7;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}
.cms-faq-item.open .cms-faq-answer { max-height: 500px; padding: 0 18px 18px; }
.cms-table-wrap { overflow-x: auto; }
.cms-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.cms-table th {
  text-align: left; padding: 10px 14px; font-weight: 600;
  background: var(--bg-elevated); border-bottom: 1px solid var(--border);
}
.cms-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.cms-table tr:hover td { background: rgba(255,255,255,0.015); }
.cms-html-block { font-size: 0.88rem; line-height: 1.7; }
.cms-html-block img { max-width: 100%; height: auto; }

@media (max-width: 768px) {
  .cms-page--sidebar { grid-template-columns: 1fr; }
  .cms-gallery { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ================================================================
   Toast notifications
   ================================================================ */
.toast-container {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  max-width: 90vw;
}
.toast {
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: var(--text);
  font-size: 0.9rem;
  animation: toast-in 0.3s ease;
  pointer-events: auto;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   Light theme — Premium «Quiet Luxury» Light
   Warm cream/ivory palette, refined shadows, champagne accent
   ================================================================ */
[data-theme="light"] {
  --bg: #F5F2EE;
  --bg-elevated: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F0EDE8;
  --surface: #FFFFFF;
  --border: rgba(28,26,24,0.14);
  --border-strong: rgba(28,26,24,0.22);
  --text: #1C1A18;
  --text-muted: #5C5854;
  --text-dim: #8A8682;
  --accent: #8B7355;
  --accent-hover: #A08060;
  --accent-dim: rgba(139,115,85,0.1);
  --accent-glow: rgba(139,115,85,0.2);
  --nav-active: #7A6348;
  --nav-active-bg: rgba(139,115,85,0.08);
  --btn-primary: #8B7355;
  --btn-primary-hover: #A08060;
  --btn-primary-text: #FFFFFF;
  --danger: #8B3A3A;
  --danger-text: #B84A4A;
  --danger-dim: rgba(139,58,58,0.12);
  --success: #2D6B5C;
  --success-text: #3D8B78;
  --glass: rgba(255,255,255,0.95);
  --glass-border: rgba(28,26,24,0.14);
  --hero-bg: #EDE9E4;
  --shadow-sm: 0 2px 12px rgba(28,26,24,0.1);
  --shadow-md: 0 8px 32px rgba(28,26,24,0.12);
  --shadow-card: 0 4px 20px rgba(28,26,24,0.1);
  --shadow-glow: 0 0 48px rgba(139,115,85,0.12);
}
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(28,26,24,0.18); border-radius: 10px; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(28,26,24,0.28); }
[data-theme="light"] * { scrollbar-color: rgba(28,26,24,0.18) transparent; }

[data-theme="light"] body { background: transparent; }
[data-theme="light"] .preloader { background: #F5F2EE !important; }
[data-theme="light"] .preloader-bar { background: rgba(28,26,24,0.12) !important; }
[data-theme="light"] .casino-header {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(24px) saturate(1.1); -webkit-backdrop-filter: blur(24px) saturate(1.1);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 2px 8px rgba(28,26,24,0.04);
}
[data-theme="light"] .winners-bar {
  background: #F8F6F4;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}
[data-theme="light"] .casino-sidebar {
  background: #FDFCFA;
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 12px rgba(28,26,24,0.06);
}
[data-theme="light"] .sidebar-loyalty-dashboard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .sidebar-nav-item:hover,
[data-theme="light"] .nav-link:hover { background: rgba(139,115,85,0.08); }
[data-theme="light"] .sidebar-nav-item.active,
[data-theme="light"] .nav-link.active {
  background: rgba(139,115,85,0.14);
  border: 1px solid rgba(139,115,85,0.25);
  color: var(--accent);
}
[data-theme="light"] .sidebar-bottom-item,
[data-theme="light"] .sidebar-support-link,
[data-theme="light"] .sidebar-bottom-card {
  background: rgba(28,26,24,0.04);
  border: 1px solid var(--border);
}
[data-theme="light"] .sidebar-bottom-item:hover,
[data-theme="light"] .sidebar-support-link:hover,
[data-theme="light"] .sidebar-bottom-card:hover { background: rgba(139,115,85,0.1); border-color: rgba(139,115,85,0.25); }
[data-theme="light"] .theme-toggle {
  background: rgba(28,26,24,0.06);
  border: 1px solid var(--border-strong);
}
[data-theme="light"] .theme-toggle:hover { border-color: rgba(139,115,85,0.4); background: rgba(139,115,85,0.08); }
[data-theme="light"] .game-card {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .game-card:hover {
  border-color: rgba(139,115,85,0.35);
  box-shadow: var(--shadow-card), 0 4px 16px rgba(28,26,24,0.08);
}
[data-theme="light"] .game-card-hover { background: var(--bg-card); }
[data-theme="light"] .game-card-btn--demo:hover {
  background: rgba(139,115,85,0.08);
  border-color: rgba(139,115,85,0.3);
}
[data-theme="light"] .game-card-fav-btn {
  background: rgba(28,26,24,0.06);
  color: var(--text-muted);
}
[data-theme="light"] .game-card-fav-btn:hover {
  background: rgba(28,26,24,0.1);
  color: var(--text);
}
[data-theme="light"] .game-card-fav-btn.active { color: var(--accent); }
[data-theme="light"] .game-card-fav-btn.active svg { fill: var(--accent); stroke: var(--accent); }
[data-theme="light"] .winners-bar-item {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255,255,255,0.8) inset;
}
[data-theme="light"] .winners-bar-item--mult-100 {
  border-color: rgba(139,115,85,0.4);
  box-shadow: 0 2px 12px rgba(139,115,85,0.12), 0 0 0 1px rgba(139,115,85,0.15) inset;
}
[data-theme="light"] .winners-bar-item--mult-200 {
  border-color: rgba(139,115,85,0.5);
  box-shadow: 0 4px 20px rgba(139,115,85,0.15), 0 0 0 1px rgba(139,115,85,0.2) inset;
}

/* Home hero & leaders — light theme */
[data-theme="light"] .home-hero-banner {
  background: linear-gradient(165deg, #F5F2EE 0%, #EDE9E4 50%, #E8E4DF 100%);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.5) inset;
}
[data-theme="light"] .home-hero-banner::before {
  background: radial-gradient(ellipse at 30% 60%, rgba(139,115,85,0.06), transparent 55%),
              radial-gradient(ellipse at 80% 20%, rgba(139,115,85,0.04), transparent 50%);
}
[data-theme="light"] .home-hero-slider-wrap {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}
[data-theme="light"] .home-leaders-block {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}
[data-theme="light"] .home-leaders-tab {
  background: rgba(28,26,24,0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
[data-theme="light"] .home-leaders-tab:hover { color: var(--text); background: rgba(139,115,85,0.08); border-color: rgba(139,115,85,0.2); }
[data-theme="light"] .home-leaders-tab.active {
  background: var(--accent);
  color: var(--btn-primary-text);
  border-color: var(--accent);
}
[data-theme="light"] .home-leaders-row {
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .home-leaders-row:nth-child(even) { background: rgba(28,26,24,0.02); }
[data-theme="light"] .home-leaders-row:hover { background: rgba(139,115,85,0.06) !important; }
[data-theme="light"] .home-leaders-row.player-preview-trigger:hover { background: rgba(139,115,85,0.08) !important; }
[data-theme="light"] .home-leaders-avatar--placeholder {
  background: rgba(139,115,85,0.12);
  color: var(--accent);
  border: 1px solid rgba(139,115,85,0.2);
}
[data-theme="light"] .hero-fallback {
  background: linear-gradient(165deg, #F5F2EE 0%, #EDE9E4 100%);
}

/* Блоки турнир/розыгрыш — светлая тема */
[data-theme="light"] .home-tournament-block a {
  background:
    radial-gradient(ellipse 80% 100% at 100% 0%, rgba(139,115,85,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(139,115,85,0.06) 0%, transparent 50%),
    linear-gradient(160deg, #F8F6F4 0%, #F0EDE8 40%, #EDE9E4 100%);
  border-color: rgba(139,115,85,0.25);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255,255,255,0.8) inset;
}
[data-theme="light"] .home-tournament-block a:hover {
  box-shadow: 0 8px 32px rgba(28,26,24,0.12), 0 0 0 1px rgba(139,115,85,0.3), 0 0 24px rgba(139,115,85,0.08);
}
[data-theme="light"] .home-raffle-block > div,
[data-theme="light"] .home-raffle-block .home-raffle--open,
[data-theme="light"] .home-raffle-block .home-raffle--progress,
[data-theme="light"] .home-raffle-block .home-raffle--completed {
  background:
    radial-gradient(ellipse 80% 100% at 0% 0%, rgba(80,175,149,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(80,175,149,0.05) 0%, transparent 50%),
    linear-gradient(160deg, #F8F6F4 0%, #F0EDE8 40%, #EDE9E4 100%);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255,255,255,0.8) inset;
}
[data-theme="light"] .home-raffle-block .home-raffle--progress,
[data-theme="light"] .home-raffle-block .home-raffle--completed {
  background:
    radial-gradient(ellipse 80% 100% at 100% 0%, rgba(139,115,85,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(139,115,85,0.04) 0%, transparent 50%),
    linear-gradient(160deg, #F8F6F4 0%, #F0EDE8 40%, #EDE9E4 100%);
}
[data-theme="light"] .home-raffle-block > div:hover,
[data-theme="light"] .home-raffle-block .home-raffle--progress:hover {
  box-shadow: 0 8px 32px rgba(28,26,24,0.1), 0 0 0 1px rgba(139,115,85,0.2);
}
[data-theme="light"] .home-tournament-block a::before,
[data-theme="light"] .home-raffle-block > div::before {
  opacity: 0.4;
}
[data-theme="light"] .home-tournament-provider {
  background: rgba(139,115,85,0.12);
  border-color: rgba(139,115,85,0.2);
}
[data-theme="light"] .home-tournament-prize {
  background: linear-gradient(135deg, rgba(139,115,85,0.12) 0%, rgba(139,115,85,0.08) 100%);
  border-color: rgba(139,115,85,0.25);
  box-shadow: 0 2px 8px rgba(139,115,85,0.06);
}
[data-theme="light"] .home-raffle-progress-ring {
  background: conic-gradient(var(--teal) 0deg calc(var(--pct, 0) * 3.6deg), rgba(28,26,24,0.08) 0);
  box-shadow: 0 0 8px rgba(80,175,149,0.15);
}
[data-theme="light"] .home-raffle-btn:disabled {
  background: rgba(28,26,24,0.06);
  border-color: var(--border);
}

/* Карусель провайдеров — светлая тема */
[data-theme="light"] .home-carousel-block {
  background: linear-gradient(135deg, #F5F2EE 0%, #EDE9E4 50%, #E8E4DF 100%);
  border-color: rgba(139,115,85,0.2);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.6) inset;
}
[data-theme="light"] .home-tournament-promo {
  background: linear-gradient(165deg, #F5F2EE 0%, #EDE9E4 50%, #E5E0DA 100%) !important;
  border-color: rgba(139,115,85,0.25);
  color: var(--text);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.5) inset;
}
[data-theme="light"] .home-tournament-promo:hover { color: var(--text); }
[data-theme="light"] .home-tournament-promo-title { color: var(--text); }
[data-theme="light"] .home-tournament-promo-subtitle,
[data-theme="light"] .home-tournament-promo-countdown { color: var(--text-muted); opacity: 1; }
[data-theme="light"] .home-tournament-promo-prize { color: var(--accent); }

/* Промо-карты --1, --2 — светлая тема (уже есть .home-promo-large-card, но --1/--2 переопределяют) */
[data-theme="light"] .home-promo-large-card--1,
[data-theme="light"] .home-promo-large-card--2 {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F6F4 50%, #F0EDE8 100%) !important;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}
[data-theme="light"] .home-promo-large-card--1:hover,
[data-theme="light"] .home-promo-large-card--2:hover {
  box-shadow: var(--shadow-md);
}

/* Раздел бонусов — светлая тема */
[data-theme="light"] .bonuses-section {
  background: rgba(248,246,243,0.98);
  border-color: rgba(139,115,85,0.2);
}
[data-theme="light"] .home-strip-nav-btn {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-muted);
}
[data-theme="light"] .home-strip-nav-btn:hover {
  background: rgba(139,115,85,0.08);
  border-color: rgba(139,115,85,0.25);
  color: var(--accent);
}
[data-theme="light"] .home-games-block-head {
  color: var(--text);
}
[data-theme="light"] .section-title {
  color: var(--text);
}
[data-theme="light"] .carousel-participants-modal {
  background: linear-gradient(165deg, #FFFFFF 0%, #F8F6F4 100%) !important;
  border-color: var(--border-strong);
}
[data-theme="light"] .carousel-modal-header {
  background: linear-gradient(180deg, rgba(139,115,85,0.06) 0%, transparent 100%);
  border-bottom-color: var(--border);
}
[data-theme="light"] .carousel-progress-bar {
  background: rgba(28,26,24,0.08);
}
[data-theme="light"] .carousel-roadmap {
  background: rgba(248,246,243,0.98);
  border-bottom-color: var(--border);
}
[data-theme="light"] .carousel-roadmap-icon {
  background: rgba(28,26,24,0.06);
}
[data-theme="light"] .carousel-roadmap-step--active .carousel-roadmap-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}
[data-theme="light"] .tournament-lobby--royal .tournament-hero {
  background: linear-gradient(135deg, #5A4A68 0%, #6B5B7A 40%, #5A4A68 100%);
  border-color: rgba(201,182,147,0.25);
  box-shadow: 0 8px 40px rgba(28,26,24,0.15);
}
[data-theme="light"] .tournament-hero-badge--active { color: var(--teal); }
[data-theme="light"] .tournament-hero-badge--upcoming { color: var(--accent); }
[data-theme="light"] .tournament-hero-title { color: #fff; }
[data-theme="light"] .tournament-hero-prize-label { color: rgba(255,255,255,0.7); }
[data-theme="light"] .tournament-hero-prize-value { color: #ffd700; }
[data-theme="light"] .tournament-hero-timer-label { color: rgba(255,255,255,0.6); }
[data-theme="light"] .tournament-hero-timer-value { color: #fff; }

[data-theme="light"] .hero-fallback-grid {
  background-image:
    linear-gradient(rgba(139,115,85,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,115,85,0.04) 1px, transparent 1px);
}
[data-theme="light"] .hf-brandname { color: var(--accent); }

/* Play page — light theme */
[data-theme="light"] .play-page-header-block {
  background: linear-gradient(145deg, rgba(253,253,251,0.98) 0%, rgba(248,246,243,0.99) 100%);
  border-color: var(--border);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.6) inset;
}
[data-theme="light"] .play-page-menu-btn,
[data-theme="light"] .play-page-icon-btn,
[data-theme="light"] .play-page-favorite-btn,
[data-theme="light"] .play-page-winners-btn,
[data-theme="light"] .play-page-stats-btn,
[data-theme="light"] .play-page-theme-btn {
  color: var(--text);
  border-color: var(--border-strong);
}
[data-theme="light"] .play-page-menu-btn:hover,
[data-theme="light"] .play-page-icon-btn:hover,
[data-theme="light"] .play-page-winners-btn:hover,
[data-theme="light"] .play-page-stats-btn:hover,
[data-theme="light"] .play-page-theme-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="light"] .play-page-menu-btn svg,
[data-theme="light"] .play-page-icon-btn svg,
[data-theme="light"] .play-page-favorite-btn svg,
[data-theme="light"] .play-page-winners-btn svg,
[data-theme="light"] .play-page-stats-btn svg,
[data-theme="light"] .play-page-theme-btn svg {
  color: inherit;
  stroke: currentColor;
}
[data-theme="light"] .play-page-favorite-btn.active,
[data-theme="light"] .play-page-winners-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}
[data-theme="light"] .play-page-favorite-btn.active svg { fill: var(--accent); stroke: var(--accent); }
[data-theme="light"] .play-page-menu {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,248,250,0.99) 100%);
  border-right-color: var(--border);
  box-shadow: 8px 0 40px rgba(0,0,0,0.15);
}
[data-theme="light"] .play-page-menu-header,
[data-theme="light"] .play-page-menu-favorites-block,
[data-theme="light"] .play-page-menu-recent-block,
[data-theme="light"] .play-page-menu-quests-block {
  background: rgba(0,0,0,0.03);
  border-color: var(--border);
}
[data-theme="light"] .play-page-menu-item:hover,
[data-theme="light"] .play-page-menu-game-link:hover {
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .play-page-profile-trigger,
[data-theme="light"] .play-page-profile-dropdown {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
}
[data-theme="light"] .play-page-profile-item:hover { background: var(--bg-card-hover); }
[data-theme="light"] .play-page-frame-wrap {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,248,250,0.98) 100%);
  border-color: var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] .play-page-toolbar {
  background: rgba(0,0,0,0.04);
  border-color: var(--border);
}
[data-theme="light"] .play-page-winners {
  background: rgba(255,255,255,0.98);
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
[data-theme="light"] .play-page-winners-header,
[data-theme="light"] .play-page-winners-title { background: rgba(0,0,0,0.03); border-color: var(--border); }
[data-theme="light"] .play-page-iframe-loading {
  background: rgba(248,248,250,0.98);
  color: var(--text-muted);
}
[data-theme="light"] .play-page-loading-spinner {
  border-color: var(--border);
  border-top-color: var(--accent);
}
[data-theme="light"] .play-page-balance-card { background: var(--glass); border-color: var(--glass-border); }
[data-theme="light"] .play-page-quest-item,
[data-theme="light"] .play-page-winner-item {
  background: var(--bg-card);
  border-color: var(--border);
}
[data-theme="light"] .play-page-stats-backdrop { background: rgba(0,0,0,0.4); }
[data-theme="light"] .play-page-stats-dialog {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,248,250,0.99) 100%);
  border-color: var(--border);
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
[data-theme="light"] .toast { background: var(--bg-card); border-color: var(--border); color: var(--text); }
[data-theme="light"] .play-page-frame-title,
[data-theme="light"] .play-page-slot-info { color: var(--text); }
[data-theme="light"] .play-page-slot-info { color: var(--text-muted); }
[data-theme="light"] .play-page-btn,
[data-theme="light"] .play-page-report-item {
  color: var(--text);
  border-color: var(--border-strong);
}
[data-theme="light"] .play-page-btn:hover,
[data-theme="light"] .play-page-report-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="light"] .play-page-winners-close {
  color: var(--text-muted);
  border-color: var(--border-strong);
}
[data-theme="light"] .play-page-winners-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="light"] .page-play { background: var(--bg); }

/* Deposit modal — light theme */
[data-theme="light"] .deposit-page-modal-box,
[data-theme="light"] .deposit-modal-box {
  background: linear-gradient(165deg, #FFFFFF 0%, #F8F8FA 100%);
  border-color: var(--border);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(0,0,0,0.04);
}
[data-theme="light"] .deposit-modal-header {
  background: linear-gradient(135deg, var(--accent-dim) 0%, rgba(255,255,255,0.5) 60%);
  border-bottom-color: var(--border);
}
[data-theme="light"] .deposit-modal-close:hover {
  color: var(--text);
  background: rgba(0,0,0,0.06);
}
[data-theme="light"] .deposit-input,
[data-theme="light"] .deposit-select,
[data-theme="light"] .deposit-select-styled {
  background: rgba(0,0,0,0.03);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="light"] .deposit-chip {
  background: rgba(0,0,0,0.04);
  border-color: var(--border);
  color: var(--text-muted);
}
[data-theme="light"] .deposit-chip:hover,
[data-theme="light"] .deposit-chip.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
[data-theme="light"] .deposit-custom-select-trigger {
  background: rgba(0,0,0,0.03);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="light"] .deposit-custom-select-trigger:hover {
  border-color: var(--text-dim);
}
[data-theme="light"] .deposit-custom-option:hover {
  background: rgba(0,0,0,0.05);
}
[data-theme="light"] .deposit-submit-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 16px rgba(139,115,85,0.3);
}
[data-theme="light"] .deposit-submit-btn:hover {
  box-shadow: 0 6px 20px rgba(139,115,85,0.4);
}
[data-theme="light"] .deposit-invoice-card {
  background: rgba(0,0,0,0.02);
  border-color: var(--border);
}
[data-theme="light"] .deposit-invoice-order {
  background: rgba(0,0,0,0.05);
  color: var(--text-muted);
}
[data-theme="light"] .deposit-invoice-value {
  color: var(--text);
}
[data-theme="light"] .deposit-copy-btn {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(139,115,85,0.35);
}
[data-theme="light"] .deposit-copy-btn:hover {
  background: rgba(139,115,85,0.18);
  border-color: var(--accent);
}
[data-theme="light"] .deposit-new-btn {
  color: var(--text-muted);
  border-color: var(--border);
}
[data-theme="light"] .deposit-new-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}
[data-theme="light"] .deposit-success-icon {
  background: rgba(80,175,149,0.15);
  color: #2D7A6B;
}

/* Catalog tabs, buttons, balance — light theme */
[data-theme="light"] .catalog-tab {
  background: rgba(28,26,24,0.05);
  border-color: var(--border);
}
[data-theme="light"] .catalog-tab:hover { background: rgba(139,115,85,0.08); border-color: rgba(139,115,85,0.25); }
[data-theme="light"] .catalog-tab.active { background: var(--accent); border-color: var(--accent); }
[data-theme="light"] .btn-outline {
  border-color: var(--border-strong);
  color: var(--text-muted);
}
[data-theme="light"] .btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
[data-theme="light"] .balance-main { color: var(--accent); }
[data-theme="light"] .page-head h1,
[data-theme="light"] .section-title { color: var(--text); }
[data-theme="light"] .casino-main { background: transparent; }
[data-theme="light"] .games-nav-row--actions {
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,246,243,0.98) 100%);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="light"] .games-search-btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); color: var(--text-dim); }
[data-theme="light"] .games-display-btn,
[data-theme="light"] .games-provider-btn { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.1); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
[data-theme="light"] .loading { color: var(--text-muted); }

/* Player profile modal, friends, account — light theme */
[data-theme="light"] .friends-item,
[data-theme="light"] .friends-request-item { background: var(--bg-card); border: 1px solid var(--border); }
[data-theme="light"] .friend-msg { background: var(--bg-elevated); border: 1px solid var(--border); }
[data-theme="light"] .friend-msg--me { background: var(--accent-dim); border-color: rgba(139,115,85,0.2); }
[data-theme="light"] .acc-sidebar-id { color: var(--text-dim); }

/* Player preview tooltip — light theme */
[data-theme="light"] .player-preview-tooltip,
[data-theme="light"] .tippy-box {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-md) !important;
}
[data-theme="light"] .tippy-content { color: var(--text); }

/* Loyalty — light theme overrides */
[data-theme="light"] .loyalty-header-xp-bar { background: rgba(28,26,24,0.08); }
[data-theme="light"] .loyalty-summary,
[data-theme="light"] .loyalty-summary-level,
[data-theme="light"] .loyalty-quest-card,
[data-theme="light"] .loyalty-craft-card {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .loyalty-leaderboard th,
[data-theme="light"] .loyalty-leaderboard td { border-color: var(--border); }
[data-theme="light"] .loyalty-leaderboard tr:hover td { background: rgba(139,115,85,0.04); }
[data-theme="light"] .sidebar-dash-xp-bar { background: rgba(28,26,24,0.12); }
[data-theme="light"] .sidebar-dash-currency { background: rgba(28,26,24,0.08); }

/* Promo, bonus cards — light theme */
[data-theme="light"] .home-promo-large-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F6F4 100%) !important;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .home-promo-large-card:hover { box-shadow: var(--shadow-card); }
[data-theme="light"] .home-faq-item {
  background: rgba(28,26,24,0.04); border-color: var(--border);
}
[data-theme="light"] .home-faq-item.open { background: rgba(139,115,85,0.08); border-color: rgba(139,115,85,0.2); }
[data-theme="light"] .home-faq-question:hover { background: rgba(139,115,85,0.06); }
[data-theme="light"] .bonus-card {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .bonus-card:hover { box-shadow: var(--shadow-card); }

/* Auth & account modals — light theme */
[data-theme="light"] .auth-modal-box,
[data-theme="light"] .account-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
[data-theme="light"] .auth-modal-promo {
  background: linear-gradient(165deg, #F5F2EE 0%, #EDE9E4 100%);
  border-left: 1px solid var(--border);
}
[data-theme="light"] .casino-footer {
  background: linear-gradient(180deg, rgba(253,252,250,0.98) 0%, rgba(248,246,243,0.99) 100%);
  border-top-color: var(--border);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.8) inset;
}
[data-theme="light"] .casino-footer::before {
  background: linear-gradient(90deg, transparent, rgba(139,115,85,0.2), transparent);
}
[data-theme="light"] .footer-column a,
[data-theme="light"] .footer-trust,
[data-theme="light"] .footer-copy { color: var(--text-muted); }
[data-theme="light"] .footer-column a:hover { color: var(--accent); }

/* Play page: animations for panels */
.play-page-winners {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.play-page-winners:not(.hidden) {
  animation: play-page-panel-in 0.25s ease;
}
@keyframes play-page-panel-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
.play-page-stats-modal:not(.hidden) .play-page-stats-dialog {
  animation: play-page-modal-in 0.3s ease;
}
@keyframes play-page-modal-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Friends & Social */
.acc-sidebar-id { font-size: 0.75rem; display: block; margin-top: 2px; }
.friends-list { display: flex; flex-direction: column; gap: 8px; }
.friends-item, .friends-request-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg-elevated); border-radius: var(--radius-sm); }
.friends-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.friends-avatar--placeholder { background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem; }
.friends-name { font-weight: 600; flex: 1; }
.friends-request-item { gap: 8px; }
.friends-request-item .friends-btn-accept { margin-left: auto; }
.friends-search-result-inner { display: flex; align-items: center; gap: 12px; }
.friends-search-result-inner .friends-avatar { width: 48px; height: 48px; }
.profile-privacy-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.profile-privacy-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.profile-privacy-item input { margin: 0; }
.friend-chat-messages { display: flex; flex-direction: column; gap: 8px; }
.friend-msg { padding: 8px 12px; border-radius: var(--radius-sm); max-width: 85%; align-self: flex-start; background: var(--bg-elevated); }
.friend-msg--me { align-self: flex-end; background: var(--accent-dim); color: var(--text); }
.friend-msg-body { display: block; }
.friend-msg-time { font-size: 0.7rem; display: block; margin-top: 4px; }
.player-preview-trigger { cursor: pointer; }
.player-preview-trigger[data-player-id]:hover { text-decoration: underline; }
.home-leaders-row.player-preview-trigger:hover { text-decoration: none; background: rgba(255,255,255,0.03); }
.winners-bar-item.player-preview-trigger:hover { text-decoration: none; }
.play-page-winner-item.player-preview-trigger:hover { text-decoration: none; }

/* ===== Player Profile Modal ===== */
.player-profile-modal-dialog {
  padding: 0; overflow: hidden; border-radius: 20px; max-width: 440px;
  background: linear-gradient(170deg, #161a20 0%, #0e1114 50%, #0b0d10 100%);
  border: 1px solid rgba(201,182,147,0.12);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,182,147,0.06);
}
.player-profile-modal-dialog .modal-close {
  top: 12px; right: 12px; z-index: 10;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px); color: rgba(255,255,255,0.5);
}
.player-profile-modal-content { min-height: 80px; padding: 0; max-height: 85vh; overflow-y: auto; }
.player-profile-modal-content::-webkit-scrollbar { width: 3px; }
.player-profile-modal-content::-webkit-scrollbar-thumb { background: rgba(201,182,147,0.1); border-radius: 3px; }

.pp-body { display: flex; flex-direction: column; }

/* ---- Hero ---- */
.pp-hero {
  position: relative; padding: 32px 20px 20px; overflow: hidden;
}
.pp-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 30% 20%, rgba(201,182,147,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 80% 100% at 80% 80%, rgba(80,175,149,0.05) 0%, transparent 50%),
    linear-gradient(180deg, rgba(201,182,147,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.pp-hero-scanline {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.02;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.4) 2px, rgba(255,255,255,0.4) 3px);
}
.pp-hero-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 16px;
}
.pp-avatar-wrap {
  position: relative; flex-shrink: 0; width: 76px; height: 76px;
}
.pp-avatar-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(201,182,147,0.5), rgba(80,175,149,0.4), rgba(201,182,147,0.3), rgba(80,175,149,0.5));
  animation: pp-ring-spin 6s linear infinite;
  filter: blur(1px);
}
@keyframes pp-ring-spin { to { transform: rotate(360deg); } }
.pp-avatar {
  position: relative; z-index: 1;
  width: 76px; height: 76px; border-radius: 50%;
  object-fit: cover; background: var(--bg-card);
  border: 3px solid #1a1e24;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.pp-avatar--ph {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 2rem; color: var(--accent);
  background: linear-gradient(135deg, rgba(201,182,147,0.1) 0%, rgba(139,115,85,0.08) 100%);
}
.pp-hero-info { flex: 1; min-width: 0; }
.pp-name {
  margin: 0 0 4px; font-size: 1.15rem; font-weight: 700; color: var(--text);
  word-break: break-word; line-height: 1.3;
}
.pp-hero-age {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; color: var(--text-dim); font-weight: 500;
}
.pp-hero-age .svg-icon { width: 0.85em; height: 0.85em; opacity: 0.5; }

/* XP rank badge */
.pp-rank-badge {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(201,182,147,0.12) 0%, rgba(139,115,85,0.1) 100%);
  border: 1px solid rgba(201,182,147,0.2);
  box-shadow: 0 0 12px rgba(201,182,147,0.06), inset 0 1px 0 rgba(255,255,255,0.03);
}
.pp-rank-icon { font-size: 0.7rem; color: var(--accent); filter: drop-shadow(0 0 3px rgba(201,182,147,0.3)); }
.pp-rank-val { font-size: 0.82rem; font-weight: 800; font-family: var(--font-mono); color: var(--accent); letter-spacing: 0.02em; }
.pp-rank-label { font-size: 0.6rem; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- Finance cards ---- */
.pp-finance {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  padding: 0 16px; margin-top: 16px;
}
.pp-fin-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 6px; border-radius: 12px; text-align: center;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.pp-fin-card:hover { border-color: var(--border-strong); }
.pp-fin-label {
  font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim);
}
.pp-fin-value {
  font-size: 1.2rem; font-weight: 800; font-family: var(--font-mono);
  line-height: 1.1;
}
.pp-fin-card--profit.pp-fin--plus { border-color: rgba(80,175,149,0.15); }
.pp-fin-card--profit.pp-fin--plus .pp-fin-value { color: var(--teal); text-shadow: 0 0 16px rgba(80,175,149,0.25); }
.pp-fin-card--profit.pp-fin--plus::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(80,175,149,0.05) 0%, transparent 70%);
}
.pp-fin-card--profit.pp-fin--minus { border-color: rgba(220,60,60,0.15); }
.pp-fin-card--profit.pp-fin--minus .pp-fin-value { color: #e04040; text-shadow: 0 0 20px rgba(220,60,60,0.35); }
.pp-fin-card--profit.pp-fin--minus::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(220,60,60,0.05) 0%, transparent 70%);
}
.pp-fin-card--bets .pp-fin-value,
.pp-fin-card--wins .pp-fin-value { color: var(--text-muted); }

/* ---- Section headers ---- */
.pp-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px;
}
.pp-section-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-dim);
}

/* ---- Medals grid ---- */
.pp-medals { margin: 16px 16px 0; padding: 14px 14px 10px; border-radius: 12px;
  background: rgba(201,182,147,0.02); border: 1px solid rgba(201,182,147,0.08);
}
.pp-medals-count { font-size: 0.88rem; font-weight: 800; color: var(--accent); font-family: var(--font-mono); }
.pp-medals-total { font-weight: 500; color: var(--text-dim); font-size: 0.72rem; }
.pp-medals-grid {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px;
}
.pp-medal-slot {
  aspect-ratio: 1; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.pp-medal-slot:hover { border-color: rgba(201,182,147,0.15); background: rgba(201,182,147,0.03); }
.pp-medal-ghost {
  font-size: 0.6rem; color: rgba(201,182,147,0.08);
  transition: color 0.3s ease;
}
.pp-medal-slot:hover .pp-medal-ghost { color: rgba(201,182,147,0.18); }
.pp-medal-slot--filled {
  background: linear-gradient(135deg, rgba(201,182,147,0.08) 0%, rgba(139,115,85,0.06) 100%);
  border-color: rgba(201,182,147,0.2);
  box-shadow: 0 0 6px rgba(201,182,147,0.08);
}
.pp-medal-icon {
  font-size: 0.7rem; color: var(--accent);
  filter: drop-shadow(0 0 3px rgba(201,182,147,0.3));
}

/* ---- Showcase — glass shelf ---- */
.pp-showcase {
  margin: 10px 16px 0; padding: 14px 14px 12px; border-radius: 12px;
  background: rgba(201,182,147,0.015);
  border: 1px solid rgba(201,182,147,0.06);
}
.pp-showcase .pp-section-title { color: rgba(201,182,147,0.4); }
.pp-showcase-glass {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.pp-showcase-slot {
  position: relative; aspect-ratio: 1; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(255,255,255,0.015);
  border: 1px solid var(--border);
  overflow: hidden; transition: all 0.3s ease;
}
.pp-showcase-slot:hover { border-color: rgba(201,182,147,0.12); }
.pp-showcase-slot-glow {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 40%;
  background: radial-gradient(ellipse, rgba(201,182,147,0.03) 0%, transparent 70%);
  pointer-events: none; transition: opacity 0.3s ease; opacity: 0.5;
}
.pp-showcase-slot:hover .pp-showcase-slot-glow { opacity: 1; }
.pp-showcase-slot--empty {
  border-style: dashed; border-color: rgba(255,255,255,0.04);
}
.pp-showcase-slot--empty::before {
  content: '◇'; font-size: 1.2rem; color: rgba(255,255,255,0.04);
}
.pp-showcase-slot-icon { position: relative; z-index: 1; }
.pp-showcase-slot-name {
  position: relative; z-index: 1;
  font-size: 0.6rem; color: var(--text-muted); text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pp-showcase-slot--legendary { border-color: rgba(201,182,147,0.25); }
.pp-showcase-slot--legendary .pp-showcase-slot-glow { background: radial-gradient(ellipse, rgba(201,182,147,0.06) 0%, transparent 70%); opacity: 1; }
.pp-showcase-slot--epic { border-color: rgba(160,100,220,0.2); }
.pp-showcase-slot--epic .pp-showcase-slot-glow { background: radial-gradient(ellipse, rgba(160,100,220,0.05) 0%, transparent 70%); opacity: 1; }
.pp-showcase-slot--rare { border-color: rgba(80,175,149,0.2); }
.pp-showcase-slot--rare .pp-showcase-slot-glow { background: radial-gradient(ellipse, rgba(80,175,149,0.05) 0%, transparent 70%); opacity: 1; }
.pp-showcase-hint {
  margin: 8px 0 0; text-align: center; font-size: 0.7rem; color: var(--text-dim);
  font-style: italic;
}

/* ---- Favorite games ---- */
.pp-fav-games { margin: 10px 16px 0; padding: 14px 14px 10px; border-radius: 12px;
  background: rgba(80,175,149,0.02); border: 1px solid rgba(80,175,149,0.08);
}
.pp-fav-games .pp-section-title { color: rgba(80,175,149,0.45); }
.pp-fav-games-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.pp-fav-game {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; color: inherit; padding: 8px 4px; border-radius: 10px;
  background: rgba(255,255,255,0.015); border: 1px solid var(--border);
  transition: all 0.25s ease; overflow: hidden;
}
.pp-fav-game:hover {
  border-color: rgba(80,175,149,0.18);
  background: rgba(80,175,149,0.03);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.pp-fav-game img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px;
  background: rgba(255,255,255,0.03);
}
.pp-fav-game-ph {
  width: 100%; aspect-ratio: 4/3; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(80,175,149,0.05); color: rgba(80,175,149,0.25);
  font-size: 1.4rem; font-weight: 700;
}
.pp-fav-game-name {
  font-size: 0.62rem; font-weight: 600; color: var(--text-muted);
  text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 2px;
}

/* ---- Stories ---- */
.pp-stories { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 16px 0; }
.pp-stories img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(201,182,147,0.15);
  cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pp-stories img:hover { transform: scale(1.08); border-color: rgba(201,182,147,0.4); box-shadow: 0 0 10px rgba(201,182,147,0.1); }

/* ---- Add friend button ---- */
.pp-add-friend {
  position: relative; display: flex; align-items: center; justify-content: center;
  margin: 16px 16px 18px; padding: 14px 24px;
  font-size: 0.88rem; font-weight: 700; color: var(--btn-primary-text);
  background: linear-gradient(135deg, var(--accent) 0%, #b8a272 100%);
  border: none; border-radius: 12px; cursor: pointer;
  transition: all 0.3s ease; overflow: hidden;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 16px rgba(201,182,147,0.15);
}
.pp-add-friend-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: none;
}
.pp-add-friend:hover .pp-add-friend-glow {
  animation: pp-btn-sweep 0.8s ease forwards;
}
@keyframes pp-btn-sweep {
  to { transform: translateX(100%); }
}
.pp-add-friend:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #c9b683 100%);
  box-shadow: 0 6px 24px rgba(201,182,147,0.25);
}
.pp-add-friend-text { position: relative; z-index: 1; }
.pp-add-friend:disabled, .pp-add-friend--sent {
  background: rgba(255,255,255,0.04); color: var(--text-dim);
  box-shadow: none; cursor: default; border: 1px solid var(--border);
}

/* ---- Light theme ---- */
[data-theme="light"] .player-profile-modal-dialog {
  background: linear-gradient(170deg, #FAFAFA 0%, #F5F3F0 50%, #ECEAE8 100%);
  border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 24px 80px rgba(0,0,0,0.12);
}
[data-theme="light"] .pp-avatar--ph { color: var(--accent); background: rgba(139,115,85,0.08); }
[data-theme="light"] .pp-fin-card { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .pp-medals { background: rgba(139,115,85,0.03); border-color: rgba(139,115,85,0.1); }
[data-theme="light"] .pp-showcase { background: rgba(139,115,85,0.02); border-color: rgba(139,115,85,0.08); }
[data-theme="light"] .pp-fav-games { background: rgba(80,175,149,0.03); border-color: rgba(80,175,149,0.1); }
[data-theme="light"] .pp-add-friend { color: #fff; }

/* ================================================================
   SUPPORT CHAT PANEL
   ================================================================ */
.support-chat-backdrop {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,0.5); opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.support-chat-backdrop.open { opacity: 1; visibility: visible; }
.support-chat-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 901;
  width: 100%; max-width: 420px;
  background: var(--bg-card); border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.3);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.3s ease;
}
.support-chat-panel.open { transform: translateX(0); }
.support-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.support-chat-title { margin: 0; font-size: 1.1rem; font-weight: 600; }
.support-chat-close {
  width: 36px; height: 36px; padding: 0; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.support-chat-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.support-chat-close svg { width: 20px; height: 20px; }
.support-chat-prompt {
  padding: 24px; text-align: center; color: var(--text-muted);
}
.support-chat-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.support-chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.support-chat-msg {
  max-width: 85%; align-self: flex-start; padding: 10px 14px;
  border-radius: 12px; font-size: 0.9rem; line-height: 1.4;
}
.support-chat-msg.out { align-self: flex-end; background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(201,182,147,0.25); }
.support-chat-msg.in { background: var(--bg-elevated); border: 1px solid var(--border); }
.support-chat-msg-time { font-size: 0.7rem; color: var(--text-dim); margin-top: 4px; }
.support-chat-footer {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-end; flex-shrink: 0;
}
.support-chat-input {
  flex: 1; min-height: 44px; max-height: 120px; padding: 10px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text); font-size: 0.9rem;
  resize: none; font-family: inherit;
  transition: border-color 0.15s ease;
}
.support-chat-input:focus { outline: none; border-color: var(--accent); }
.support-chat-send {
  width: 44px; height: 44px; padding: 0; border: none;
  background: var(--accent); color: var(--btn-primary-text);
  border-radius: var(--radius-md); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s ease;
}
.support-chat-send:hover { background: var(--accent-hover); }
.support-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.support-chat-send svg { width: 20px; height: 20px; }
@media (max-width: 480px) {
  .support-chat-panel { max-width: 100%; }
}

/* ================================================================
   PLAYER ROOM CHAT (игровой чат между игроками)
   Desktop: панель справа, полная высота
   Mobile: полноэкранный оверлей с кнопкой закрытия
   ================================================================ */
.player-room-chat-backdrop {
  position: fixed; inset: 0; z-index: 902;
  background: rgba(0,0,0,0.5); opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.player-room-chat-backdrop.open { opacity: 1; visibility: visible; }
.player-room-chat-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 903;
  width: 100%; max-width: 380px;
  background: var(--bg-card); border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.3);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.3s ease;
}
.player-room-chat-panel.open { transform: translateX(0); }
.player-room-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.player-room-chat-title { margin: 0; font-size: 1.1rem; font-weight: 600; }
.player-room-chat-close {
  width: 36px; height: 36px; padding: 0; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.player-room-chat-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.player-room-chat-close svg { width: 20px; height: 20px; }
.player-room-chat-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.player-room-chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.player-room-chat-msg {
  max-width: 90%; align-self: flex-start; padding: 10px 14px;
  border-radius: 12px; font-size: 0.9rem; line-height: 1.4;
  background: var(--bg-elevated); border: 1px solid var(--border);
}
.player-room-chat-msg-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; background: var(--accent-dim);
}
.player-room-chat-msg-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.player-room-chat-msg-username { font-weight: 600; font-size: 0.82rem; color: var(--accent); }
.player-room-chat-msg-time { font-size: 0.7rem; color: var(--text-dim); }
.player-room-chat-footer {
  padding: 12px 16px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.player-room-chat-hint {
  font-size: 0.8rem; color: var(--text-muted); text-align: center;
}
.player-room-chat-input-wrap {
  display: flex; gap: 10px; align-items: flex-end;
}
.player-room-chat-input {
  flex: 1; min-height: 44px; max-height: 120px; padding: 10px 14px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text); font-size: 0.9rem;
  resize: none; font-family: inherit;
  transition: border-color 0.15s ease;
}
.player-room-chat-input:focus { outline: none; border-color: var(--accent); }
.player-room-chat-input:disabled {
  opacity: 0.6; cursor: not-allowed; background: var(--surface);
}
.player-room-chat-send {
  width: 44px; height: 44px; padding: 0; border: none;
  background: var(--accent); color: var(--btn-primary-text);
  border-radius: var(--radius-md); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s ease;
}
.player-room-chat-send:hover { background: var(--accent-hover); }
.player-room-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.player-room-chat-send svg { width: 20px; height: 20px; }
.header-btn-chat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 0.88rem;
}
.header-btn-chat svg { width: 18px; height: 18px; }
.sidebar-player-chat-link {
  width: 100%; text-align: left; border: none; background: transparent;
  color: inherit; cursor: pointer; font-family: inherit;
}
@media (max-width: 768px) {
  .player-room-chat-panel { max-width: 100%; width: 100%; }
  .header-btn-chat-label { display: none; }
}

/* Плавающая кнопка чата */
.floating-chat-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 800;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #b8a272 100%);
  border: none; color: var(--btn-primary-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(201,182,147,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.floating-chat-btn:hover { transform: scale(1.05); box-shadow: 0 6px 24px rgba(201,182,147,0.45); }
.floating-chat-btn svg { width: 26px; height: 26px; }

/* ================================================================
   PERFORMANCE: Reduced-motion & GPU hints
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
