/* ── PREMIUM CYBER-DOCK HEADER STYLE ── */

.header-nav.dock-outer {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  scrollbar-width: none;
}

.header-nav .dock-panel {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 1.2rem;
  border-radius: 2rem;
  background-color: rgba(18, 15, 23, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 16px;
  height: 52px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.header-nav .dock-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(18, 15, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  width: 40px;
  height: 40px;
  cursor: pointer;
  outline: none;
  transition: width 0.15s cubic-bezier(0.25, 1, 0.5, 1), height 0.15s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s, border-color 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.header-nav .dock-item:hover {
  background-color: rgba(0, 255, 100, 0.08);
  border-color: rgba(0, 255, 100, 0.3);
}

.header-nav .dock-item.active {
  background-color: rgba(0, 255, 100, 0.12);
  border-color: #00ff64;
  box-shadow: 0 0 12px rgba(0, 255, 100, 0.25);
}

.header-nav .dock-item.active svg {
  color: #00ff64;
}

.header-nav .dock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.header-nav .dock-icon svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  transition: transform 0.2s, stroke 0.2s;
}

.header-nav .dock-item:hover .dock-icon svg {
  transform: scale(1.1);
  stroke: #00ff64;
}

.header-nav .dock-label {
  position: absolute;
  top: 3.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: fit-content;
  white-space: pre;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: #120f17;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.25, 1, 0.5, 1), transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-nav .dock-item:hover .dock-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── GOOEY NAV PARTICLE ANIMATION ── */
:root {
  --color-1: #00ff64; /* Cyber green */
  --color-2: #00f0ff; /* Cyan */
  --color-3: #ff0055; /* Hot pink */
  --color-4: #ffb300; /* Gold */
}

.gooey-filter-container {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  z-index: 5;
  display: block;
}

.gooey-filter-container.effect.filter {
  filter: blur(6px) contrast(15);
  mix-blend-mode: lighten;
}

.gooey-filter-container.effect.filter::before {
  content: '';
  position: absolute;
  inset: -60px;
  z-index: -2;
  background: black;
}

.particle,
.point {
  display: block;
  opacity: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform-origin: center;
}

.particle {
  --time: 600ms;
  position: absolute;
  top: calc(50% - 7px);
  left: calc(50% - 7px);
  animation: gooeyParticle calc(var(--time)) ease 1 -350ms;
}

.point {
  background: var(--color, white);
  opacity: 1;
  animation: gooeyPoint calc(var(--time)) ease 1 -350ms;
}

@keyframes gooeyParticle {
  0% {
    transform: rotate(0deg) translate(0px, 0px);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  70% {
    transform: rotate(calc(var(--rotate) * 0.5)) translate(calc(var(--end-x) * 1.2), calc(var(--end-y) * 1.2));
    opacity: 1;
    animation-timing-function: ease;
  }
  85% {
    transform: rotate(calc(var(--rotate) * 0.66)) translate(calc(var(--end-x)), calc(var(--end-y)));
    opacity: 1;
  }
  100% {
    transform: rotate(calc(var(--rotate) * 1.2)) translate(calc(var(--end-x) * 0.5), calc(var(--end-y) * 0.5));
    opacity: 1;
  }
}

@keyframes gooeyPoint {
  0% {
    transform: scale(0);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  25% {
    transform: scale(calc(var(--scale) * 0.25));
  }
  38% {
    opacity: 1;
  }
  65% {
    transform: scale(var(--scale));
    opacity: 1;
    animation-timing-function: ease;
  }
  85% {
    transform: scale(var(--scale));
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

.has-gooey-burst:not(.action) {
  position: relative !important;
}

/* ── MAINFRAME LOADER GLOBAL STYLING ── */
.m-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.85) 0%, rgba(4, 6, 18, 0.95) 100%),
    linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px, 30px 30px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 20px;
}
.m-card {
  --bg-color: #111;
  background-color: var(--bg-color);
  padding: 1rem 2rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}
.m-loader {
  color: rgb(124, 124, 124);
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: calc(25px * var(--font-scale, 1));
  -webkit-box-sizing: content-box;
  box-sizing: content-box;
  height: 40px;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  border-radius: 8px;
}
.m-loader p {
  margin: 0;
  line-height: 40px;
  font-weight: bold;
  font-family: 'Pacifico', 'Dancing Script', 'Brush Script MT', cursive;
}
.m-words {
  overflow: hidden;
  position: relative;
  height: 40px;
}
.m-words::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    var(--bg-color, #111) 10%,
    transparent 30%,
    transparent 70%,
    var(--bg-color, #111) 90%
  );
  z-index: 20;
}
.m-word {
  display: block;
  height: 40px;
  line-height: 40px;
  padding-left: 6px;
  color: #956afa;
  animation: m-spin_4991 6s infinite;
}
@keyframes m-spin_4991 {
  0%, 10% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
  15%, 28% {
    -webkit-transform: translateY(-100%);
    transform: translateY(-100%);
  }
  33%, 46% {
    -webkit-transform: translateY(-200%);
    transform: translateY(-200%);
  }
  51%, 64% {
    -webkit-transform: translateY(-300%);
    transform: translateY(-300%);
  }
  69%, 82% {
    -webkit-transform: translateY(-400%);
    transform: translateY(-400%);
  }
  87%, 100% {
    -webkit-transform: translateY(-500%);
    transform: translateY(-500%);
  }
}
.m-spinner {
  width: 3em;
  height: 3em;
  cursor: not-allowed;
  border-radius: 50%;
  border: 2px solid #444;
  box-shadow: -10px -10px 10px #6359f8, 0px -10px 10px 0px #9c32e2, 10px -10px 10px #f36896, 10px 0 10px #ff0b0b, 10px 10px 10px 0px #ff5500, 0 10px 10px 0px #ff9500, -10px 10px 10px 0px #ffb700;
  animation: m-rot55 0.7s linear infinite;
  position: relative;
}
.m-spinnerin {
  border: 2px solid #444;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
@keyframes m-rot55 {
  to {
    transform: rotate(360deg);
  }
}

/* ── RAYCAST-STYLE FLOATING PILL NAVBAR OVERRIDES (GLASS-NEUMORPHISM & 144HZ SMOOTHNESS) ── */
header {
  position: fixed !important;
  top: 16px !important;
  left: 50% !important;
  width: calc(100% - 32px) !important;
  max-width: 1200px !important;
  border-radius: 9999px !important;
  background: rgba(3, 3, 3, 0.85) !important; /* Extremely dark premium black glass */
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important; /* Brighter high-contrast border */
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 10px 24px !important;
  z-index: 1000 !important;
  height: 58px !important;
  
  /* Blended Glassmorphism & Neumorphism (Soft UI) shadows */
  box-shadow: 
    8px 8px 24px rgba(0, 0, 0, 0.8), 
    -8px -8px 24px rgba(255, 255, 255, 0.02), 
    0 12px 30px rgba(0, 0, 0, 0.6), 
    inset 1px 1px 1px rgba(255, 255, 255, 0.08), 
    inset -1px -1px 2px rgba(0, 0, 0, 0.6) !important;

  /* 144hz hardware acceleration */
  will-change: transform;
  transform: translateX(-50%) translate3d(0, 0, 0) !important;
  backface-visibility: hidden !important;
  perspective: 1000px !important;
}

/* Ensure body has appropriate padding-top to account for the floating navbar */
body {
  padding-top: 110px !important;
}

/* Style logo with high-tech Space Grotesk font and impressive red/coral diamond badge mark */
header .logo {
  font-family: 'Space Grotesk', -apple-system, sans-serif !important;
  font-weight: 700 !important;
  font-size: 19px !important;
  letter-spacing: -0.03em !important;
  color: #ffffff !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: transparent !important;
  visibility: visible !important;
  pointer-events: auto !important;

  /* 144hz transitions */
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform;
}

header .logo:hover {
  transform: scale(1.02) translate3d(0, 0, 0) !important;
}

header .logo::before {
  content: "" !important;
  display: inline-block !important;
  width: 15px !important;
  height: 15px !important;
  background: linear-gradient(135deg, #FF7E7E 0%, #FF6363 100%) !important;
  border-radius: 4px !important;
  box-shadow: 0 0 10px rgba(255, 99, 99, 0.4) !important;
  transform: rotate(45deg) !important;
  margin-right: 2px !important;
  flex-shrink: 0 !important;

  /* Smooth spinning diamond transition */
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform;
}

header .logo:hover::before {
  transform: rotate(135deg) scale(1.08) translate3d(0, 0, 0) !important;
}

header .logo span {
  background: linear-gradient(135deg, #FF7E7E 0%, #FF6363 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  text-shadow: none !important;
  font-weight: 700 !important;
}

/* Hide the absolute/fixed positioned logo outside the header on games & leaderboard pages */
.logo-fixed {
  display: none !important;
}

/* Navigation Dock-panel to clean text links transformation */
header .header-nav.dock-outer {
  margin: 0 !important;
}

header .header-nav .dock-panel {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: auto !important;
  gap: 32px !important;
  display: flex !important;
  align-items: center !important;
}

header .header-nav .dock-item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 6px 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  transition: none !important;
}

header .header-nav .dock-icon {
  display: none !important; /* Hide SVGs */
}

header .header-nav .dock-label {
  position: static !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #8A8F98 !important; /* Muted gray text */
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  
  /* Butter smooth 144hz transition */
  transition: 
    color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform, color;
}

header .header-nav .dock-item:hover .dock-label {
  color: #ffffff !important;
  transform: translate3d(0, -1px, 0) scale(1.03) !important;
}

header .header-nav .dock-item.active .dock-label {
  color: #ffffff !important;
  font-weight: 700 !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
}

/* Hide navigation item tooltips/particles/effects */
header .header-nav .gooey-filter-container,
header .header-nav .particle,
header .header-nav .point {
  display: none !important;
}

/* Header Actions container */
header #headerActions,
header .header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  margin-right: 0 !important;
}

/* Hide day/night theme switch */
header #themeToggleBtn,
header .toggle-container {
  display: none !important;
}

/* Style login button as soft white glass-neumorphic pill button */
header #loginBtn {
  background: #ffffff !important;
  color: #000000 !important;
  border-radius: 9999px !important;
  border: none !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  padding: 9px 20px !important;
  cursor: pointer !important;
  outline: none !important;
  height: auto !important;
  min-height: auto !important;

  /* Neumorphic soft depth + subtle shadow */
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.8), 
    inset -1.5px -1.5px 3px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(255, 255, 255, 0.1) !important;

  /* Snappy 144hz transition */
  transition: 
    opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform, opacity, box-shadow;
}

header #loginBtn:hover {
  opacity: 0.95 !important;
  transform: translate3d(0, -1px, 0) scale(1.02) !important;
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.9), 
    inset -1px -1px 2px rgba(0, 0, 0, 0.1),
    0 6px 18px rgba(255, 255, 255, 0.15) !important;
}

header #loginBtn:active {
  transform: translate3d(0, 1px, 0) scale(0.98) !important;
  box-shadow: 
    inset 1.5px 1.5px 3px rgba(0, 0, 0, 0.2), 
    inset -1px -1px 2px rgba(255, 255, 255, 0.8),
    0 2px 6px rgba(255, 255, 255, 0.05) !important;
}

header #loginBtn .wrap {
  padding: 0 !important;
  background: transparent !important;
  color: #000000 !important;
  border-radius: 0 !important;
}

header #loginBtn .wrap p {
  transform: none !important;
  mask-image: none !important;
  margin: 0 !important;
  color: #000000 !important;
}

header #loginBtn .wrap p span:not([data-translate]) {
  display: none !important; /* Hide stars */
}

header #loginBtn .wrap p span[data-translate] {
  color: #000000 !important;
  text-shadow: none !important;
}

/* Logged-in user details formatting */
header .user-info {
  display: none !important;
  align-items: center !important;
  gap: 16px !important;
}

header .user-info.visible {
  display: flex !important;
}

header .username {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #8A8F98 !important;
  text-shadow: none !important;
  text-decoration: none !important;
  display: inline-block !important;
  
  /* 144hz transitions */
  transition: 
    color 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform, color;
}

header .username:hover {
  color: #ffffff !important;
  transform: translate3d(0, -1px, 0) scale(1.02) !important;
}

header .session-badge {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 11px !important;
  background: rgba(0, 255, 100, 0.08) !important;
  color: #00ff64 !important;
  border: 1px solid rgba(0, 255, 100, 0.15) !important;
  border-radius: 4px !important;
  padding: 2px 8px !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

header .logout-btn {
  background: #ffffff !important;
  color: #000000 !important;
  border-radius: 9999px !important;
  border: none !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  padding: 9px 20px !important;
  cursor: pointer !important;
  margin: 0 !important;
  outline: none !important;

  /* Neumorphic soft depth + subtle shadow */
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.8), 
    inset -1.5px -1.5px 3px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(255, 255, 255, 0.1) !important;

  /* Snappy 144hz transition */
  transition: 
    opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform, opacity, box-shadow;
}

header .logout-btn:hover {
  opacity: 0.95 !important;
  color: #000000 !important;
  border: none !important;
  transform: translate3d(0, -1px, 0) scale(1.02) !important;
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.9), 
    inset -1px -1px 2px rgba(0, 0, 0, 0.1),
    0 6px 18px rgba(255, 255, 255, 0.15) !important;
}

header .logout-btn:active {
  transform: translate3d(0, 1px, 0) scale(0.98) !important;
  box-shadow: 
    inset 1.5px 1.5px 3px rgba(0, 0, 0, 0.2), 
    inset -1px -1px 2px rgba(255, 255, 255, 0.8),
    0 2px 6px rgba(255, 255, 255, 0.05) !important;
}

/* Hide cybernetic toggle hamburger button */
input#checkbox,
label.toggle {
  display: none !important;
}

/* Style Play Now button on about page as white pill button */
header .play-now-btn {
  background: #ffffff !important;
  color: #000000 !important;
  border-radius: 9999px !important;
  border: none !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  padding: 9px 20px !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  outline: none !important;

  /* Neumorphic soft depth + subtle shadow */
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.8), 
    inset -1.5px -1.5px 3px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(255, 255, 255, 0.1) !important;

  /* Snappy 144hz transition */
  transition: 
    opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform, opacity, box-shadow;
}

header .play-now-btn:hover {
  opacity: 0.95 !important;
  color: #000000 !important;
  border: none !important;
  transform: translate3d(0, -1px, 0) scale(1.02) !important;
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.9), 
    inset -1px -1px 2px rgba(0, 0, 0, 0.1),
    0 6px 18px rgba(255, 255, 255, 0.15) !important;
}

header .play-now-btn:active {
  transform: translate3d(0, 1px, 0) scale(0.98) !important;
  box-shadow: 
    inset 1.5px 1.5px 3px rgba(0, 0, 0, 0.2), 
    inset -1px -1px 2px rgba(255, 255, 255, 0.8),
    0 2px 6px rgba(255, 255, 255, 0.05) !important;
}

/* ── RESPONSIVE MOBILE OVERRIDES ── */
@media (max-width: 768px) {
  header {
    padding: 8px 16px !important;
    top: 10px !important;
    width: calc(100% - 24px) !important;
    height: 48px !important;
    
    transform: translateX(-50%) translate3d(0, 0, 0) !important;
    box-shadow: 
      4px 4px 16px rgba(0, 0, 0, 0.6), 
      -4px -4px 16px rgba(255, 255, 255, 0.015), 
      0 8px 20px rgba(0, 0, 0, 0.4), 
      inset 1px 1px 1px rgba(255, 255, 255, 0.06), 
      inset -1px -1px 1px rgba(0, 0, 0, 0.4) !important;
  }
  body {
    padding-top: 95px !important;
  }
  header .logo {
    font-size: 16px !important;
    gap: 6px !important;
  }
  header .logo::before {
    width: 12px !important;
    height: 12px !important;
    border-radius: 3px !important;
    margin-right: 2px !important;
  }
  header .header-nav .dock-panel {
    gap: 16px !important;
  }
  header .header-nav .dock-label {
    font-size: 13.5px !important;
  }
  header #loginBtn, 
  header .logout-btn, 
  header .play-now-btn {
    font-size: 13px !important;
    padding: 7px 14px !important;
  }
  header #headerActions, 
  header .header-actions {
    gap: 10px !important;
  }
}

@media (max-width: 480px) {
  header {
    padding: 8px 12px !important;
    top: 8px !important;
    width: calc(100% - 16px) !important;
    
    transform: translateX(-50%) translate3d(0, 0, 0) !important;
    box-shadow: 
      2px 2px 10px rgba(0, 0, 0, 0.6), 
      -2px -2px 10px rgba(255, 255, 255, 0.015), 
      0 6px 12px rgba(0, 0, 0, 0.4), 
      inset 1px 1px 1px rgba(255, 255, 255, 0.06), 
      inset -0.5px -0.5px 0.5px rgba(0, 0, 0, 0.4) !important;
  }
  body {
    padding-top: 90px !important;
  }
  header .logo {
    font-size: 14px !important;
    gap: 4px !important;
  }
  header .logo::before {
    width: 10px !important;
    height: 10px !important;
    border-radius: 3px !important;
    margin-right: 2px !important;
  }
  header .header-nav .dock-panel {
    gap: 10px !important;
  }
  header .header-nav .dock-label {
    font-size: 12px !important;
  }
  header #loginBtn, 
  header .logout-btn, 
  header .play-now-btn {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }
}

/* ── RAYCAST-STYLE EXTENSIONS GRID & CARDS REDESIGN ── */
.raycast-games-section {
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 96px 24px !important;
  background: transparent !important;
}

.raycast-section-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  margin-bottom: 60px !important;
  font-family: 'Space Grotesk', -apple-system, sans-serif !important;
}

.raycast-header-left {
  max-width: 580px !important;
}

.raycast-title {
  font-size: 46px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 0 12px 0 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.15 !important;
}

.raycast-subtitle {
  font-family: 'Inter', sans-serif !important;
  font-size: 17px !important;
  color: #b0b4bc !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

.raycast-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.raycast-categories {
  display: flex !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 9999px !important;
  padding: 3px !important;
  gap: 2px !important;
  align-items: center !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.25) !important;
  position: relative !important;
}

.category-pill-indicator {
  position: absolute !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
  border-radius: 9999px !important;
  transition: all 0.45s cubic-bezier(0.32, 0.72, 0, 1) !important; /* Silk-smooth motion */
  z-index: 0 !important;
  pointer-events: none !important;
}

.raycast-categories .category-pill {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 9999px !important;
  color: #8A8F98 !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  padding: 7px 16px !important;
  cursor: pointer !important;
  transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.1s !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 1 !important;
}

.raycast-categories .category-pill.active {
  background: transparent !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.raycast-categories .category-pill:hover:not(.active) {
  color: #ffffff !important;
}

.raycast-search-container {
  display: flex !important;
  align-items: center !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 9999px !important;
  padding: 7px 9px !important;
  gap: 0px !important;
  width: 33px !important;
  height: 33px !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4) !important;
  overflow: hidden !important;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), gap 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.2s !important;
}

.raycast-search-container:hover,
.raycast-search-container:focus-within {
  width: 210px !important;
  padding: 7px 14px !important;
  gap: 8px !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.04), inset 0 2px 4px rgba(0,0,0,0.4) !important;
}

.raycast-search-input {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 13.5px !important;
  width: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
}

.raycast-search-container:hover .raycast-search-input,
.raycast-search-container:focus-within .raycast-search-input {
  width: 100% !important;
  opacity: 1 !important;
}

.raycast-search-icon {
  color: #8A8F98 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* Raycast Grid layout */
.games-grid.raycast-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  margin: 0 0 40px 0 !important;
  padding: 0 !important;
}

/* Raycast Card layout */
.raycast-card {
  background: linear-gradient(rgba(20, 20, 24, 0.85), rgba(20, 20, 24, 0.85)) padding-box,
              linear-gradient(120deg, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.08) 70%) border-box !important;
  background-size: 100% 100%, 200% 100% !important;
  background-position: 0 0, 0 0 !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  padding: 0 !important; /* Reset padding so graphic fills the 80% split */
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  height: 400px !important;
  min-height: 400px !important;
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1), 
              box-shadow 0.45s ease,
              background 0.45s ease !important;
  will-change: transform, box-shadow;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* Premium Sweeping Glass Shine Reflection */
.raycast-card::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -150% !important;
  width: 150% !important;
  height: 100% !important;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.04),
    transparent
  ) !important;
  transform: skewX(-20deg) !important;
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 2 !important;
  pointer-events: none !important;
  mask: none !important;
  -webkit-mask: none !important;
}

.raycast-card:hover::after {
  left: 150% !important;
}

.raycast-card::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, -30%), rgba(0, 255, 100, 0.05) 0%, rgba(0, 240, 255, 0.03) 35%, transparent 70%) !important;
  pointer-events: none !important;
  z-index: 1 !important;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s ease !important;
  opacity: 0.5;
  will-change: background, opacity;
}

/* Unified hover state (single accent system) */
.raycast-card:hover {
  transform: translate3d(0, -6px, 0) scale(1.01) !important;
  background: linear-gradient(rgba(20, 20, 24, 0.85), rgba(20, 20, 24, 0.85)) padding-box,
              linear-gradient(120deg, rgba(0, 255, 100, 0.2) 20%, rgba(0, 255, 100, 0.85) 50%, rgba(0, 255, 100, 0.2) 80%) border-box !important;
  background-size: 100% 100%, 200% 100% !important;
  animation: borderShimmer 3.5s linear infinite !important;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(0, 255, 100, 0.15),
    inset 0 0 12px rgba(0, 255, 100, 0.05) !important;
}

.raycast-card:hover::before {
  opacity: 1;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, -30%), rgba(0, 255, 100, 0.08) 0%, rgba(0, 240, 255, 0.06) 30%, rgba(255, 0, 240, 0.04) 60%, transparent 85%) !important;
  animation: aiGlowDrift 10s ease-in-out infinite alternate !important;
}

@keyframes borderShimmer {
  0% { background-position: 0 0, 0% 0%; }
  100% { background-position: 0 0, 200% 0%; }
}

@keyframes aiGlowDrift {
  0% { filter: hue-rotate(0deg) saturate(1); }
  100% { filter: hue-rotate(360deg) saturate(1.25); }
}

/* Card details footer (takes 20%) */
.raycast-card .card-details-footer {
  height: 20% !important;
  width: 100% !important;
  padding: 10px 14px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  background: rgba(12, 14, 24, 0.75) !important;
  backdrop-filter: blur(10px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  z-index: 2 !important;
  position: relative !important;
}

.raycast-card .card-footer-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

.raycast-card .card-metadata {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  font-size: 11px !important;
}

.raycast-card .game-title {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 !important;
  letter-spacing: -0.02em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transition: color 0.4s ease, text-shadow 0.4s ease !important;
}

.raycast-card:hover .game-title {
  color: #00ff64 !important;
  text-shadow: 0 0 10px rgba(0, 255, 100, 0.4) !important;
}

.raycast-card .card-badge {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  background: rgba(0, 255, 100, 0.08) !important;
  color: #00ff64 !important;
  border: 1px solid rgba(0, 255, 100, 0.15) !important;
  border-radius: 4px !important;
  padding: 1px 4px !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.raycast-card .game-desc {
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  color: #8A8F98 !important;
  line-height: 1.4 !important;
  margin: 2px 0 4px 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 1 !important;
  -webkit-box-orient: vertical !important;
  transition: color 0.3s ease !important;
}

.raycast-card:hover .game-desc {
  color: #d1d5db !important;
}

/* Card graphic (takes 80%) */
.raycast-card .card-graphic {
  height: 80% !important;
  margin: 0 !important;
  width: 100% !important;
  border-radius: 14px 14px 0 0 !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, background-color 0.4s, box-shadow 0.4s !important;
}

.hover-preview-video {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease !important;
  z-index: 1 !important; /* Render under scanlines (z-index 2) but above bg image (z-index 0) */
}

/* Interactive ratings styles */
.meta-stars-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  cursor: pointer !important;
  user-select: none !important;
}

.meta-stars-wrap:hover .star {
  transform: scale(1.08) !important;
}

.stars-list {
  display: inline-flex !important;
  gap: 1px !important;
}

.star {
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.15) !important;
  transition: transform 0.15s ease, color 0.15s ease !important;
}

.star.filled {
  color: var(--accent-gold, #ffd700) !important;
}

.star.half-filled {
  color: var(--accent-gold, #ffd700) !important;
}

.ratings-count {
  font-family: 'Inter', sans-serif !important;
  font-size: 10px !important;
  color: #8A8F98 !important;
  margin-left: 2px !important;
}

/* Premium Retro CRT Screen Scanlines & RGB Subpixel Texture Simulation */
.raycast-card .card-graphic::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: 
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 45%),
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.05), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.05)) !important;
  background-size: 100% 100%, 100% 4px, 6px 100% !important;
  pointer-events: none !important;
  z-index: 2 !important;
  opacity: 0.8 !important;
  transition: opacity 0.3s ease !important;
}

.raycast-card:hover .card-graphic::before {
  opacity: 1 !important;
}

/* Atmospheric internal lighting — centered radial depth */
.raycast-card .card-graphic::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.025) 0%, transparent 65%) !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* Elevate preview elements above card-graphic lighting overlays */
.flappy-bird-sprite,
.flappy-pipe,
.pong-paddle,
.pong-ball,
.pong-line,
.snake-segment,
.snake-food,
.tetris-shape,
.plus-sign-glow {
  z-index: 3 !important;
}

.tile-grid-mini,
.mines-graphic,
.ttt-graphic,
.hearts-graphic {
  position: relative !important;
  z-index: 3 !important;
}

.ludo-graphic,
.uno-online-graphic,
.uno-local-graphic,
.solitaire-graphic {
  z-index: 3 !important;
}

.raycast-card:hover .card-graphic {
  transform: scale(1.02) translate3d(0, -2px, 0) !important;
  border-color: rgba(0, 255, 100, 0.3) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.8),
    0 8px 20px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(0, 255, 100, 0.08) !important;
}

/* Per-game colored depth glows */
.flappy-graphic::after { background: radial-gradient(ellipse at 35% 45%, rgba(240, 190, 60, 0.04) 0%, transparent 60%) !important; }
.pong-graphic::after { background: radial-gradient(ellipse at 50% 45%, rgba(100, 160, 255, 0.04) 0%, transparent 60%) !important; }
.snake-graphic::after { background: radial-gradient(ellipse at 45% 50%, rgba(80, 210, 130, 0.035) 0%, transparent 60%) !important; }
.puzzle-2048-graphic::after { background: radial-gradient(ellipse at 50% 45%, rgba(240, 200, 60, 0.04) 0%, transparent 60%) !important; }
.mines-scene::after { background: radial-gradient(ellipse at 50% 50%, rgba(90, 160, 230, 0.035) 0%, transparent 60%) !important; }
.tetris-graphic::after { background: radial-gradient(ellipse at 45% 40%, rgba(150, 100, 240, 0.04) 0%, transparent 55%) !important; }
.ludo-scene::after { background: radial-gradient(ellipse at 50% 50%, rgba(180, 100, 200, 0.035) 0%, transparent 55%) !important; }
.uno-scene::after { background: radial-gradient(ellipse at 50% 50%, rgba(200, 80, 80, 0.03) 0%, transparent 55%) !important; }
.ttt-scene::after { background: radial-gradient(ellipse at 50% 50%, rgba(100, 120, 220, 0.035) 0%, transparent 55%) !important; }
.solitaire-scene::after { background: radial-gradient(ellipse at 50% 40%, rgba(80, 160, 100, 0.035) 0%, transparent 55%) !important; }
.hearts-scene::after { background: radial-gradient(ellipse at 50% 50%, rgba(220, 60, 60, 0.04) 0%, transparent 50%) !important; }
.request-graphic::after { background: radial-gradient(ellipse at 50% 50%, rgba(100, 140, 220, 0.03) 0%, transparent 50%) !important; }

/* Scene backgrounds on card-graphic wrappers */
.solitaire-scene {
  background: 
    radial-gradient(ellipse at 50% 40%, rgba(60, 140, 80, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, rgba(15, 30, 20, 0.4) 0%, rgba(10, 20, 15, 0.6) 100%) !important;
}
.ttt-scene {
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(100, 110, 200, 0.04) 0%, transparent 55%),
    rgba(100, 110, 180, 0.03) !important;
}
.mines-scene {
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(80, 140, 200, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, rgba(18, 25, 40, 0.4) 0%, transparent 100%) !important;
}
.ludo-scene {
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(180, 100, 200, 0.04) 0%, transparent 55%),
    linear-gradient(180deg, rgba(28, 18, 35, 0.4) 0%, transparent 100%) !important;
}
.uno-scene {
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(200, 80, 80, 0.04) 0%, transparent 55%),
    linear-gradient(180deg, rgba(25, 15, 30, 0.4) 0%, transparent 100%) !important;
}
.hearts-scene {
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(200, 50, 60, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, rgba(35, 15, 18, 0.4) 0%, transparent 100%) !important;
}

/* ── PREMIUM POSTER SCENES ── */
/* Each scene: curated color palette, atmospheric depth, one subtle motion max */

/* Flappy Bird — Golden Hour */
.flappy-graphic {
  background: 
    radial-gradient(ellipse at 35% 45%, rgba(210, 160, 60, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, rgba(45, 50, 80, 0.6) 0%, rgba(20, 18, 35, 0.8) 60%, rgba(60, 35, 20, 0.4) 100%) !important;
}
.flappy-bird-sprite {
  width: 24px;
  height: 18px;
  background: linear-gradient(135deg, #f0c240, #e8a020);
  border-radius: 50% 50% 40% 40%;
  position: absolute;
  left: 30%;
  top: 42%;
  box-shadow: 0 0 12px rgba(240, 194, 64, 0.25);
  animation: birdFlapPlay 2.5s ease-in-out infinite;
}
@keyframes birdFlapPlay {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  45% { transform: translateY(-16px) rotate(-20deg); }
  50% { transform: translateY(-16px) rotate(15deg); }
  90% { transform: translateY(18px) rotate(40deg); }
}
.flappy-pipe {
  width: 24px;
  background: linear-gradient(90deg, rgba(60, 170, 110, 0.5), rgba(30, 100, 60, 0.4));
  border: 1px solid rgba(80, 190, 130, 0.3);
  position: absolute;
  animation: pipeMovePlay 3s linear infinite;
}
.pipe-top { height: 65px; top: 0; border-radius: 0 0 6px 6px; }
.pipe-bottom { height: 80px; bottom: 0; border-radius: 6px 6px 0 0; }
@keyframes pipeMovePlay {
  0% { left: 110%; }
  100% { left: -30%; }
}

/* Neon Pong — Electric Blue */
.pong-graphic {
  background: 
    radial-gradient(ellipse at 50% 45%, rgba(60, 120, 220, 0.07) 0%, transparent 55%),
    linear-gradient(180deg, rgba(15, 22, 50, 0.6) 0%, rgba(8, 12, 35, 0.8) 100%) !important;
}
.pong-paddle {
  width: 4px;
  height: 38px;
  background: rgba(140, 180, 255, 0.85);
  border-radius: 99px;
  position: absolute;
  box-shadow: 0 0 10px rgba(100, 150, 255, 0.4);
}
.paddle-left {
  left: 14%;
  animation: paddleLeftPlay 4s linear infinite;
}
.paddle-right {
  right: 14%;
  animation: paddleRightPlay 4s linear infinite;
}
.pong-ball {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  box-shadow: 0 0 12px rgba(120, 170, 255, 0.8);
  animation: pongBallPlay 4s linear infinite;
}
@keyframes pongBallPlay {
  0% { top: 25%; left: 16%; }
  25% { top: 85%; left: 50%; }
  50% { top: 60%; left: 81%; }
  75% { top: 15%; left: 50%; }
  100% { top: 25%; left: 16%; }
}
@keyframes paddleLeftPlay {
  0%, 100% { top: 12%; }
  25% { top: 50%; }
  50% { top: 75%; }
  75% { top: 35%; }
}
@keyframes paddleRightPlay {
  0%, 100% { top: 75%; }
  25% { top: 30%; }
  50% { top: 48%; }
  75% { top: 20%; }
}
.pong-line {
  position: absolute;
  width: 1px;
  height: 100%;
  border-left: 1px dashed rgba(100, 150, 255, 0.06);
  left: 50%;
}

/* Retro Snake — Emerald Forest */
.snake-graphic {
  background: 
    radial-gradient(ellipse at 45% 50%, rgba(40, 180, 100, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, rgba(12, 30, 22, 0.5) 0%, rgba(8, 18, 14, 0.7) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 11px, rgba(60, 180, 100, 0.02) 11px, rgba(60, 180, 100, 0.02) 12px),
    repeating-linear-gradient(90deg, transparent, transparent 11px, rgba(60, 180, 100, 0.02) 11px, rgba(60, 180, 100, 0.02) 12px) !important;
}
.snake-segment {
  width: 9px;
  height: 9px;
  background: rgba(80, 210, 130, 0.85);
  border-radius: 2px;
  position: absolute;
  box-shadow: 0 0 8px rgba(80, 210, 130, 0.3);
}
.seg-4 { animation: snakeChasePlay 4s infinite linear; }
.seg-3 { animation: snakeChasePlay 4s infinite linear; animation-delay: -0.15s; }
.seg-2 { animation: snakeChasePlay 4s infinite linear; animation-delay: -0.3s; }
.seg-1 { animation: snakeChasePlay 4s infinite linear; animation-delay: -0.45s; }

@keyframes snakeChasePlay {
  0% { left: 30%; top: 40%; }
  25% { left: 60%; top: 40%; }
  50% { left: 60%; top: 70%; }
  75% { left: 30%; top: 70%; }
  100% { left: 30%; top: 40%; }
}
.snake-food {
  width: 8px;
  height: 8px;
  background: #ff4436;
  border-radius: 50%;
  position: absolute;
  left: 60%;
  top: 40%;
  box-shadow: 0 0 10px rgba(255, 68, 54, 0.6);
  animation: foodSpawnPlay 4s infinite linear;
}
@keyframes foodSpawnPlay {
  0%, 23% { transform: scale(1); opacity: 1; }
  25%, 73% { transform: scale(0); opacity: 0; }
  75%, 98% { transform: scale(1); opacity: 1; }
}

/* 2048 — Warm Amber */
.puzzle-2048-graphic {
  background: 
    radial-gradient(ellipse at 50% 45%, rgba(220, 170, 50, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, rgba(40, 30, 15, 0.5) 0%, rgba(18, 14, 8, 0.7) 100%) !important;
}
.tile-grid-mini {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 5px !important;
  padding: 10px !important;
  background: rgba(255, 220, 140, 0.02) !important;
  border-radius: 8px !important;
  width: 140px !important;
  height: 140px !important;
}
.tile-grid-mini .tile {
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  transition: transform 0.2s;
}
.tile-empty { background: rgba(255, 220, 140, 0.03) !important; }
.tile-2 {
  background: rgba(238, 228, 218, 0.3) !important;
  color: rgba(238, 228, 218, 0.9) !important;
  animation: tileSlideLeft 4s infinite ease-in-out;
}
.tile-4 {
  background: rgba(237, 224, 200, 0.3) !important;
  color: rgba(237, 224, 200, 0.9) !important;
  animation: tileSlideRight 4s infinite ease-in-out;
}
.tile-8 { background: rgba(230, 160, 80, 0.35) !important; }
.tile-16 { background: rgba(235, 130, 60, 0.4) !important; }
.tile-2048 {
  background: rgba(243, 194, 46, 0.8) !important;
  grid-column: span 2 !important;
  box-shadow: 0 0 15px rgba(243, 194, 46, 0.6) !important;
  animation: tileMergeGlow 4s infinite ease-in-out !important;
}
@keyframes tileSlideLeft {
  0%, 100% { transform: translateX(0); }
  30%, 70% { transform: translateX(12px); }
}
@keyframes tileSlideRight {
  0%, 100% { transform: translateX(0); }
  30%, 70% { transform: translateX(-12px); }
}
@keyframes tileMergeGlow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(243, 194, 46, 0.4); }
  30%, 70% { transform: scale(1.08); box-shadow: 0 0 25px rgba(243, 194, 46, 0.8); }
}

/* Minesweeper — Steel Blue */
.mines-graphic {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  padding: 10px !important;
  width: 130px !important;
}
.mines-graphic .cell {
  height: 34px !important;
  border-radius: 4px !important;
  background: rgba(120, 160, 200, 0.08) !important;
  border: 1px solid rgba(120, 160, 200, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700;
}
.cell-1 { animation: cellReveal1 5s infinite step-end; }
.cell-2 { animation: cellReveal2 5s infinite step-end; }
.cell-flag { animation: cellFlagPlay 5s infinite step-end; }
.cell-mine { animation: cellMinePlay 5s infinite step-end; }

@keyframes cellReveal1 {
  0%, 19% { font-size: 0; background: rgba(120, 160, 200, 0.08); color: transparent; }
  20%, 100% { font-size: 12px; background: rgba(120, 160, 200, 0.2); color: rgba(90, 180, 230, 0.95); }
}
@keyframes cellReveal2 {
  0%, 39% { font-size: 0; background: rgba(120, 160, 200, 0.08); color: transparent; }
  40%, 100% { font-size: 12px; background: rgba(120, 160, 200, 0.2); color: rgba(90, 200, 130, 0.95); }
}
@keyframes cellFlagPlay {
  0%, 59% { font-size: 0; color: transparent; }
  60%, 100% { font-size: 12px; color: rgba(240, 190, 60, 0.95); }
}
@keyframes cellMinePlay {
  0%, 79% { font-size: 0; background: rgba(120, 160, 200, 0.08); }
  80%, 95% { font-size: 12px; background: rgba(220, 70, 70, 0.5); border-color: rgba(255, 0, 0, 0.8); box-shadow: 0 0 15px rgba(255, 0, 0, 0.6); }
  96%, 100% { font-size: 0; background: rgba(120, 160, 200, 0.08); }
}

/* Tetris — Deep Violet */
.tetris-graphic {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  background: 
    radial-gradient(ellipse at 45% 40%, rgba(130, 80, 220, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, rgba(25, 15, 50, 0.5) 0%, rgba(12, 8, 30, 0.7) 100%) !important;
}
.tetris-shape {
  position: absolute !important;
  border-radius: 2px !important;
}
.block-t {
  width: 24px;
  height: 16px;
  background: rgba(160, 100, 240, 0.65) !important;
  border: 1px solid rgba(160, 100, 240, 0.4) !important;
  box-shadow: 0 0 10px rgba(160, 100, 240, 0.3) !important;
  left: 42%;
  clip-path: polygon(0 8px, 8px 8px, 8px 0, 16px 0, 16px 8px, 24px 8px, 24px 16px, 0 16px);
  animation: tetrisTPlay 6s infinite linear;
}
.block-i {
  width: 32px;
  height: 8px;
  background: rgba(60, 200, 180, 0.6) !important;
  border: 1px solid rgba(60, 200, 180, 0.35) !important;
  box-shadow: 0 0 8px rgba(60, 200, 180, 0.3) !important;
  left: 20%;
  animation: tetrisIPlay 6s infinite linear;
}
.block-o {
  width: 16px;
  height: 16px;
  background: rgba(240, 200, 60, 0.55) !important;
  border: 1px solid rgba(240, 200, 60, 0.35) !important;
  box-shadow: 0 0 8px rgba(240, 200, 60, 0.3) !important;
  left: 60%;
  animation: tetrisOPlay 6s infinite linear;
}

@keyframes tetrisTPlay {
  0% { top: -20px; transform: rotate(0deg); opacity: 1; }
  30% { top: 40px; transform: rotate(0deg); }
  35% { top: 40px; transform: rotate(90deg); }
  50%, 80% { top: 120px; transform: rotate(90deg); opacity: 1; }
  85%, 100% { opacity: 0; }
}
@keyframes tetrisIPlay {
  0%, 20% { top: -20px; transform: rotate(0deg); opacity: 1; }
  50% { top: 60px; transform: rotate(0deg); }
  55% { top: 60px; transform: rotate(90deg); }
  70%, 80% { top: 130px; transform: rotate(90deg); opacity: 1; }
  85%, 100% { opacity: 0; }
}
@keyframes tetrisOPlay {
  0%, 40% { top: -20px; opacity: 1; }
  75%, 80% { top: 125px; opacity: 1; }
  85%, 100% { opacity: 0; }
}

/* Ludo — Jewel Tones */
.ludo-graphic {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  width: 100px !important;
  position: relative !important;
}
.ludo-square {
  height: 40px !important;
  border-radius: 6px !important;
}
.red-sq { background: rgba(220, 60, 80, 0.25) !important; border: 1px solid rgba(220, 60, 80, 0.4) !important; }
.green-sq { background: rgba(50, 190, 100, 0.25) !important; border: 1px solid rgba(50, 190, 100, 0.4) !important; }
.ludo-token {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.token-red {
  background: #ff3b47 !important;
  box-shadow: 0 0 10px rgba(255, 59, 71, 0.6) !important;
  animation: tokenRedPlay 5s infinite ease-in-out;
}
.token-green {
  background: #00ff64 !important;
  box-shadow: 0 0 10px rgba(0, 255, 100, 0.6) !important;
  animation: tokenGreenPlay 5s infinite ease-in-out;
}
@keyframes tokenRedPlay {
  0%, 100% { transform: translate(-30px, -15px); }
  25% { transform: translate(-10px, -15px); }
  50% { transform: translate(-10px, 5px); }
  75% { transform: translate(-30px, 5px); }
}
@keyframes tokenGreenPlay {
  0%, 100% { transform: translate(20px, 15px); }
  25% { transform: translate(5px, 15px); }
  50% { transform: translate(5px, -5px); }
  75% { transform: translate(20px, -5px); }
}

/* UNO Cards — Vivid Hand */
.uno-online-graphic, .uno-local-graphic {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
  position: relative !important;
  width: 110px !important;
  height: 60px !important;
}
.uno-card {
  width: 36px !important;
  height: 52px !important;
  border-radius: 5px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 900 !important;
  font-size: 14px !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
  position: absolute;
}
.uno-online-graphic .uno-card:nth-child(1), .uno-local-graphic .uno-card:nth-child(1) {
  animation: unoPlayCard1 4s infinite ease-in-out;
}
.uno-online-graphic .uno-card:nth-child(2), .uno-local-graphic .uno-card:nth-child(2) {
  animation: unoPlayCard2 4s infinite ease-in-out;
}
.uno-online-graphic .uno-card:nth-child(3), .uno-local-graphic .uno-card:nth-child(3) {
  animation: unoPlayCard3 4s infinite ease-in-out;
}

@keyframes unoPlayCard1 {
  0%, 100% { transform: translate(-35px, 0px) rotate(-15deg); z-index: 1; }
  30% { transform: translate(0, 0) rotate(5deg); z-index: 5; }
  60% { transform: translate(0, 0) rotate(5deg); z-index: 1; }
}
@keyframes unoPlayCard2 {
  0%, 100% { transform: translate(0, 0px) rotate(0deg); z-index: 2; }
  33% { transform: translate(0, 0px) rotate(0deg); z-index: 1; }
  63% { transform: translate(0, -4px) rotate(-5deg); z-index: 5; }
}
@keyframes unoPlayCard3 {
  0%, 100% { transform: translate(35px, 0px) rotate(15deg); z-index: 3; }
  10% { transform: translate(0, 0) rotate(10deg); z-index: 5; }
  40% { transform: translate(0, 0) rotate(10deg); z-index: 1; }
}
.u-red { background: linear-gradient(145deg, rgba(220, 50, 50, 0.85), rgba(180, 30, 50, 0.75)) !important; }
.u-blue { background: linear-gradient(145deg, rgba(40, 100, 220, 0.85), rgba(30, 70, 180, 0.75)) !important; }
.u-yellow { background: linear-gradient(145deg, rgba(230, 190, 30, 0.85), rgba(200, 160, 20, 0.75)) !important; }
.u-green { background: linear-gradient(145deg, rgba(40, 170, 80, 0.85), rgba(30, 130, 60, 0.75)) !important; }
.u-wild { background: linear-gradient(145deg, rgba(130, 70, 200, 0.85), rgba(100, 50, 160, 0.75)) !important; }

/* Tic Tac Toe — Soft Indigo */
.ttt-graphic {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  width: 110px !important;
  height: 110px !important;
  background: rgba(100, 110, 180, 0.03) !important;
  border: 1px solid rgba(100, 120, 200, 0.06) !important;
  border-radius: 8px !important;
  padding: 6px !important;
}
.ttt-cell {
  border: 1px solid rgba(100, 120, 200, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 700 !important;
  font-size: 15px !important;
}
.ttt-cell:nth-child(1) { animation: tttMarkX 6s infinite step-end; color: #ff5e5b !important; }
.ttt-cell:nth-child(5) { animation: tttMarkO 6s infinite step-end; color: #8cb4ff !important; }
.ttt-cell:nth-child(3) { animation: tttMarkX2 6s infinite step-end; color: #ff5e5b !important; }
.ttt-cell:nth-child(9) { animation: tttMarkO2 6s infinite step-end; color: #8cb4ff !important; }

@keyframes tttMarkX {
  0%, 14% { opacity: 0; }
  15%, 100% { opacity: 1; }
}
@keyframes tttMarkO {
  0%, 34% { opacity: 0; }
  35%, 100% { opacity: 1; }
}
@keyframes tttMarkX2 {
  0%, 54% { opacity: 0; }
  55%, 100% { opacity: 1; }
}
@keyframes tttMarkO2 {
  0%, 74% { opacity: 0; }
  75%, 90% { opacity: 1; background: rgba(0, 255, 100, 0.1); }
  91%, 100% { opacity: 0; background: transparent; }
}
.ttt-cell.ttt-win {
  color: rgba(100, 200, 140, 0.7) !important;
  background: rgba(100, 200, 140, 0.05) !important;
}

/* Solitaire — Green Felt */
.solitaire-graphic {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  position: relative !important;
  height: 100px !important;
  width: 65px !important;
}
.deck-card {
  width: 52px !important;
  height: 68px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 5px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4) !important;
  position: absolute !important;
  transition: transform 0.3s;
}
.c-king { top: 0 !important; color: #ffc837 !important; animation: solitaireKing 5s infinite ease-in-out; }
.c-queen { top: 14px !important; left: 3px !important; color: #ff5e5b !important; animation: solitaireQueen 5s infinite ease-in-out; }
.c-jack { top: 28px !important; left: 6px !important; color: #8cb4ff !important; animation: solitaireJack 5s infinite ease-in-out; }

@keyframes solitaireKing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@keyframes solitaireQueen {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
@keyframes solitaireJack {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(15px); }
}

/* High Score Row below Game Title */
.card-score-hud {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 3px !important;
  pointer-events: none !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  animation: scoreFadeIn 0.35s ease both;
}

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

.score-subrow-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.score-subrow-separator {
  color: rgba(255, 255, 255, 0.15) !important;
  font-size: 10px !important;
  user-select: none !important;
}

.score-hud-label {
  font-size: 8.5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: rgba(255, 255, 255, 0.4) !important;
}

.score-hud-val {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
}

.score-hud-val.personal {
  color: #00ff64 !important;
  text-shadow: 0 0 6px rgba(0, 255, 100, 0.35) !important;
}

.score-hud-val.global {
  color: #ffd700 !important;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.35) !important;
}

/* Hearts — Crimson Depth */
.hearts-graphic {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
}
.heart-symbol {
  font-size: 46px !important;
  color: rgba(220, 60, 60, 0.45) !important;
  text-shadow: 0 0 20px rgba(220, 60, 60, 0.08) !important;
  animation: heartPulse 3s ease-in-out infinite !important;
}
@keyframes heartPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.75; }
}

/* Request Game — Soft Blue Canvas */
.request-graphic {
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(100, 140, 220, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, rgba(18, 20, 35, 0.3) 0%, transparent 100%) !important;
}
.plus-sign-glow {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  transition: border-color 0.3s, background-color 0.3s !important;
}
.plus-sign-glow::before {
  content: '+' !important;
  font-size: 22px !important;
  font-family: 'Space Grotesk', sans-serif !important;
  color: rgba(255, 255, 255, 0.2) !important;
  transition: color 0.3s !important;
  line-height: 1 !important;
}
.req-game-card:hover .plus-sign-glow {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}
.req-game-card:hover .plus-sign-glow::before {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Raycast section footer */
.raycast-section-footer {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin-top: 32px !important;
}

.raycast-footer-link {
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #8A8F98 !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
}

.raycast-footer-link:hover {
  color: #ffffff !important;
}

.raycast-carousel-arrows {
  display: flex !important;
  gap: 12px !important;
}

.raycast-carousel-arrows .carousel-arrow {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #8A8F98 !important;
  font-size: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s !important;
  outline: none !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.raycast-carousel-arrows .carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.raycast-carousel-arrows .carousel-arrow:active {
  background: rgba(255, 255, 255, 0.06) !important;
}

.raycast-carousel-arrows .carousel-arrow.disabled {
  opacity: 0.25 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* Responsive grid overrides */
@media (max-width: 1100px) {
  .games-grid.raycast-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
}

@media (max-width: 768px) {
  .raycast-section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 24px !important;
  }
  .raycast-header-right {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 16px !important;
  }
  .raycast-search-container {
    width: 100% !important;
  }
  .raycast-title {
    font-size: 28px !important;
  }
}

@media (max-width: 580px) {
  .games-grid.raycast-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .raycast-categories {
    flex-wrap: wrap !important;
    border-radius: 12px !important;
    padding: 6px !important;
  }
  .raycast-categories .category-pill {
    padding: 6px 12px !important;
    font-size: 12px !important;
    flex-grow: 1 !important;
  }
}

/* ==========================================
   Luminous Subcategory Navigation (Raycast Layout)
   ========================================== */
.raycast-subcategories-wrapper {
  display: flex !important;
  justify-content: flex-start !important;
  margin-top: -12px !important;
  margin-bottom: 24px !important;
  padding: 0 4px !important;
}

.raycast-subcategories {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

.raycast-subcategories .subcategory-pill {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-radius: 9999px !important;
  color: #8A8F98 !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 5px 14px !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.1s !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  will-change: transform, background-color, border-color, color, box-shadow !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.raycast-subcategories .subcategory-pill:hover:not(.active) {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.raycast-subcategories .subcategory-pill.active {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
}

.raycast-subcategories .subcategory-pill:active {
  transform: scale(0.96) !important;
}

@media (max-width: 768px) {
  .raycast-subcategories-wrapper {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
  }
}

/* Dim and desaturate background universe videos to act as a desensitized atmosphere */
.bg-video {
  opacity: 0.14 !important;
  filter: brightness(0.26) saturate(0.35) !important;
}

.games-category-pane {
  display: flex !important;
  flex-flow: row nowrap !important;
  width: 25% !important;
  flex-shrink: 0 !important;
  gap: 24px !important; /* Breathing room for larger cards */
  box-sizing: border-box !important;
  padding: 0 4px !important;
  transition: transform 0.55s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.4s ease, filter 0.4s ease !important;
  will-change: transform;
}

.games-category-pane .game-card.raycast-card {
  width: calc((100% - 48px) / 3) !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

/* ==========================================
   Continuous Sliding Track & Spring Physics
   ========================================== */
.raycast-track-viewport {
  width: 100% !important;
  overflow: hidden !important;
  position: relative !important;
  border-radius: 16px !important;
  padding: 14px 0 !important; /* Padding to prevent hover clip */
}

.games-track {
  display: flex !important;
  width: 400% !important;
  will-change: transform !important;
  /* Silk-smooth track motion */
  transition: transform 0.55s cubic-bezier(0.32, 0.72, 0, 1) !important;
}

/* Selected active Indicator (Apple-style segmented control) */
.category-pill-indicator {
  position: absolute !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
  border-radius: 9999px !important;
  transition: all 0.45s cubic-bezier(0.32, 0.72, 0, 1) !important; /* Silk-smooth motion */
  z-index: 0 !important;
  pointer-events: none !important;
}

/* Gently Floating Suspended Keyframe */
@keyframes floatCard {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -1px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Staggered entrance slide up keyframe */
@keyframes showcaseEntrance {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Card Internal Weight & Lag Parallax Transition */
.game-card.raycast-card {
  transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1), 
              opacity 0.4s ease, 
              filter 0.4s ease, 
              border-color 0.45s ease,
              box-shadow 0.45s ease !important;
  will-change: transform, opacity, filter, box-shadow !important;
  animation: floatCard 13s ease-in-out infinite; /* Subtle floating motion */
}

/* Staggered desynchronized floating animations */
.game-card.raycast-card:nth-child(2n) {
  animation-duration: 14s;
  animation-delay: -4s;
}
.game-card.raycast-card:nth-child(3n) {
  animation-duration: 15s;
  animation-delay: -7s;
}
.game-card.raycast-card:nth-child(4n) {
  animation-duration: 12.5s;
  animation-delay: -2s;
}

/* Apply showcase staggered entrance */
.game-card.showcase-entering {
  animation: showcaseEntrance 0.5s cubic-bezier(0.32, 0.72, 0, 1) both !important;
}

/* Disable floating when card is hovered or focused */
.game-card.raycast-card:hover,
.game-card.raycast-card.focused-card {
  animation: none !important;
}

/* Premium Hover Elevate (unified accent system) */
.game-card.raycast-card:hover {
  transform: translate3d(0, -4px, 0) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5) !important;
  z-index: 5 !important;
}

.game-card.raycast-card .card-icon,
.game-card.raycast-card .game-title,
.game-card.raycast-card .game-desc,
.game-card.raycast-card .card-graphic,
.game-card.raycast-card .card-arrow {
  transition: transform 0.55s cubic-bezier(0.32, 0.72, 0, 1) !important;
  will-change: transform !important;
}

/* Directional Lag Offsets during slide transitions */
.games-track.sliding-next .game-card.raycast-card .card-icon,
.games-track.sliding-next .game-card.raycast-card .game-title,
.games-track.sliding-next .game-card.raycast-card .game-desc,
.games-track.sliding-next .game-card.raycast-card .card-graphic,
.games-track.sliding-next .game-card.raycast-card .card-arrow {
  transform: translate3d(-7px, 0, 0) !important;
}

.games-track.sliding-prev .game-card.raycast-card .card-icon,
.games-track.sliding-prev .game-card.raycast-card .game-title,
.games-track.sliding-prev .game-card.raycast-card .game-desc,
.games-track.sliding-prev .game-card.raycast-card .card-graphic,
.games-track.sliding-prev .game-card.raycast-card .card-arrow {
  transform: translate3d(7px, 0, 0) !important;
}

/* Subcategory Focus & Ambient Lighting */
.game-card.raycast-card.focused-card {
  transform: scale(1.02) translate3d(0, -2px, 0) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 
              0 2px 4px rgba(0, 0, 0, 0.5), 
              inset 0 1px 1px rgba(255, 255, 255, 0.06) !important;
  opacity: 1 !important;
  filter: none !important;
}

.game-card.raycast-card.dimmed-card {
  opacity: 0.35 !important;
  filter: grayscale(0.2) blur(0.4px) !important;
}

/* Responsive overrides for physical carousel horizontal layout */
@media (max-width: 1100px) {
  .raycast-track-viewport {
    overflow: hidden !important; /* Keep hidden to avoid manual category swiping */
  }
  .games-track {
    width: 400% !important;
  }
  .games-category-pane {
    gap: 16px !important;
  }
  .games-category-pane .game-card.raycast-card {
    width: calc((100% - 16px) / 2) !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 580px) {
  .games-category-pane {
    gap: 12px !important;
  }
  .games-category-pane .game-card.raycast-card {
    width: 100% !important;
    flex-shrink: 0 !important;
  }
}

/* Guest locked cards cursor styling */
.game-card.raycast-card.guest-locked {
  cursor: not-allowed !important;
  opacity: 0.55 !important;
}

.game-card.raycast-card.guest-locked * {
  cursor: not-allowed !important;
}

/* ==========================================================================
   Premium Atmospheric Background (Stripe/Raycast/Linear aesthetic)
   ========================================================================== */


body {
  background-color: transparent !important;
}

/* Subtle, expensive noise overlay to add organic texture (similar to Raycast/Linear) */
body::after {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E") !important;
  opacity: 0.015 !important; /* Elegant, low opacity film grain */
  pointer-events: none !important;
  z-index: 9999 !important; /* Top z-index to blend all elements */
}

.premium-bg {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: #000000 !important;
  z-index: -100 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Very subtle grid pattern (3% opacity) */
.bg-grid {
  position: absolute !important;
  inset: 0 !important;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px), 
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px) !important;
  background-size: 60px 60px !important;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, rgba(0, 0, 0, 0.2) 70%, transparent 100%) !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

/* Three large blurred aurora glows (Blue, Purple, Cyan) */
.aurora-glow {
  position: absolute !important;
  border-radius: 50% !important;
  filter: blur(140px) !important;
  opacity: 0.09 !important; /* Visible but supporting aurora glows */
  will-change: transform;
  pointer-events: none !important;
}

.glow-blue {
  width: 600px !important;
  height: 600px !important;
  background: radial-gradient(circle, #0055ff, transparent 70%) !important;
  left: -10% !important;
  top: -10% !important;
  animation: driftBlue 32s ease-in-out infinite alternate !important;
}

.glow-purple {
  width: 700px !important;
  height: 700px !important;
  background: radial-gradient(circle, #9900ff, transparent 70%) !important;
  right: -15% !important;
  bottom: -15% !important;
  animation: driftPurple 38s ease-in-out infinite alternate !important;
}

.glow-cyan {
  width: 550px !important;
  height: 550px !important;
  background: radial-gradient(circle, #00ffff, transparent 70%) !important;
  left: 35% !important;
  top: 40% !important;
  animation: driftCyan 28s ease-in-out infinite alternate !important;
}

/* Slow drifting movement animations (20-40s) */
@keyframes driftBlue {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(80px, 60px, 0) scale(1.1); }
}

@keyframes driftPurple {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-100px, -70px, 0) scale(1.15); }
}

@keyframes driftCyan {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-50px, 90px, 0) scale(1.08); }
}

/* Floating particles animation */
@keyframes floatParticle {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.35;
  }
  90% {
    opacity: 0.35;
  }
  100% {
    transform: translate3d(50px, -80px, 0);
    opacity: 0;
  }
}

/* ── HIDE BROWSER VERTICAL SCROLLBAR ── */
html, body {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}
html::-webkit-scrollbar, body::-webkit-scrollbar {
  display: none !important; /* Chrome/Safari/Opera */
}

/* ── HEADER SCROLL PROGRESS BAR WRAPPER ── */
.header-scroll-wrapper {
  position: absolute !important;
  inset: 0 !important;
  height: auto !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.header-scroll-progress {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: auto !important;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.08) 0%, rgba(0, 255, 100, 0.15) 100%) !important; /* Subtle Cyber Cyan-to-Green gradient */
  width: 0%;
  pointer-events: none !important;
}

/* Aggressive pulse overscroll glow */
.header-scroll-progress.aggressive-glow {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.15) 0%, rgba(0, 255, 100, 0.25) 100%) !important;
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.2) !important;
  transition: background 0.2s ease, box-shadow 0.2s ease !important;
  animation: pulseAggressive 0.4s ease-in-out infinite alternate !important;
}

@keyframes pulseAggressive {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Ensure header elements stack above the progress fill */
header > *:not(.header-scroll-progress):not(.header-scroll-wrapper) {
  position: relative !important;
  z-index: 2 !important;
}

/* ── PREMIUM LIGHT MODE OVERRIDES (DAY THEME) ── */
body:not(.night-mode) header {
  background: rgba(255, 255, 255, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 
    0 10px 32px rgba(15, 23, 42, 0.04), 
    inset 1px 1px 1px rgba(255, 255, 255, 0.9), 
    inset -1px -1px 2px rgba(0, 0, 0, 0.03) !important;
}

body:not(.night-mode) header .logo {
  color: #0f172a !important;
}

body:not(.night-mode) header .header-nav .dock-label {
  color: #475569 !important;
}

body:not(.night-mode) header .header-nav .dock-item:hover .dock-label,
body:not(.night-mode) header .header-nav .dock-item.active .dock-label {
  color: #0f172a !important;
}

body:not(.night-mode) header .username {
  color: #475569 !important;
}

body:not(.night-mode) header .username:hover {
  color: #0f172a !important;
}

body:not(.night-mode) header #loginBtn,
body:not(.night-mode) header .logout-btn,
body:not(.night-mode) header .play-now-btn {
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.15), 
    inset -1.5px -1.5px 3px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

body:not(.night-mode) header #loginBtn:hover,
body:not(.night-mode) header .logout-btn:hover,
body:not(.night-mode) header .play-now-btn:hover {
  background: #1e293b !important;
  color: #ffffff !important;
  opacity: 1 !important;
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.2), 
    inset -1px -1px 2px rgba(0, 0, 0, 0.2),
    0 6px 18px rgba(0, 0, 0, 0.15) !important;
}

body:not(.night-mode) header #loginBtn .wrap,
body:not(.night-mode) header #loginBtn .wrap p,
body:not(.night-mode) header #loginBtn .wrap p span[data-translate] {
  color: #ffffff !important;
}

body:not(.night-mode) .header-scroll-progress {
  background: linear-gradient(90deg, rgba(0, 114, 255, 0.05) 0%, rgba(0, 198, 255, 0.1) 100%) !important;
}

body:not(.night-mode) .raycast-card {
  background: rgba(255, 255, 255, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 
    0 8px 24px rgba(15, 23, 42, 0.03), 
    inset 1px 1px 1px rgba(255, 255, 255, 0.8), 
    inset -1.5px -1.5px 3px rgba(0, 0, 0, 0.03) !important;
}

body:not(.night-mode) .raycast-card::before {
  background: radial-gradient(circle at 50% -30%, rgba(255, 255, 255, 0.5), transparent 65%) !important;
}

body:not(.night-mode) .raycast-card:hover {
  border-color: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 
    0 16px 36px rgba(15, 23, 42, 0.06), 
    inset 1px 1px 1.5px rgba(255, 255, 255, 0.95), 
    inset -1px -1px 2px rgba(0, 0, 0, 0.02) !important;
}

body:not(.night-mode) .raycast-card .game-title {
  color: #0f172a !important;
}

body:not(.night-mode) .raycast-card .game-desc {
  color: #475569 !important;
}

body:not(.night-mode) .raycast-card .card-arrow {
  background: rgba(255, 255, 255, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  color: #475569 !important;
}

body:not(.night-mode) .raycast-card:hover .card-arrow {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  color: #0f172a !important;
}

body:not(.night-mode) .raycast-card .card-icon {
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body:not(.night-mode) .raycast-card .card-icon-placeholder {
  background: rgba(0, 0, 0, 0.02) !important;
  border: 1px dashed rgba(0, 0, 0, 0.1) !important;
}

body:not(.night-mode) .raycast-card .card-graphic {
  background: rgba(255, 255, 255, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

body:not(.night-mode) .raycast-card .card-graphic::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 45%) !important;
}

body:not(.night-mode) .raycast-card .card-graphic::after {
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 65%) !important;
}

body:not(.night-mode) .raycast-card:hover .card-graphic {
  background: rgba(255, 255, 255, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}

body:not(.night-mode) .raycast-carousel-arrows .carousel-arrow {
  background: rgba(255, 255, 255, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  color: #475569 !important;
}

body:not(.night-mode) .raycast-carousel-arrows .carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  color: #0f172a !important;
}

body:not(.night-mode) .raycast-carousel-arrows .carousel-arrow:active {
  background: rgba(255, 255, 255, 0.95) !important;
}

body:not(.night-mode) .raycast-footer-link {
  color: #475569 !important;
}

body:not(.night-mode) .raycast-footer-link:hover {
  color: #0f172a !important;
}

/* ── LIGHT MODE OVERRIDES FOR TITLES, SUBTITLES & CATEGORIES ── */
body:not(.night-mode) .raycast-title {
  color: #0f172a !important;
}

body:not(.night-mode) .raycast-subtitle {
  color: #475569 !important;
}

body:not(.night-mode) .raycast-categories {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: inset 0 1px 2.5px rgba(0, 0, 0, 0.05) !important;
}

body:not(.night-mode) .category-pill-indicator {
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 1) !important;
}

body:not(.night-mode) .raycast-categories .category-pill {
  color: #64748b !important;
}

body:not(.night-mode) .raycast-categories .category-pill.active {
  color: #0f172a !important;
}

body:not(.night-mode) .raycast-categories .category-pill:hover:not(.active) {
  color: #0f172a !important;
}

body:not(.night-mode) .raycast-search-container {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

body:not(.night-mode) .raycast-search-container:focus-within {
  border-color: rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.03), inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

body:not(.night-mode) .raycast-search-input {
  color: #0f172a !important;
}

body:not(.night-mode) .raycast-search-input::placeholder {
  color: #94a3b8 !important;
}

body:not(.night-mode) .raycast-search-icon {
  color: #64748b !important;
}

body:not(.night-mode) .premium-bg {
  background-color: transparent !important;
}

/* ── INTERACTIVE EXPANDING LOGOUT BUTTON (UIVERSE REDESIGN) ── */
#logoutBtn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 44px;
  height: 44px;
  background-color: #dc2626;
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
  padding: 0;
  outline: none;
}

#logoutBtn:hover {
  width: 128px;
  border-radius: 8px;
}

#logoutBtn:active {
  transform: translate3d(4px, 4px, 0);
}

#logoutBtn .logout-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

#logoutBtn:hover .logout-icon-wrap {
  justify-content: flex-start;
  padding-left: 14px;
}

#logoutBtn .logout-icon-wrap svg {
  width: 16px;
  height: 16px;
  fill: white;
}

#logoutBtn .logout-text {
  position: absolute;
  right: 20px;
  transform: translateX(100%);
  opacity: 0;
  color: white;
  font-size: 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  white-space: nowrap;
}

#logoutBtn:hover .logout-text {
  transform: translateX(0);
  opacity: 1;
}

/* ── WEBGL AURORA BACKGROUND CONTAINER ── */
#aurora-bg {
  position: fixed !important;
  inset: 0 !important;
  z-index: -9 !important;
  pointer-events: none !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  opacity: 0.22 !important;
  transition: opacity 0.5s ease !important;
}

body:not(.night-mode) #aurora-bg {
  opacity: 0.08 !important;
}

/* ── GLOBAL PERFORMANCE OVERRIDES ── */
.perf-low-graphics, .perf-low-graphics * {
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}
.perf-low-graphics #aurora-bg {
  display: none !important;
}
.perf-reduce-animations, .perf-reduce-animations * {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}

/* ==========================================================================
   Robotic Cyber-Minion & Torchlight Spotlight System
   ========================================================================== */

#page-torch-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 997 !important;
  pointer-events: none !important;
  background: #040612 !important;
  opacity: 1 !important; /* Starts completely dark (100% dark) on load! */
  transition: background 1.8s ease-in-out, opacity 1.8s ease-in-out !important;
}

#page-torch-overlay.torch-on {
  background: 
    radial-gradient(circle 1200px at 70px calc(100vh - 75px), transparent 40%, rgba(4, 6, 18, 0.65) 90%),
    conic-gradient(from 0deg at 70px calc(100vh - 75px), 
      rgba(4, 6, 18, 0.65) 5deg, 
      rgba(4, 6, 18, 0.10) 20deg, 
      rgba(4, 6, 18, 0) 35deg, 
      rgba(4, 6, 18, 0) 80deg, 
      rgba(4, 6, 18, 0.10) 95deg, 
      rgba(4, 6, 18, 0.65) 110deg),
      
    radial-gradient(circle 800px at calc(100vw - 70px) calc(100vh - 75px), transparent 35%, rgba(4, 6, 18, 0.65) 90%),
    conic-gradient(from 0deg at calc(100vw - 70px) calc(100vh - 75px), 
      rgba(4, 6, 18, 0.65) 250deg, 
      rgba(4, 6, 18, 0.10) 270deg, 
      rgba(4, 6, 18, 0) 285deg, 
      rgba(4, 6, 18, 0) 345deg, 
      rgba(4, 6, 18, 0.10) 355deg, 
      rgba(4, 6, 18, 0.15) 360deg) !important;
  background-blend-mode: multiply !important;
  background-color: transparent !important;
  opacity: 0.12 !important; /* Dim the website by exactly 12% when active for a subtle dark look */
}

/* ── VOLUMETRIC TORCH LIGHT BEAM GLOW ── */
#page-torch-beam {
  position: fixed !important;
  top: calc(100vh - 75px) !important;
  left: 70px !important;
  bottom: auto !important;
  width: 200vw !important;
  height: 200vh !important;
  transform-origin: 0 0 !important;
  transform: rotate(-45deg) !important;
  pointer-events: none !important;
  z-index: 998 !important; /* Renders above page UI content to project light onto the foreground */
  opacity: 0;
  filter: blur(2px) !important; /* Soft blur to prevent aliased jagged lines on the glass edges */
  transition: opacity 1.5s ease-out !important;
}

#page-torch-beam::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.45) 0px, rgba(255, 255, 255, 0.15) 60px, rgba(255, 255, 255, 0.04) 150px, transparent 250px) !important;
  clip-path: polygon(0 -12px, 200vw -120vw, 200vw 120vw, 0 12px) !important; /* Spreads widely from a 24px bulb head base */
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

#page-torch-beam.active {
  opacity: 1 !important;
}

/* ── CINEMATIC VIGNETTE OVERLAY ── */
#cinematic-vignette {
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 996 !important; /* Above page content but below dark spotlight overlay (997) */
  background: radial-gradient(circle, transparent 30%, rgba(4, 6, 18, 0.60) 70%, #040612 100%) !important;
  opacity: 0.10 !important; /* Corners dark by 10% */
}

.minion-container {
  position: fixed !important;
  bottom: 15px !important;
  left: 15px !important;
  width: 90px !important;
  height: 120px !important;
  z-index: 999 !important;
  pointer-events: auto !important;
  user-select: none !important;
}

.minion {
  width: 100% !important;
  height: 100% !important;
  cursor: pointer !important;
}

.minion-left-arm {
  transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.minion-pupil-group {
  transition: transform 0.08s ease-out !important;
}

/* ── SPEECH BUBBLE TOOLTIP ── */
.minion-bubble {
  position: absolute !important;
  bottom: 135px !important;
  left: 0px !important;
  background: rgba(8, 12, 32, 0.92) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 10px var(--accent-glow) !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s !important;
  width: 220px !important;
  line-height: 1.4 !important;
  z-index: 1000 !important;
  pointer-events: none !important;
}

.minion-bubble::after {
  content: "" !important;
  position: absolute !important;
  bottom: -6px !important;
  left: 35px !important;
  width: 10px !important;
  height: 10px !important;
  background: rgba(8, 12, 32, 0.92) !important;
  border-right: 1px solid var(--accent) !important;
  border-bottom: 1px solid var(--accent) !important;
  transform: rotate(45deg) !important;
}

.minion-bubble.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

/* ── QUICK SELECTION MENU (GAMES PAGE) ── */
.minion-quick-menu {
  position: absolute !important;
  bottom: 135px !important;
  left: 0px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s !important;
  width: 170px !important;
  z-index: 1000 !important;
}

.minion-quick-menu.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.minion-menu-btn {
  background: rgba(12, 16, 36, 0.94) !important;
  border: 1px solid var(--border) !important;
  color: #e4e4e7 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  outline: none !important;
}

.minion-menu-btn:hover {
  border-color: var(--accent) !important;
  background: rgba(255, 94, 91, 0.1) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px var(--accent-glow) !important;
  transform: translateX(4px) !important;
}

.minion-menu-btn span.emoji {
  font-size: 13px !important;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif !important;
}

/* ── FLOATING HELP CHAT BOX ── */
#minion-chat-box {
  position: fixed !important;
  bottom: 15px !important;
  left: 125px !important;
  width: 320px !important;
  height: 400px !important;
  background: rgba(6, 8, 20, 0.96) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 25px var(--accent-glow) !important;
  z-index: 1010 !important;
  overflow: hidden !important;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s !important;
}

#minion-chat-box.open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) translateY(0) !important;
}

.chat-header {
  padding: 12px 16px !important;
  background: rgba(255, 94, 91, 0.08) !important;
  border-bottom: 1px solid var(--border) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.chat-title {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: 0.08em !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.chat-online-dot {
  width: 6px !important;
  height: 6px !important;
  background: #00ff66 !important;
  border-radius: 50% !important;
  box-shadow: 0 0 6px #00ff66 !important;
  animation: pulseDot 1.5s infinite alternate !important;
}

@keyframes pulseDot {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.chat-close-btn {
  background: none !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.4) !important;
  cursor: pointer !important;
  font-size: 14px !important;
  transition: color 0.2s ease !important;
  outline: none !important;
}

.chat-close-btn:hover {
  color: #ff4466 !important;
}

.chat-messages {
  flex-grow: 1 !important;
  overflow-y: auto !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  scrollbar-width: none !important; /* hide default scrollbar Firefox */
}

.chat-messages::-webkit-scrollbar {
  display: none !important; /* hide Webkit scrollbar */
}

.chat-msg {
  max-width: 82% !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  word-wrap: break-word !important;
}

.chat-msg.minion-msg {
  align-self: flex-start !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #e4e4e7 !important;
  border-bottom-left-radius: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.02) !important;
}

.chat-msg.user-msg {
  align-self: flex-end !important;
  background: var(--accent) !important;
  color: #ffffff !important;
  border-bottom-right-radius: 0 !important;
  box-shadow: 0 3px 10px var(--accent-glow) !important;
}

.chat-input-container {
  padding: 10px 12px !important;
  border-top: 1px solid var(--border) !important;
  display: flex !important;
  gap: 8px !important;
  background: rgba(4, 6, 18, 0.6) !important;
  align-items: center !important;
}

.chat-input {
  flex-grow: 1 !important;
  background: rgba(8, 12, 32, 0.9) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  color: #ffffff !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 12px !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
}

.chat-input:focus {
  border-color: var(--accent) !important;
}

.chat-send-btn {
  background: var(--accent) !important;
  border: none !important;
  color: #ffffff !important;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.chat-send-btn:hover {
  opacity: 0.9 !important;
  box-shadow: 0 0 10px var(--accent-glow) !important;
}

/* ── DOUBLE OVERRIDES FOR PERFORMANCE CLASS CONTROLS ── */
.perf-low-graphics #page-torch-overlay,
.perf-low-graphics #page-torch-beam,
.perf-low-graphics #page-torch-beam-little,
.perf-low-graphics #cinematic-vignette,
.perf-low-graphics .minion-container,
.perf-low-graphics .little-minion-container,
.perf-low-graphics #minion-chat-box {
  display: none !important;
}
.perf-reduce-animations .minion-left-arm,
.perf-reduce-animations .little-minion-right-arm {
  transition: none !important;
}
.perf-reduce-animations #page-torch-overlay,
.perf-reduce-animations #page-torch-beam,
.perf-reduce-animations #page-torch-beam-little,
.perf-reduce-animations #cinematic-vignette {
  transition: none !important;
}

/* Hide minions during cinematic intro sequence */
#cinematic-intro ~ .minion-container,
#cinematic-intro ~ .little-minion-container {
  display: none !important;
}

/* ── VOLUMETRIC TORCH LIGHT BEAM GLOW (LITTLE) ── */
#page-torch-beam-little {
  position: fixed !important;
  top: calc(100vh - 75px) !important;
  left: calc(100vw - 70px) !important;
  bottom: auto !important;
  width: 200vw !important;
  height: 200vh !important;
  transform-origin: 0 0 !important;
  transform: scaleX(-1) rotate(-45deg) !important;
  pointer-events: none !important;
  z-index: 998 !important; /* Renders above page UI content to project light onto the foreground */
  opacity: 0;
  filter: blur(2px) !important; /* Soft blur to prevent aliased jagged lines on the glass edges */
  transition: opacity 1.5s ease-out !important;
}

#page-torch-beam-little::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.45) 0px, rgba(255, 255, 255, 0.15) 60px, rgba(255, 255, 255, 0.04) 150px, transparent 250px) !important;
  clip-path: polygon(0 -12px, 200vw -120vw, 200vw 120vw, 0 12px) !important; /* Spreads widely from a 24px bulb head base */
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

#page-torch-beam-little.active {
  opacity: 1 !important;
}

/* ── LITTLE MINION CONTAINER ── */
.little-minion-container {
  position: fixed !important;
  bottom: 15px !important;
  right: 15px !important;
  left: auto !important;
  width: 65px !important;
  height: 97px !important;
  z-index: 999 !important;
  pointer-events: auto !important;
  user-select: none !important;
}

.little-minion-container .minion-bubble {
  left: auto !important;
  right: 0px !important;
  bottom: 110px !important;
  transform: translateY(10px);
}

.little-minion-container .minion-bubble::after {
  left: auto !important;
  right: 25px !important;
}

.little-minion-right-arm {
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

/* ── ACTIVE TORCH HALOGEN BULB GLOW ── */
body.torch-active #minionChar .minion-left-arm g circle[fill="#ffd700"],
body.torch-active #littleMinionChar .minion-left-arm g circle[fill="#ffd700"] {
  filter: drop-shadow(0 0 10px #ffe178) drop-shadow(0 0 3px #ffffff) !important;
  fill: #ffffff !important;
}

