/* ─── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #080f1d;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ─── CSS Variables (Design Tokens SaaS / iGaming Premium) ──────────────────── */
:root {
  --xmas-red:          #e63946;
  --xmas-red-light:    #ff6b6b;
  --xmas-red-dark:     #b91c1c;
  --xmas-green:        #15803d;
  --xmas-green-light:  #22c55e;
  --xmas-green-bright: #4ade80;
  --xmas-gold:         #f59e0b;
  --xmas-gold-light:   #fde047;
  --xmas-gold-dim:     #d97706;
  --xmas-ink:          #080f1d;
  --xmas-ink-light:    #0f172a;
  --xmas-snow:         #f8fafc;
  --xmas-blue:         #38bdf8;
  
  /* Glassmorphism & Cards */
  --card-bg:           rgba(15, 23, 42, 0.72);
  --card-bg-light:     rgba(255, 255, 255, 0.04);
  --card-border:       rgba(255, 255, 255, 0.09);
  --card-border-hover: rgba(245, 158, 11, 0.35);
  --glass-blur:        blur(16px) saturate(160%);
  
  /* Shadows & Elevations */
  --shadow-sm:         0 2px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow:            0 10px 30px -5px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-hover:      0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 158, 11, 0.2);
  --shadow-glow-red:   0 8px 30px rgba(230, 57, 70, 0.4);
  --shadow-glow-gold:  0 8px 30px rgba(245, 158, 11, 0.35);
  --shadow-glow-green: 0 8px 30px rgba(34, 197, 94, 0.35);
  
  /* Border Radii */
  --radius-xs:         6px;
  --radius-sm:         10px;
  --radius:            18px;
  --radius-lg:         24px;
  --radius-btn:        50px;
  
  /* Transitions */
  --transition-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition:        0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Pages / Router ────────────────────────────────────────────────────────── */
.page { display: none; min-height: 100vh; width: 100%; max-width: 100%; overflow-x: hidden; }
.page.active { display: block; }

/* ─── Keyframe Animations ───────────────────────────────────────────────────── */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse     { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes float     { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin      { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes popIn     { 0% { transform: scale(0.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes toastIn   { from { opacity: 0; transform: translateX(50px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut  { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(50px) scale(0.95); } }
@keyframes snowfall  { 0% { transform: translateY(-10px) rotate(0deg); opacity: 0.9; } 100% { transform: translateY(100vh) rotate(360deg); opacity: 0; } }
@keyframes glowPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }

.anim-fade    { animation: fadeIn 0.4s ease both; }
.anim-slide   { animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: var(--delay, 0s); }
.anim-pulse   { animation: pulse 2.2s infinite; }
.anim-float   { animation: float 4s ease-in-out infinite; }

/* ─── Global Loading ────────────────────────────────────────────────────────── */
.global-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(8, 15, 29, 0.92);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: var(--glass-blur);
}
.global-loading.hidden { display: none; }
.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(245, 158, 11, 0.2);
  border-top-color: var(--xmas-red);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.3);
}

/* ─── Toast System ──────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: 24px; right: 24px; z-index: 999999 !important;
  display: flex; flex-direction: column; gap: 12px;
  max-width: calc(100vw - 32px);
}
.toast {
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  color: var(--xmas-snow);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--toast-accent, var(--xmas-gold));
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  max-width: 360px; width: max-content;
  display: flex; align-items: center; gap: 12px;
}
.toast.out     { animation: toastOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) both; }
.toast.success { --toast-accent: var(--xmas-green-bright); }
.toast.error   { --toast-accent: var(--xmas-red); }
.toast.info    { --toast-accent: var(--xmas-gold); }
.toast.warning { --toast-accent: #fbbf24; }

@media (max-width: 480px) {
  .toast-container { top: auto; bottom: 20px; right: 16px; left: 16px; }
  .toast { max-width: 100%; width: 100%; }
}

/* ─── Snowflakes (ambient) ─────────────────────────────────────────────────── */
.snowflakes {
  position: fixed; inset: 0; z-index: 9990;
  pointer-events: none; overflow: hidden;
}
.snowflake {
  position: absolute; top: -10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  opacity: 0; animation: snowfall linear infinite;
  user-select: none; pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

/* ─── Premium Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer; font-weight: 700; font-size: 15px;
  transition: all var(--transition);
  user-select: none; white-space: nowrap;
  position: relative; overflow: hidden;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.btn:hover::before { opacity: 1; }
.btn:active {
  transform: scale(0.97) translateY(1px);
  transition-duration: 0.1s;
}
.btn:disabled {
  opacity: 0.45; cursor: not-allowed; transform: none !important;
  box-shadow: none !important;
}

.btn-sm  { padding: 8px 18px; font-size: 13px; border-radius: 30px; }
.btn-lg  { padding: 16px 36px; font-size: 16px; border-radius: 50px; }
.btn-full { width: 100%; }

/* ─── Premium Cards & Glassmorphism ─────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--card-border-hover);
  transform: translateY(-3px);
}
