/* ==========================================================================
   GameBos - Custom Cyber Gaming Styles & Animations
   ========================================================================== */

:root {
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --color-primary: #00f2fe;
  --color-secondary: #4facfe;
  --color-accent: #ff0844;
  --color-neon-purple: #8a2be2;
  --color-bg-dark: #07090e;
  --color-surface: #0f1322;
  --color-surface-card: #141a2e;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg-dark);
  color: #f1f5f9;
  overflow-x: hidden;
}

::selection {
  background-color: #00f2fe;
  color: #000000;
}

.font-display {
  font-family: var(--font-display);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #090c15;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Cyber Glow Effects */
.glow-cyan {
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
}
.glow-purple {
  box-shadow: 0 0 25px rgba(138, 43, 226, 0.4);
}
.glow-pink {
  box-shadow: 0 0 20px rgba(255, 8, 68, 0.35);
}

.text-glow-cyan {
  text-shadow: 0 0 12px rgba(0, 242, 254, 0.6);
}
.text-glow-pink {
  text-shadow: 0 0 12px rgba(255, 8, 68, 0.6);
}

/* High Visibility Focus Indicators for Keyboard Navigation (A11y) */
:focus-visible {
  outline: 2px solid #00f2fe !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 4px rgba(0, 242, 254, 0.25) !important;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
  outline: none;
}

/* Glassmorphism */
.glass-nav {
  background: rgba(11, 14, 23, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
  background: rgba(18, 23, 39, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-modal {
  background: rgba(12, 16, 28, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 242, 254, 0.25);
}

/* Game Card Hover & Image Auto-Crop */
.game-grid-item {
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
}

.game-card {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 242, 254, 0.45);
  box-shadow: 0 14px 28px -8px rgba(0, 242, 254, 0.2);
}

.game-thumb-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #0b0f19;
}

.game-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

.game-card:hover .game-thumb-img {
  transform: scale(1.06);
}

/* Animated Gradient Background for Hero Banner */
.cyber-gradient-hero {
  background: radial-gradient(circle at 50% 20%, rgba(138, 43, 226, 0.16) 0%, rgba(0, 242, 254, 0.08) 40%, rgba(7, 9, 14, 0) 70%),
              linear-gradient(180deg, rgba(15, 19, 34, 0.85) 0%, rgba(7, 9, 14, 1) 100%);
}

/* Pulse Badge Animation */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.04);
  }
}
.animate-pulse-glow {
  animation: pulse-glow 2s infinite ease-in-out;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-bg {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Iframe Game Player Responsive Container */
.game-iframe-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-iframe-wrapper.portrait-mode {
  aspect-ratio: 9 / 16;
  max-width: 460px;
  margin: 0 auto;
}

.game-iframe-wrapper.theater-mode {
  aspect-ratio: 21 / 9;
  max-width: 100%;
}

.game-iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Category Nav Slider */
.category-scrollbar::-webkit-scrollbar {
  height: 4px;
}
.category-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

/* Toast Container */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 90vw;
  width: 380px;
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ==========================================================================
   Motion Accessibility (Prefers-Reduced-Motion)
   Preserves state transitions and visibility without disorienting motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .animate-pulse-glow,
  .shimmer-bg,
  .animate-spin,
  .animate-ping {
    animation: none !important;
  }

  .game-card:hover {
    transform: none !important;
  }

  .game-thumb-img {
    transition: none !important;
  }

  .game-card:hover .game-thumb-img {
    transform: none !important;
  }

  .toast-item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
