/* ==========================================================================
   ELITECHESS DESIGN SYSTEM & TOKENS
   Aesthetics: Premium Royal Forest, Warm Ivory, Antique Gold, Emerald
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Vice City Obsidian Gaming Palette */
  --bg-primary: #08090D;          /* Deep Carbon Obsidian Background */
  --bg-secondary: #10131A;        /* Primary Surface */
  --bg-surface: #171B24;          /* Elevated Surface / Secondary */
  --bg-card: #10131A;             /* Card Surface */
  --bg-card-hover: #171B24;       /* Card Hover Surface */
  --bg-glass: rgba(16, 19, 26, 0.92); /* Glass Surfaces */
  --bg-glass-heavy: rgba(10, 11, 16, 0.97); /* Header & Heavy Glass */
  --border-glass: rgba(255, 255, 255, 0.08); /* Borders and subtle separators */
  --border-glass-light: rgba(255, 255, 255, 0.12); /* Subtle card inner borders */
  --border-focus: rgba(245, 158, 11, 0.6); /* Warm gold focus */

  /* Vice City & Esports Neon Accents */
  --vice-cyan: #00F0FF;
  --vice-cyan-glow: rgba(0, 240, 255, 0.35);
  --vice-magenta: #FF2E93;
  --vice-magenta-glow: rgba(255, 46, 147, 0.35);
  --vice-amber: #FFB703;
  --vice-amber-glow: rgba(255, 183, 3, 0.35);
  --vice-green: #10B981;
  --vice-gradient-primary: linear-gradient(135deg, #FFB703 0%, #F59E0B 45%, #E11D48 100%);
  --vice-gradient-cyber: linear-gradient(135deg, #00F0FF 0%, #3B82F6 100%);
  --vice-gradient-sunset: linear-gradient(135deg, #FF2E93 0%, #FF8A00 100%);

  /* Classroom of the Elite Anime Accents & Hierarchy */
  --cote-crimson: #FF2E93;
  --cote-crimson-glow: rgba(255, 46, 147, 0.36);
  --cote-cyan: #00F0FF;
  --cote-cyan-glow: rgba(0, 240, 255, 0.36);
  --cote-gold: #FFB703;
  --cote-gold-glow: rgba(255, 183, 3, 0.36);
  --cote-purple: #A855F7;
  --cote-purple-glow: rgba(168, 85, 247, 0.36);

  /* Class Hierarchy Colors */
  --class-d: #94A3B8;             /* Class D: Defectives (Iron Gray) */
  --class-d-glow: rgba(148, 163, 184, 0.25);
  --class-c: #10B981;             /* Class C: Challengers (Dragon Jade) */
  --class-c-glow: rgba(16, 185, 129, 0.3);
  --class-b: #00F0FF;             /* Class B: United (Electric Sapphire) */
  --class-b-glow: rgba(0, 240, 255, 0.3);
  --class-a: #FF2E93;             /* Class A: Pinnacle (Imperial Crimson) */
  --class-a-glow: rgba(255, 46, 147, 0.35);
  --class-elite: #FFB703;         /* ELITE: White Room Masterpiece (Holographic Gold) */
  --class-elite-glow: rgba(255, 183, 3, 0.45);

  /* Legacy & Complementary Tokens */
  --forest-green: #081C14;
  --forest-green-light: #0D3E2B;
  --emerald-accent: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --antique-gold: #FFB703;
  --antique-gold-hover: #F59E0B;
  --antique-gold-glow: rgba(255, 183, 3, 0.3);
  --royal-gold: #FFB703;
  --royal-gold-glow: rgba(255, 183, 3, 0.3);
  --solar-crimson: #FF2E93;
  --solar-crimson-glow: rgba(255, 46, 147, 0.3);
  --neon-green: #10B981;
  --neon-green-glow: rgba(16, 185, 129, 0.25);
  --neon-blue: #00F0FF;

  /* Text Colors */
  --text-primary: #F5F7FA;        /* Crisp Primary Light */
  --text-secondary: #A3ACBA;      /* Friendly Balanced Secondary Gray */
  --text-muted: #7B8598;          /* Readable Muted Gray */
  --text-inverse: #08090D;

  /* Typography */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Elevations */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 20px var(--royal-gold-glow);
  --shadow-emerald: 0 0 20px var(--emerald-glow);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions — Luxurious, Smooth & Slow Animations */
  --trans-fast: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-normal: 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-slow: 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-bounce: 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);

  /* Auto Screen Size Fluid Tokens (Chess.com Balanced Proportions) */
  --board-size: min(calc(100dvh - 190px), calc(100vw - 580px), 570px);
}

/* ==========================================================================
   OBSIDIAN PITCH-BLACK & CHARCOAL GREY THEME OVERRIDES
   ========================================================================== */
html.theme-obsidian-black,
html.theme-obsidian-black body,
body.theme-obsidian-black {
  --bg-primary: #08090D !important;
  --bg-secondary: #10131A !important;
  --bg-surface: #171B24 !important;
  --bg-card: rgba(16, 19, 26, 0.90) !important;
  --bg-card-hover: rgba(23, 27, 36, 0.96) !important;
  --bg-glass: rgba(16, 19, 26, 0.92) !important;
  --bg-glass-heavy: rgba(10, 11, 16, 0.98) !important;
  --border-glass: rgba(255, 255, 255, 0.08) !important;
  --border-glass-light: rgba(255, 255, 255, 0.14) !important;
  --border-focus: rgba(245, 158, 11, 0.6) !important;

  --text-primary: #F5F7FA !important;
  --text-secondary: #A3ACBA !important;
  --text-muted: #7B8598 !important;
  --text-inverse: #08090D !important;
}

html.theme-charcoal-grey,
html.theme-charcoal-grey body,
body.theme-charcoal-grey {
  --bg-primary: #202124 !important;
  --bg-secondary: #282A2D !important;
  --bg-surface: #303238 !important;
  --bg-card: #282A2D !important;
  --bg-card-hover: #303238 !important;
  --bg-glass: rgba(40, 42, 45, 0.94) !important;
  --bg-glass-heavy: rgba(32, 33, 36, 0.97) !important;
  --border-glass: #3A3D42 !important;
  --border-glass-light: rgba(255, 255, 255, 0.12) !important;
  --border-focus: rgba(245, 158, 11, 0.6) !important;

  --text-primary: #F1F3F4 !important;
  --text-secondary: #B8BCC2 !important;
  --text-muted: #80868B !important;
  --text-inverse: #17181B !important;
}

/* ==========================================================================
   LIGHT THEME: ROYAL FOREST & WARM IVORY
   ========================================================================== */
html.light-theme,
html:has(body.light-theme),
body.light-theme {
  --bg-primary: #F8F6F0;          /* Warm Ivory */
  --bg-secondary: #EFECE2;        /* Warm Parchment */
  --bg-surface: #FFFFFF;          /* Pure Ivory White */
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(248, 246, 240, 0.82);
  --bg-glass-heavy: rgba(248, 246, 240, 0.95);
  --border-glass: rgba(197, 160, 89, 0.26);
  --border-glass-light: rgba(197, 160, 89, 0.42);
  --border-focus: #059669;

  --forest-green: #0F2D1F;
  --forest-green-light: #16422F;
  --emerald-accent: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.2);
  --antique-gold: #9E7427;
  --antique-gold-hover: #7E5B1A;
  --antique-gold-glow: rgba(158, 116, 39, 0.2);
  --royal-gold: #9E7427;
  --royal-gold-glow: rgba(158, 116, 39, 0.2);
  --solar-crimson: #BE123C;

  --text-primary: #121F17;        /* Deep Forest Slate */
  --text-secondary: #4B5A51;      /* Slate Moss */
  --text-muted: #79877E;
  --text-inverse: #F8F6F0;

  --shadow-sm: 0 4px 12px rgba(18, 31, 23, 0.08);
  --shadow-md: 0 8px 24px rgba(18, 31, 23, 0.12);
  --shadow-lg: 0 16px 40px rgba(18, 31, 23, 0.18);
}

/* ==========================================================================
   COMPACT & FLUID VIEWPORT AUTO ADJUSTMENTS
   Adapting gracefully to small vertical heights and widths
   ========================================================================== */
@media (max-width: 1100px) {
  :root {
    --board-size: min(96vw, calc(100dvh - 200px), 560px);
  }
}

@media (max-width: 600px) {
  :root {
    --board-size: min(100vw, calc(100dvh - 190px));
  }
}

@media (max-height: 700px) {
  :root {
    --board-size: min(calc(100dvh - 140px), calc(100vw - 320px), 500px);
  }
}

@media (max-height: 550px) {
  :root {
    --board-size: min(calc(100dvh - 100px), calc(100vw - 260px), 380px);
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background-color: var(--bg-primary) !important;
  background: var(--bg-primary) !important;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app-container,
.app-main-content,
.main-viewport {
  background-color: transparent !important;
  background: transparent !important;
}

/* Custom Scrollbar — Modern Standards with WebKit Fallback */
:root, html, body, * {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(0, 0, 0, 0.4);
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
  }
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
  }
}

/* Fixed Ambient Background with Luminous Cursor Spotlight */
.ambient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background-color: var(--bg-primary) !important;
  background: radial-gradient(circle 800px at 85% 15%, rgba(0, 240, 255, 0.015) 0%, transparent 70%),
              radial-gradient(circle 700px at 15% 85%, rgba(255, 46, 147, 0.012) 0%, transparent 70%),
              var(--bg-primary) !important;
}

.global-mouse-glow {
  display: none !important;
  pointer-events: none;
  opacity: 0 !important;
}

.global-mouse-glow.active {
  opacity: 1;
}

body.light-theme .ambient-background {
  background-color: var(--bg-primary) !important;
  background: var(--bg-primary) !important;
}

body.light-theme .global-mouse-glow {
  background: radial-gradient(
    130px circle at var(--global-mouse-x, 50vw) var(--global-mouse-y, 50vh),
    rgba(16, 185, 129, 0.045) 0%,
    rgba(16, 185, 129, 0.02) 40%,
    transparent 100%
  );
}

body.light-theme .ambient-grid {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}

.ambient-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 56px 56px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* Layout Container with Left Navigation Sidebar */
#app-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  width: 100%;
}

@media (max-width: 900px) {
  #app-container {
    flex-direction: column;
  }
}

/* ==========================================================================
   NAVIGATION HEADER
   ========================================================================== */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(6px, 1.2vh, 12px) clamp(12px, 2vw, 28px);
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: all var(--trans-normal);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.brand-icon-crown {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.brand-icon-crown svg {
  width: 38px;
  height: 38px;
  display: block;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}

.brand-title span.esports-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(197, 160, 89, 0.15);
  color: var(--antique-gold);
  border: 1px solid rgba(197, 160, 89, 0.35);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--trans-fast);
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-btn:hover {
  color: var(--text-primary);
  background: rgba(197, 160, 89, 0.08);
}

.nav-btn.active {
  color: var(--antique-gold);
  background: rgba(197, 160, 89, 0.14);
  box-shadow: inset 0 0 0 1px rgba(197, 160, 89, 0.3);
}

body.light-theme .nav-btn.active {
  color: var(--forest-green);
  background: rgba(197, 160, 89, 0.2);
  box-shadow: inset 0 0 0 1px rgba(197, 160, 89, 0.4);
}

/* User & Utility Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-badge {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(197, 160, 89, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.35);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--royal-gold);
  height: 26px;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform var(--trans-fast), background var(--trans-fast);
}

.wallet-badge:hover {
  transform: translateY(-1px);
  background: rgba(197, 160, 89, 0.2);
}

.wallet-badge:focus-visible {
  outline: 2px solid var(--royal-gold);
  outline-offset: 2px;
}

/* Premium Passive Income Rate Tooltip */
.wallet-income-tooltip {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--bg-surface);
  border: 1px solid rgba(212, 175, 55, 0.38);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #E2E8F0;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 10px rgba(212, 175, 55, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
  z-index: 1200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 5px;
}

.wallet-income-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: transparent transparent rgba(212, 175, 55, 0.45) transparent;
}

.wallet-badge:hover .wallet-income-tooltip,
.wallet-badge:focus-visible .wallet-income-tooltip,
.wallet-badge.tooltip-active .wallet-income-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.wallet-income-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #F5C518;
  box-shadow: 0 0 6px rgba(245, 197, 24, 0.65);
  display: inline-block;
  flex-shrink: 0;
}

.wallet-income-label {
  color: var(--antique-gold);
  font-weight: 800;
  font-size: 0.64rem;
  letter-spacing: 0.5px;
}

.wallet-income-val {
  color: #FFFFFF;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.wallet-income-picture {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.wallet-income-coin-img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 1px 4px rgba(245, 158, 11, 0.6));
  animation: coinBobFloat 3s ease-in-out infinite;
}

@media (max-width: 768px) {
  .wallet-income-tooltip {
    left: auto;
    right: 0;
    transform: translateY(-4px);
  }
  .wallet-income-tooltip::after {
    left: auto;
    right: 16px;
    transform: none;
  }
  .wallet-badge:hover .wallet-income-tooltip,
  .wallet-badge.tooltip-active .wallet-income-tooltip {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wallet-income-tooltip {
    transition: opacity 0.1s linear;
  }
}

.wallet-badge svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  stroke: #F5C518;
  stroke-width: 1.8px;
  filter: drop-shadow(0 1px 2px rgba(245, 197, 24, 0.45));
}

.wallet-badge .wallet-coin-picture,
.wallet-badge .svg-points-coin-picture,
.svg-points-coin-picture {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

.wallet-badge .header-coin-badge-img,
.wallet-badge img,
.header-coin-badge-img {
  width: 18px;
  height: 18px;
  min-width: 18px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(245, 158, 11, 0.55));
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wallet-badge:hover .header-coin-badge-img,
.wallet-badge:hover img {
  transform: scale(1.15) rotate(4deg);
}

.svg-points-coin {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.45));
}

.desktop-topbar-utils,
.topbar-actions #header-gift-btn,
.topbar-actions .header-gift-btn {
  display: none !important;
}

.online-indicator-badge,
.header-sunday-timer-pill,
.wallet-badge,
.header-gift-btn,
.user-pill,
.nav-auth-btn {
  white-space: nowrap !important;
  flex-shrink: 0;
}

.icon-btn-util {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--trans-fast);
}

.icon-btn-util svg {
  width: 13px;
  height: 13px;
  display: block;
  stroke: currentColor;
  stroke-width: 2px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.2s ease;
}

.icon-btn-util:hover svg {
  transform: scale(1.12);
}

.icon-btn-util.muted {
  opacity: 0.65;
  border-color: rgba(225, 29, 72, 0.35);
  color: var(--solar-crimson) !important;
}

body.light-theme .icon-btn-util {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--forest-green);
}

body.light-theme .icon-btn-util:hover {
  background: rgba(197, 160, 89, 0.2);
  border-color: var(--antique-gold);
  color: var(--antique-gold-hover);
}

body.light-theme .icon-btn-util.muted {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.35);
  color: var(--solar-crimson) !important;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 2px 8px 2px 3px;
  border-radius: var(--radius-full);
  height: 26px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all var(--trans-fast);
}

body.light-theme .user-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.user-pill:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.user-avatar-mini {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: url('/assets/avatar_default.webp') center / cover no-repeat, linear-gradient(135deg, var(--antique-gold), #7C5A1C);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.user-meta-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-tier-badge {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  background: rgba(197, 160, 89, 0.18);
  color: var(--antique-gold);
  border: 1px solid rgba(197, 160, 89, 0.35);
}

.topbar-actions .nav-auth-btn,
#nav-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-height: 28px;
  padding: 0 16px;
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #FFD166 0%, #FFB703 50%, #F59E0B 100%);
  color: #08090D;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-full);
  box-sizing: border-box;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(255, 183, 3, 0.2);
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, filter 0.2s ease;
}

.topbar-actions .nav-auth-btn:hover,
#nav-auth-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 6px 16px rgba(255, 183, 3, 0.3);
}

.topbar-actions .nav-auth-btn:active,
#nav-auth-btn:active {
  transform: scale(0.96) translateY(0) !important;
}

/* ==========================================================================
   MAIN VIEWPORT & SECTION TRANSITIONS
   ========================================================================== */
.main-viewport {
  flex: 1;
  padding: 56px clamp(12px, 2vw, 32px) clamp(16px, 2vh, 32px);
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: viewFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.996);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .view-panel {
    animation: none;
  }
}

/* ==========================================================================
   GLASS CARDS & SURFACES WITH INTERACTIVE BLUE & WHITE SPOTLIGHT GLOW
   ========================================================================== */
.glass-card,
.dash-stat-card,
.dash-card,
.dash-hero-card,
.dash-arena-card,
.landing-feature-card,
.landing-stat-card,
.bot-card,
.bot-selection-card,
.bot-persona-card,
.bot-avatar-card,
.tournament-card,
.tourn-card,
.tourn-hero-card,
.puzzle-card,
.puzzle-info-card,
.store-card,
.theme-preview-card,
.market-item-card,
.profile-card,
.profile-stat-box,
.arena-panel,
.lobby-card,
.match-mode-card,
.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans-smooth), 
              box-shadow var(--trans-smooth), 
              border-color var(--trans-smooth), 
              background-color var(--trans-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card:hover,
.dash-stat-card:hover,
.dash-card:hover,
.dash-hero-card:hover,
.dash-arena-card:hover,
.landing-feature-card:hover,
.landing-stat-card:hover,
.bot-card:hover,
.bot-selection-card:hover,
.bot-persona-card:hover,
.bot-avatar-card:hover,
.tournament-card:hover,
.tourn-card:hover,
.tourn-hero-card:hover,
.puzzle-card:hover,
.puzzle-info-card:hover,
.store-card:hover,
.theme-preview-card:hover,
.market-item-card:hover,
.profile-card:hover,
.profile-stat-box:hover,
.arena-panel:hover,
.lobby-card:hover,
.match-mode-card:hover,
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55) !important;
}

.glass-card::before,
.dash-stat-card::before,
.dash-card::before,
.dash-hero-card::before,
.dash-arena-card::before,
.landing-quickplay-box::before,
.landing-feature-card::before,
.landing-stat-card::before,
.bot-card::before,
.bot-selection-card::before,
.bot-persona-card::before,
.bot-avatar-card::before,
.tournament-card::before,
.tourn-card::before,
.tourn-hero-card::before,
.puzzle-card::before,
.puzzle-info-card::before,
.store-card::before,
.theme-preview-card::before,
.market-item-card::before,
.profile-card::before,
.profile-stat-box::before,
.arena-panel::before,
.lobby-card::before,
.match-mode-card::before,
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0 !important;
  pointer-events: none;
  z-index: 1;
  display: none !important;
}

.glass-card:hover::before,
.dash-stat-card:hover::before,
.dash-card:hover::before,
.dash-hero-card:hover::before,
.dash-arena-card:hover::before,
.landing-quickplay-box:hover::before,
.landing-feature-card:hover::before,
.landing-stat-card:hover::before,
.bot-card:hover::before,
.bot-selection-card:hover::before,
.bot-persona-card:hover::before,
.bot-avatar-card:hover::before,
.tournament-card:hover::before,
.tourn-card:hover::before,
.tourn-hero-card:hover::before,
.puzzle-card:hover::before,
.puzzle-info-card:hover::before,
.store-card:hover::before,
.theme-preview-card:hover::before,
.market-item-card:hover::before,
.profile-card:hover::before,
.profile-stat-box:hover::before,
.arena-panel:hover::before,
.lobby-card:hover::before,
.match-mode-card:hover::before,
.stat-card:hover::before {
  opacity: 1;
}

/* ==========================================================================
   BUTTONS SYSTEM: TACTILE SPRING & CLASSROOM OF THE ELITE ANIME STYLING
   ========================================================================== */
.btn-royal-primary, .btn-esports-primary, .btn-royal-secondary, .btn-esports-secondary, .btn-emerald, .btn-cote-crimson, .btn-cote-cyan {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, border-color 0.25s ease, color 0.2s ease;
}

.btn-royal-primary, .btn-esports-primary {
  background: linear-gradient(135deg, var(--cote-gold), #D97706);
  color: #080A12;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 13px 26px;
  min-height: 46px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 18px var(--cote-gold-glow);
}

.btn-royal-primary:hover, .btn-esports-primary:hover {
  background: linear-gradient(135deg, #FBBF24, #B45309);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.45);
}

.btn-royal-primary:active, .btn-esports-primary:active {
  transform: scale(0.97) translateY(0) !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* S-System Crimson High-Stakes Action Button */
.btn-cote-crimson {
  background: linear-gradient(135deg, #E11D48, #BE123C);
  color: #FFFFFF;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 13px 26px;
  min-height: 46px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 18px var(--cote-crimson-glow);
}

.btn-cote-crimson:hover {
  background: linear-gradient(135deg, #F43F5E, #9F1239);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(225, 29, 72, 0.5);
}

.btn-cote-crimson:active {
  transform: scale(0.97) translateY(0) !important;
}

.btn-royal-secondary, .btn-esports-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 22px;
  min-height: 44px;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme .btn-royal-secondary, body.light-theme .btn-esports-secondary {
  background: rgba(0, 0, 0, 0.04);
}

.btn-royal-secondary:hover, .btn-esports-secondary:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(245, 158, 11, 0.42);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.btn-royal-secondary:active, .btn-esports-secondary:active {
  transform: scale(0.97) translateY(0) !important;
}

.btn-royal-ghost,
.btn-royal-outline,
.btn-play-shortcut,
.settings-test-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #F1F5F9;
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 16px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-royal-ghost:hover,
.btn-royal-outline:hover,
.btn-play-shortcut:hover,
.settings-test-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #FFD166;
  transform: translateY(-1px);
}

body.light-theme .btn-royal-ghost,
body.light-theme .btn-royal-outline,
body.light-theme .btn-play-shortcut,
body.light-theme .settings-test-btn {
  background: #F8FAFC;
  color: #1E293B;
  border-color: #CBD5E1;
}

.btn-emerald {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 13px 26px;
  min-height: 46px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px var(--emerald-glow);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-emerald:active {
  transform: scale(0.97) translateY(0) !important;
}

/* ==========================================================================
   CRISP BOX BOUNDARY CLICK SHOCKWAVE (INWARD TO OUTWARD 2x EXPANSION)
   Pure vector boundary ring expanding from inward (0.97x) to 2.0x without blur filter
   ========================================================================== */
.box-boundary-shockwave {
  position: fixed;
  box-sizing: border-box;
  pointer-events: none;
  border-width: 2px;
  border-style: solid;
  border-color: #38BDF8;
  border-radius: var(--radius-md);
  z-index: 1000001;
  transform-origin: center center;
  transform: scale(0.97);
  opacity: 0.95;
  animation: boxBoundaryShockwave 0.52s cubic-bezier(0.12, 0.9, 0.25, 1) forwards;
  will-change: transform, opacity;
}

/* Strictly disable inner-to-outer boundary shockwave animations on mobile & touch devices */
@media (max-width: 768px), (pointer: coarse) {
  .box-boundary-shockwave {
    display: none !important;
    animation: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@keyframes boxBoundaryShockwave {
  0% {
    transform: scale(0.97);
    opacity: 0.95;
    border-width: 2px;
  }
  25% {
    transform: scale(1.18);
    opacity: 0.85;
    border-width: 1.8px;
  }
  65% {
    opacity: 0.4;
    border-width: 1.2px;
  }
  100% {
    transform: scale(2.05);
    opacity: 0;
    border-width: 1px;
  }
}

/* Floating Reward Tokens / S-System Points Badge */
.floating-reward-pill {
  position: fixed;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.96), rgba(225, 29, 72, 0.96));
  color: #FFFFFF;
  padding: 8px 18px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5), 0 0 16px rgba(225, 29, 72, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
  animation: floatRewardUp 1.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes floatRewardUp {
  0% { transform: translateY(0) scale(0.85); opacity: 0; }
  18% { transform: translateY(-14px) scale(1.08); opacity: 1; }
  75% { transform: translateY(-44px) scale(1); opacity: 0.9; }
  100% { transform: translateY(-72px) scale(0.92); opacity: 0; }
}

/* ==========================================================================
   CLASSROOM OF THE ELITE: CLASS BADGES & VISUAL HIERARCHY
   ========================================================================== */
.class-badge-d {
  background: rgba(148, 163, 184, 0.15) !important;
  color: var(--class-d) !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  box-shadow: 0 0 10px var(--class-d-glow);
}

.class-badge-c {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--class-c) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  box-shadow: 0 0 12px var(--class-c-glow);
}

.class-badge-b {
  background: rgba(6, 182, 212, 0.15) !important;
  color: var(--class-b) !important;
  border: 1px solid rgba(6, 182, 212, 0.4) !important;
  box-shadow: 0 0 14px var(--class-b-glow);
}

.class-badge-a {
  background: rgba(225, 29, 72, 0.16) !important;
  color: var(--class-a) !important;
  border: 1px solid rgba(225, 29, 72, 0.45) !important;
  box-shadow: 0 0 16px var(--class-a-glow);
}

.class-badge-elite {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.22), rgba(168, 85, 247, 0.22), rgba(56, 189, 248, 0.22)) !important;
  color: #FFB703 !important;
  border: 1px solid rgba(255, 183, 3, 0.55) !important;
  box-shadow: 0 0 20px var(--class-elite-glow);
  animation: elitePulsate 3s infinite ease-in-out;
}

@keyframes elitePulsate {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 183, 3, 0.4); border-color: rgba(255, 183, 3, 0.55); }
  50% { box-shadow: 0 0 28px rgba(168, 85, 247, 0.65), 0 0 12px rgba(56, 189, 248, 0.5); border-color: rgba(168, 85, 247, 0.7); }
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 10, 8, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-xl);
  padding: 30px;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalScaleUp 0.22s ease-out;
}

@keyframes modalScaleUp {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color var(--trans-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   CIRCULAR REVEAL THEME TRANSITION (INNER TO OUTER CIRCLE)
   ========================================================================== */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 999999;
}

.light-theme::view-transition-old(root) {
  z-index: 1;
}

.light-theme::view-transition-new(root) {
  z-index: 999999;
}

.theme-circular-ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease 0.9s;
  will-change: transform, opacity;
}

/* Ultra-smooth synchronized transition for all colors during theme shift */
html.theme-transitioning,
html.theme-transitioning body,
html.theme-transitioning .app-container,
html.theme-transitioning .glass-card,
html.theme-transitioning .topbar-glass,
html.theme-transitioning .sidebar-glass,
html.theme-transitioning .arena-hero-card {
  transition: background-color 1.4s cubic-bezier(0.16, 1, 0.3, 1),
              color 1.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 1.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ==========================================================================
   INTERACTIVE MOUSE SPOTLIGHT (DESKTOP-ONLY AMBIENT GLOW - no custom cursor)
   The .cursor-dot / .cursor-ring / .cursor-torch elements are removed.
   Ambient white spotlight only lives in .global-mouse-glow & card ::before.
   ========================================================================== */

/* ==========================================================================
   HEADER GUEST EXPIRY COUNTDOWN BADGE (DAY 3 / <= 24H)
   ========================================================================== */
.guest-expiry-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #EF4444;
  padding: 3px 8px;
  height: 26px;
  box-sizing: border-box;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
  user-select: none;
}

.guest-expiry-badge:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #EF4444;
  transform: translateY(-1px);
}

.guest-timer-clock {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #F87171;
}

.guest-claim-pill {
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   SUNDAY TOURNAMENT LIVE DOT INDICATOR
   ========================================================================== */
.sunday-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cote-crimson);
  box-shadow: 0 0 8px var(--cote-crimson);
  animation: pulse 1.6s infinite;
}

/* ==========================================================================
   ARENA VERTICAL MENU LAYOUT (MATCHING REFERENCE IMAGE)
   ========================================================================== */
.arena-vertical-menu-wrapper {
  max-width: 440px;
  width: 100%;
  margin: 20px auto 40px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 10;
}

/* 1. Time Control Pill Dropdown */
.arena-tc-picker-pill {
  width: 100%;
  background: #18191C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--trans-fast);
  user-select: none;
}

.arena-tc-picker-pill:hover {
  background: #202226;
  border-color: rgba(255, 183, 3, 0.4);
}

.arena-tc-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.arena-tc-pill-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.arena-tc-pill-arrow {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.arena-tc-dropdown {
  position: relative;
  background: #1E2024;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  animation: slideDownFade 0.2s ease;
}

.arena-tc-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.arena-tc-opt {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all var(--trans-fast);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.arena-tc-opt:hover,
.arena-tc-opt.active {
  background: rgba(255, 183, 3, 0.12);
  border-color: #FFB703;
}

.arena-tc-opt .tc-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFFFFF;
}

.arena-tc-opt .tc-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* 2. Start Game Big Vibrant Gold/Yellow Button (Theme-matched) */
.arena-btn-start {
  width: 100%;
  background: linear-gradient(135deg, #FFB703 0%, #F59E0B 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 16px 20px;
  color: #120D00;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  transition: all var(--trans-smooth);
  box-shadow: 0 4px 22px rgba(255, 183, 3, 0.45);
  text-align: center;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.arena-btn-start:hover {
  background: linear-gradient(135deg, #FFC72C 0%, #FFAA00 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 183, 3, 0.65);
  color: #000000;
}

.arena-btn-start:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(255, 183, 3, 0.4);
}

/* 3. Secondary Vertical Stack Buttons */
.arena-btn-secondary {
  width: 100%;
  background: #18191C;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 20px;
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  user-select: none;
}

.arena-btn-secondary:hover {
  background: #222428;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.arena-btn-secondary .arena-opt-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 4. Collapsible Chevron Toggle Button */
.arena-btn-collapse-toggle {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans-fast);
}

.arena-btn-collapse-toggle:hover {
  color: #FFFFFF;
}

.arena-collapsible-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideDownFade 0.25s ease;
}

.friend-choice-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-md);
  padding: 14px;
}

/* ==========================================================================
   STANDARDIZED ESPORTS TIER BADGES (NO CARTOONISH LOOKS)
   ========================================================================== */
.user-tier-badge,
.tier-d,
.tier-c,
.tier-b,
.tier-a,
.tier-elite {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  border-radius: 4px;
  padding: 1.5px 6px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  vertical-align: middle;
  line-height: 1.3;
}

.user-tier-badge .tier-badge-icon,
.user-tier-badge span[data-icon] {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-tier-badge .tier-badge-icon svg,
.user-tier-badge span[data-icon] svg {
  width: 12px;
  height: 12px;
}

.user-tier-badge.tier-d,
.class-badge-d {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #94A3B8 !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  box-shadow: none !important;
}

.user-tier-badge.tier-c,
.class-badge-c {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #10B981 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  box-shadow: none !important;
}

.user-tier-badge.tier-b,
.class-badge-b {
  background: rgba(6, 182, 212, 0.12) !important;
  color: #06B6D4 !important;
  border: 1px solid rgba(6, 182, 212, 0.4) !important;
  box-shadow: none !important;
}

.user-tier-badge.tier-a,
.class-badge-a {
  background: rgba(225, 29, 72, 0.12) !important;
  color: #E11D48 !important;
  border: 1px solid rgba(225, 29, 72, 0.4) !important;
  box-shadow: none !important;
}

.user-tier-badge.tier-elite,
.class-badge-elite {
  background: rgba(255, 183, 3, 0.14) !important;
  color: #FFB703 !important;
  border: 1px solid rgba(255, 183, 3, 0.5) !important;
  box-shadow: none !important;
}

/* ==========================================================================
   LIGHT THEME: PURE IVORY / WHITE ESPORTS LOOK WITH ZERO BLACK CARDS
   ========================================================================== */
html.light-theme,
html:has(body.light-theme),
body.light-theme {
  --bg-primary: #F8F6F0 !important;
  --bg-secondary: #EFECE2 !important;
  --bg-surface: #FFFFFF !important;
  --bg-card: #FFFFFF !important;
  --bg-card-hover: #F8F7F4 !important;
  --bg-glass: rgba(255, 255, 255, 0.94) !important;
  --bg-glass-heavy: rgba(255, 255, 255, 0.98) !important;
  --border-glass: rgba(0, 0, 0, 0.08) !important;
  --border-glass-light: rgba(0, 0, 0, 0.12) !important;
  --text-primary: #0F172A !important;
  --text-secondary: #475569 !important;
  --text-muted: #64748B !important;
  background-color: #F8F6F0 !important;
  background: #F8F6F0 !important;
  color: #0F172A !important;
}

body.light-theme .ambient-background {
  background-color: #F8F6F0 !important;
  background: #F8F6F0 !important;
}

/* Light Theme Card Overrides */
body.light-theme .glass-card,
body.light-theme .dash-stat-card,
body.light-theme .dash-card,
body.light-theme .dash-hero-card,
body.light-theme .dash-arena-card,
body.light-theme .landing-quickplay-box,
body.light-theme .landing-feature-card,
body.light-theme .landing-stat-card,
body.light-theme .bot-card,
body.light-theme .bot-selection-card,
body.light-theme .bot-persona-card,
body.light-theme .bot-avatar-card,
body.light-theme .tournament-card,
body.light-theme .tourn-card,
body.light-theme .tourn-hero-card,
body.light-theme .sunday-tournament-banner,
body.light-theme .puzzle-card,
body.light-theme .puzzle-info-card,
body.light-theme .store-card,
body.light-theme .store-hero-banner,
body.light-theme .theme-preview-card,
body.light-theme .market-item-card,
body.light-theme .profile-card,
body.light-theme .profile-stat-box,
body.light-theme .arena-panel,
body.light-theme .lobby-card,
body.light-theme .match-mode-card,
body.light-theme .stat-card,
body.light-theme .modal-box,
body.light-theme .upcoming-tourneys-card,
body.light-theme .tactical-arena-banner,
body.light-theme .improve-game-card {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

/* Light Theme Headings & Text */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme .dashboard-greeting-title,
body.light-theme .dashboard-greeting-title span,
body.light-theme .tourn-title,
body.light-theme .arena-tc-pill-label,
body.light-theme .dash-stat-val,
body.light-theme .tourney-item-name {
  color: #0F172A !important;
}

body.light-theme .dashboard-greeting-sub,
body.light-theme .dash-stat-label,
body.light-theme .tourney-item-sub,
body.light-theme .sidebar-sunday-warning {
  color: #475569 !important;
}

/* Light Theme Topbar & Sidebar */
body.light-theme .app-topbar {
  background: rgba(248, 246, 240, 0.96) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .app-sidebar {
  background: rgba(248, 246, 240, 0.98) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Light theme: ELITE text must be visible (dark) against light sidebar/topbar background */
body.light-theme .brand-title-elite,
body.light-theme .topbar-brand-title .brand-title-elite {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

/* CHESS stays gold in light theme */
body.light-theme .brand-title-chess {
  background: linear-gradient(135deg, #D97706 0%, #B45309 50%, #92400E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .topbar-search input {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #0F172A !important;
}

body.light-theme .global-search-dropdown {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #0F172A !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1) !important;
}

/* Light Theme Welcome Grant Card */
body.light-theme .dash-welcome-grant-card {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.06) 0%, rgba(255, 255, 255, 0.98) 100%) !important;
  border: 1px solid rgba(225, 29, 72, 0.25) !important;
}

body.light-theme #dash-grant-title,
body.light-theme .dash-grant-heading {
  color: #0F172A !important;
}

/* Light Theme Arena Menu */
body.light-theme .arena-tc-picker-pill,
body.light-theme .arena-btn-secondary {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #0F172A !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .arena-tc-picker-pill:hover,
body.light-theme .arena-btn-secondary:hover {
  background: #F8F9FA !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
}

body.light-theme .arena-tc-pill-label {
  color: #0F172A !important;
}

body.light-theme .arena-tc-dropdown {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .arena-tc-opt {
  background: #F8F9FA !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .arena-tc-opt:hover,
body.light-theme .arena-tc-opt.active {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: #10B981 !important;
}

body.light-theme .arena-tc-opt .tc-name {
  color: #0F172A !important;
}

body.light-theme .arena-btn-collapse-toggle {
  color: #64748B !important;
}

body.light-theme .arena-btn-collapse-toggle:hover {
  color: #0F172A !important;
}

body.light-theme .friend-choice-card {
  background: #F8F9FA !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* ==========================================================================
   LIGHT THEME: TELEGRAM-STYLE GLOBAL CHAT FULL OVERHAUL
   ========================================================================== */
html.light-theme .view-panel-chat-page,
body.light-theme .view-panel-chat-page,
html[data-theme="light"] .view-panel-chat-page,
body[data-theme="light"] .view-panel-chat-page {
  background: transparent !important;
}

html.light-theme .chat-telegram-shell,
body.light-theme .chat-telegram-shell,
html[data-theme="light"] .chat-telegram-shell,
body[data-theme="light"] .chat-telegram-shell {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}

/* 1. Left Section: Channels & Communities Sidebar */
html.light-theme .chat-channels-sidebar,
body.light-theme .chat-channels-sidebar,
html[data-theme="light"] .chat-channels-sidebar,
body[data-theme="light"] .chat-channels-sidebar {
  background: #F8FAFC !important;
  border-right: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-channels-header,
body.light-theme .chat-channels-header,
html[data-theme="light"] .chat-channels-header,
body[data-theme="light"] .chat-channels-header {
  background: #F8FAFC !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-channels-brand,
body.light-theme .chat-channels-brand,
html.light-theme .chat-brand-title,
body.light-theme .chat-brand-title {
  color: #0F172A !important;
}

html.light-theme .chat-channels-search-box input,
body.light-theme .chat-channels-search-box input {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
}

html.light-theme .chat-channels-search-box input::placeholder,
body.light-theme .chat-channels-search-box input::placeholder {
  color: #94A3B8 !important;
}

html.light-theme .chat-channels-search-box input:focus,
body.light-theme .chat-channels-search-box input:focus {
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
}

html.light-theme .chat-search-glyph,
body.light-theme .chat-search-glyph {
  color: #94A3B8 !important;
}

/* Channel Items */
html.light-theme .chat-channel-item,
body.light-theme .chat-channel-item {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-channel-item:hover,
body.light-theme .chat-channel-item:hover {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
}

html.light-theme .chat-channel-item.active,
body.light-theme .chat-channel-item.active,
html.light-theme .chat-channel-tab.active,
body.light-theme .chat-channel-tab.active {
  background: #FFFFFF !important;
  border: 1px solid rgba(212, 175, 55, 0.6) !important;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.12), inset 0 0 8px rgba(212, 175, 55, 0.05) !important;
}

html.light-theme .chat-channel-item.active::before,
body.light-theme .chat-channel-item.active::before {
  background: #D4AF37 !important;
}

html.light-theme .channel-item-name,
body.light-theme .channel-item-name,
html.light-theme .chat-channel-item.active .channel-item-name,
body.light-theme .chat-channel-item.active .channel-item-name {
  color: #0F172A !important;
}

html.light-theme .channel-item-snippet,
body.light-theme .channel-item-snippet {
  color: #64748B !important;
}

html.light-theme .chat-channel-item.active .channel-item-snippet,
body.light-theme .chat-channel-item.active .channel-item-snippet {
  color: #334155 !important;
}

html.light-theme .channel-item-tag,
body.light-theme .channel-item-tag {
  background: #F1F5F9 !important;
  color: #64748B !important;
  border: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-channel-item.active .channel-item-tag,
body.light-theme .chat-channel-item.active .channel-item-tag {
  background: rgba(212, 175, 55, 0.15) !important;
  color: #B45309 !important;
  border-color: rgba(212, 175, 55, 0.4) !important;
}

html.light-theme .channel-item-avatar,
body.light-theme .channel-item-avatar {
  background: #F1F5F9 !important;
  color: #475569 !important;
}

html.light-theme .chat-channel-item.active .avatar-class-d,
body.light-theme .chat-channel-item.active .avatar-class-d {
  background: rgba(212, 175, 55, 0.12) !important;
  border-color: rgba(212, 175, 55, 0.4) !important;
  color: #B45309 !important;
}

html.light-theme .channel-item-avatar.has-channel-image,
body.light-theme .channel-item-avatar.has-channel-image,
html.light-theme .chat-channel-item.active .avatar-class-d.has-channel-image,
body.light-theme .chat-channel-item.active .avatar-class-d.has-channel-image,
html.light-theme .chat-header-avatar.has-channel-image,
body.light-theme .chat-header-avatar.has-channel-image,
html.light-theme .chat-info-big-avatar.has-channel-image,
body.light-theme .chat-info-big-avatar.has-channel-image {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #FFFFFF !important;
  padding: 0 !important;
}

/* Sidebar Footer & 1v1 Button */
html.light-theme .chat-channels-footer,
body.light-theme .chat-channels-footer {
  background: #F8FAFC !important;
  border-top: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-sidebar-1v1-btn,
body.light-theme .chat-sidebar-1v1-btn {
  background: #FFFBEB !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  color: #B45309 !important;
}

html.light-theme .chat-sidebar-1v1-btn:hover,
body.light-theme .chat-sidebar-1v1-btn:hover {
  background: #D4AF37 !important;
  color: #0A120E !important;
}

/* 2. Center Conversation Pane */
html.light-theme .chat-conversation-pane,
body.light-theme .chat-conversation-pane,
html[data-theme="light"] .chat-conversation-pane,
body[data-theme="light"] .chat-conversation-pane {
  background: #F8FAFC !important;
}

html.light-theme .chat-list-section-label,
body.light-theme .chat-list-section-label {
  color: #64748B !important;
}

html.light-theme .chat-people-online-pill,
body.light-theme .chat-people-online-pill {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

html.light-theme .chat-item-chevron,
body.light-theme .chat-item-chevron {
  color: #64748B !important;
}

html.light-theme .chat-dm-online-dot,
body.light-theme .chat-dm-online-dot {
  border-color: #FFFFFF !important;
}

html.light-theme .chat-mobile-back-btn,
body.light-theme .chat-mobile-back-btn {
  color: #0F172A !important;
}

html.light-theme .chat-search-clear-btn,
body.light-theme .chat-search-clear-btn {
  background: rgba(15, 23, 42, 0.08) !important;
  color: #475569 !important;
}

html.light-theme .chat-search-clear-btn:hover,
body.light-theme .chat-search-clear-btn:hover {
  background: rgba(15, 23, 42, 0.15) !important;
  color: #0F172A !important;
}

html.light-theme .chat-people-empty-prompt,
body.light-theme .chat-people-empty-prompt {
  background: #FFFFFF !important;
  border-color: rgba(180, 83, 9, 0.25) !important;
  color: #475569 !important;
}

html.light-theme .chat-people-empty-prompt:hover,
body.light-theme .chat-people-empty-prompt:hover {
  background: #FFFBEB !important;
  border-color: rgba(180, 83, 9, 0.5) !important;
  color: #0F172A !important;
}

html.light-theme .chat-people-empty-prompt-icon,
body.light-theme .chat-people-empty-prompt-icon {
  background: rgba(212, 175, 55, 0.16) !important;
  color: #B45309 !important;
}

@media (max-width: 768px) {
  html.light-theme .chat-channels-sidebar,
  body.light-theme .chat-channels-sidebar {
    background: #F1F5F9 !important;
  }
}

html.light-theme .chat-telegram-header,
body.light-theme .chat-telegram-header,
html[data-theme="light"] .chat-telegram-header,
body[data-theme="light"] .chat-telegram-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-header-title,
body.light-theme .chat-header-title {
  color: #0F172A !important;
}

html.light-theme .chat-header-sub,
body.light-theme .chat-header-sub {
  color: #64748B !important;
}

html.light-theme .chat-header-sub-divider,
body.light-theme .chat-header-sub-divider {
  color: #CBD5E1 !important;
}

html.light-theme .chat-btn-icon,
body.light-theme .chat-btn-icon {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  color: #475569 !important;
}

html.light-theme .chat-btn-icon:hover,
body.light-theme .chat-btn-icon:hover {
  background: #FEF3C7 !important;
  color: #B45309 !important;
  border-color: #D4AF37 !important;
}

/* In-Channel Search */
html.light-theme .chat-in-channel-search,
body.light-theme .chat-in-channel-search {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-search-inner input,
body.light-theme .chat-search-inner input {
  background: #F1F5F9 !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
}

html.light-theme .chat-search-inner input::placeholder,
body.light-theme .chat-search-inner input::placeholder {
  color: #94A3B8 !important;
}

html.light-theme .search-count-label,
body.light-theme .search-count-label {
  color: #64748B !important;
}

/* Messages Area & Bubbles */
html.light-theme .chat-messages-container-rel,
body.light-theme .chat-messages-container-rel,
html[data-theme="light"] .chat-messages-container-rel,
body[data-theme="light"] .chat-messages-container-rel,
html.light-theme .chat-messages-scroll,
body.light-theme .chat-messages-scroll,
html[data-theme="light"] .chat-messages-scroll,
body[data-theme="light"] .chat-messages-scroll {
  background: #F8FAFC !important;
}

html.light-theme .chat-date-separator span,
body.light-theme .chat-date-separator span {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  color: #64748B !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

html.light-theme .chat-bubble-telegram.chat-msg-other .chat-bubble-content,
body.light-theme .chat-bubble-telegram.chat-msg-other .chat-bubble-content {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme .chat-bubble-telegram.chat-msg-other .chat-text,
body.light-theme .chat-bubble-telegram.chat-msg-other .chat-text,
html.light-theme .chat-bubble-telegram.chat-msg-other .chat-username,
body.light-theme .chat-bubble-telegram.chat-msg-other .chat-username {
  color: #0F172A !important;
}

html.light-theme .chat-bubble-telegram.chat-msg-self .chat-bubble-content,
body.light-theme .chat-bubble-telegram.chat-msg-self .chat-bubble-content {
  background: #ECFDF5 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08) !important;
}

html.light-theme .chat-bubble-telegram.chat-msg-self .chat-text,
body.light-theme .chat-bubble-telegram.chat-msg-self .chat-text {
  color: #064E3B !important;
}

html.light-theme .chat-bubble-telegram.chat-msg-self .chat-username,
body.light-theme .chat-bubble-telegram.chat-msg-self .chat-username {
  color: #047857 !important;
}

html.light-theme .chat-bubble-telegram .chat-bubble-meta,
body.light-theme .chat-bubble-telegram .chat-bubble-meta {
  color: #64748B !important;
}

html.light-theme .telegram-reply-quote,
body.light-theme .telegram-reply-quote {
  background: rgba(0, 0, 0, 0.04) !important;
  border-left: 3px solid var(--royal-gold) !important;
}

html.light-theme .telegram-reply-author,
body.light-theme .telegram-reply-author {
  color: #0F172A !important;
}

html.light-theme .telegram-reply-snippet,
body.light-theme .telegram-reply-snippet {
  color: #475569 !important;
}

/* Bottom Composer */
html.light-theme .chat-telegram-composer,
body.light-theme .chat-telegram-composer,
html[data-theme="light"] .chat-telegram-composer,
body[data-theme="light"] .chat-telegram-composer {
  background: #FFFFFF !important;
  border-top: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-composer-box,
body.light-theme .chat-composer-box,
html[data-theme="light"] .chat-composer-box,
body[data-theme="light"] .chat-composer-box {
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

html.light-theme .chat-composer-box:focus-within,
body.light-theme .chat-composer-box:focus-within,
html[data-theme="light"] .chat-composer-box:focus-within,
body[data-theme="light"] .chat-composer-box:focus-within {
  background: #FFFFFF !important;
  border-color: #D4AF37 !important;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.30), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

html.light-theme .chat-telegram-textarea,
body.light-theme .chat-telegram-textarea {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #0F172A !important;
}

html.light-theme .chat-telegram-textarea::placeholder,
body.light-theme .chat-telegram-textarea::placeholder {
  color: #94A3B8 !important;
}

html.light-theme .chat-telegram-textarea:focus,
body.light-theme .chat-telegram-textarea:focus {
  background: transparent !important;
  border: none !important;
  color: #0F172A !important;
  box-shadow: none !important;
}

html.light-theme .composer-tool-btn,
body.light-theme .composer-tool-btn {
  color: #64748B !important;
}

html.light-theme .composer-tool-btn:hover,
body.light-theme .composer-tool-btn:hover {
  background: #F1F5F9 !important;
  color: #B45309 !important;
}

html.light-theme .chat-telegram-send-btn,
body.light-theme .chat-telegram-send-btn {
  background: linear-gradient(135deg, var(--royal-gold), #B38F3F) !important;
  color: #0B0E14 !important;
}

/* Info Sidebar & Reactions Popover */
html.light-theme .chat-info-sidebar,
body.light-theme .chat-info-sidebar {
  background: #FFFFFF !important;
  border-left: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-info-header,
body.light-theme .chat-info-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-info-title,
body.light-theme .chat-info-title {
  color: #0F172A !important;
}

html.light-theme .chat-info-channel-card,
body.light-theme .chat-info-channel-card,
html.light-theme .chat-info-section,
body.light-theme .chat-info-section {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

html.light-theme .chat-react-popover,
body.light-theme .chat-react-popover {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

/* Classic fallback classes */
html.light-theme .chat-container,
body.light-theme .chat-container {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
}

html.light-theme .chat-header,
body.light-theme .chat-header {
  background: #F8F6F0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #0F172A !important;
}

html.light-theme .chat-messages-container,
body.light-theme .chat-messages-container {
  background: #FBFBFA !important;
}

html.light-theme .chat-input-row,
body.light-theme .chat-input-row {
  background: #FFFFFF !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html.light-theme .chat-input-row textarea,
body.light-theme .chat-input-row textarea,
html.light-theme .chat-input-row input,
body.light-theme .chat-input-row input {
  background: #F4F4F1 !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #0F172A !important;
}

html.light-theme .telegram-reply-preview-bar,
body.light-theme .telegram-reply-preview-bar {
  background: #F3F4F6 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html.light-theme .modal-box-chat-compose,
body.light-theme .modal-box-chat-compose {
  background: #FFFFFF !important;
  color: #0F172A !important;
}

/* ==========================================================================
   LIGHT THEME: AUTH MODAL & FORM INPUTS (SIGNUP, SIGNIN, CLAIM ACCOUNT)
   Fixes invisible white text on white input background
   ========================================================================== */
html.light-theme #auth-modal.auth-modal-overlay,
body.light-theme #auth-modal.auth-modal-overlay,
html[data-theme="light"] #auth-modal.auth-modal-overlay,
body[data-theme="light"] #auth-modal.auth-modal-overlay {
  background: rgba(15, 23, 42, 0.52) !important;
}

html.light-theme #auth-modal .modal-box,
body.light-theme #auth-modal .modal-box,
html[data-theme="light"] #auth-modal .modal-box,
body[data-theme="light"] #auth-modal .modal-box,
html.light-theme #modal-claim-account .modal-box,
body.light-theme #modal-claim-account .modal-box {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  color: #0F172A !important;
  color-scheme: light !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16) !important;
}

html.light-theme .auth-dialog .auth-terms-checkbox,
body.light-theme .auth-dialog .auth-terms-checkbox {
  background: #FFFFFF;
  border-color: #94A3B8;
}

html.light-theme .auth-dialog .auth-terms-checkbox:checked,
body.light-theme .auth-dialog .auth-terms-checkbox:checked {
  background: #B45309;
  border-color: #B45309;
}

html.light-theme .auth-dialog .auth-terms-checkbox:checked::after,
body.light-theme .auth-dialog .auth-terms-checkbox:checked::after {
  border-color: #FFFFFF;
}

html.light-theme .auth-brand-mark,
body.light-theme .auth-brand-mark,
html[data-theme="light"] .auth-brand-mark,
body[data-theme="light"] .auth-brand-mark {
  background: rgba(180, 83, 9, 0.08) !important;
  border-color: rgba(180, 83, 9, 0.24) !important;
  color: #B45309 !important;
}

html.light-theme #auth-modal .auth-close-btn,
body.light-theme #auth-modal .auth-close-btn,
html[data-theme="light"] #auth-modal .auth-close-btn,
body[data-theme="light"] #auth-modal .auth-close-btn {
  background: #F8FAFC !important;
  border-color: #E2E8F0 !important;
  color: #64748B !important;
}

html.light-theme #auth-modal .auth-close-btn:hover,
body.light-theme #auth-modal .auth-close-btn:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}

html.light-theme #auth-modal-title,
body.light-theme #auth-modal-title,
html.light-theme .modal-box h2,
body.light-theme .modal-box h2 {
  color: #0F172A !important;
}

html.light-theme #auth-modal-sub,
body.light-theme #auth-modal-sub,
html.light-theme .modal-box p,
body.light-theme .modal-box p {
  color: #475569 !important;
}

html.light-theme .auth-tabs-row,
body.light-theme .auth-tabs-row,
html[data-theme="light"] .auth-tabs-row,
body[data-theme="light"] .auth-tabs-row {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
}

html.light-theme .auth-tab-btn,
body.light-theme .auth-tab-btn,
html[data-theme="light"] .auth-tab-btn,
body[data-theme="light"] .auth-tab-btn {
  color: #64748B !important;
}

html.light-theme .auth-tab-btn.active,
body.light-theme .auth-tab-btn.active,
html[data-theme="light"] .auth-tab-btn.active,
body[data-theme="light"] .auth-tab-btn.active {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border-color: rgba(180, 83, 9, 0.28) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

html.light-theme .auth-welcome-chip,
body.light-theme .auth-welcome-chip,
html[data-theme="light"] .auth-welcome-chip,
body[data-theme="light"] .auth-welcome-chip {
  background: #FFFBEB !important;
  border-color: #FDE68A !important;
  color: #334155 !important;
}

html.light-theme .auth-welcome-chip strong,
body.light-theme .auth-welcome-chip strong {
  color: #B45309 !important;
}

html.light-theme .auth-welcome-icon,
body.light-theme .auth-welcome-icon {
  color: #B45309 !important;
}

html.light-theme .auth-input-group label,
body.light-theme .auth-input-group label,
html.light-theme #form-claim-account label,
body.light-theme #form-claim-account label {
  color: #334155 !important;
  font-weight: 600 !important;
}

html.light-theme .auth-input-group label .auth-label-muted,
body.light-theme .auth-input-group label .auth-label-muted,
html.light-theme .auth-otp-meta,
body.light-theme .auth-otp-meta,
html.light-theme .auth-field-meta,
body.light-theme .auth-field-meta {
  color: #64748B !important;
}

html.light-theme .auth-field-error,
body.light-theme .auth-field-error {
  color: #DC2626 !important;
}

html.light-theme .auth-ref-bonus,
body.light-theme .auth-ref-bonus {
  color: #B45309 !important;
}

html.light-theme .auth-required-badge,
body.light-theme .auth-required-badge {
  background: #FEF3C7 !important;
  border-color: #FCD34D !important;
  color: #92400E !important;
}

/* Integrated Input Shells in Light Theme */
html.light-theme .auth-dialog .auth-input-shell,
body.light-theme .auth-dialog .auth-input-shell,
html[data-theme="light"] .auth-dialog .auth-input-shell,
body[data-theme="light"] .auth-dialog .auth-input-shell {
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: none !important;
}

html.light-theme .auth-dialog .auth-input-shell:focus-within,
body.light-theme .auth-dialog .auth-input-shell:focus-within,
html[data-theme="light"] .auth-dialog .auth-input-shell:focus-within,
body[data-theme="light"] .auth-dialog .auth-input-shell:focus-within {
  background: #FFFFFF !important;
  border-color: #B45309 !important;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
}

html.light-theme .auth-dialog .auth-input-group.error .auth-input-shell,
body.light-theme .auth-dialog .auth-input-group.error .auth-input-shell {
  border-color: #DC2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14) !important;
}

html.light-theme .auth-dialog .auth-input-shell input,
body.light-theme .auth-dialog .auth-input-shell input,
html[data-theme="light"] .auth-dialog .auth-input-shell input,
body[data-theme="light"] .auth-dialog .auth-input-shell input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #0F172A !important;
}

html.light-theme .auth-dialog .auth-input-shell input::placeholder,
body.light-theme .auth-dialog .auth-input-shell input::placeholder {
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
}

html.light-theme .auth-eye-btn,
body.light-theme .auth-eye-btn {
  color: #64748B !important;
}

html.light-theme .auth-eye-btn:hover,
body.light-theme .auth-eye-btn:hover {
  color: #0F172A !important;
  background: rgba(15, 23, 42, 0.04) !important;
}

html.light-theme .auth-inline-secondary-btn,
body.light-theme .auth-inline-secondary-btn {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #334155 !important;
}

html.light-theme .auth-inline-secondary-btn:hover:not(:disabled),
body.light-theme .auth-inline-secondary-btn:hover:not(:disabled) {
  background: #FFFBEB !important;
  border-color: #D4AF37 !important;
  color: #92400E !important;
}

html.light-theme .auth-oauth-divider,
body.light-theme .auth-oauth-divider {
  color: #64748B !important;
}

html.light-theme .auth-oauth-divider::before,
body.light-theme .auth-oauth-divider::before,
html.light-theme .auth-oauth-divider::after,
body.light-theme .auth-oauth-divider::after {
  background: #E2E8F0 !important;
}

html.light-theme .auth-dialog-footer,
body.light-theme .auth-dialog-footer {
  border-top-color: #E2E8F0 !important;
}

html.light-theme .auth-guest-btn,
body.light-theme .auth-guest-btn {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
  color: #334155 !important;
}

html.light-theme .auth-guest-btn:hover,
body.light-theme .auth-guest-btn:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}

html.light-theme .auth-footer-switch-wrap,
body.light-theme .auth-footer-switch-wrap,
html.light-theme .auth-back-link,
body.light-theme .auth-back-link {
  color: #64748B !important;
}

html.light-theme .auth-footer-switch-btn,
body.light-theme .auth-footer-switch-btn {
  color: #B45309 !important;
}

/* Claim Modal & Generic Form Inputs */
html.light-theme #modal-claim-account .auth-input-group input,
body.light-theme #modal-claim-account .auth-input-group input,
html.light-theme #claim-account-otp,
body.light-theme #claim-account-otp,
html.light-theme .input-with-action input,
body.light-theme .input-with-action input,
html.light-theme .form-input,
body.light-theme .form-input {
  background: #F8FAFC !important;
  border: 1.5px solid #CBD5E1 !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #0F172A !important;
  font-weight: 600 !important;
}

html.light-theme #modal-claim-account .auth-input-group input::placeholder,
body.light-theme #modal-claim-account .auth-input-group input::placeholder,
html.light-theme .input-with-action input::placeholder,
body.light-theme .input-with-action input::placeholder,
html.light-theme .form-input::placeholder,
body.light-theme .form-input::placeholder {
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
}

html.light-theme #modal-claim-account .auth-input-group input:focus,
body.light-theme #modal-claim-account .auth-input-group input:focus,
html.light-theme #claim-account-otp:focus,
body.light-theme #claim-account-otp:focus,
html.light-theme .input-with-action input:focus,
body.light-theme .input-with-action input:focus,
html.light-theme .form-input:focus,
body.light-theme .form-input:focus {
  background: #FFFFFF !important;
  border-color: #D4AF37 !important;
  color: #0F172A !important;
  -webkit-text-fill-color: #0F172A !important;
  caret-color: #0F172A !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25) !important;
}

/* Chrome / Safari autofill support */
html.light-theme input:-webkit-autofill,
body.light-theme input:-webkit-autofill,
html[data-theme="light"] input:-webkit-autofill,
body[data-theme="light"] input:-webkit-autofill,
html.light-theme input:-webkit-autofill:hover,
body.light-theme input:-webkit-autofill:hover,
html.light-theme input:-webkit-autofill:focus,
body.light-theme input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0F172A !important;
  -webkit-box-shadow: 0 0 0px 1000px #F8FAFC inset !important;
  transition: background-color 5000s ease-in-out 0s;
  color: #0F172A !important;
}

html.light-theme input::selection,
body.light-theme input::selection {
  background: #D4AF37 !important;
  color: #0B0E14 !important;
  -webkit-text-fill-color: #0B0E14 !important;
}

html.light-theme .btn-roll-dice,
body.light-theme .btn-roll-dice {
  background: #F1F5F9 !important;
  border: 1.5px solid #CBD5E1 !important;
  color: #B45309 !important;
}

html.light-theme .btn-roll-dice:hover,
body.light-theme .btn-roll-dice:hover {
  background: #E2E8F0 !important;
  border-color: #D4AF37 !important;
}

html.light-theme .auth-alert-box.info,
body.light-theme .auth-alert-box.info {
  background: #FEF3C7 !important;
  border-color: #F59E0B !important;
  color: #92400E !important;
}

html.light-theme .auth-alert-box.error,
body.light-theme .auth-alert-box.error {
  background: #FEE2E2 !important;
  border-color: #F87171 !important;
  color: #B91C1C !important;
}

html.light-theme .auth-alert-box.success,
body.light-theme .auth-alert-box.success {
  background: #D1FAE5 !important;
  border-color: #34D399 !important;
  color: #065F46 !important;
}

html.light-theme .auth-text-link,
body.light-theme .auth-text-link {
  color: #B45309 !important;
}

/* ==========================================================================
   SUNDAY PROMOTION TOURNAMENT HEADER PILL (DESKTOP)
   ========================================================================== */
.header-sunday-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 183, 3, 0.08);
  border: 1px solid rgba(255, 183, 3, 0.35);
  border-radius: 999px;
  padding: 0 10px;
  height: 26px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all var(--trans-fast);
  user-select: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-sunday-label,
.header-sunday-join-btn {
  display: none !important;
}

.header-sunday-timer-pill:hover {
  background: rgba(255, 183, 3, 0.16);
  border-color: rgba(255, 183, 3, 0.65);
  box-shadow: 0 0 14px rgba(255, 183, 3, 0.25);
  transform: translateY(-1px);
}

.sunday-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FFB703;
  box-shadow: 0 0 6px #FFB703;
  animation: pulseGoldDot 1.5s infinite ease-in-out;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes pulseGoldDot {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 10px #FFB703;
  }
}

.header-sunday-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--cote-gold);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.header-sunday-val {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.4px;
}

.header-sunday-join-btn {
  background: linear-gradient(135deg, #FFB703, #F59E0B);
  color: #1A1100;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: transform var(--trans-fast);
}

.header-sunday-timer-pill:hover .header-sunday-join-btn {
  transform: scale(1.05);
}

/* ==========================================================================
   MINI SLIDEABLE SUNDAY TOURNAMENT SIDEBAR (MOBILE)
   ========================================================================== */
.mobile-slide-sunday-widget {
  position: fixed;
  top: 135px;
  right: 0;
  z-index: 600;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
}

.mobile-slide-sunday-widget.hidden-by-setting {
  display: none !important;
}

/* Tab Handle protruding on the right screen edge */
.mobile-slide-sunday-handle {
  pointer-events: auto;
  position: relative;
  background: rgba(18, 19, 23, 0.95);
  border: 1px solid rgba(255, 183, 3, 0.5);
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 10px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: -4px 4px 18px rgba(0, 0, 0, 0.65), 0 0 14px rgba(255, 183, 3, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--cote-gold);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
  user-select: none;
}

.mobile-slide-sunday-handle:active {
  transform: scale(0.95);
}

.mobile-slide-handle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFB703;
  box-shadow: 0 0 8px #FFB703;
  animation: pulseGoldDot 1.5s infinite ease-in-out;
}

.mobile-slide-handle-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cote-gold);
}

.mobile-slide-handle-icon svg {
  width: 16px;
  height: 16px;
}

.mobile-slide-handle-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  margin: 2px 0;
}

.mobile-slide-handle-arrow {
  font-size: 1rem;
  line-height: 1;
  color: var(--cote-gold);
  font-weight: bold;
  transition: transform 0.3s ease;
}

.mobile-slide-sunday-widget.open .mobile-slide-handle-arrow {
  transform: rotate(180deg);
}

/* Slide Drawer Container */
.mobile-slide-sunday-drawer {
  pointer-events: auto;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88vw, 340px);
  background: rgba(14, 15, 18, 0.98);
  border-left: 1px solid rgba(255, 183, 3, 0.35);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 605;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: env(safe-area-inset-top, 16px) 18px env(safe-area-inset-bottom, 24px) 18px;
}

.mobile-slide-sunday-widget.open .mobile-slide-sunday-drawer {
  transform: translateX(0);
}

/* Backdrop */
.mobile-slide-backdrop {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 604;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-slide-sunday-widget.open .mobile-slide-backdrop {
  pointer-events: auto;
  opacity: 1;
}

/* Drawer Header */
.mobile-slide-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-slide-drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-slide-title-trophy {
  width: 24px;
  height: 24px;
  color: var(--cote-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-slide-drawer-title h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFFFFF;
}

.mobile-slide-sub {
  font-size: 0.7rem;
  color: var(--cote-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-slide-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.mobile-slide-close-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.15);
}

/* Drawer Body */
.mobile-slide-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
}

/* Timer Box */
.mobile-slide-timer-box {
  background: rgba(255, 183, 3, 0.08);
  border: 1px solid rgba(255, 183, 3, 0.25);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.mobile-slide-timer-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--cote-gold);
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.mobile-slide-timer-digits {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 1px;
}

/* Rule Card */
.mobile-slide-rule-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px;
}

.mobile-slide-ladder-path {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 4px;
}

.ladder-step {
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.ladder-step.step-d {
  background: rgba(148, 163, 184, 0.15);
  color: #CBD5E1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.ladder-step.step-elite {
  background: rgba(255, 183, 3, 0.2);
  color: var(--cote-gold);
  border: 1px solid rgba(255, 183, 3, 0.45);
}

.ladder-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.mobile-slide-rule-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.mobile-slide-rule-desc strong {
  color: #FFFFFF;
}

/* Action CTAs */
.mobile-slide-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.mobile-slide-btn-enter {
  width: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.mobile-slide-btn-hide-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  padding: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.mobile-slide-btn-hide-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

/* Light Theme Overrides */
body.light-theme .header-sunday-timer-pill {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(217, 119, 6, 0.4);
}

body.light-theme .header-sunday-val {
  color: #1E293B;
}

body.light-theme .header-sunday-label {
  color: #B45309;
}

body.light-theme .arena-btn-start {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4);
}

body.light-theme .arena-btn-start:hover {
  background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.55);
  color: #FFFFFF;
}

body.light-theme .mobile-slide-sunday-handle {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: -4px 4px 18px rgba(0, 0, 0, 0.12), 0 0 12px rgba(245, 158, 11, 0.2);
  color: #B45309;
}

body.light-theme .mobile-slide-handle-text {
  color: #0F172A;
}

body.light-theme .mobile-slide-sunday-drawer {
  background: rgba(255, 255, 255, 0.98);
  border-left-color: rgba(217, 119, 6, 0.35);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
}

body.light-theme .mobile-slide-drawer-title h4 {
  color: #0F172A;
}

body.light-theme .mobile-slide-timer-box {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(217, 119, 6, 0.35);
}

body.light-theme .mobile-slide-timer-digits {
  color: #0F172A;
}

body.light-theme .mobile-slide-rule-card {
  background: #F8FAFC;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .mobile-slide-rule-desc {
  color: #475569;
}

body.light-theme .mobile-slide-rule-desc strong {
  color: #0F172A;
}

body.light-theme .mobile-slide-btn-hide-toggle {
  border-color: rgba(0, 0, 0, 0.12);
  color: #64748B;
}

/* ==========================================================================
   LIGHT THEME OVERRIDES FOR PREMIUM STORE & MARKETPLACE
   ========================================================================== */
html.light-theme .store-header-bar,
body.light-theme .store-header-bar {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

html.light-theme .store-header-title,
body.light-theme .store-header-title {
  color: #0F172A !important;
}

html.light-theme .store-header-subtitle,
body.light-theme .store-header-subtitle {
  color: #475569 !important;
}

html.light-theme .store-wallet-pill,
body.light-theme .store-wallet-pill {
  background: #F8FAFC !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #0F172A !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

html.light-theme .store-pill-value,
body.light-theme .store-pill-value {
  color: #0F172A !important;
}

html.light-theme .store-pill-unit,
body.light-theme .store-pill-unit {
  color: #64748B !important;
}

html.light-theme .store-pill-icon,
body.light-theme .store-pill-icon {
  color: #D97706 !important;
}

html.light-theme .store-wallet-pill.salary-pill,
body.light-theme .store-wallet-pill.salary-pill {
  background: rgba(245, 158, 11, 0.08) !important;
  border: 1px solid rgba(217, 119, 6, 0.3) !important;
}

html.light-theme .store-wallet-pill.salary-pill .store-pill-value.salary-val,
body.light-theme .store-wallet-pill.salary-pill .store-pill-value.salary-val {
  color: #B45309 !important;
}

html.light-theme .salary-status-text,
body.light-theme .salary-status-text {
  color: #059669 !important;
}

html.light-theme .salary-indicator-dot,
body.light-theme .salary-indicator-dot {
  background: #D97706 !important;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.5) !important;
}

html.light-theme .store-passive-income-badge,
body.light-theme .store-passive-income-badge {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(217, 119, 6, 0.35) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme .passive-income-live-pill,
body.light-theme .passive-income-live-pill {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

html.light-theme .store-segmented-tabs,
body.light-theme .store-segmented-tabs {
  background: #F1F5F9 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light-theme .store-segment-btn,
body.light-theme .store-segment-btn {
  color: #475569 !important;
}

html.light-theme .store-segment-btn:hover,
body.light-theme .store-segment-btn:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #0F172A !important;
}

html.light-theme .store-segment-btn.active,
body.light-theme .store-segment-btn.active {
  background: #FFFFFF !important;
  border-color: #F59E0B !important;
  color: #0F172A !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

html.light-theme .store-tab-counter,
body.light-theme .store-tab-counter {
  background: #E2E8F0 !important;
  color: #475569 !important;
}

html.light-theme .store-segment-btn.active .store-tab-counter,
body.light-theme .store-segment-btn.active .store-tab-counter {
  color: #B45309 !important;
  background: rgba(245, 158, 11, 0.15) !important;
}

html.light-theme .store-search-box input,
body.light-theme .store-search-box input {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0F172A !important;
}

html.light-theme .store-search-box input:focus,
body.light-theme .store-search-box input:focus {
  border-color: #0284C7 !important;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.18) !important;
}

html.light-theme .store-search-icon,
body.light-theme .store-search-icon {
  color: #64748B !important;
}

html.light-theme .store-search-clear-btn,
body.light-theme .store-search-clear-btn {
  color: #64748B !important;
}

html.light-theme .store-search-clear-btn:hover,
body.light-theme .store-search-clear-btn:hover {
  color: #0F172A !important;
}

html.light-theme .store-select-dropdown,
body.light-theme .store-select-dropdown {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0F172A !important;
}

html.light-theme .store-select-dropdown:hover,
html.light-theme .store-select-dropdown:focus,
body.light-theme .store-select-dropdown:hover,
body.light-theme .store-select-dropdown:focus {
  border-color: #0284C7 !important;
  color: #0F172A !important;
}

/* Shop Product Cards */
html.light-theme .shop-card,
body.light-theme .shop-card {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme .shop-card:hover,
body.light-theme .shop-card:hover {
  border-color: rgba(217, 119, 6, 0.45) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08), 0 0 14px rgba(245, 158, 11, 0.08) !important;
}

html.light-theme .shop-card:hover .shop-card-title,
body.light-theme .shop-card:hover .shop-card-title {
  color: #B45309 !important;
}

html.light-theme .shop-card.is-equipped,
body.light-theme .shop-card.is-equipped {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06), #FFFFFF) !important;
  border-color: rgba(217, 119, 6, 0.5) !important;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.1) !important;
}

html.light-theme .shop-card.is-owned,
body.light-theme .shop-card.is-owned {
  border-color: rgba(16, 185, 129, 0.35) !important;
}

html.light-theme .shop-card-preview,
body.light-theme .shop-card-preview {
  background: #F8FAFC !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

html.light-theme .preview-hover-hint,
body.light-theme .preview-hover-hint {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #0F172A !important;
}

html.light-theme .preview-click-hint,
body.light-theme .preview-click-hint {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #334155 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

html.light-theme .micro-board-grid,
body.light-theme .micro-board-grid {
  border-color: rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

html.light-theme .piece-stage,
body.light-theme .piece-stage {
  background: radial-gradient(circle at center 60%, rgba(226, 232, 240, 0.9), rgba(241, 245, 249, 0.98)) !important;
}

html.light-theme .piece-glyph-podium,
html.light-theme .stage-piece-glyph,
body.light-theme .piece-glyph-podium,
body.light-theme .stage-piece-glyph {
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.18)) !important;
}

html.light-theme .shop-card-title,
body.light-theme .shop-card-title {
  color: #0F172A !important;
}

html.light-theme .shop-card-desc,
body.light-theme .shop-card-desc {
  color: #475569 !important;
}

html.light-theme .badge-status-equipped,
body.light-theme .badge-status-equipped {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #B45309 !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

html.light-theme .badge-status-owned,
body.light-theme .badge-status-owned {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

html.light-theme .btn-shop-buy,
body.light-theme .btn-shop-buy {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.28)) !important;
  border-color: rgba(217, 119, 6, 0.5) !important;
  color: #B45309 !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12) !important;
}

html.light-theme .btn-shop-buy:hover,
body.light-theme .btn-shop-buy:hover {
  background: linear-gradient(135deg, #F59E0B, #D97706) !important;
  border-color: #B45309 !important;
  color: #FFFFFF !important;
}

html.light-theme .btn-shop-rent,
body.light-theme .btn-shop-rent {
  background: #F8FAFC !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #334155 !important;
}

html.light-theme .btn-shop-rent:hover,
body.light-theme .btn-shop-rent:hover {
  background: #F1F5F9 !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
  color: #0F172A !important;
}

html.light-theme .btn-shop-equip,
body.light-theme .btn-shop-equip {
  background: rgba(2, 132, 199, 0.1) !important;
  border-color: rgba(2, 132, 199, 0.35) !important;
  color: #0284C7 !important;
}

html.light-theme .btn-shop-equip:hover,
body.light-theme .btn-shop-equip:hover {
  background: #0284C7 !important;
  border-color: #0284C7 !important;
  color: #FFFFFF !important;
}

html.light-theme .btn-shop-equipped,
body.light-theme .btn-shop-equipped {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #059669 !important;
}

html.light-theme .store-empty-catalog,
body.light-theme .store-empty-catalog {
  background: #FFFFFF !important;
  border: 1px dashed rgba(0, 0, 0, 0.15) !important;
}

/* Store Purchase & Theme Preview Modals */
html.light-theme .store-purchase-modal-box,
html.light-theme .theme-preview-modal-box,
body.light-theme .store-purchase-modal-box,
body.light-theme .theme-preview-modal-box {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0F172A !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

html.light-theme .store-purchase-title,
html.light-theme .theme-preview-title-text,
html.light-theme .store-purchase-item-text h3,
body.light-theme .store-purchase-title,
body.light-theme .theme-preview-title-text,
body.light-theme .store-purchase-item-text h3 {
  color: #0F172A !important;
}

html.light-theme .theme-preview-desc-text,
html.light-theme .store-purchase-item-cat,
body.light-theme .theme-preview-desc-text,
body.light-theme .store-purchase-item-cat {
  color: #475569 !important;
}

html.light-theme .store-purchase-item-summary,
body.light-theme .store-purchase-item-summary {
  background: #F8FAFC !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light-theme .store-purchase-item-icon,
body.light-theme .store-purchase-item-icon {
  background: #F1F5F9 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

html.light-theme .store-purchase-breakdown,
body.light-theme .store-purchase-breakdown {
  background: #F8FAFC !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light-theme .store-breakdown-row,
body.light-theme .store-breakdown-row {
  color: #475569 !important;
}

html.light-theme .breakdown-val,
html.light-theme .balance-after-row,
body.light-theme .breakdown-val,
body.light-theme .balance-after-row {
  color: #0F172A !important;
}

html.light-theme .breakdown-price,
body.light-theme .breakdown-price {
  color: #B45309 !important;
}

html.light-theme .store-breakdown-divider,
body.light-theme .store-breakdown-divider {
  background: rgba(0, 0, 0, 0.08) !important;
}

html.light-theme .store-purchase-icon-badge,
body.light-theme .store-purchase-icon-badge {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #B45309 !important;
}

/* Settings View Light Theme Refinements */
html.light-theme .settings-card,
body.light-theme .settings-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme .settings-card-title,
body.light-theme .settings-card-title {
  color: #0F172A !important;
}

html.light-theme .settings-card-desc,
body.light-theme .settings-card-desc {
  color: #475569 !important;
}

html.light-theme .settings-theme-option,
body.light-theme .settings-theme-option {
  background: #F8FAFC !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light-theme .settings-theme-option:hover,
body.light-theme .settings-theme-option:hover {
  background: #FFFFFF !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
}

html.light-theme .settings-theme-option.active,
body.light-theme .settings-theme-option.active {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: #F59E0B !important;
}

html.light-theme .theme-option-name,
body.light-theme .theme-option-name {
  color: #0F172A !important;
}

html.light-theme .theme-option-desc,
body.light-theme .theme-option-desc {
  color: #64748B !important;
}

/* Visibility Rules based on viewport width */
@media (min-width: 769px) {
  .mobile-slide-sunday-widget {
    display: none !important;
  }
}

@media (max-width: 768px) {
  #header-sunday-timer-badge {
    display: none !important;
  }
}

/* Light Theme Mode for Play Arena Redesign */
body.light-theme .arena-hero-banner {
  background: radial-gradient(ellipse at top left, #F5EFE3, #FFFFFF) !important;
  border-color: rgba(15, 45, 31, 0.12) !important;
  box-shadow: 0 12px 32px rgba(15, 45, 31, 0.08) !important;
}

body.light-theme .arena-hero-title {
  color: #0F2D1F !important;
}

body.light-theme .arena-hero-subtitle {
  color: #4A6354 !important;
}

body.light-theme .arena-tc-chip {
  background: #FFFFFF !important;
  border-color: rgba(15, 45, 31, 0.12) !important;
}

body.light-theme .arena-tc-chip:hover {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: var(--antique-gold) !important;
}

body.light-theme .arena-tc-chip.active {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: var(--antique-gold) !important;
}

body.light-theme .arena-tc-chip .tc-chip-name {
  color: #0F2D1F !important;
}

body.light-theme .arena-stage-card {
  background: #FDFBF7 !important;
  border-color: rgba(15, 45, 31, 0.1) !important;
}

body.light-theme .arena-hero-user-chip {
  background: #FFFFFF !important;
  border-color: rgba(15, 45, 31, 0.1) !important;
}

body.light-theme .arena-user-display-name {
  color: #0F2D1F !important;
}

body.light-theme .arena-section-title {
  color: #0F2D1F !important;
}

body.light-theme .arena-section-subtitle {
  color: #4A6354 !important;
}

body.light-theme .arena-mode-card {
  background: #FFFFFF !important;
  border-color: rgba(15, 45, 31, 0.1) !important;
  box-shadow: 0 4px 18px rgba(15, 45, 31, 0.06) !important;
}

body.light-theme .arena-mode-card:hover {
  background: #FFFFFF !important;
  border-color: var(--antique-gold) !important;
  box-shadow: 0 12px 28px rgba(15, 45, 31, 0.12) !important;
}

body.light-theme .arena-card-title {
  color: #0F2D1F !important;
}

body.light-theme .arena-card-desc {
  color: #4A6354 !important;
}

body.light-theme .arena-contenders-card,
body.light-theme .arena-sunday-card {
  background: #FFFFFF !important;
  border-color: rgba(15, 45, 31, 0.1) !important;
  box-shadow: 0 4px 18px rgba(15, 45, 31, 0.06) !important;
}

body.light-theme .arena-contenders-title,
body.light-theme .arena-sunday-title {
  color: #0F2D1F !important;
}

body.light-theme .arena-contenders-subtitle,
body.light-theme .arena-sunday-desc {
  color: #4A6354 !important;
}

body.light-theme .arena-contenders-search-box input {
  background: #F8FAF7 !important;
  border-color: rgba(15, 45, 31, 0.15) !important;
  color: #0F2D1F !important;
}

body.light-theme .arena-sunday-countdown-box {
  background: #F8FAF7 !important;
  border-color: rgba(197, 160, 89, 0.4) !important;
}

body.light-theme .lobby-tier-btn {
  background: #F8FAF7 !important;
  color: #4A6354 !important;
  border-color: rgba(15, 45, 31, 0.12) !important;
}

body.light-theme .lobby-tier-btn.active {
  background: #0F2D1F !important;
  color: #FFFFFF !important;
}

body.light-theme .lobby-contender-card {
  background: #FDFBF7 !important;
  border-color: rgba(15, 45, 31, 0.1) !important;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.04) !important;
}

body.light-theme .lobby-contender-card:hover {
  background: #FFFFFF !important;
  border-color: rgba(225, 29, 72, 0.35) !important;
  box-shadow: 0 6px 16px rgba(15, 45, 31, 0.08) !important;
}

body.light-theme .lobby-contender-name {
  color: #0F2D1F !important;
}

body.light-theme .lobby-contender-meta {
  color: #4A6354 !important;
}

body.light-theme .arena-sunday-rule-callout {
  background: rgba(225, 29, 72, 0.06) !important;
  border-color: rgba(225, 29, 72, 0.2) !important;
  color: #4A6354 !important;
}

body.light-theme .matchmaking-radar-card {
  background: #FFFFFF !important;
  border-color: rgba(225, 29, 72, 0.3) !important;
  box-shadow: 0 10px 30px rgba(15, 45, 31, 0.08) !important;
}

body.light-theme .radar-title {
  color: #0F2D1F !important;
}

body.light-theme .radar-sub {
  color: #4A6354 !important;
}

body.light-theme #matchmaking-radar-modal .radar-modal-box {
  background: #FFFFFF !important;
  color: #0F172A !important;
}

body.light-theme #matchmaking-radar-modal .radar-timer-ticker {
  color: #B45309 !important;
}

body.light-theme #matchmaking-radar-modal #radar-spar-bot-btn {
  border-color: rgba(2, 132, 199, 0.45) !important;
  color: #0369A1 !important;
  background: rgba(2, 132, 199, 0.06) !important;
}

body.light-theme #matchmaking-radar-modal #radar-spar-bot-btn:hover {
  background: rgba(2, 132, 199, 0.12) !important;
  color: #0369A1 !important;
}

body.light-theme #matchmaking-radar-modal #cancel-matchmaking-btn {
  color: #334155 !important;
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
}

body.light-theme #matchmaking-radar-modal #cancel-matchmaking-btn:hover {
  color: #0F172A !important;
  background: #E2E8F0 !important;
  border-color: #94A3B8 !important;
}

body.light-theme #radar-in-queue-count,
body.light-theme #radar-target-rating {
  color: #475569 !important;
}

/* ==========================================================================
   GLOBAL SMOOTHNESS & HARDWARE-ACCELERATED TRANSITIONS
   ========================================================================== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Subtle, high-fps page view crossfade */
.view-content.active, .sub-view.active {
  animation: smoothViewFade 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes smoothViewFade {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   GLOBAL TOAST NOTIFICATIONS (COMPACT, PROFESSIONAL, NON-OBSTRUCTIVE)
   ========================================================================== */
.global-toast-container {
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 1000000;
  pointer-events: none;
  max-width: min(92vw, 420px);
  width: max-content;
}

@media (max-width: 768px) {
  .global-toast-container {
    top: 54px;
    max-width: min(94vw, 360px);
  }
}

.global-toast-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(20, 23, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #F3F4F6;
  font-family: var(--font-main);
  font-size: 0.80rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.global-toast-pill.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.global-toast-pill.toast-hide {
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
}

.global-toast-pill .toast-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.global-toast-pill .toast-icon-wrap svg {
  width: 14px;
  height: 14px;
}

.global-toast-pill .toast-msg-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

@media (max-width: 480px) {
  .global-toast-pill .toast-msg-text {
    max-width: 260px;
    font-size: 0.77rem;
  }
}

.global-toast-pill.toast-success {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 8px rgba(16, 185, 129, 0.12);
}
.global-toast-pill.toast-success .toast-icon-wrap {
  color: #10B981;
}

.global-toast-pill.toast-error {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 8px rgba(239, 68, 68, 0.12);
}
.global-toast-pill.toast-error .toast-icon-wrap {
  color: #EF4444;
}

.global-toast-pill.toast-warning {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 8px rgba(245, 158, 11, 0.12);
}
.global-toast-pill.toast-warning .toast-icon-wrap {
  color: #F59E0B;
}

.global-toast-pill.toast-info {
  border-color: rgba(255, 255, 255, 0.12);
}
.global-toast-pill.toast-info .toast-icon-wrap {
  color: #94A3B8;
}

.global-toast-pill.toast-challenge {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 8px rgba(212, 175, 55, 0.14);
}
.global-toast-pill.toast-challenge .toast-icon-wrap {
  color: var(--royal-gold);
}

body.light-theme .global-toast-pill {
  background: rgba(255, 255, 255, 0.96);
  color: #0F172A;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   CRISP SVG ICONOGRAPHY SYSTEM & COMPETITIVE CHESS COLOR STANDARDS
   Standardized vector geometry matching Chess.com & FIDE esports specs
   ========================================================================== */
.reaction-pill-svg, .emoji-svg-icon, [data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.reaction-pill-svg svg, .emoji-svg-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

[data-icon] > svg {
  display: block;
  flex-shrink: 0;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.18s ease, fill 0.18s ease;
}

/* 1. Time Controls (Esports Chess Standards) */
[data-icon="flame"] { color: #EF4444; } /* Bullet (Ultra-fast flame red-orange) */
[data-icon="zap"] { color: #F59E0B; }   /* Blitz (Lightning amber-yellow) */
[data-icon="clock"] { color: #38BDF8; } /* Rapid / Clocks (Deep calculation sky blue) */
[data-icon="shield"] { color: #10B981; }/* Classical / Fair Play (Royal emerald) */

/* 2. Core Game Modes & Progression */
[data-icon="bot"] { color: #10B981; }   /* AI Bot Sparring (Emerald green) */
[data-icon="puzzle"] { color: #FB923C; }/* Tactical Puzzles (Coral orange) */
[data-icon="swords"] { color: #F59E0B; }/* Ranked 1v1 Arena Matchmaking (Combat gold) */
[data-icon="trophy"] { color: #FBBF24; }/* Tournament Cups & Championships (Warm trophy gold) */
[data-icon="crown"],
[data-icon="chessCrown"] { color: #F59E0B; } /* Royal Imperial Crest / Leaderboard (Imperial gold) */

/* 3. Tactical In-Game Actions & Board Tools */
[data-icon="lightbulb"] { color: #FDE047; } /* Hints & Brilliance (Warm glowing yellow) */
[data-icon="refresh"] { color: #38BDF8; }   /* Board Flip & Move Retry (Ice sky cyan) */
[data-icon="handshake"] { color: #38BDF8; } /* Offer Draw (Diplomatic sky blue) */
[data-icon="flag"] { color: #EF4444; }      /* Resign / Flag Fall (Caution crimson) */
[data-icon="check"],
[data-icon="checkCheck"] { color: #10B981; }/* Verified / Solved / Success (Vibrant green) */
[data-icon="alertTriangle"] { color: #F59E0B; } /* Warning / Demotion Alert (Caution amber) */
[data-icon="target"] { color: #EC4899; }    /* Accuracy / Tactical Target (Focus magenta) */
[data-icon="star"] { color: #FBBF24; }      /* Best Move / Star Player (Radiant gold) */
[data-icon="gift"] { color: #F59E0B; }      /* Welcome Bonus / Vault Rewards (Gift gold) */
[data-icon="sparkles"] { color: #A855F7; }  /* Brilliant Move / VIP Aura (Arcane violet) */
[data-icon="brain"] { color: #EC4899; }     /* Engine Evaluation / Psychology (Neural magenta) */
[data-icon="eye"],
[data-icon="eyeOff"] { color: #38BDF8; }    /* Spectate / Reveal Continuation (Sky blue) */
[data-icon="play"] { color: #F59E0B; }      /* Instant Match / Play Now (Action amber) */
[data-icon="link"],
[data-icon="qrCode"] { color: #38BDF8; }    /* Friend Challenge / Direct Link (Ice sky) */
[data-icon="copy"] { color: #94A3B8; }      /* Copy PGN / Link (Muted slate) */
[data-icon="edit"] { color: #38BDF8; }      /* Edit Profile / Bio (Cyan) */
[data-icon="dice"] { color: #A855F7; }      /* Random Matchmaking (Arcane purple) */
[data-icon="pin"] { color: #10B981; }       /* Pinned Bulletin / Announcement (Emerald) */

/* 4. Navigation & Community */
[data-icon="home"] { color: #10B981; }      /* Sanctuary Home (Emerald) */
[data-icon="grid"] { color: #38BDF8; }      /* Arena Dashboard (Sky cyan) */
[data-icon="messageSquare"] { color: #A78BFA; } /* Global Chat (Lavender violet) */
[data-icon="user"],
[data-icon="users"],
[data-icon="userPlus"] { color: #60A5FA; }  /* Live Players / Profiles (Royal blue) */
[data-icon="store"] { color: #F59E0B; }     /* Royal Store / Vault (Treasury gold) */
[data-icon="points"],
[data-icon="point"],
[data-icon="coin"],
[data-icon="coins"] { color: #F5C518; }     /* $CHESS Currency Coin (Vibrant coin gold) */
[data-icon="book"],
[data-icon="bookOpen"] { color: #818CF8; }  /* Theory / Chess Books / Rules (Royal indigo) */
[data-icon="settings"] { color: #94A3B8; }  /* Board & Account Settings (Metallic slate) */
[data-icon="logOut"] { color: #F43F5E; }    /* Safe Logout (Rose red) */
[data-icon="search"] { color: #94A3B8; }    /* Search Bar (Slate) */
[data-icon="chart"],
[data-icon="trendingUp"] { color: #38BDF8; }/* Rating Curve / Buchholz (Sky cyan) */
[data-icon="layers"] { color: #F59E0B; }    /* Swiss Brackets / Tier Layers (Amber) */
[data-icon="medalGold"] { color: #F59E0B; } /* 1st Place Gold (Pure gold) */
[data-icon="medalSilver"] { color: #E2E8F0; } /* 2nd Place Silver (Platinum silver) */
[data-icon="medalBronze"] { color: #CD7F32; } /* 3rd Place Bronze (Warm bronze) */
[data-icon="heart"] { color: #F43F5E; }     /* Favorite / Heart Reaction (Rose ruby) */
[data-icon="thumbsUp"] { color: #10B981; }  /* Thumbs Up (Emerald green) */
[data-icon="thumbsDown"] { color: #EF4444; }/* Thumbs Down (Crimson red) */
[data-icon="laugh"] { color: #FBBF24; }     /* Laugh Reaction (Warm gold) */
[data-icon="clap"] { color: #FCD34D; }      /* Applause (Bright gold) */
[data-icon="sun"] { color: #F59E0B; }       /* Light Theme Sun (Solar amber) */
[data-icon="moon"] { color: #818CF8; }      /* Dark Theme Moon (Night indigo) */
[data-icon="volume2"],
[data-icon="volumeX"] { color: #38BDF8; }   /* Sound FX Audio (Acoustic cyan) */
[data-icon="mic"],
[data-icon="micOff"] { color: #10B981; }    /* AI Voice Announcer (Voice emerald) */
[data-icon="globe"] { color: #60A5FA; }     /* Localization / Language (Global blue) */
[data-icon="lock"] { color: #EF4444; }      /* Locked Level / Content (Lock red) */
[data-icon="unlock"] { color: #10B981; }    /* Unlocked Reward (Access emerald) */
[data-icon="pawn"] { color: #60A5FA; }      /* Pawn (Royal blue) */

/* High-Contrast Inverted Action Overrides (e.g. solid gold/radiant buttons with dark text) */
.btn-landing-quickplay [data-icon],
.btn-landing-quickplay .ec-svg-icon,
.btn-landing-quickplay svg,
.btn-home-level-play [data-icon],
.btn-home-level-play .ec-svg-icon,
.btn-home-level-play svg,
.dash-btn-start-hero [data-icon],
.dash-btn-start-hero .ec-svg-icon,
.dash-btn-start-hero svg,
#dash-btn-start-game [data-icon],
#dash-btn-start-game .ec-svg-icon,
#dash-btn-start-game svg,
.more-ranked-cta [data-icon],
.more-ranked-cta .ec-svg-icon,
.more-ranked-cta svg,
.arena-btn-start [data-icon],
.arena-btn-start .ec-svg-icon,
.arena-btn-start svg,
.arena-btn-start-hero [data-icon],
.arena-btn-start-hero .ec-svg-icon,
.arena-btn-start-hero svg,
.champ-register-cta-btn [data-icon],
.champ-register-cta-btn .ec-svg-icon,
.champ-register-cta-btn svg,
.btn-puzzle-primary [data-icon],
.btn-puzzle-primary .ec-svg-icon,
.btn-puzzle-primary svg,
.btn-sheet-go-ahead [data-icon],
.btn-sheet-go-ahead .ec-svg-icon,
.btn-sheet-go-ahead svg,
.header-sunday-join-btn [data-icon],
.header-sunday-join-btn .ec-svg-icon,
.header-sunday-join-btn svg,
.btn-enter-live-match [data-icon],
.btn-enter-live-match .ec-svg-icon,
.btn-enter-live-match svg,
.btn-join-tourney [data-icon],
.btn-join-tourney .ec-svg-icon,
.btn-join-tourney svg,
.btn-royal-primary [data-icon],
.btn-royal-primary .ec-svg-icon,
.btn-royal-primary svg,
.btn-esports-primary [data-icon],
.btn-esports-primary .ec-svg-icon,
.btn-esports-primary svg,
.btn-gold [data-icon],
.btn-gold .ec-svg-icon,
.btn-gold svg {
  color: #07090E !important;
  stroke: #07090E !important;
  filter: none !important;
}

.btn-landing-quickplay .ec-svg-icon path,
.btn-landing-quickplay svg path,
.btn-landing-quickplay .ec-svg-icon line,
.btn-landing-quickplay svg line,
.btn-home-level-play .ec-svg-icon path,
.btn-home-level-play .ec-svg-icon polygon,
.btn-home-level-play svg path,
.btn-home-level-play svg polygon,
.dash-btn-start-hero .ec-svg-icon path,
.dash-btn-start-hero svg path,
.dash-btn-start-hero .ec-svg-icon line,
.dash-btn-start-hero svg line,
#dash-btn-start-game .ec-svg-icon path,
#dash-btn-start-game svg path,
#dash-btn-start-game .ec-svg-icon line,
#dash-btn-start-game svg line,
.more-ranked-cta .ec-svg-icon path,
.more-ranked-cta .ec-svg-icon polygon,
.more-ranked-cta svg path,
.more-ranked-cta svg polygon,
.arena-btn-start .ec-svg-icon path,
.arena-btn-start svg path,
.arena-btn-start-hero .ec-svg-icon path,
.arena-btn-start-hero svg path,
.btn-royal-primary .ec-svg-icon path,
.btn-royal-primary .ec-svg-icon polygon,
.btn-royal-primary svg path,
.btn-royal-primary svg polygon,
.btn-royal-primary .ec-svg-icon line,
.btn-royal-primary svg line {
  stroke: #07090E !important;
}

.btn-home-level-play svg polygon,
.btn-home-level-play .ec-svg-icon polygon {
  fill: #07090E !important;
  stroke: #07090E !important;
}

.btn-emerald-primary [data-icon] {
  color: #052E16 !important;
}

/* Subtle scale enhancement on hover for interactive icon containers */
.quickplay-pill:hover [data-icon] > svg,
.home-tactical-mode-card:hover [data-icon] > svg,
.btn-match-tc:hover [data-icon] > svg,
.sidebar-btn:hover [data-icon] > svg,
.mobile-nav-item:hover [data-icon] > svg {
  transform: scale(1.14);
}

.input-emoji-item, .modal-emoji-chip, .react-pick-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
  cursor: pointer;
  padding: 6px;
}

.input-emoji-item:hover, .modal-emoji-chip:hover, .react-pick-item:hover {
  transform: scale(1.18);
  background: rgba(255, 255, 255, 0.08);
}

.rank-badge-svg svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* ==========================================================================
   CURSOR GLOW ACCESSIBILITY & MOBILE TOUCH OVERRIDES
   ========================================================================== */
@media (hover: none), (pointer: coarse) {
  .global-mouse-glow,
  .global-mouse-glow.active {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-mouse-glow,
  .global-mouse-glow.active {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
}



/* ==========================================================================
   ELITECHESS OFFICIAL NEON & METALLIC ICON DESIGN SYSTEM
   Source of Truth: EliteChess Premium Neon Pack & Class Badges
   ========================================================================== */

.ec-icon-pic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

.ec-svg-icon {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  max-width: 100%;
  max-height: 100%;
  flex-shrink: 0;
  pointer-events: none;
  stroke: currentColor;
  color: inherit;
  transition: color 0.18s ease, filter 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Standalone / Card Context Accent Colors */
.ec-svg-icon.ec-accent-gold { color: #F59E0B; }
.ec-svg-icon.ec-accent-blue { color: #38BDF8; }
.ec-svg-icon.ec-accent-green { color: #34D399; }
.ec-svg-icon.ec-accent-purple { color: #A855F7; }
.ec-svg-icon.ec-accent-red { color: #F43F5E; }
.ec-svg-icon.ec-accent-silver { color: #E2E8F0; }

/* Subtle Ambient Glow in Dark Mode */
.ec-accent-gold { filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.4)); }
.ec-accent-blue { filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.4)); }
.ec-accent-green { filter: drop-shadow(0 0 3px rgba(52, 211, 153, 0.4)); }
.ec-accent-purple { filter: drop-shadow(0 0 3px rgba(168, 85, 247, 0.4)); }
.ec-accent-red { filter: drop-shadow(0 0 3px rgba(244, 63, 94, 0.4)); }
.ec-accent-silver { filter: drop-shadow(0 0 2px rgba(226, 232, 240, 0.3)); }

/* ==========================================================================
   THEME RESPONSIVENESS IN NAVIGATION & CONTROLS
   When icons sit inside buttons, sidebar, mobile bar, or tabs, they must
   STRICTLY inherit the state color of their interactive container!
   ========================================================================== */
.sidebar-btn .ec-svg-icon,
.mobile-nav-item .ec-svg-icon,
.nav-tab .ec-svg-icon,
.more-sheet-card .ec-svg-icon,
.btn-landing-quickplay .ec-svg-icon,
.btn-home-level-play .ec-svg-icon,
.dash-btn-start-hero .ec-svg-icon,
.more-ranked-cta .ec-svg-icon,
.arena-btn-start .ec-svg-icon,
.arena-btn-start-hero .ec-svg-icon,
.btn-royal-primary .ec-svg-icon,
.btn-royal-secondary .ec-svg-icon,
.quickplay-pill .ec-svg-icon,
.header-action-btn .ec-svg-icon,
.action-btn-sm .ec-svg-icon {
  color: inherit !important;
  stroke: currentColor !important;
  filter: none;
}

/* Inactive Sidebar State: Muted Slate / Silver */
.sidebar-btn:not(.active):not(:hover) .ec-svg-icon,
.mobile-nav-item:not(.active):not(:hover) .ec-svg-icon {
  color: var(--text-secondary, #94A3B8) !important;
  opacity: 0.85;
}

/* Hover State: Brilliant White with Aura Glow */
.sidebar-btn:hover .ec-svg-icon,
.mobile-nav-item:hover .ec-svg-icon,
.more-sheet-card:hover .ec-svg-icon {
  color: #FFFFFF !important;
  opacity: 1;
  transform: scale(1.12);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7)) !important;
}

/* Active State: Rich Royal Amber Gold with Neon Radiance */
.sidebar-btn.active .ec-svg-icon,
.mobile-nav-item.active .ec-svg-icon,
.nav-tab.active .ec-svg-icon {
  color: var(--royal-gold, #F59E0B) !important;
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.75)) !important;
}

/* ==========================================================================
   LIGHT THEME RESPONSIVENESS (html.light-theme / body.light-theme)
   No washed-out yellow! High-contrast, crystal-clear rendering.
   ========================================================================== */
body.light-theme .ec-svg-icon,
html.light-theme .ec-svg-icon {
  filter: none !important;
}

body.light-theme .sidebar-btn:not(.active):not(:hover) .ec-svg-icon,
html.light-theme .sidebar-btn:not(.active):not(:hover) .ec-svg-icon {
  color: #475569 !important;
  opacity: 0.9;
}

body.light-theme .sidebar-btn:hover .ec-svg-icon,
html.light-theme .sidebar-btn:hover .ec-svg-icon {
  color: #0F172A !important;
  filter: none !important;
}

body.light-theme .sidebar-btn.active .ec-svg-icon,
html.light-theme .sidebar-btn.active .ec-svg-icon {
  color: #B45309 !important;
  filter: drop-shadow(0 1px 2px rgba(180, 83, 9, 0.2)) !important;
}

/* Light Theme Standalone Overrides for Maximum Legibility */
body.light-theme .ec-accent-gold,
html.light-theme .ec-accent-gold {
  color: #B45309;
}
body.light-theme .ec-accent-blue,
html.light-theme .ec-accent-blue {
  color: #0284C7;
}
body.light-theme .ec-accent-green,
html.light-theme .ec-accent-green {
  color: #059669;
}
body.light-theme .ec-accent-purple,
html.light-theme .ec-accent-purple {
  color: #7C3AED;
}

.ec-neon-icon {
  display: block;
  width: 20px;
  height: 20px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.35));
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease;
}

/* Sidebar & Mobile Nav Sizing */
.sidebar-icon .ec-neon-icon,
.sidebar-icon .ec-svg-icon {
  width: 22px;
  height: 22px;
}

.mobile-nav-item .icon .ec-neon-icon,
.mobile-nav-item .icon .ec-svg-icon,
.mobile-nav-img-icon,
.mobile-nav-img-icon .ec-svg-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Interactive Hover Enhancements */
.sidebar-btn:hover .ec-neon-icon,
.sidebar-btn:hover .ec-svg-icon,
.mobile-nav-item:hover .ec-neon-icon,
.mobile-nav-item:hover .ec-svg-icon,
.nav-tab:hover .ec-neon-icon,
.nav-tab:hover .ec-svg-icon,
.btn-royal-primary:hover .ec-neon-icon,
.btn-royal-primary:hover .ec-svg-icon,
.quickplay-pill:hover .ec-neon-icon,
.quickplay-pill:hover .ec-svg-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 0 8px rgba(255, 224, 102, 0.85));
}

/* Class Badge Graphical System */
.tier-badge-pic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

.tier-badge-graphic {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  pointer-events: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}

/* Structure of Unified User Tier Badges */
.user-tier-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.user-tier-badge .tier-badge-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
}

.user-tier-badge .tier-badge-icon .tier-badge-graphic {
  width: 18px !important;
  height: 18px !important;
}

/* Official Class Color Identities & Glows (Prompt Spec) */
/* Class D: Metallic Silver */
.user-tier-badge.tier-d,
.class-badge-d {
  background: rgba(148, 163, 184, 0.14) !important;
  color: #CBD5E1 !important;
  border: 1px solid rgba(203, 213, 225, 0.45) !important;
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.2) !important;
}
.tier-badge-graphic.tier-badge-d,
.tier-badge-d .tier-badge-graphic {
  filter: drop-shadow(0 0 5px rgba(203, 213, 225, 0.75));
}

/* Class C: Emerald Green */
.user-tier-badge.tier-c,
.class-badge-c {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #10B981 !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25) !important;
}
.tier-badge-graphic.tier-badge-c,
.tier-badge-c .tier-badge-graphic {
  filter: drop-shadow(0 0 5px rgba(34, 197, 94, 0.8));
}

/* Class B: Electric Blue */
.user-tier-badge.tier-b,
.class-badge-b {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #38BDF8 !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25) !important;
}
.tier-badge-graphic.tier-badge-b,
.tier-badge-b .tier-badge-graphic {
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.8));
}

/* Class A: Royal Purple */
.user-tier-badge.tier-a,
.class-badge-a {
  background: rgba(168, 85, 247, 0.14) !important;
  color: #C084FC !important;
  border: 1px solid rgba(168, 85, 247, 0.45) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.25) !important;
}
.tier-badge-graphic.tier-badge-a,
.tier-badge-a .tier-badge-graphic {
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.85));
}

/* Elite: Legendary Gold */
.user-tier-badge.tier-elite,
.class-badge-elite {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #F59E0B !important;
  border: 1px solid rgba(245, 158, 11, 0.55) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35) !important;
}
.tier-badge-graphic.tier-badge-elite,
.tier-badge-elite .tier-badge-graphic {
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.9));
}

/* Large Class Badges for Profile & Tournament Headers */
.profile-tier-badge-large .tier-badge-graphic,
.modal-profile-tier-badge .tier-badge-graphic {
  width: 26px !important;
  height: 26px !important;
}

/* ==========================================================================
   WHOLE-SITE FRIENDLY POLISH & SMOOTH MOTION LAYER
   ========================================================================== */
@keyframes ecRiseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes ecModalSpring {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Crisp Landing Hero Stagger */
#view-landing.active .landing-hero-badge {
  animation: ecRiseIn 0.36s cubic-bezier(0.16, 1, 0.3, 1) 0.03s both;
}

#view-landing.active .landing-hero-title {
  animation: ecRiseIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

#view-landing.active .landing-hero-subtitle {
  animation: ecRiseIn 0.44s cubic-bezier(0.16, 1, 0.3, 1) 0.13s both;
}

#view-landing.active .landing-quickplay-box {
  animation: ecRiseIn 0.48s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

/* Economy 5-Class Staggered Entrance & Friendly Hover Lift */
.landing-tier-card {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.28s ease, box-shadow 0.28s ease !important;
}

.landing-tier-card:hover {
  transform: translateY(-4px);
}

.landing-tier-card .tier-badge-graphic {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-tier-card:hover .tier-badge-graphic {
  transform: scale(1.08);
}

#view-landing.active .landing-tier-card:nth-child(1) { animation: ecRiseIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both; }
#view-landing.active .landing-tier-card:nth-child(2) { animation: ecRiseIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.10s both; }
#view-landing.active .landing-tier-card:nth-child(3) { animation: ecRiseIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
#view-landing.active .landing-tier-card:nth-child(4) { animation: ecRiseIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.20s both; }
#view-landing.active .landing-tier-card:nth-child(5) { animation: ecRiseIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }

/* Lobby / Dashboard Stat Cards & Quick Actions */
#view-dashboard.active .dash-stat-card,
#view-dashboard.active .quick-action-btn {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

#view-dashboard.active .dash-stat-card:hover,
#view-dashboard.active .quick-action-btn:hover {
  transform: translateY(-3px);
}

/* Sidebar Active Indicator & Smooth Shift */
.sidebar-btn {
  position: relative;
}

.sidebar-btn.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 22%;
  height: 56%;
  width: 3px;
  border-radius: 3px;
  background: #FFB703;
  box-shadow: 0 0 8px rgba(255, 183, 3, 0.55);
}

/* Physical Press Feel on Primary Interactive Controls */
.btn-royal-primary:active,
.btn-royal-secondary:active,
.btn-landing-quickplay:active,
.quickplay-pill:active,
.quick-action-btn:active,
.sidebar-btn:active,
.mobile-nav-item:active {
  transform: scale(0.975) !important;
}

/* Spring Reveal on Modals */
.modal-overlay.active {
  animation: ecBackdropFade 0.2s ease both;
}

.modal-overlay.active .modal-box {
  animation: ecModalSpring 0.28s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

/* Calm Brand Icon (No Endless Bobbing, Subtle Hover Micro-Interaction) */
.brand-icon-crown,
.brand-logo:hover .brand-icon-crown {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo:hover .brand-icon-crown {
  transform: scale(1.06);
}

/* Friendly Typography Focus States */
input:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(245, 158, 11, 0.65);
  outline-offset: 2px;
}

/* Harmonized Button & Active Tab Icon Contrast */
.btn-royal-primary .ec-svg-icon,
.btn-landing-quickplay .ec-svg-icon,
.playbot-play-btn .ec-svg-icon,
.dash-btn-start-hero .ec-svg-icon,
.auth-primary-cta .ec-svg-icon,
.tourney-primary-register-btn .ec-svg-icon,
.puzzle-mode-tab.active .ec-svg-icon,
.store-segment-btn.active .ec-svg-icon,
.emp-main-tab-btn.active .ec-svg-icon,
.emp-upgrade-btn.ready .ec-svg-icon,
.emp-streak-btn:not(:disabled) .ec-svg-icon {
  color: currentColor !important;
  filter: none !important;
}

/* Accessibility: Honor Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
