  :root {
      --bg-color: rgba(0, 0, 0, 0.6);
      --text-color: rgba(255, 255, 255, 0.8);
      --navbar-bg: rgba(0, 0, 0, 0.4);
      --container-bg: rgba(0, 0, 0, 0.4);
      --search-bg: rgba(0, 0, 0, 0.1);
      --footer-bg: rgba(0, 0, 0, 0.4);
      --toggle-bg: rgba(0, 0, 0, 0.1);
      --placeholder-color: white;
      --element-bg: rgba(255, 255, 255, 0.1);
      --form-bg: rgba(0, 0, 0, 0.4);
      --table-bg: rgba(0, 0, 0, 0.4);
      --input-bg: rgba(0, 0, 0, 0.4);
      --input-text: rgba(255, 255, 255, 0.9);
      --border-color: rgba(255, 255, 255, 0.2);
      --neon-blue: #00d4ff;
      --bright-cyan: #00ffff;
      --electric-blue: #007fff;
      --royal-blue: #0055ff;
      --plasma-red: #ff0066;
      --deep-violet: #6a0dad;
      --accent-glow: rgba(0, 212, 255, 0.3);
      --gradient-primary: linear-gradient(135deg, var(--bright-cyan), var(--electric-blue));
      --gradient-secondary: linear-gradient(135deg, var(--plasma-red), var(--deep-violet));
      --gradient-visible: linear-gradient(to right, #00ccff 0%, #66ffff 20%, #9966ff 40%, #cc66ff 60%, #ff66cc 80%, #ff99ff 100%);
      --gradient-purple: linear-gradient(90deg, #cc66ff 0%, #bb55ff 25%, #aa44ff 50%, #9933ff 75%, #8822ff 100%);
      --glass-gradient: linear-gradient(135deg, rgba(17, 25, 40, 0.85) 0%, rgba(17, 25, 40, 0.9) 50%, rgba(17, 25, 40, 0.85) 100%);
  }

  [data-theme="light"] {
      --bg-color: rgba(240, 248, 255, 0.6);
      --text-color: rgba(0, 0, 0, 0.8);
      --navbar-bg: rgba(255, 255, 255, 0.4);
      --container-bg: rgba(255, 255, 255, 0.4);
      --search-bg: rgba(255, 255, 255, 0.1);
      --footer-bg: rgba(248, 250, 252, 0.4);
      --toggle-bg: rgba(255, 255, 255, 0.1);
      --placeholder-color: black;
      --element-bg: rgba(0, 0, 0, 0.1);
      --form-bg: rgba(255, 255, 255, 0.4);
      --table-bg: rgba(255, 255, 255, 0.4);
      --input-bg: rgba(255, 255, 255, 0.4);
      --input-text: rgba(0, 0, 0, 0.8);
      --border-color: rgba(0, 0, 0, 0.2);
      --neon-blue: #0066ff;
      --bright-cyan: #0099ff;
      --electric-blue: #0044cc;
      --gradient-visible: linear-gradient(to right, #0066ff 0%, #3366ff 20%, #6633ff 40%, #9933cc 60%, #cc3399 80%, #ff3366 100%);
      --gradient-purple: linear-gradient(90deg, #bb55ff 0%, #aa44ff 25%, #9933ff 50%, #8822ff 75%, #7711ff 100%);
      --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.85) 100%);
  }

  html,
  body {
      height: 100%;
      overflow: visible;
      /* CRITICAL FIX: Changed from hidden to visible to allow search suggestions to display */
      transition: all 0.5s ease;
  }

  html {
      transition: all 0.5s ease;
  }

  /* Universal smooth transitions for theme switching */
  * {
      transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, opacity 0.5s ease, backdrop-filter 0.5s ease;
  }

  /* Enhanced theme transition class for smooth switching */
  .theme-transition,
  .theme-transition * {
      transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, opacity 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease !important;
  }

  body {
      background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
      background-color: var(--bg-color);
      color: var(--text-color);
      font-family: 'Rajdhani', sans-serif;
      margin: 0;
      padding: 0;
      transition: all 0.5s ease;
      min-height: 100vh;
  }

  /* Specific transitions for layout containers */
  .navbar,
  .container,
  .footer,
  .game-list,
  .game-card,
  .filters,
  .search-container,
  .theme-switch,
  .static-background,
  .loading-message,
  .pagination {
      transition: all 0.5s ease, background-color 0.5s ease, backdrop-filter 0.5s ease;
  }

  .loading-message-container {
      min-height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 8px auto;
      /* Reduced margin for tighter spacing */
      max-width: 400px;
      width: 95%;
      transition: margin 0.3s ease, min-height 0.3s ease, opacity 0.3s ease;
  }

  /* Completely remove space when loading message is hidden */
  .loading-message-container:not(.visible) {
      min-height: 0;
      margin: 0;
      padding: 0;
      overflow: hidden;
      display: none;
      /* Completely remove from layout when hidden */
  }

  .loading-message {
      text-align: center;
      margin: 20px auto;
      font-size: 18px;
      color: var(--text-color);
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      transition: max-height 0.5s ease, opacity 0.5s ease;
      padding: 0 20px;
  }

  .loading-message.visible {
      max-height: 425px;
      opacity: 1;
      padding: 20px;
  }

  .navbar {
      position: fixed;
      top: 10px;
      left: 50%;
      transform: translateX(-50%);
      width: 90%;
      padding: 10px 15px;
      background: var(--navbar-bg);
      backdrop-filter: blur(6px);
      border-radius: 10px;
      z-index: 1000;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: var(--card-shadow);
      border: 1px solid rgba(0, 0, 0, 0.1);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      will-change: transform;
      /* GPU acceleration hint */
  }

  .navbar.hidden {
      transform: translate(-50%, -120%);
      /* Slightly more offset for cleaner hide */
  }

  .logo {
      display: flex;
      align-items: center;
      margin-left: 10px;
  }

  .logo img {
      height: 90px;
      transition: transform 0.5s ease;
  }

  .logo img:hover {
      transform: scale(1.05);
  }

  .navbar-title {
      font-size: 18px;
      margin-bottom: -5px;
      font-weight: bold;
      text-align: center;
      flex-grow: 1;
      color: var(--text-color);
      transition: all 0.5s ease;
  }

  .navbar-title {
      font-size: 18px;
      font-weight: bold;
      text-align: center;
      flex-grow: 1;
      color: var(--text-color);
      transition: all 0.5s ease;
      position: relative;
      height: 60px;
      overflow: hidden;
  }

  .navbar-title h1 {
      margin: 0;
      position: absolute;
      width: 100%;
      top: 50%;
      transform: translateY(-50%);
      transition: all 0.5s ease;
      z-index: 2;
      font-family: 'Orbitron', monospace;
      font-weight: 900;
      /* Fallback color for browsers that don't support background-clip */
      color: #00ccff;
      background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff);
      background-size: 400% 400%;
      background-repeat: no-repeat;
      background-position: center;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: 0 0 5px var(--accent-glow);
      animation: gradientMove 8s ease-in-out infinite;
  }

  /* Light mode darker version for navbar title h1 */
  [data-theme="light"] .navbar-title h1 {
      color: #0066cc;
      background: linear-gradient(90deg, #cc2233, #229988, #2266aa, #668844, #cc7722, #cc3399, #2244cc);
      background-size: 400% 400%;
      background-repeat: no-repeat;
      background-position: center;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
      animation: gradientMove 8s ease-in-out infinite;
  }

  .navbar-title h6 {
      margin: 0;
      position: absolute;
      width: 100%;
      opacity: 0;
      top: 50%;
      transform: translateY(-50%);
      transition: all 0.5s ease;
      z-index: 1;
      font-family: 'Orbitron', monospace;
      font-weight: 600;
      /* Fallback color for browsers that don't support background-clip */
      color: #00ccff;
      background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff);
      background-size: 400% 400%;
      background-repeat: no-repeat;
      background-position: center;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: 0 0 3px rgba(0, 204, 255, 0.3);
      animation: gradientMove 8s ease-in-out infinite;
  }

  /* Light mode darker version for navbar title h6 */
  [data-theme="light"] .navbar-title h6 {
      color: #0066cc;
      background: linear-gradient(90deg, #cc2233, #229988, #2266aa, #668844, #cc7722, #cc3399, #2244cc);
      background-size: 400% 400%;
      background-repeat: no-repeat;
      background-position: center;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: 0 0 3px rgba(0, 102, 204, 0.3);
      animation: gradientMove 8s ease-in-out infinite;
  }

  .title-animate h1 {
      top: 30%;
  }

  .title-animate h6 {
      opacity: 1;
      top: 70%;
  }

  .nav-links {
      list-style: none;
      display: flex;
      align-items: center;
      margin: 0;
      padding: 0;
      z-index: 1000;
      border-bottom-right-radius: 10px;
      border-bottom-left-radius: 10px;
  }

  .nav-links li {
      margin: 0 15px;
  }

  .nav-links a,
  .nav-links button {
      text-decoration: none;
      color: var(--text-color);
      background: none;
      border: none;
      font: inherit;
      cursor: pointer;
      padding: 0;
      transition: opacity 0.5s ease;
  }

  .nav-links a:hover,
  .nav-links button:hover {
      opacity: 0.8;
      transition: opacity 0.5s ease;
  }

  /* Gradient styling for About button, Contact link, Instagram link, and Home button */
  .nav-links button#aboutBtn,
  .nav-links button#homeBtn,
  .nav-links a[href*="mail.google.com"],
  .nav-links a[href*="instagram.com"] {
      font-family: 'Orbitron', monospace;
      font-weight: 600;
      background: var(--gradient-visible);
      background-size: fit-content;
      background-repeat: no-repeat;
      background-position: center;
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      color: #007BFF;
      /* Fallback color */
  }

  /* Light mode darker versions for better visibility */
  [data-theme="light"] .nav-links button#aboutBtn,
  [data-theme="light"] .nav-links button#homeBtn,
  [data-theme="light"] .nav-links a[href*="mail.google.com"],
  [data-theme="light"] .nav-links a[href*="instagram.com"] {
      background: linear-gradient(to right, #0044cc 0%, #2244cc 20%, #4422cc 40%, #6622aa 60%, #882288 80%, #aa2266 100%);
      background-size: fit-content;
      background-repeat: no-repeat;
      background-position: center;
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      color: #0044cc;
      /* Darker fallback color for light mode */
  }

  /* Button styling to match index.html */
  .btn {
      padding: 15px 30px;
      border: none;
      border-radius: 50px;
      font-family: 'Rajdhani', sans-serif;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      display: inline-block;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
  }

  .btn-primary {
      background: var(--gradient-primary);
      color: white;
      box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
  }

  .btn-primary:hover {
      transform: translateY(-3px);
      box-shadow: 0 15px 40px rgba(0, 212, 255, 0.5);
  }

  .theme-switch {
      display: flex;
      align-items: center;
      padding: 5px 10px;
      border-radius: 20px;
      cursor: pointer;
      background: var(--toggle-bg);
      margin-right: 15px;
      border: 1px solid rgba(0, 0, 0, 0.2);
      transition: transform 0.5s ease;
  }

  .theme-switch:hover {
      transform: scale(1.05);
  }

  .theme-switch span {
      font-size: 20px;
      margin: 0 20px;
  }

  .search-container {
      position: relative;
      margin: 0 auto;
      text-align: center;
      max-width: 480px;
      /* Match search-unit controlled max-width */
      width: 100%;
      flex-shrink: 0;
      /* Prevent container compression */
      transition: all 0.5s ease;
  }

  .search-input {
      background: var(--search-bg);
      color: var(--text-color);
      padding: 12px 20px;
      border-radius: 25px;
      width: 300px;
      max-width: 320px;
      /* Controlled maximum expansion */
      border: none;
      font-family: 'Rajdhani', sans-serif;
      transition: all 0.3s ease;
      /* Faster, smoother transition */
      box-shadow: var(--card-shadow);
      backdrop-filter: blur(6px);
      box-sizing: border-box;
      /* Ensure padding doesn't affect width calculation */
  }

  .search-input:focus {
      outline: none;
      width: 320px;
      /* Moderate expansion - only 20px growth */
      box-shadow: var(--hover-shadow);
      backdrop-filter: blur(6px);
      transform: scale(1.01);
      /* Subtle scale instead of aggressive width growth */
  }

  .search-input::placeholder {
      color: var(--placeholder-color);
      transition: color 0.5s ease;
  }

  /* Search Suggestion System Styling - CONSTRAINED LAYOUT */
  .search-unit {
      position: relative;
      margin: 0 auto;
      text-align: center;
      max-width: 480px;
      /* HARD LIMIT: Reduced from 600px for controlled expansion */
      width: 95%;
      /* Responsive width with max limit */
      /* IRONCLAD HEIGHT CONSTRAINTS */
      max-height: 350px;
      /* PREVENT SEARCH UNIT FROM OWNING THE SCREEN */
      min-height: 48px;
      /* Minimum for search input */
      transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease, backdrop-filter 0.5s ease;
      /* Added theme transition properties */
      will-change: transform, opacity;
      z-index: 900000;
      /* ULTRA HIGH Z-INDEX: ENSURE SEARCH UNIT IS ABOVE OTHER ELEMENTS */
      flex-grow: 0;
      /* Prevent full container takeover */
      /* LAYOUT RESPECT */
      contain: layout style;
      box-sizing: border-box;
      overflow: visible;
      /* CRITICAL: Allow suggestions to extend naturally and be fully visible */
  }

  .search-unit.search-expanded {
      transform: translateY(-10px);
  }

  .search-unit.search-collapsed {
      transform: translateY(0);
  }

  .search-bar {
      position: relative;
      z-index: 999990;
      /* ULTRA HIGH Z-INDEX: SEARCH BAR ABOVE EVERYTHING BUT BELOW SUGGESTIONS */
      transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
      border-radius: 25px;
  }

  .search-unit.search-expanded .search-bar {
      border-radius: 25px 25px 8px 8px;
      box-shadow: 0 4px 20px rgba(142, 72, 255, 0.3);
  }

  .search-suggestions-panel {
      position: absolute;
      top: 100%;
      z-index: 999999;
      /* ULTIMATE Z-INDEX: Guarantee visibility above everything */
      /* MUST be visible above all main UI elements, overlays, and modals */
      width: 320px;
      /* Match controlled search-input max-width exactly */
      left: 0;
      right: 0;
      margin: 0 auto;
      max-width: none;
      background: var(--glass-gradient);
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
      /* Enhanced fallback for browsers that don't support backdrop-filter */
      background-color: rgba(17, 25, 40, 0.95);
      /* STRONGER BACKGROUND for better visibility */
      border-radius: 0 0 20px 20px;
      border: 2px solid rgba(142, 72, 255, 0.5);
      /* STRONGER BORDER for better definition */
      border-top: none;
      box-shadow:
          0 12px 48px rgba(0, 0, 0, 0.6),
          0 6px 24px rgba(142, 72, 255, 0.4),
          inset 0 1px 0 rgba(255, 255, 255, 0.15);
      /* STRONGER SHADOWS for better visibility */
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
      /* Added theme transition properties */
      will-change: max-height, opacity, transform;
      /* REMOVED SCROLL FUNCTIONALITY - Allow full expansion */
      /* overflow-y: auto; - REMOVED */
      /* scrollbar-width: thin; - REMOVED */
      /* scrollbar-color: rgba(142, 72, 255, 0.6) transparent; - REMOVED */
      /* Force backdrop-filter to work properly */
      isolation: isolate;
      /* REMOVED contain: layout style paint; - This was potentially clipping the panel */
      /* Hardware acceleration */
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
      -webkit-perspective: 1000px;
      perspective: 1000px;
      /* Initial state for first-load animations */
      transform: translateY(-10px);
      /* ENSURE FULL VISIBILITY - NEVER CLIPPED */
      pointer-events: auto;
      display: block;
  }

  /* Animation state classes for consistent behavior */
  .search-suggestions-panel.animating-in {
      animation: suggestionsSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .search-suggestions-panel.animating-out {
      animation: suggestionsSlideOut 0.3s ease-out forwards;
  }

  /* Keyframe animations for suggestions panel */
  @keyframes suggestionsSlideIn {
      from {
          max-height: 0;
          opacity: 0;
          transform: translateY(-10px);
      }

      to {
          max-height: 288px;
          /* 6-SUGGESTION LIMIT: Match controlled desktop height */
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes suggestionsSlideOut {
      from {
          max-height: 288px;
          /* 6-SUGGESTION LIMIT: Match controlled desktop height */
          opacity: 1;
          transform: translateY(0);
      }

      to {
          max-height: 0;
          opacity: 0;
          transform: translateY(-10px);
      }
  }

  /* Custom scrollbar styling for 6-suggestion limit with scrollable overflow */
  .search-suggestions-panel::-webkit-scrollbar {
      width: 6px;
  }

  .search-suggestions-panel::-webkit-scrollbar-track {
      background: rgba(0, 0, 0, 0.1);
      border-radius: 3px;
  }

  .search-suggestions-panel::-webkit-scrollbar-thumb {
      background: linear-gradient(135deg, rgba(142, 72, 255, 0.6), rgba(142, 72, 255, 0.8));
      border-radius: 3px;
      transition: background 0.3s ease;
  }

  .search-suggestions-panel::-webkit-scrollbar-thumb:hover {
      background: linear-gradient(135deg, rgba(142, 72, 255, 0.8), rgba(142, 72, 255, 1));
  }

  /* Expanded state with 6-SUGGESTION LIMIT - SCROLLABLE OVERFLOW */
  .search-unit.search-expanded .search-suggestions-panel {
      max-height: 288px !important;
      /* LIMIT: exactly 6 suggestions (~48px each) - others scrollable */
      min-height: 0;
      height: auto;
      opacity: 1;
      overflow-y: auto;
      overflow-x: hidden;
      /* RESTORE SCROLL for suggestions beyond 6 */
      padding-bottom: 4px;
      background: var(--glass-gradient);
      backdrop-filter: blur(6px);
      /* Space for scrollbar */
      transform: translateY(0);
      scrollbar-width: thin;
      scrollbar-color: rgba(142, 72, 255, 0.6) transparent;
      /* CONTROLLED EXPANSION with scrolling */
      box-sizing: border-box;
  }
  }

  /* CRITICAL VISIBILITY OVERRIDE - FORCE SUGGESTIONS TO ALWAYS BE VISIBLE WHEN EXPANDED */
  .search-unit.search-expanded .search-suggestions-panel {
      display: block !important;
      visibility: visible !important;
      opacity: 1 !important;
      pointer-events: auto !important;
      z-index: 999999 !important;
      /* FORCE MAXIMUM VISIBILITY */
      position: absolute !important;
      top: 100% !important;
      /* ENSURE PROPER POSITIONING */
  }

  /* SAFETY RULE: Ensure no parent containers clip search suggestions */
  .search-unit,
  .search-container,
  .toggle-controls-container {
      overflow: visible !important;
      /* CRITICAL: Never clip search suggestions */
  }

  /* Mobile-specific animation optimizations */
  @media (max-width: 768px) {
      .search-suggestions-panel {
          /* Faster animations on mobile for better performance */
          transition: all 0.3s ease-out;
          width: 300px;
          /* Match mobile search-input max-width */
      }

      @keyframes suggestionsSlideIn {
          from {
              max-height: 0;
              opacity: 0;
              transform: translateY(-5px);
              /* Reduced transform for mobile */
          }

          to {
              max-height: 240px;
              /* MOBILE LIMIT: 4 suggestions × 60px = 240px */
              opacity: 1;
              transform: translateY(0);
          }
      }

      @keyframes suggestionsSlideOut {
          from {
              max-height: 240px;
              /* MOBILE LIMIT: 4 suggestions × 60px = 240px */
              opacity: 1;
              transform: translateY(0);
          }

          to {
              max-height: 0;
              opacity: 0;
              transform: translateY(-5px);
          }
      }

      .search-suggestions-panel.animating-in {
          animation: suggestionsSlideIn 0.3s ease-out forwards;
      }

      .search-suggestions-panel.animating-out {
          animation: suggestionsSlideOut 0.2s ease-out forwards;
      }

      .search-unit.search-expanded .search-suggestions-panel {
          max-height: 240px !important;
          /* MOBILE LIMIT: exactly 4 suggestions (60px each) - others scrollable */
          min-height: 0;
          height: auto;
          scrollbar-width: thin;
          overflow-y: auto;
          overflow-x: hidden;
          /* RESTORE MOBILE SCROLL for suggestions beyond 4 */
          /* CONTROLLED MOBILE EXPANSION with scrolling */
          box-sizing: border-box;
      }
  }

  /* Enhanced backdrop-filter support detection and fallbacks */
  @supports not (backdrop-filter: blur(1px)) and not (-webkit-backdrop-filter: blur(1px)) {
      .search-suggestions-panel {
          background: rgba(17, 25, 40, 0.98) !important;
          border: 2px solid rgba(142, 72, 255, 0.5);
          box-shadow:
              0 12px 40px rgba(0, 0, 0, 0.6),
              0 6px 20px rgba(142, 72, 255, 0.3);
      }

      [data-theme="light"] .search-suggestions-panel {
          background: rgba(255, 255, 255, 0.98) !important;
          backdrop-filter: blur(6px);
          border: 2px solid rgba(142, 72, 255, 0.4);
          box-shadow:
              0 12px 40px rgba(0, 0, 0, 0.2),
              0 6px 20px rgba(142, 72, 255, 0.2);
      }
  }

  .suggestion-card {
      display: flex;
      align-items: center;
      padding: 12px 16px;
      margin: 6px 8px;
      /* Slightly reduced margin for better fit */
      min-height: 40px;
      /* Ensure consistent card height */
      background: var(--container-bg, rgba(255, 255, 255, 0.05));
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease;
      /* Added theme transition properties */
      border: 1px solid rgba(142, 72, 255, 0.1);
      position: relative;
      overflow: hidden;
      will-change: transform, opacity, box-shadow;
      /* role: option; - Removed invalid CSS property */
      /* tabindex: -1; - Removed invalid CSS property */
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
      /* Enhanced fallback for individual cards */
      background-color: rgba(255, 255, 255, 0.08);
  }

  .suggestion-card:first-child {
      margin-top: 12px;
  }

  .suggestion-card:last-child {
      margin-bottom: 12px;
  }

  .suggestion-card:hover,
  .suggestion-card.highlighted {
      transform: translateY(-2px) scale(1.02);
      background: var(--container-bg, rgba(255, 255, 255, 0.1));
      border-color: rgba(142, 72, 255, 0.4);
      box-shadow: 0 8px 25px rgba(142, 72, 255, 0.2);
  }

  .suggestion-card:active {
      transform: translateY(0) scale(1);
      transition: all 0.15s ease;
  }

  .suggestion-poster {
      width: 48px;
      height: 32px;
      border-radius: 6px;
      object-fit: cover;
      margin-right: 12px;
      flex-shrink: 0;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      position: relative;
      overflow: hidden;
  }

  .suggestion-poster img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: opacity 0.3s ease;
  }

  .suggestion-poster.loading {
      animation: suggestionShimmer 1.5s ease-in-out infinite;
  }

  @keyframes suggestionShimmer {
      0% {
          background-position: -200px 0;
      }

      100% {
          background-position: calc(200px + 100%) 0;
      }
  }

  .suggestion-poster.loading::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
      animation: suggestionShimmer 1.5s ease-in-out infinite;
  }

  .suggestion-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      text-align: left;
      min-width: 0;
  }

  .suggestion-title {
      font-family: 'Rajdhani', sans-serif;
      font-size: 14px;
      font-weight: 600;
      color: var(--text-color, #fff);
      margin: 0;
      line-height: 1.2;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 100%;
      transition: color 0.5s ease;
      /* Added theme transition for color */
  }

  .suggestion-store {
      font-family: 'Rajdhani', sans-serif;
      font-size: 12px;
      color: var(--text-color-secondary, rgba(255, 255, 255, 0.7));
      margin-top: 2px;
      opacity: 0.8;
      transition: color 0.5s ease;
      /* Added theme transition for color */
  }

  .suggestion-highlight {
      background: linear-gradient(135deg, rgba(142, 72, 255, 0.3), rgba(142, 72, 255, 0.5));
      color: #fff;
      padding: 1px 3px;
      border-radius: 3px;
      font-weight: bold;
  }

  /* Light theme adjustments for search suggestions */
  [data-theme="light"] .search-suggestions-panel {
      background: var(--glass-gradient);
      border-color: rgba(142, 72, 255, 0.4);
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
      /* Enhanced fallback for browsers that don't support backdrop-filter */
      background-color: rgba(255, 255, 255, 0.9);
      box-shadow:
          0 8px 32px rgba(0, 0, 0, 0.15),
          0 4px 16px rgba(142, 72, 255, 0.15),
          inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  [data-theme="light"] .search-suggestions-panel::-webkit-scrollbar-thumb {
      background: linear-gradient(135deg, rgba(142, 72, 255, 0.4), rgba(142, 72, 255, 0.6));
  }

  [data-theme="light"] .search-suggestions-panel::-webkit-scrollbar-thumb:hover {
      background: linear-gradient(135deg, rgba(142, 72, 255, 0.6), rgba(142, 72, 255, 0.8));
  }

  [data-theme="light"] .suggestion-card {
      background: rgba(17, 25, 40, 0.05);
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
      /* Enhanced fallback for light theme cards */
      background-color: rgba(17, 25, 40, 0.08);
  }

  [data-theme="light"] .suggestion-card:hover,
  [data-theme="light"] .suggestion-card.highlighted {
      background: rgba(17, 25, 40, 0.1);
  }

  [data-theme="light"] .suggestion-title {
      color: var(--text-color, #222);
  }

  [data-theme="light"] .suggestion-store {
      color: rgba(34, 34, 34, 0.7);
  }

  /* Mobile responsive adjustments */
  @media (max-width: 768px) {
      .search-suggestions-panel {
          margin: 0 auto;
          left: 0;
          right: 0;
          width: 300px;
          /* Match .search-input width exactly */
          max-width: 100vw;
      }

      .search-input {
          width: 300px;
          min-width: 0;
          margin: 0 auto;
          display: block;
      }

      .suggestion-card {
          margin: 6px;
          padding: 10px 12px;
      }

      .suggestion-poster {
          width: 40px;
          height: 28px;
          margin-right: 10px;
      }

      .suggestion-title {
          font-size: 13px;
      }

      .suggestion-store {
          font-size: 11px;
      }
  }

  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce) {

      .search-unit,
      .search-bar,
      .search-suggestions-panel,
      .suggestion-card {
          transition: none;
      }

      .search-unit.search-expanded {
          transform: none;
      }

      .suggestion-card:hover,
      .suggestion-card.highlighted {
          transform: none;
      }
  }

  /* No-results state */
  .search-no-results {
      padding: 20px;
      text-align: center;
      color: var(--text-color-secondary, rgba(255, 255, 255, 0.6));
      font-family: 'Rajdhani', sans-serif;
      font-size: 14px;
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.3s ease-out, transform 0.3s ease-out, color 0.5s ease;
      /* Added theme transition for color */
  }

  .search-no-results.show {
      opacity: 1;
      transform: translateY(0);
  }

  [data-theme="light"] .search-no-results {
      color: rgba(34, 34, 34, 0.6);
  }

  .Games-buttons {
      display: flex;
      justify-content: center;
      margin-top: 24px;
      /* Reduced from 50px for tighter spacing */
      margin-bottom: 24px;
      /* Added consistent bottom spacing */
      flex-wrap: wrap;
      transition: opacity 0.5s ease, transform 0.5s ease;
      opacity: 1;
      transition: all 0.5s ease;
      position: relative;
      z-index: 10;
      /* Lower than suggestions panel */
  }

  .Games-button {
      position: relative;
      background-color: var(--navbar-bg);
      border-radius: 15px;
      width: 300px;
      height: 180px;
      margin: 8px;
      /* Reduced from 10px for tighter spacing */
      display: flex;
      justify-content: center;
      align-items: center;
      transition: all 0.5s ease, opacity 0.4s ease, transform 0.4s ease, height 0.4s ease, margin 0.4s ease;
      overflow: hidden;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }

  .Games-button img {
      max-width: 90%;
      max-height: 90%;
      border-radius: 5px;
      transition: all 0.5s ease, border-radius 0.5s ease;
  }

  .Games-button:hover {
      transform: scale(1.25);
      box-shadow: 0 0 20px 5px rgba(142, 72, 255, 1)
  }

  .Games-button:hover img {
      transform: scale(0.8);
      margin-top: -20px;
      border-radius: 20px;
  }

  .Games-button:active {
      transform: scale(1.25) translateY(0);
      box-shadow: var(--card-shadow);
  }

  .game-details-container {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      background: rgba(0, 0, 0, 0.5);
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
      padding: 15px;
      transform: translateY(100%);
      transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
      opacity: 0;
      display: flex;
      flex-direction: column;
      gap: 5px;
  }

  [data-theme="light"] .game-details-container {
      background: rgba(255, 255, 255, 0.5);
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
      border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .Games-button:hover .game-details-container {
      transform: translateY(0);
      opacity: 1;
  }

  .game-detail {
      color: white;
      font-size: 14px;
      text-align: center;
      padding: 3px 5px;
      transition: transform 0.5s ease;
      word-wrap: break-word;
      overflow-wrap: break-word;
      -webkit-hyphens: auto;
      hyphens: auto;
      line-height: 1.3;
      width: 100%;
      box-sizing: border-box;
  }

  .game-title {
      font-weight: bold;
      font-size: 15px;
      margin-bottom: 2px;
      display: block;
      text-align: center;
      white-space: normal;
      overflow: visible;
      text-overflow: unset;
  }

  [data-theme="light"] .game-detail {
      color: black;
  }

  .game-detail:hover {
      transform: scale(1);
  }

  footer {
      background-color: var(--footer-bg);
      padding: 5px;
      text-align: center;
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      color: var(--text-color);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(6px);
      border-radius: 15px;
      width: 90%;
      will-change: transform;
      z-index: 999999 !important;
      /* Footer on top with highest priority */
      /* GPU acceleration hint */
  }

  footer.hidden {
      transform: translate(-50%, 120%);
      /* Slightly more offset for cleaner hide */
  }

  footer a {
      color: var(--text-color);
      text-decoration: underline;
      transition: color 0.5s ease;
  }

  /* Make all links inside .carousel-text-wrapper and .carousel-text look like footer links */
  .carousel-text-wrapper a,
  .carousel-text a {
      color: var(--text-color);
      text-decoration: underline;
      transition: color 0.5s ease;
  }

  @media (max-width: 768px) {
      body {
          padding-top: 0;
          /* Remove extra padding at the top */
          margin-bottom: 100px;
      }

      .navbar {
          padding: 10px;
          margin-bottom: 0;
          /* Remove margin below the navbar */
      }

      .logo {
          margin-left: 5px;
      }

      .logo img {
          height: 60px;
      }

      .menu-toggle {
          gap: 4px;
          display: flex;
          flex-direction: column;
          cursor: pointer;
      }

      .menu-toggle span {
          background: var(--text-color);
          width: 25px;
          height: 3px;
          margin: 4px 0;
          transition: 0.5s;
      }

      .nav-links {
          position: absolute;
          top: 100%;
          left: 0;
          width: 100%;
          background: var(--navbar-bg);
          flex-direction: column;
          padding: 0;
          max-height: 0;
          overflow: hidden;
          transition: max-height 0.5s ease-out;
      }

      .nav-links.active {
          max-height: 300px;
          transition: 0.5s;
          backdrop-filter: blur(6px);
      }

      .nav-links li {
          margin: 15px 0;
          transition: 0.5s;
      }

      .prime-toggle-container {
          margin-top: 0;
          /* Remove space above the Prime Toggle */
      }

      .search-container {
          margin-top: 10px;
          /* Adjust spacing below the toggle */
      }

      .toggle-controls-container {
          width: 95%;
          max-width: 400px;
          margin: 10px auto;
          padding: 8px;
          box-sizing: border-box;
      }

      .loading-message-container {
          width: 95%;
          max-width: 400px;
          margin: 10px auto;
      }

      .search-unit {
          max-width: 95%;
          /* Responsive mobile width */
          width: 95%;
      }

      .search-input {
          width: 280px;
          /* Controlled mobile base width */
          max-width: 300px;
          /* Controlled mobile maximum */
      }

      .search-input:focus {
          width: 300px;
          /* Moderate mobile expansion */
          max-width: 300px;
          transform: scale(1.005);
          /* Subtle mobile scale */
      }

      .sort-container {
          width: 90%;
          max-width: 250px;
      }

      .prime-toggle-container,
      .nsfw-toggle-container {
          width: 100%;
          padding: 0 5px;
          margin: 12px 0;
          box-sizing: border-box;
          transition: width 0.3s ease, padding 0.3s ease;
      }

      .prime-toggle-container span,
      .nsfw-toggle-container span {
          font-size: 0.9em;
          line-height: 1.2;
      }

      .Games-buttons {
          grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
          gap: 15px;
          padding: 15px;
      }

      .theme-switch {
          margin: 10px auto;
          width: fit-content;
      }

      #home-section {
          padding-top: 140px;
          /* More padding on mobile to prevent navbar overlap */
      }
  }

  /* Additional mobile fix for navbar overlap */
  @media (max-width: 480px) {
      #home-section {
          padding-top: 150px !important;
          /* Extra padding for small mobile screens */
      }
  }

  .loading-message-container {
      min-height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .loading-message {
      text-align: center;
      margin: 20px auto;
      font-size: 18px;
      color: var(--text-color);
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      transition: max-height 0.5s ease, opacity 0.5s ease;
      padding: 0 20px;
  }

  .loading-message.visible {
      max-height: 425px;
      opacity: 1;
      padding: 20px;
  }

  .tagline {
      font-style: italic;
      margin-top: 10px;
      color: #888;
      color: var(--text-color);
      opacity: 0;
      transition: opacity 0.5s ease;
  }

  .tagline.visible {
      opacity: 1;
  }

  .loading-content-container {
      background: var(--container-bg);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      border-radius: 20px;
      padding: 24px;
      margin: 20px auto;
      max-width: 425px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.1);
      text-align: center;
      transition: height 240ms ease-out, all 0.5s ease;
      overflow: hidden;
  }

  .toggle-controls-container.expanded {
      /* Height is dynamically calculated by JavaScript */
  }

  [data-theme="light"] .loading-content-container {
      background: var(--container-bg, rgba(255, 255, 255, 0.6));
      border: 1px solid rgba(0, 0, 0, 0.08);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }

  [data-theme]:not([data-theme="light"]) .loading-content-container,
  html:not([data-theme]) .loading-content-container {
      background: var(--navbar-bg, rgba(17, 25, 40, 0.6));
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  }

  .loading-content-container .connection-message {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-color);
      margin-bottom: 16px;
      line-height: 1.4;
      transition: color 0.5s ease;
  }

  .tagline-container {
      transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: visible;
      /* Allow content to show even if height is wrong */
      will-change: height;
      min-height: 1.4em;
      /* Minimum height to prevent collapse */
      position: relative;
  }

  .loading-content-container .tagline {
      font-size: 14px;
      margin-top: 8px;
      margin-bottom: 0;
      transition: opacity 0.5s ease, color 0.5s ease;
      position: relative;
      width: 100%;
      word-wrap: break-word;
      line-height: 1.4;
      min-height: 1.4em;
      /* Ensure minimum height for single line */
      display: block;
      /* Ensure block display for proper height calculation */
  }

  /* Mobile optimizations for tagline animations */
  @media (max-width: 768px) {
      .tagline-container {
          transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
          -webkit-transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
          /* Safari support */
          overflow: visible;
          will-change: height;
          min-height: 1.4em;
          position: relative;
          /* Mobile-specific optimizations */
          -webkit-transform: translateZ(0);
          /* Force hardware acceleration */
          transform: translateZ(0);
          /* Force hardware acceleration */
          -webkit-backface-visibility: hidden;
          /* Prevent flickering */
          backface-visibility: hidden;
          /* Prevent flickering */
          contain: layout style;
          /* CSS containment for better performance */
          /* Enhanced mobile transition properties */
          -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
          transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
          -webkit-transition-property: height;
          transition-property: height;
          /* Prevent layout thrashing on mobile */
          box-sizing: border-box;
      }

      .loading-content-container .tagline {
          font-size: 14px;
          margin-top: 8px;
          margin-bottom: 0;
          transition: opacity 0.5s ease, color 0.5s ease;
          -webkit-transition: opacity 0.5s ease, color 0.5s ease;
          /* Safari support */
          position: relative;
          width: 100%;
          word-wrap: break-word;
          line-height: 1.4;
          min-height: 1.4em;
          display: block;
          /* Mobile-specific optimizations */
          -webkit-transform: translateZ(0);
          /* Force hardware acceleration */
          transform: translateZ(0);
          /* Force hardware acceleration */
          -webkit-backface-visibility: hidden;
          /* Prevent flickering */
          backface-visibility: hidden;
          /* Prevent flickering */
          contain: layout style;
          /* CSS containment for better performance */
          /* Enhanced mobile fade properties */
          -webkit-transition-timing-function: ease;
          transition-timing-function: ease;
          -webkit-transition-property: opacity, color;
          transition-property: opacity, color;
      }

      .loading-content-container {
          /* Ensure container behaves properly on mobile */
          max-width: 90%;
          margin: 20px auto;
          padding: 20px;
      }

      /* Ensure animations work on mobile Safari */
      .tagline.visible {
          opacity: 1;
          -webkit-animation: none;
          /* Prevent conflicts */
          animation: none;
          /* Prevent conflicts */
      }

      /* Mobile modal optimizations */
      .prime-modal-box {
          max-width: 90vw;
          /* Ensure modals fit on small screens */
          margin: 10px;
          padding: 20px 16px;
          /* Reduce padding on mobile */
          /* Prevent modal content from being too small */
          min-width: 280px;
      }

      /* Mobile button optimizations */
      #primeModalYes,
      #primeModalNo,
      .steam-modal-yes,
      .steam-modal-no,
      .nsfw-modal-yes,
      .nsfw-modal-no {
          min-height: 44px;
          /* Apple's recommended minimum tap target */
          padding: 12px 20px;
          /* Larger touch targets */
          font-size: 1.1em;
          /* Slightly larger text for readability */
      }

      /* Modal close buttons - larger touch targets */
      .steam-modal-close,
      .nsfw-modal-close {
          min-height: 44px;
          min-width: 44px;
          font-size: 1.8em;
          /* Larger close button */
      }
  }

  .sort-container {
      text-align: center;
      margin: 20px auto;
      position: relative;
      width: 200px;
      border-radius: 45px;
      backdrop-filter: blur(6px);
  }

  .sort-select {
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      background: var(--search-bg);
      color: var(--text-color);
      padding: 10px 35px 10px 20px;
      border-radius: 45px;
      width: 100%;
      border: none;
      font-family: 'Rajdhani', sans-serif;
      transition: all 0.5s ease;
      box-shadow: var(--card-shadow);
      cursor: pointer;
  }

  .sort-container::after {
      position: absolute;
      right: 15px;
      top: 50%;
      transform: translateY(-50%);
      pointer-events: none;
      transition: transform 0.5s ease;
      backdrop-filter: blur(6px);
  }

  .sort-container.reversed::after {
      transform: translateY(-50%) rotate(180deg);
      backdrop-filter: blur(6px);
  }

  .sort-select:focus {
      outline: none;
      box-shadow: var(--hover-shadow);
  }

  .sort-select option {
      background: var(--bg-color);
      color: var(--text-color);
      padding: 10px;
  }

  /* ===== STANDARDIZED VERTICAL SPACING ===== */
  /* Consistent 24px bottom margin for all major containers */
  .store-group,
  .expiry-group {
      margin: 0 0 24px 0;
      /* Standardized bottom spacing */
      padding: 20px;
      background: var(--navbar-bg);
      border-radius: 15px;
      backdrop-filter: blur(6px);
      transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), margin 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: var(--card-shadow);
      border: 1px solid rgba(0, 0, 0, 0.1);
      width: 90%;
      margin-left: 100px;
      margin-right: 100px;
      text-align: center;
      will-change: opacity, transform;
      position: relative;
      z-index: 10;
      /* Lower than suggestions panel */
  }

  /* Mobile improvements for store groups */
  @media (max-width: 768px) {

      .store-group,
      .expiry-group {
          width: 95%;
          margin-left: auto;
          margin-right: auto;
          margin-bottom: 20px;
          /* Slightly reduced for mobile */
          padding: 15px;
      }

      .Games-buttons {
          margin-top: 16px;
          /* Reduced mobile top margin */
          margin-bottom: 16px;
          /* Reduced mobile bottom margin */
      }

      .Games-button {
          margin: 6px;
          /* Tighter mobile spacing */
      }

      .Games-section.visible {
          padding: 12px 0;
          /* Reduced mobile padding */
      }

      .store-games {
          display: flex;
          flex-wrap: wrap;
          gap: 15px;
          justify-content: center;
          min-width: 100%;
      }
  }

  .store-group:last-of-type,
  .expiry-group:last-of-type,
  .Games-buttons:last-of-type {
      margin-bottom: 32px;
      /* Significantly reduced from 150px for lean scroll */
  }

  .store-header {
      font-size: 1.1em;
      margin-bottom: 20px;
      padding: 12px 24px;
      border-radius: 25px;
      font-family: 'Orbitron', monospace;
      font-weight: 600;
      text-align: center;
      display: inline-block;
      position: relative;
      margin-right: 15px;
      margin-left: 15px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(10px);
      transition: all 0.3s ease;
      /* Fallback color for browsers that don't support background-clip */
      color: #66ffff;
      background: var(--gradient-visible);
      background-size: fit-content;
      background-repeat: no-repeat;
      background-position: center;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: 0 0 3px rgba(102, 255, 255, 0.3);
  }

  .store-header::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border-radius: 25px;
      background: var(--navbar-bg);
      opacity: 0.8;
      z-index: -1;
  }

  .store-header:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(102, 255, 255, 0.3);
  }

  /* Light theme specific styling for store headers */
  [data-theme="light"] .store-header {
      color: #0066ff;
      text-shadow: 0 0 3px rgba(0, 102, 255, 0.4);
  }

  [data-theme="light"] .store-header:hover {
      box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
  }

  /* Store header link styles */
  .store-header a {
      text-decoration: none;
      color: inherit;
      cursor: default;
      display: block;
      width: 100%;
      height: 100%;
      /* Inherit all text styling from parent */
      font-family: inherit;
      font-weight: inherit;
      font-size: inherit;
      text-align: inherit;
      background: inherit;
      background-size: inherit;
      background-repeat: inherit;
      background-position: inherit;
      -webkit-background-clip: inherit;
      -webkit-text-fill-color: inherit;
      background-clip: inherit;
      text-shadow: inherit;
  }

  .store-header a:hover {
      text-decoration: none;
      color: inherit;
      -webkit-text-fill-color: inherit;
  }

  [data-theme="light"] .store-header a:hover {
      color: inherit;
      -webkit-text-fill-color: inherit;
  }

  .store-games {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      justify-content: center;
  }

  .expiry-group {
      margin: 20px 0;
      padding: 20px;
      background: var(--navbar-bg);
      border-radius: 15px;
      backdrop-filter: blur(6px);
      transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), margin 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: var(--card-shadow);
      border: 1px solid rgba(0, 0, 0, 0.1);
      width: 90%;
      margin-left: 100px;
      margin-right: 100px;
      text-align: center;
      will-change: opacity, transform;
      position: relative;
      z-index: 10;
      /* Lower than suggestions panel */
  }

  /* Mobile improvements for expiry groups */
  @media (max-width: 768px) {
      .expiry-group {
          width: 95%;
          margin-left: auto;
          margin-right: auto;
          padding: 15px;
      }

      .expiry-games {
          display: flex;
          flex-wrap: wrap;
          gap: 15px;
          justify-content: center;
          min-width: 100%;
      }
  }

  /* Duplicate rule removed - consolidated above with store-group */

  .expiry-header {
      font-size: 1.1em;
      margin-bottom: 20px;
      padding: 12px 24px;
      border-radius: 25px;
      background: var(--navbar-bg);
      border: 2px solid transparent;
      background-clip: padding-box;
      font-family: 'Orbitron', monospace;
      font-weight: 600;
      text-align: center;
      display: inline-block;
      position: relative;
      margin-right: 15px;
      margin-left: 15px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(10px);
      transition: all 0.3s ease;
      /* Fallback color for browsers that don't support background-clip */
      color: #66ffff;
      background: var(--gradient-visible);
      background-size: fit-content;
      background-repeat: no-repeat;
      background-position: center;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: 0 0 3px rgba(102, 255, 255, 0.3);
  }

  .expiry-header::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border-radius: 25px;
      background: var(--gradient-visible);
      opacity: 0.1;
      z-index: -1;
  }

  .expiry-header:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(102, 255, 255, 0.3);
  }

  .expiry-games {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      justify-content: center;
  }

  .background {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      transform: scale(1.2);
      z-index: -1;
      transition: opacity 0.5s ease;
  }

  .mode-switch {
      position: relative;
      margin: 20px auto;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 5px 10px;
      border-radius: 20px;
      cursor: pointer;
      background: var(--toggle-bg);
      transition: all 0.5s ease;
      max-width: fit-content;
      backdrop-filter: blur(6px);
      box-shadow: var(--mode-switch-shadow);
  }

  .mode-switch:hover {
      transform: scale(1.05);
  }

  .mode-switch span {
      font-size: 14px;
      margin: 0 5px;
  }

  /* Static background style */
  .static-background {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: url('../src/Background_Dark.png') no-repeat center center fixed;
      background-size: cover;
      z-index: -1;
      opacity: 0;
      transform: scale(1.2);
      transition: opacity 0.5s ease, background-image 0.5s ease, filter 0.5s ease;
  }

  /* Live Video Background for Dark Mode */
  .live-video-background {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -2;
      opacity: 0;
      transition: opacity 0.8s ease;
      pointer-events: none;
  }

  .live-video-background video {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: opacity 0.8s ease;
      transform: scale(1.1);
      transform-origin: center center;
  }

  .live-video-background.active {
      opacity: 1;
  }

  .live-video-background.crossfade-out {
      opacity: 0;
  }

  /* Light theme static background */
  [data-theme="light"] .static-background {
      background: url('./src/Background_Light.jpg') no-repeat center center fixed;
      background-size: cover;
      transition: opacity 0.5s ease, background-image 0.5s ease, filter 0.5s ease;
  }

  .static-background.active {
      opacity: 1;
  }

  .wifi {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      padding-top: 47.5px;
      padding-bottom: 40px;
  }

  .wifi .semione {
      position: absolute;
      width: 120px;
      aspect-ratio: 1;
      border: 8px solid transparent;
      border-top-color: #2B32B2;
      border-radius: 50%;
      animation: semione 2s infinite;
      /* Automate animation */
  }

  .wifi .semitwo {
      position: absolute;
      width: 80px;
      aspect-ratio: 1;
      border: 6px solid transparent;
      border-top-color: #2B32B2;
      border-radius: 50%;
      animation: semitwo 2s infinite;
      /* Automate animation */
  }

  .wifi .semithree {
      position: absolute;
      width: 45px;
      aspect-ratio: 1;
      border: 4px solid transparent;
      border-top-color: #2B32B2;
      border-radius: 50%;
      animation: semithree 2s infinite;
      /* Automate animation */
  }

  .wifi .circle {
      position: absolute;
      width: 15px;
      aspect-ratio: 1;
      background-color: #2B32B2;
      border-radius: 50%;
      animation: circle 2s infinite;
      /* Automate animation */
  }

  @keyframes semione {

      0%,
      100% {
          transform: translate(0);
      }

      10% {
          transform: translateY(40px);
      }

      15% {
          transform: translateY(30px);
      }

      25% {
          transform: translateY(30px) translateX(-5px);
      }

      35% {
          transform: translateY(30px) translateX(0);
      }

      45% {
          transform: translateY(30px) translateX(5px);
      }

      55% {
          transform: translateY(30px) translateX(0);
      }

      65% {
          transform: translateY(55px);
      }

      75% {
          transform: translate(0);
      }
  }

  @keyframes semitwo {

      0%,
      100% {
          transform: rotate(0) translate(0);
      }

      8% {
          transform: rotate(180deg) translateY(24px);
      }

      15% {
          transform: rotate(180deg) translateY(24px);
      }

      25% {
          transform: rotate(180deg) translateY(24px) translateX(5px);
      }

      35% {
          transform: rotate(180deg) translateY(32px) translateX(0);
      }

      45% {
          transform: rotate(180deg) translateY(32px) translateX(-5px);
      }

      55% {
          transform: rotate(180deg) translateY(24px) translateX(0);
      }

      65% {
          transform: rotate(180deg) translateY(24px) translateX(0);
      }

      75% {
          transform: rotate(360deg);
      }

      100% {
          transform: rotate(360deg);
      }
  }

  @keyframes semithree {

      0%,
      100% {
          transform: translate(0);
      }

      10% {
          transform: translateY(22px);
      }

      15% {
          transform: translateY(8px);
      }

      25% {
          transform: translateY(8px) translateX(-5px);
      }

      35% {
          transform: translateY(8px) translateX(0);
      }

      45% {
          transform: translateY(8px) translateX(5px);
      }

      55% {
          transform: translateY(8px) translateX(0);
      }

      65% {
          transform: translateY(22px);
      }

      75% {
          transform: translate(0);
      }
  }

  @keyframes circle {

      0%,
      100% {
          transform: translate(0);
      }

      10% {
          transform: translateY(5px);
      }

      15% {
          transform: translateY(0);
      }

      25% {
          transform: translateX(-10px);
      }

      35% {
          transform: translateY(-5px) translateX(0);
      }

      45% {
          transform: translateY(0) translateX(10px);
      }

      55% {
          transform: translate(0);
      }

      65% {
          transform: translateY(5px);
      }

      75% {
          transform: translate(0);
      }
  }

  /* Moving gradient animation for navbar title */
  @keyframes gradientMove {
      0% {
          background-position: 0% 50%;
      }

      50% {
          background-position: 100% 50%;
      }

      100% {
          background-position: 0% 50%;
      }
  }

  @media (max-width: 768px) {
      .wifi {
          padding-top: 47.5px;
          /* Further increase padding for mobile view */
          padding-bottom: 40px;
      }
  }

  .prime-toggle-container {
      display: flex;
      width: 100%;
      align-items: center;
      justify-content: space-between;
      margin: 15px 0;
      color: var(--text-color, #fff);
      box-sizing: border-box;
      transition: width 0.3s ease, padding 0.3s ease;
  }

  .prime-toggle-container input[type="checkbox"] {
      display: none;
  }

  .prime-toggle-container label {
      position: relative;
      display: inline-block;
      width: 50px;
      height: 28px;
      margin-left: 10px;
  }

  .prime-toggle-container label::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: #ccc;
      border-radius: 35px;
      transition: background-color 0.5s;
  }

  .prime-toggle-container label::after {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 24px;
      height: 24px;
      background-color: white;
      border-radius: 50%;
      transition: transform 0.5s;
  }

  .prime-toggle-container input[type="checkbox"]:checked+label::before {
      background-color: #4CAF50;
  }

  .prime-toggle-container input[type="checkbox"]:checked+label::after {
      transform: translateX(25px);
  }

  .toggle-controls-container {
      background: var(--container-bg);
      border-radius: 25px;
      padding: 10px;
      margin: 10px auto 16px auto;
      /* Reduced bottom margin from default to 16px */
      width: 95%;
      max-width: 425px;
      /* IRONCLAD HEIGHT CONSTRAINTS - NO LAYOUT BLOAT */
      max-height: 650px;
      /* Reasonable limit to prevent UI explosion */
      min-height: 100px;
      /* Minimum container height */
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      transition: height 0.5s ease, all 0.5s ease;
      overflow: visible;
      /* CRITICAL: Allow search suggestions to extend beyond container and be fully visible */
      position: relative;
      /* Start with measured height instead of auto for proper transitions */
      height: auto;
      /* Ensure transition always works, even on first load */
      will-change: height;
      /* Force transition initialization */
      transform: translateZ(0);
      /* PREVENT CONTAINER FROM STRETCHING LIKE TAFFY */
      /* contain: layout style; - REMOVED: This was clipping the search suggestions */
      box-sizing: border-box;
      /* ENSURE SEARCH SUGGESTIONS ARE NEVER CLIPPED */
      z-index: 100;
      /* Lower than search components but above other UI elements */
  }

  /* Ensure expanded state maintains transition */
  .toggle-controls-container.expanded {
      /* Height is dynamically calculated by JavaScript */
      transition: height 0.5s ease, all 0.5s ease;
  }

  /* Initial loading state to prevent flash */
  .toggle-controls-container:not(.loaded) {
      transition: none !important;
  }

  /* Ensure transitions are enabled after loading */
  .toggle-controls-container.loaded {
      transition: height 0.5s ease, all 0.5s ease;
  }

  .nsfw-toggle-container {
      display: flex;
      width: 100%;
      align-items: center;
      justify-content: space-between;
      margin: 15px 0;
      color: var(--text-color, #fff);
      box-sizing: border-box;
      transition: width 0.3s ease, padding 0.3s ease;
  }

  .nsfw-toggle-container input[type="checkbox"] {
      display: none;
  }

  .nsfw-toggle-container label {
      position: relative;
      display: inline-block;
      width: 50px;
      height: 28px;
      margin-left: 10px;
  }

  .nsfw-toggle-container label::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: #ccc;
      border-radius: 35px;
      transition: background-color 0.3s;
  }

  .nsfw-toggle-container label::after {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 24px;
      height: 24px;
      background-color: white;
      border-radius: 50%;
      transition: transform 0.5s;
  }

  .nsfw-toggle-container input[type="checkbox"]:checked+label::before {
      background-color: #dc3545;
  }

  .nsfw-toggle-container input[type="checkbox"]:checked+label::after {
      transform: translateX(25px);
  }

  .Games-section {
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), padding 0.6s cubic-bezier(0.4, 0, 0.2, 1);
      padding: 0;
      margin-top: 16px;
      /* Reduced gap between toggle controls and games section */
      visibility: hidden;
      /* Prevents interaction during transition */
  }

  .Games-section.visible {
      max-height: none;
      opacity: 1;
      padding: 16px 0;
      /* Reduced padding for tighter spacing */
      visibility: visible;
  }

  /* Enhanced store and expiry groups for smoother section transitions */
  .store-group,
  .expiry-group {
      transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), margin 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
      will-change: opacity, transform;
      /* GPU acceleration */
  }

  /* Section transition states */
  .Games-section.section-hiding {
      max-height: 0;
      opacity: 0;
      padding: 0;
  }

  .Games-section.section-hiding .store-group,
  .Games-section.section-hiding .expiry-group {
      opacity: 0;
      transform: translateY(-20px);
      max-height: 0;
      margin: 0;
      padding: 0;
  }

  .about-section {
      display: none;
      padding-top: 100px;
      text-align: center;
  }

  .about-section.visible {
      display: block;
  }

  .about-container {
      background: rgba(255, 255, 255, 0.4);
      padding: 20px;
      border-radius: 25px;
      max-width: 425px;
      margin: 20px auto;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(6px);
      color: #333;
      text-align: center;
      transition: all 0.5s ease;
  }

  [data-theme="light"] .about-container {
      background: rgba(255, 255, 255, 0.4);
      color: #333;
  }

  [data-theme]:not([data-theme="light"]) .about-container,
  html:not([data-theme]) .about-container {
      background: rgba(17, 25, 40, 0.7);
      color: #fff;
  }

  .qr-code {
      margin-top: 20px;
  }

  .qr-code img {
      max-width: 250px;
      height: auto;
      border: 2px solid #007bff;
      border-radius: 8px;
  }

  .donation-message {
      margin-top: 20px;
      color: #28a745;
      font-weight: bold;
  }

  .Games-buttons>.Games-button:last-child {
      margin-bottom: 150px;
  }

  .carousel-container {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 30px auto 10px auto;
      width: 90%;
      max-width: 1000px;
      min-width: 0;
      background: var(--container-bg);
      border-radius: 18px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      padding: 10px 0;
      transition: background 0.5s, width 0.5s, min-width 0.5s, max-width 0.5s;
      backdrop-filter: blur(6px);
  }

  [data-theme="light"] .carousel-container {
      background: var(--container-bg);
      /* Use theme variable for light */
  }

  [data-theme]:not([data-theme="light"]) .carousel-container,
  html:not([data-theme]) .carousel-container {
      background: var(--navbar-bg);
      /* Use dark theme variable */
  }

  .carousel-arrow {
      background: var(--toggle-bg);
      border: none;
      color: var(--text-color);
      font-size: 1.5em;
      padding: 8px 16px;
      border-radius: 50%;
      cursor: pointer;
      transition: background 0.5s, color 0.5s, transform 0.2s;
      margin: 0 8px;
      min-width: 40px;
      min-height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .carousel-arrow:hover {
      background: var(--navbar-bg);
      transform: scale(1.15);
  }

  .carousel-text-wrapper {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: visible;
      height: auto;
      /* Animate height changes smoothly */
      transition: height 0.5s;
  }

  .carousel-text {
      font-size: 0.98em;
      color: var(--text-color);
      font-family: inherit;
      text-align: center;
      padding: 0 10px;
      opacity: 1;
      transition: opacity 0.25s, color 0.5s, background 0.5s;
      will-change: opacity, color, background;
      min-height: 1.5em;
      max-width: 100%;
      white-space: normal;
      word-break: break-word;
      overflow-wrap: break-word;
      transition: opacity 0.5s, color 0.5s, background 0.5s;
  }

  .carousel-text.fade-out {
      opacity: 0;
      transition: opacity 0.25s;
  }

  .carousel-text.fade-in {
      opacity: 1;
      transition: opacity 0.25s;
  }

  @media (max-width: 600px) {
      .carousel-container {
          max-width: 98vw;
          padding: 6px 0;
      }

      .carousel-text {
          font-size: 0.92em;
          padding: 0 4px;
      }

      .carousel-arrow {
          font-size: 1.2em;
          width: 32px;
          height: 32px;
          min-width: 32px;
          min-height: 32px;
      }

      .carousel-text-wrapper {
          height: auto;
      }
  }



  .carousel-arrow {

      border-radius: 50%;

  }

  /* Fix carousel arrow/circle shape and size */
  .carousel-arrow {
      width: 32px;
      height: 32px;
      min-width: 32px;
      min-height: 32px;
      border-radius: 50%;

  }

  @media (min-width: 601px) {
      .carousel-arrow {
          width: 40px;
          height: 40px;
          min-width: 40px;
          min-height: 40px;
      }
  }

  /* Error and retry button styles */
  .error-container {
      text-align: center;
      padding: 40px;
      color: var(--text-color);
      background: var(--navbar-bg);
      border-radius: 15px;
      margin: 20px auto;
      max-width: 425px;
      backdrop-filter: blur(6px);
      box-shadow: var(--card-shadow);
  }

  .retry-button {
      background: var(--navbar-bg);
      color: var(--text-color);
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 12px 24px;
      border-radius: 8px;
      cursor: pointer;
      margin-top: 15px;
      transition: all 0.3s ease;
      font-size: 14px;
  }

  .retry-button:hover {
      transform: scale(1.05);
      background: var(--toggle-bg);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .api-status {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: bold;
      margin-left: 10px;
  }

  .api-status.online {
      background: rgba(40, 167, 69, 0.2);
      color: #28a745;
      border: 1px solid rgba(40, 167, 69, 0.3);
  }

  .api-status.offline {
      background: rgba(220, 53, 69, 0.2);
      color: #dc3545;
      border: 1px solid rgba(220, 53, 69, 0.3);
  }

  .api-status.loading {
      background: rgba(255, 193, 7, 0.2);
      color: #ffc107;
      border: 1px solid rgba(255, 193, 7, 0.3);
  }

  /* Small Connection Status Indicator for Home Page */
  .connection-status-small {
      text-align: center;
      margin: 15px auto;
      padding: 8px 15px;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.3);
      backdrop-filter: blur(8px);
      max-width: 250px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      transition: all 0.3s ease;
      opacity: 1;
  }

  .connection-indicator-small {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
  }

  .connection-spinner-small {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(0, 0, 0, 0.1);
      border-top: 2px solid #007bff;
      border-radius: 50%;
      animation: spin 1s linear infinite;
  }

  @keyframes spin {
      0% {
          transform: rotate(0deg);
      }

      100% {
          transform: rotate(360deg);
      }
  }

  .connection-text-small {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-color);
      transition: color 0.3s ease;
  }

  .connection-status-small.connected {
      background: rgba(40, 167, 69, 0.15);
      border: 1px solid rgba(40, 167, 69, 0.2);
  }

  .connection-status-small.connected .connection-spinner-small {
      border: 2px solid rgba(40, 167, 69, 0.3);
      border-top: 2px solid #28a745;
      animation: none;
      position: relative;
  }

  .connection-status-small.connected .connection-spinner-small::after {
      content: "✓";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #28a745;
      font-weight: bold;
      font-size: 10px;
      line-height: 1;
  }

  .connection-status-small.error {
      background: rgba(220, 53, 69, 0.15);
      border: 1px solid rgba(220, 53, 69, 0.2);
  }

  .connection-status-small.error .connection-spinner-small {
      border: 2px solid rgba(220, 53, 69, 0.3);
      border-top: 2px solid #dc3545;
      animation: none;
      position: relative;
  }

  .connection-status-small.error .connection-spinner-small::after {
      content: "✗";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #dc3545;
      font-weight: bold;
      font-size: 10px;
      line-height: 1;
  }

  .connection-status-small.hidden {
      opacity: 0;
      pointer-events: none;
      transform: translateY(-10px);
  }

  /* Hide on mobile to save space */
  @media (max-width: 768px) {
      .connection-status-small {
          max-width: 200px;
          padding: 6px 12px;
          margin: 10px auto;
      }

      .connection-text-small {
          font-size: 12px;
      }

      .connection-spinner-small {
          width: 14px;
          height: 14px;
      }
  }



  #home-section {
      padding-top: 120px;
      /* Add space below the navbar */
  }

  @media (max-width: 768px) {
      #home-section {
          padding-top: 100px;
          /* Slightly less padding on mobile */
      }
  }

  .Games-section {
      display: none;
      /* Hide the section by default */
  }

  .Games-section.visible {
      display: block;
      /* Show the section when visible */
  }

  .about-section {
      display: none;
      padding-top: 100px;
      text-align: center;
  }

  .about-section.visible {
      display: block;
  }

  .about-container {
      background: rgba(255, 255, 255, 0.4);
      padding: 20px;
      border-radius: 25px;
      max-width: 425px;
      margin: 20px auto;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(6px);
      color: #333;
      text-align: center;
      transition: all 0.5s ease;
  }

  [data-theme="light"] .about-container {
      background: rgba(255, 255, 255, 0.4);
      color: #333;
  }

  [data-theme]:not([data-theme="light"]) .about-container,
  html:not([data-theme]) .about-container {
      background: rgba(17, 25, 40, 0.7);
      color: #fff;
  }

  .qr-code {
      margin-top: 20px;
  }

  .qr-code img {
      max-width: 250px;
      height: auto;
      border: 2px solid #007bff;
      border-radius: 8px;
  }

  .donation-message {
      margin-top: 20px;
      color: #28a745;
      font-weight: bold;
  }

  .Games-buttons>.Games-button:last-child {
      margin-bottom: 150px;
  }

  .carousel-container {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 30px auto 10px auto;
      width: 90%;
      max-width: 1000px;
      min-width: 0;
      background: var(--container-bg);
      border-radius: 18px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      padding: 10px 0;
      transition: background 0.5s, width 0.5s, min-width 0.5s, max-width 0.5s;
      backdrop-filter: blur(6px);
  }

  [data-theme="light"] .carousel-container {
      background: var(--container-bg);
      /* Use theme variable for light */
  }

  [data-theme]:not([data-theme="light"]) .carousel-container,
  html:not([data-theme]) .carousel-container {
      background: var(--navbar-bg);
      /* Use dark theme variable */
  }

  .carousel-arrow {
      background: var(--toggle-bg);
      border: none;
      color: var(--text-color);
      font-size: 1.5em;
      padding: 8px 16px;
      border-radius: 50%;
      cursor: pointer;
      transition: background 0.5s, color 0.5s, transform 0.2s;
      margin: 0 8px;
      min-width: 40px;
      min-height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .carousel-arrow:hover {
      background: var(--navbar-bg);
      transform: scale(1.15);
  }

  .carousel-text-wrapper {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: visible;
      height: auto;
      /* Animate height changes smoothly */
      transition: height 0.5s;
  }

  .carousel-text {
      font-size: 0.98em;
      color: var(--text-color);
      font-family: inherit;
      text-align: center;
      padding: 0 10px;
      opacity: 1;
      transition: opacity 0.25s, color 0.5s, background 0.5s;
      will-change: opacity, color, background;
      min-height: 1.5em;
      max-width: 100%;
      white-space: normal;
      word-break: break-word;
      overflow-wrap: break-word;
      transition: opacity 0.5s, color 0.5s, background 0.5s;
  }

  .carousel-text.fade-out {
      opacity: 0;
      transition: opacity 0.25s;
  }

  .carousel-text.fade-in {
      opacity: 1;
      transition: opacity 0.25s;
  }

  @media (max-width: 600px) {
      .carousel-container {
          max-width: 98vw;
          padding: 6px 0;
      }

      .carousel-text {
          font-size: 0.92em;
          padding: 0 4px;
      }

      .carousel-arrow {
          font-size: 1.2em;
          width: 32px;
          height: 32px;
          min-width: 32px;
          min-height: 32px;
      }

      .carousel-text-wrapper {
          height: auto;
      }
  }



  .carousel-arrow {

      border-radius: 50%;

  }

  /* Fix carousel arrow/circle shape and size */
  .carousel-arrow {
      width: 32px;
      height: 32px;
      min-width: 32px;
      min-height: 32px;
      border-radius: 50%;

  }

  @media (min-width: 601px) {
      .carousel-arrow {
          width: 40px;
          height: 40px;
          min-width: 40px;
          min-height: 40px;
      }
  }

  /* Error and retry button styles */
  .error-container {
      text-align: center;
      padding: 40px;
      color: var(--text-color);
      background: var(--navbar-bg);
      border-radius: 15px;
      margin: 20px auto;
      max-width: 425px;
      backdrop-filter: blur(6px);
      box-shadow: var(--card-shadow);
  }

  .retry-button {
      background: var(--navbar-bg);
      color: var(--text-color);
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 12px 24px;
      border-radius: 8px;
      cursor: pointer;
      margin-top: 15px;
      transition: all 0.3s ease;
      font-size: 14px;
  }

  .retry-button:hover {
      transform: scale(1.05);
      background: var(--toggle-bg);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .api-status {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: bold;
      margin-left: 10px;
  }

  .api-status.online {
      background: rgba(40, 167, 69, 0.2);
      color: #28a745;
      border: 1px solid rgba(40, 167, 69, 0.3);
  }

  .api-status.offline {
      background: rgba(220, 53, 69, 0.2);
      color: #dc3545;
      border: 1px solid rgba(220, 53, 69, 0.3);
  }

  .api-status.loading {
      background: rgba(255, 193, 7, 0.2);
      color: #ffc107;
      border: 1px solid rgba(255, 193, 7, 0.3);
  }

  /* Small Connection Status Indicator for Home Page */
  .connection-status-small {
      text-align: center;
      margin: 15px auto;
      padding: 8px 15px;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.3);
      backdrop-filter: blur(8px);
      max-width: 250px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      transition: all 0.3s ease;
      opacity: 1;
  }

  .connection-indicator-small {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
  }

  .connection-spinner-small {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(0, 0, 0, 0.1);
      border-top: 2px solid #007bff;
      border-radius: 50%;
      animation: spin 1s linear infinite;
  }

  @keyframes spin {
      0% {
          transform: rotate(0deg);
      }

      100% {
          transform: rotate(360deg);
      }
  }

  .connection-text-small {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-color);
      transition: color 0.3s ease;
  }

  .connection-status-small.connected {
      background: rgba(40, 167, 69, 0.15);
      border: 1px solid rgba(40, 167, 69, 0.2);
  }

  .connection-status-small.connected .connection-spinner-small {
      border: 2px solid rgba(40, 167, 69, 0.3);
      border-top: 2px solid #28a745;
      animation: none;
      position: relative;
  }

  .connection-status-small.connected .connection-spinner-small::after {
      content: "✓";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #28a745;
      font-weight: bold;
      font-size: 10px;
      line-height: 1;
  }

  .connection-status-small.error {
      background: rgba(220, 53, 69, 0.15);
      border: 1px solid rgba(220, 53, 69, 0.2);
  }

  .connection-status-small.error .connection-spinner-small {
      border: 2px solid rgba(220, 53, 69, 0.3);
      border-top: 2px solid #dc3545;
      animation: none;
      position: relative;
  }

  .connection-status-small.error .connection-spinner-small::after {
      content: "✗";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #dc3545;
      font-weight: bold;
      font-size: 10px;
      line-height: 1;
  }

  .connection-status-small.hidden {
      opacity: 0;
      pointer-events: none;
      transform: translateY(-10px);
  }

  /* Hide on mobile to save space */
  @media (max-width: 768px) {
      .connection-status-small {
          max-width: 200px;
          padding: 6px 12px;
          margin: 10px auto;
      }

      .connection-text-small {
          font-size: 12px;
      }

      .connection-spinner-small {
          width: 14px;
          height: 14px;
      }
  }



  #home-section {
      padding-top: 120px;
      /* Add space below the navbar */
  }

  @media (max-width: 768px) {
      #home-section {
          padding-top: 100px;
          /* Slightly less padding on mobile */
      }
  }

  .Games-section {
      display: none;
      /* Hide the section by default */
  }

  .Games-section.visible {
      display: block;
      /* Show the section when visible */
  }

  .about-section {
      display: none;
      padding-top: 100px;
      text-align: center;
  }

  .about-section.visible {
      display: block;
  }

  .about-container {
      background: rgba(255, 255, 255, 0.4);
      padding: 20px;
      border-radius: 25px;
      max-width: 425px;
      margin: 20px auto;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(6px);
      color: #333;
      text-align: center;
      transition: all 0.5s ease;
  }

  [data-theme="light"] .about-container {
      background: rgba(255, 255, 255, 0.4);
      color: #333;
  }

  [data-theme]:not([data-theme="light"]) .about-container,
  html:not([data-theme]) .about-container {
      background: rgba(17, 25, 40, 0.7);
      color: #fff;
  }

  .qr-code {
      margin-top: 20px;
  }

  .qr-code img {
      max-width: 250px;
      height: auto;
      border: 2px solid #007bff;
      border-radius: 8px;
  }

  .donation-message {
      margin-top: 20px;
      color: #28a745;
      font-weight: bold;
  }

  .Games-buttons>.Games-button:last-child {
      margin-bottom: 150px;
  }

  .carousel-container {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 30px auto 10px auto;
      width: 90%;
      max-width: 1000px;
      min-width: 0;
      background: var(--container-bg);
      border-radius: 18px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      padding: 10px 0;
      transition: background 0.5s, width 0.5s, min-width 0.5s, max-width 0.5s;
      backdrop-filter: blur(6px);
  }

  [data-theme="light"] .carousel-container {
      background: var(--container-bg);
      /* Use theme variable for light */
  }

  [data-theme]:not([data-theme="light"]) .carousel-container,
  html:not([data-theme]) .carousel-container {
      background: var(--navbar-bg);
      /* Use dark theme variable */
  }

  .carousel-arrow {
      background: var(--toggle-bg);
      border: none;
      color: var(--text-color);
      font-size: 1.5em;
      padding: 8px 16px;
      border-radius: 50%;
      cursor: pointer;
      transition: background 0.5s, color 0.5s, transform 0.2s;
      margin: 0 8px;
      min-width: 40px;
      min-height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .carousel-arrow:hover {
      background: var(--navbar-bg);
      transform: scale(1.15);
  }

  .carousel-text-wrapper {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: visible;
      height: auto;
      /* Animate height changes smoothly */
      transition: height 0.5s;
  }

  .carousel-text {
      font-size: 0.98em;
      color: var(--text-color);
      font-family: inherit;
      text-align: center;
      padding: 0 10px;
      opacity: 1;
      transition: opacity 0.25s, color 0.5s, background 0.5s;
      will-change: opacity, color, background;
      min-height: 1.5em;
      max-width: 100%;
      white-space: normal;
      word-break: break-word;
      overflow-wrap: break-word;
      transition: opacity 0.5s, color 0.5s, background 0.5s;
  }

  .carousel-text.fade-out {
      opacity: 0;
      transition: opacity 0.25s;
  }

  .carousel-text.fade-in {
      opacity: 1;
      transition: opacity 0.25s;
  }

  @media (max-width: 600px) {
      .carousel-container {
          max-width: 98vw;
          padding: 6px 0;
      }

      .carousel-text {
          font-size: 0.92em;
          padding: 0 4px;
      }

      .carousel-arrow {
          font-size: 1.2em;
          width: 32px;
          height: 32px;
          min-width: 32px;
          min-height: 32px;
      }

      .carousel-text-wrapper {
          height: auto;
      }
  }



  .carousel-arrow {

      border-radius: 50%;

  }

  /* Fix carousel arrow/circle shape and size */
  .carousel-arrow {
      width: 32px;
      height: 32px;
      min-width: 32px;
      min-height: 32px;
      border-radius: 50%;

  }

  @media (min-width: 601px) {
      .carousel-arrow {
          width: 40px;
          height: 40px;
          min-width: 40px;
          min-height: 40px;
      }
  }

  /* Error and retry button styles */
  .error-container {
      text-align: center;
      padding: 40px;
      color: var(--text-color);
      background: var(--navbar-bg);
      border-radius: 15px;
      margin: 20px auto;
      max-width: 425px;
      backdrop-filter: blur(6px);
      box-shadow: var(--card-shadow);
  }

  .retry-button {
      background: var(--navbar-bg);
      color: var(--text-color);
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 12px 24px;
      border-radius: 8px;
      cursor: pointer;
      margin-top: 15px;
      transition: all 0.3s ease;
      font-size: 14px;
  }

  .retry-button:hover {
      transform: scale(1.05);
      background: var(--toggle-bg);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .api-status {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: bold;
      margin-left: 10px;
  }

  .api-status.online {
      background: rgba(40, 167, 69, 0.2);
      color: #28a745;
      border: 1px solid rgba(40, 167, 69, 0.3);
  }

  .api-status.offline {
      background: rgba(220, 53, 69, 0.2);
      color: #dc3545;
      border: 1px solid rgba(220, 53, 69, 0.3);
  }

  .api-status.loading {
      background: rgba(255, 193, 7, 0.2);
      color: #ffc107;
      border: 1px solid rgba(255, 193, 7, 0.3);
  }

  /* Small Connection Status Indicator for Home Page */
  .connection-status-small {
      text-align: center;
      margin: 15px auto;
      padding: 8px 15px;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.3);
      backdrop-filter: blur(8px);
      max-width: 250px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      transition: all 0.3s ease;
      opacity: 1;
  }

  .connection-indicator-small {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
  }

  .connection-spinner-small {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(0, 0, 0, 0.1);
      border-top: 2px solid #007bff;
      border-radius: 50%;
      animation: spin 1s linear infinite;
  }

  @keyframes spin {
      0% {
          transform: rotate(0deg);
      }

      100% {
          transform: rotate(360deg);
      }
  }

  .connection-text-small {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-color);
      transition: color 0.3s ease;
  }

  .connection-status-small.connected {
      background: rgba(40, 167, 69, 0.15);
      border: 1px solid rgba(40, 167, 69, 0.2);
  }

  .connection-status-small.connected .connection-spinner-small {
      border: 2px solid rgba(40, 167, 69, 0.3);
      border-top: 2px solid #28a745;
      animation: none;
      position: relative;
  }

  .connection-status-small.connected .connection-spinner-small::after {
      content: "✓";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #28a745;
      font-weight: bold;
      font-size: 10px;
      line-height: 1;
  }

  .connection-status-small.error {
      background: rgba(220, 53, 69, 0.15);
      border: 1px solid rgba(220, 53, 69, 0.2);
  }

  .connection-status-small.error .connection-spinner-small {
      border: 2px solid rgba(220, 53, 69, 0.3);
      border-top: 2px solid #dc3545;
      animation: none;
      position: relative;
  }

  .connection-status-small.error .connection-spinner-small::after {
      content: "✗";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #dc3545;
      font-weight: bold;
      font-size: 10px;
      line-height: 1;
  }

  .connection-status-small.hidden {
      opacity: 0;
      pointer-events: none;
      transform: translateY(-10px);
  }

  /* Hide on mobile to save space */
  @media (max-width: 768px) {
      .connection-status-small {
          max-width: 200px;
          padding: 6px 12px;
          margin: 10px auto;
      }

      .connection-text-small {
          font-size: 12px;
      }

      .connection-spinner-small {
          width: 14px;
          height: 14px;
      }
  }



  #home-section {
      padding-top: 120px;
      /* Add space below the navbar */
  }

  @media (max-width: 768px) {
      #home-section {
          padding-top: 100px;
          /* Slightly less padding on mobile */
      }
  }

  .Games-section {
      display: none;
      /* Hide the section by default */
  }

  .Games-section.visible {
      display: block;
      /* Show the section when visible */
  }

  .about-section {
      display: none;
      padding-top: 100px;
      text-align: center;
  }

  .about-section.visible {
      display: block;
  }

  .about-container {
      background: rgba(255, 255, 255, 0.4);
      padding: 20px;
      border-radius: 25px;
      max-width: 425px;
      margin: 20px auto;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(6px);
      color: #333;
      text-align: center;
      transition: all 0.5s ease;
  }

  [data-theme="light"] .about-container {
      background: rgba(255, 255, 255, 0.4);
      color: #333;
  }

  [data-theme]:not([data-theme="light"]) .about-container,
  html:not([data-theme]) .about-container {
      background: rgba(17, 25, 40, 0.7);
      color: #fff;
  }

  .qr-code {
      margin-top: 20px;
  }

  .qr-code img {
      max-width: 250px;
      height: auto;
      border: 2px solid #007bff;
      border-radius: 8px;
  }

  .donation-message {
      margin-top: 20px;
      color: #28a745;
      font-weight: bold;
  }

  .Games-buttons>.Games-button:last-child {
      margin-bottom: 150px;
  }

  .carousel-container {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 30px auto 10px auto;
      width: 90%;
      max-width: 1000px;
      min-width: 0;
      background: var(--container-bg);
      border-radius: 18px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      padding: 10px 0;
      transition: background 0.5s, width 0.5s, min-width 0.5s, max-width 0.5s;
      backdrop-filter: blur(6px);
      z-index: 0;
  }

  [data-theme="light"] .carousel-container {
      background: var(--container-bg);
      /* Use theme variable for light */
  }

  [data-theme]:not([data-theme="light"]) .carousel-container,
  html:not([data-theme]) .carousel-container {
      background: var(--navbar-bg);
      /* Use dark theme variable */
  }

  .carousel-arrow {
      background: var(--toggle-bg);
      border: none;
      color: var(--text-color);
      font-size: 1.5em;
      padding: 8px 16px;
      border-radius: 50%;
      cursor: pointer;
      transition: background 0.5s, color 0.5s, transform 0.2s;
      margin: 0 8px;
      min-width: 40px;
      min-height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .carousel-arrow:hover {
      background: var(--navbar-bg);
      transform: scale(1.15);
  }

  .carousel-text-wrapper {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: visible;
      height: auto;
      /* Animate height changes smoothly */
      transition: height 0.5s;
  }

  .carousel-text {
      font-size: 0.98em;
      color: var(--text-color);
      font-family: inherit;
      text-align: center;
      padding: 0 10px;
      opacity: 1;
      transition: opacity 0.25s, color 0.5s, background 0.5s;
      will-change: opacity, color, background;
      min-height: 1.5em;
      max-width: 100%;
      white-space: normal;
      word-break: break-word;
      overflow-wrap: break-word;
      transition: opacity 0.5s, color 0.5s, background 0.5s;
  }

  .carousel-text.fade-out {
      opacity: 0;
      transition: opacity 0.25s;
  }

  .carousel-text.fade-in {
      opacity: 1;
      transition: opacity 0.25s;
  }

  @media (max-width: 600px) {
      .carousel-container {
          max-width: 98vw;
          padding: 6px 0;
      }

      .carousel-text {
          font-size: 0.92em;
          padding: 0 4px;
      }

      .carousel-arrow {
          font-size: 1.2em;
          width: 32px;
          height: 32px;
          min-width: 32px;
          min-height: 32px;
      }

      .carousel-text-wrapper {
          height: auto;
      }
  }



  .carousel-arrow {

      border-radius: 50%;

  }

  /* Fix carousel arrow/circle shape and size */
  .carousel-arrow {
      width: 32px;
      height: 32px;
      min-width: 32px;
      min-height: 32px;
      border-radius: 50%;

  }

  @media (min-width: 601px) {
      .carousel-arrow {
          width: 40px;
          height: 40px;
          min-width: 40px;
          min-height: 40px;
      }
  }

  /* Error and retry button styles */
  .error-container {
      text-align: center;
      padding: 40px;
      color: var(--text-color);
      background: var(--navbar-bg);
      border-radius: 15px;
      margin: 20px auto;
      max-width: 425px;
      backdrop-filter: blur(6px);
      box-shadow: var(--card-shadow);
  }

  .retry-button {
      background: var(--navbar-bg);
      color: var(--text-color);
      border: 1px solid rgba(255, 255, 255, 0.1);
      padding: 12px 24px;
      border-radius: 8px;
      cursor: pointer;
      margin-top: 15px;
      transition: all 0.3s ease;
      font-size: 14px;
  }

  .retry-button:hover {
      transform: scale(1.05);
      background: var(--toggle-bg);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .api-status {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: bold;
      margin-left: 10px;
  }

  .api-status.online {
      background: rgba(40, 167, 69, 0.2);
      color: #28a745;
      border: 1px solid rgba(40, 167, 69, 0.3);
  }

  .api-status.offline {
      background: rgba(220, 53, 69, 0.2);
      color: #dc3545;
      border: 1px solid rgba(220, 53, 69, 0.3);
  }

  .api-status.loading {
      background: rgba(255, 193, 7, 0.2);
      color: #ffc107;
      border: 1px solid rgba(255, 193, 7, 0.3);
  }

  /* Small Connection Status Indicator for Home Page */
  .connection-status-small {
      text-align: center;
      margin: 15px auto;
      padding: 8px 15px;
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.3);
      backdrop-filter: blur(8px);
      max-width: 250px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      transition: all 0.3s ease;
      opacity: 1;
  }

  .connection-indicator-small {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
  }

  .connection-spinner-small {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(0, 0, 0, 0.1);
      border-top: 2px solid #007bff;
      border-radius: 50%;
      animation: spin 1s linear infinite;
  }

  @keyframes spin {
      0% {
          transform: rotate(0deg);
      }

      100% {
          transform: rotate(360deg);
      }
  }

  .connection-text-small {
      font-size: 13px;
      font-weight: 500;
      color: var(--text-color);
      transition: color 0.3s ease;
  }

  .connection-status-small.connected {
      background: rgba(40, 167, 69, 0.15);
      border: 1px solid rgba(40, 167, 69, 0.2);
  }

  .connection-status-small.connected .connection-spinner-small {
      border: 2px solid rgba(40, 167, 69, 0.3);
      border-top: 2px solid #28a745;
      animation: none;
      position: relative;
  }

  .connection-status-small.connected .connection-spinner-small::after {
      content: "✓";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #28a745;
      font-weight: bold;
      font-size: 10px;
      line-height: 1;
  }

  .connection-status-small.error {
      background: rgba(220, 53, 69, 0.15);
      border: 1px solid rgba(220, 53, 69, 0.2);
  }

  .connection-status-small.error .connection-spinner-small {
      border: 2px solid rgba(220, 53, 69, 0.3);
      border-top: 2px solid #dc3545;
      animation: none;
      position: relative;
  }

  .connection-status-small.error .connection-spinner-small::after {
      content: "✗";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #dc3545;
      font-weight: bold;
      font-size: 10px;
      line-height: 1;
  }

  .connection-status-small.hidden {
      opacity: 0;
      pointer-events: none;
      transform: translateY(-10px);
  }

  /* Hide on mobile to save space */
  @media (max-width: 768px) {
      .connection-status-small {
          max-width: 200px;
          padding: 6px 12px;
          margin: 10px auto;
      }

      .connection-text-small {
          font-size: 12px;
      }

      .connection-spinner-small {
          width: 14px;
          height: 14px;
      }
  }

  .prime-modal-box {
      background: var(--container-bg, rgba(255, 255, 255, 0.6));
      color: var(--text-color, #222);
      border-radius: 18px;
      padding: 32px 24px;
      max-width: 350px;
      margin: auto;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
      text-align: center;
      position: relative;
      -webkit-backdrop-filter: blur(6px);
      /* Safari iOS support */
      backdrop-filter: blur(6px);
      border: 1px solid rgba(0, 0, 0, 0.08);
      transition: background 0.5s, color 0.5s;
  }

  [data-theme="light"] .prime-modal-box {
      background: var(--container-bg, rgba(255, 255, 255, 0.6));
      color: var(--text-color, #222);
      border: 1px solid rgba(0, 0, 0, 0.08);
  }

  [data-theme]:not([data-theme="light"]) .prime-modal-box,
  html:not([data-theme]) .prime-modal-box {
      background: var(--navbar-bg, rgba(17, 25, 40, 0.6));
      color: var(--text-color, #fff);
      border: 1px solid rgba(255, 255, 255, 0.08);
  }

  #primeModalYes,
  #primeModalNo {
      transition: transform 0.2s cubic-bezier(.4, 2, .6, 1);
      background: rgba(255, 255, 255, 0.6);
      color: white;
      border: none;
      border-radius: 8px;
      padding: 10px 24px;
      font-size: 1em;
      cursor: pointer;
      -webkit-backdrop-filter: blur(12px);
      /* Safari iOS support */
      backdrop-filter: blur(12px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  #primeModalYes {
      /* Only glassmorphic, no gradient */
      background: rgba(40, 167, 70, 0.5);
  }

  #primeModalNo {
      background: rgba(220, 53, 69, 0.5);
  }

  #primeModalYes:hover,
  #primeModalNo:hover {
      transform: scale(1.15);
      transition: 0.25s;
      z-index: 1;
  }

  .steam-modal-close {
      position: absolute;
      top: 8px;
      right: 8px;
      background: none;
      border: none;
      font-size: 1.5em;
      cursor: pointer;
      color: var(--text-color, #222);
      z-index: 2;
      padding: 2px 8px;
      border-radius: 50%;
      transition: transform 0.18s, box-shadow 0.18s;
      box-shadow: none;
  }

  .steam-modal-close:hover {
      transform: scale(1.25);

  }

  .steam-modal-no,
  .steam-modal-yes {
      transition: transform 0.2s cubic-bezier(.4, 2, .6, 1);
      border: none;
      border-radius: 8px;
      padding: 10px 24px;
      font-size: 1em;
      cursor: pointer;
      -webkit-backdrop-filter: blur(12px);
      /* Safari iOS support */
      backdrop-filter: blur(12px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      color: #fff;
  }

  .steam-modal-no {
      background: rgba(0, 123, 255, 0.5);
  }

  .steam-modal-yes {
      background: rgba(40, 167, 70, 0.5);
  }

  .steam-modal-no:hover,
  .steam-modal-yes:hover {
      transform: scale(1.15);
      transition: 0.25s;
      z-index: 1;
  }

  .nsfw-modal-close {
      position: absolute;
      top: 8px;
      right: 8px;
      background: none;
      border: none;
      font-size: 1.5em;
      cursor: pointer;
      color: var(--text-color, #222);
      z-index: 2;
      padding: 2px 8px;
      border-radius: 50%;
      transition: transform 0.18s, box-shadow 0.18s;
      box-shadow: none;
  }

  .nsfw-modal-close:hover {
      transform: scale(1.25);
  }

  .nsfw-modal-no,
  .nsfw-modal-yes {
      transition: transform 0.2s cubic-bezier(.4, 2, .6, 1);
      border: none;
      border-radius: 8px;
      padding: 10px 24px;
      font-size: 1em;
      cursor: pointer;
      -webkit-backdrop-filter: blur(12px);
      /* Safari iOS support */
      backdrop-filter: blur(12px);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      color: #fff;
  }

  .nsfw-modal-no {
      background: rgba(40, 167, 70, 0.5);
  }

  .nsfw-modal-yes {
      background: rgba(220, 53, 69, 0.5);
  }

  .nsfw-modal-no:hover,
  .nsfw-modal-yes:hover {
      transform: scale(1.15);
      transition: 0.25s;
      z-index: 1;
  }

  /* Search Animation System */
  .Games-button {
      transition: opacity 0.4s ease, transform 0.4s ease, height 0.4s ease, margin 0.4s ease;
      will-change: opacity, transform;
      /* GPU acceleration hint */
  }

  .Games-button.search-hiding {
      opacity: 0;
      transform: scale(0.95) translateY(-10px);
      height: 0;
      margin: 0;
      overflow: hidden;
      pointer-events: none;
      /* Prevent interaction during animation */
  }

  .Games-button.search-showing {
      opacity: 1;
      transform: scale(1) translateY(0);
  }

  .Games-button.search-restored {
      animation: searchRestoreCard 0.6s ease forwards;
  }

  @keyframes searchRestoreCard {
      0% {
          opacity: 0;
          transform: scale(0.9) translateY(20px);
      }

      100% {
          opacity: 1;
          transform: scale(1) translateY(0);
      }
  }

  .store-group,
  .expiry-group {
      transition: opacity 0.5s ease, transform 0.5s ease, max-height 0.5s ease, margin 0.5s ease, padding 0.5s ease;
      overflow: hidden;
      will-change: opacity, transform, max-height;
      /* GPU acceleration hint */
  }

  .store-group.search-collapsing,
  .expiry-group.search-collapsing {
      opacity: 0;
      transform: translateY(-20px);
      max-height: 0;
      margin: 0;
      padding: 0;
      pointer-events: none;
      /* Prevent interaction during animation */
  }

  .store-group.search-expanding,
  .expiry-group.search-expanding {
      animation: searchExpandGroup 0.6s ease forwards;
  }

  @keyframes searchExpandGroup {
      0% {
          opacity: 0;
          transform: translateY(-20px);
          max-height: 0;
      }

      100% {
          opacity: 1;
          transform: translateY(0);
          max-height: none;
      }
  }

  .store-games,
  .expiry-games {
      transition: opacity 0.3s ease;
  }

  /* Staggered animation delays */
  .search-stagger-1 {
      animation-delay: 0.1s;
  }

  .search-stagger-2 {
      animation-delay: 0.2s;
  }

  .search-stagger-3 {
      animation-delay: 0.3s;
  }

  .search-stagger-4 {
      animation-delay: 0.4s;
  }

  .search-stagger-5 {
      animation-delay: 0.5s;
  }

  /* Search input enhancement */
  .search-input {
      transition: all 0.3s ease;
  }

  .search-input:focus {
      transform: scale(1.02);
      box-shadow: 0 0 0 2px rgba(142, 72, 255, 0.3);
  }

  /* Enhanced navbar and footer for scroll behavior */
  .navbar {
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      will-change: transform;
      /* GPU acceleration hint */
  }

  .navbar.hidden {
      transform: translate(-50%, -120%);
      /* Slightly more offset for cleaner hide */
  }

  footer {
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      will-change: transform;
      /* GPU acceleration hint */
  }

  footer.hidden {
      transform: translate(-50%, 120%);
      /* Slightly more offset for cleaner hide */
  }

  /* Scroll performance optimizations */
  .navbar,
  footer {
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      /* Prevent flickering during transforms */
  }

  /* Mobile-specific optimizations */
  @media (max-width: 768px) {
      .navbar {
          transition: transform 0.25s ease-out;
          /* Faster on mobile */
      }

      footer {
          transition: transform 0.25s ease-out;
          /* Faster on mobile */
      }
  }

  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce) {

      .navbar,
      footer {
          transition: none;
      }

      .navbar.hidden {
          opacity: 0;
          transform: translateX(-50%);
      }

      footer.hidden {
          opacity: 0;
          transform: translateX(-50%);
      }
  }

  /* Dynamic Game Count Message Styling */
  .game-count-message {
      display: inline-block;
      font-weight: inherit;
      font-size: inherit;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      will-change: transform, opacity;
  }

  .game-count-message.updating {
      animation: gameCountPulse 0.6s ease-out;
  }

  @keyframes gameCountPulse {
      0% {
          transform: scale(1);
          opacity: 1;
      }

      50% {
          transform: scale(1.05);
          opacity: 0.8;
      }

      100% {
          transform: scale(1);
          opacity: 1;
      }
  }

  /* Optional fade-in animation for count updates */
  .game-count-message.fade-update {
      animation: gameCountFadeUpdate 0.4s ease-in-out;
  }

  @keyframes gameCountFadeUpdate {
      0% {
          opacity: 0.6;
          transform: translateY(-2px);
      }

      100% {
          opacity: 1;
          transform: translateY(0);
      }
  }

  </style>
