/* ============================================================
   header.css — All static header styles extracted from header.php
   Loaded via <link> so the browser caches this file across pages.
   DO NOT add PHP here. Theme colours use CSS custom properties
   already set by theme-generator.php (loaded before this file).
   ============================================================ */

/* Custom base */
.glass-header {
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(209, 213, 219, 0.4);
}

/* ====== DARK MODE – Header Components ====== */
.dark .mobile-glass-header,
.dark .desktop-glass-header {
  background: #09090b !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 24px -4px rgba(0, 0, 0, 0.6) !important;
}

.dark .premium-search-container {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}
.dark .premium-search-container:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
.dark .premium-search-container:focus-within {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
}
.dark .premium-search-input { color: #e2e8f0 !important; background-color: transparent !important; background: transparent !important; -webkit-appearance: none !important; color-scheme: light !important; }
.dark .premium-search-input::placeholder { color: #64748b !important; }
.dark input#searchInput { background-color: transparent !important; background: transparent !important; color-scheme: light !important; }
.dark .search-icon-wrapper {
  background: rgba(255, 255, 255, 0.06) !important;
}
.dark .search-icon-wrapper svg { color: #64748b !important; }
.dark .search-shortcut-badge {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #64748b !important;
}

.dark .premium-side-menu {
  background: rgba(9, 9, 11, 0.98) !important;
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.7) !important;
}
.dark .premium-profile-header {
  background: linear-gradient(135deg, #0d0d0f 0%, #09090b 50%, #0d0d0f 100%) !important;
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}
.dark .premium-menu-item:hover {
  background: linear-gradient(90deg, rgba(var(--theme-500-rgb), 0.08), rgba(22, 27, 34, 0.6)) !important;
}
.dark .menu-section-title { color: #8b949e !important; }
.dark .premium-menu-item span.text-gray-800 { color: #c9d1d9 !important; }

.dark .premium-dropdown {
  background: #161b22 !important;
  border-color: rgba(240, 246, 252, 0.1) !important;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6) !important;
}
.dark .premium-dropdown-item:hover {
  background: linear-gradient(90deg, rgba(var(--theme-500-rgb), 0.1), rgba(22, 27, 34, 0.8)) !important;
}
.dark .premium-dropdown-item span { color: #c9d1d9 !important; }

.dark .premium-support-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}
.dark .premium-support-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
.dark .premium-support-btn span,
.dark .premium-support-btn i { color: #94a3b8 !important; }
.dark .premium-support-btn:hover span,
.dark .premium-support-btn:hover i { color: #ffffff !important; }

.dark .premium-balance-display {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
}

.dark .balance-btn {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
}

.dark .menu-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.dark .menu-btn:hover {
  background: rgba(255, 255, 255, 0.09) !important;
}

/* Desktop floating nav pill (dark mode) */
.dark .premium-nav-shell,
.dark .floating-nav-shell {
  background: rgba(9, 9, 11, 0.96) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(32px) saturate(180%) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
              0 8px 32px -8px rgba(0, 0, 0, 0.7),
              inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}
.dark .floating-nav-shell:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07),
              0 12px 40px -8px rgba(0, 0, 0, 0.75),
              inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.dark .floating-nav-shell .premium-nav-link {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  box-shadow: none !important;
}
.dark .floating-nav-shell .premium-nav-link:hover {
  background: rgba(var(--theme-500-rgb), 0.12) !important;
  color: var(--theme-300) !important;
  border-color: rgba(var(--theme-500-rgb), 0.25) !important;
  box-shadow: 0 4px 16px rgba(var(--theme-500-rgb), 0.1) !important;
  transform: translateY(-2px);
}
.dark .floating-nav-shell .premium-nav-link.active {
  background: linear-gradient(135deg, var(--theme-500), var(--theme-600)) !important;
  color: #fff !important;
  border-color: rgba(var(--theme-400-rgb), 0.5) !important;
  box-shadow: 0 8px 24px rgba(var(--theme-500-rgb), 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.dark .premium-nav-link.text-gray-700 { color: #8b949e !important; }

.dark .auth-btn-login {
  background: #161b22 !important;
  border-color: var(--theme-500) !important;
  color: var(--theme-400) !important;
}
.dark .desktop-auth-btn-login {
  background: #161b22 !important;
  border-color: var(--theme-500) !important;
  color: var(--theme-400) !important;
}

.dark .dark-mode-toggle {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.dark .dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Dark mode for footer */
.dark #desktopFooter {
  background: linear-gradient(135deg, #09090b, #111113, #09090b) !important;
  border-top-color: rgba(255, 255, 255, 0.05) !important;
}
.dark #desktopFooter h3,
.dark #desktopFooter h4 { color: #c9d1d9 !important; }
.dark #desktopFooter p,
.dark #desktopFooter a,
.dark #desktopFooter li { color: #8b949e !important; }
.dark #desktopFooter a:hover { color: var(--theme-400) !important; }

/* Mobile bottom nav (dark mode) */
.dark .safe-area-bottom > div.mobile-bottom-nav {
  background: rgba(9, 9, 11, 0.97) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.04),
              0 -4px 24px -4px rgba(0, 0, 0, 0.6) !important;
}
.dark .safe-area-bottom a.text-gray-600 {
  color: #8b949e !important;
}
.dark .safe-area-bottom a.text-gray-600:hover {
  color: var(--theme-300) !important;
  background: rgba(var(--theme-500-rgb), 0.1) !important;
}
.dark .safe-area-bottom button.ring-4 {
  --tw-ring-color: rgba(22, 27, 34, 0.7) !important;
  border-color: rgba(var(--theme-400-rgb), 0.5) !important;
}

/* Explore sheet (dark mode) */
.dark #mobileExploreSheet .bg-white {
  background: #09090b !important;
}
.dark #mobileExploreSheet .rounded-t-3xl {
  border-top: 1px solid rgba(48, 54, 61, 0.4);
}
.dark #mobileExploreSheet .text-gray-900 { color: #e6edf3 !important; }
.dark #mobileExploreSheet .text-gray-600 { color: #8b949e !important; }
.dark #mobileExploreSheet .text-gray-700 { color: #c9d1d9 !important; }
.dark #mobileExploreSheet .text-gray-800 { color: #c9d1d9 !important; }
.dark #mobileExploreSheet .bg-gray-100 { background: #161b22 !important; }
.dark #mobileExploreSheet .hover\:bg-gray-200:hover { background: #2d333b !important; }
.dark #mobileExploreSheet .from-white { --tw-gradient-from: #161b22 !important; }
.dark #mobileExploreSheet .to-white { --tw-gradient-to: #161b22 !important; }
.dark #mobileExploreSheet .border-theme-100\/70 { border-color: rgba(48, 54, 61, 0.4) !important; }
.dark #mobileExploreSheet .from-gray-100 { --tw-gradient-from: #161b22 !important; }
.dark #mobileExploreSheet .to-gray-50 { --tw-gradient-to: #161b22 !important; }
.dark #mobileExploreSheet .border-gray-200 { border-color: #30363d !important; }
.dark #mobileExploreSheet .bg-white\/70 { background: rgba(22, 27, 34, 0.7) !important; }
.dark #mobileExploreSheet .text-gray-500 { color: #6e7681 !important; }
.dark #mobileExploreSheet .shadow-inner { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important; }

/* Dark mode logout modal */
.dark #logoutModal .bg-white {
  background: #161b22 !important;
}
.dark #logoutModal .text-gray-800 { color: #c9d1d9 !important; }
.dark #logoutModal .text-gray-600 { color: #8b949e !important; }
.dark #logoutModal .bg-gray-100 { background: #21262d !important; }

/* Additional dark mode overrides for slate/gray classes */
.dark .text-slate-900 { color: #e6edf3 !important; }
.dark .text-slate-800 { color: #e6edf3 !important; }
.dark .text-slate-700 { color: #c9d1d9 !important; }
.dark .text-slate-600 { color: #c9d1d9 !important; }
.dark .text-slate-500 { color: #8b949e !important; }
.dark .bg-slate-50 { background-color: #161b22 !important; }
.dark .bg-slate-100 { background-color: #161b22 !important; }
.dark .bg-slate-200 { background-color: #21262d !important; }
.dark .border-gray-100 { border-color: #30363d !important; }
.dark .border-slate-100 { border-color: #30363d !important; }
.dark .border-slate-200 { border-color: #484f58 !important; }
.dark .border-slate-300 { border-color: #484f58 !important; }
.dark .ring-gray-100 { --tw-ring-color: #30363d !important; }
.dark .ring-gray-200 { --tw-ring-color: #484f58 !important; }

/* Dark mode for common cards and panels */
.dark .bg-white\/80 { background-color: rgba(22, 27, 34, 0.8) !important; }
.dark .bg-white\/90 { background-color: rgba(22, 27, 34, 0.9) !important; }
.dark .bg-white\/95 { background-color: rgba(22, 27, 34, 0.95) !important; }
.dark .bg-gray-50\/50 { background-color: rgba(22, 27, 34, 0.5) !important; }
.dark .from-white { --tw-gradient-from: #09090b !important; }
.dark .to-white { --tw-gradient-to: #09090b !important; }
.dark .from-gray-50 { --tw-gradient-from: #09090b !important; }
.dark .to-gray-50 { --tw-gradient-to: #09090b !important; }
.dark .from-gray-100 { --tw-gradient-from: #111113 !important; }
.dark .to-gray-100 { --tw-gradient-to: #111113 !important; }

/* Dark mode for swiper navigation */
.dark .swiper-button-prev::after,
.dark .swiper-button-next::after { color: #c9d1d9 !important; }

.dark body { background-color: #09090b !important; }

/* Dark mode for colored accent backgrounds (-50 shades) */
.dark .bg-blue-50 { background-color: rgba(30, 58, 138, 0.2) !important; }
.dark .bg-green-50 { background-color: rgba(20, 83, 45, 0.2) !important; }
.dark .bg-yellow-50 { background-color: rgba(113, 63, 18, 0.2) !important; }
.dark .bg-red-50 { background-color: rgba(127, 29, 29, 0.2) !important; }
.dark .bg-purple-50 { background-color: rgba(88, 28, 135, 0.2) !important; }
.dark .bg-pink-50 { background-color: rgba(131, 24, 67, 0.2) !important; }
.dark .bg-amber-50 { background-color: rgba(120, 53, 15, 0.2) !important; }
.dark .bg-teal-50 { background-color: rgba(19, 78, 74, 0.2) !important; }
.dark .bg-cyan-50 { background-color: rgba(22, 78, 99, 0.2) !important; }
.dark .bg-indigo-50 { background-color: rgba(49, 46, 129, 0.2) !important; }
.dark .bg-emerald-50 { background-color: rgba(6, 78, 59, 0.2) !important; }
.dark .bg-rose-50 { background-color: rgba(136, 19, 55, 0.2) !important; }
.dark .bg-violet-50 { background-color: rgba(91, 33, 182, 0.2) !important; }
.dark .bg-orange-50 { background-color: rgba(124, 45, 18, 0.2) !important; }
.dark .bg-sky-50 { background-color: rgba(12, 74, 110, 0.2) !important; }
.dark .bg-sky-100 { background-color: rgba(12, 74, 110, 0.25) !important; }
.dark .bg-blue-100 { background-color: rgba(30, 58, 138, 0.25) !important; }
.dark .bg-green-100 { background-color: rgba(20, 83, 45, 0.25) !important; }
.dark .bg-yellow-100 { background-color: rgba(113, 63, 18, 0.25) !important; }
.dark .bg-red-100 { background-color: rgba(127, 29, 29, 0.25) !important; }
.dark .bg-purple-100 { background-color: rgba(88, 28, 135, 0.25) !important; }
.dark .bg-emerald-100 { background-color: rgba(6, 78, 59, 0.25) !important; }

/* Dark mode colored gradient stops (-50) */
.dark .from-blue-50 { --tw-gradient-from: rgba(30, 58, 138, 0.2) !important; }
.dark .from-green-50 { --tw-gradient-from: rgba(20, 83, 45, 0.2) !important; }
.dark .from-purple-50 { --tw-gradient-from: rgba(88, 28, 135, 0.2) !important; }
.dark .from-emerald-50 { --tw-gradient-from: rgba(6, 78, 59, 0.2) !important; }
.dark .from-amber-50 { --tw-gradient-from: rgba(120, 53, 15, 0.2) !important; }
.dark .from-indigo-50 { --tw-gradient-from: rgba(49, 46, 129, 0.2) !important; }
.dark .from-teal-50 { --tw-gradient-from: rgba(19, 78, 74, 0.2) !important; }
.dark .from-pink-50 { --tw-gradient-from: rgba(131, 24, 67, 0.2) !important; }
.dark .from-orange-50 { --tw-gradient-from: rgba(124, 45, 18, 0.2) !important; }
.dark .from-sky-50 { --tw-gradient-from: rgba(12, 74, 110, 0.2) !important; }
.dark .from-rose-50 { --tw-gradient-from: rgba(136, 19, 55, 0.2) !important; }

.dark .to-blue-50 { --tw-gradient-to: rgba(30, 58, 138, 0.15) !important; }
.dark .to-blue-100 { --tw-gradient-to: rgba(30, 58, 138, 0.2) !important; }
.dark .to-green-50 { --tw-gradient-to: rgba(20, 83, 45, 0.15) !important; }
.dark .to-purple-50 { --tw-gradient-to: rgba(88, 28, 135, 0.15) !important; }
.dark .to-indigo-50 { --tw-gradient-to: rgba(49, 46, 129, 0.15) !important; }
.dark .to-pink-50 { --tw-gradient-to: rgba(131, 24, 67, 0.15) !important; }
.dark .to-cyan-50 { --tw-gradient-to: rgba(22, 78, 99, 0.15) !important; }
.dark .to-teal-50 { --tw-gradient-to: rgba(19, 78, 74, 0.15) !important; }
.dark .to-amber-50 { --tw-gradient-to: rgba(120, 53, 15, 0.15) !important; }
.dark .to-amber-100 { --tw-gradient-to: rgba(120, 53, 15, 0.2) !important; }
.dark .to-orange-50 { --tw-gradient-to: rgba(124, 45, 18, 0.15) !important; }

/* Dark mode colored gradient stops (-100) */
.dark .from-blue-100 { --tw-gradient-from: rgba(30, 58, 138, 0.25) !important; }
.dark .from-green-100 { --tw-gradient-from: rgba(20, 83, 45, 0.25) !important; }
.dark .from-purple-100 { --tw-gradient-from: rgba(88, 28, 135, 0.25) !important; }
.dark .from-indigo-100 { --tw-gradient-from: rgba(49, 46, 129, 0.25) !important; }
.dark .from-amber-100 { --tw-gradient-from: rgba(120, 53, 15, 0.25) !important; }
.dark .from-pink-100 { --tw-gradient-from: rgba(131, 24, 67, 0.25) !important; }
.dark .from-teal-100 { --tw-gradient-from: rgba(19, 78, 74, 0.25) !important; }

.dark .to-blue-200 { --tw-gradient-to: rgba(30, 58, 138, 0.3) !important; }
.dark .to-green-100 { --tw-gradient-to: rgba(20, 83, 45, 0.2) !important; }
.dark .to-purple-100 { --tw-gradient-to: rgba(88, 28, 135, 0.2) !important; }
.dark .to-indigo-100 { --tw-gradient-to: rgba(49, 46, 129, 0.2) !important; }

/* Dark mode for transparent white backgrounds */
.dark .bg-white\/60 { background-color: rgba(22, 27, 34, 0.6) !important; }
.dark .bg-white\/70 { background-color: rgba(22, 27, 34, 0.7) !important; }
.dark .bg-white\/75 { background-color: rgba(22, 27, 34, 0.75) !important; }
.dark .bg-white\/85 { background-color: rgba(22, 27, 34, 0.85) !important; }
.dark .bg-white\/92 { background-color: rgba(22, 27, 34, 0.92) !important; }

.dark .glass-card {
  background: rgba(22, 27, 34, 0.75) !important;
  border-color: rgba(240, 246, 252, 0.1) !important;
}

.dark .gradient-bg {
  background: linear-gradient(-45deg, #1e1b4b, #312e81, #161b22, #0c0f14) !important;
  background-size: 400% 400% !important;
}

/* Dark mode colored text */
.dark .text-blue-900 { color: #93c5fd !important; }
.dark .text-green-900 { color: #86efac !important; }
.dark .text-yellow-900 { color: #fde047 !important; }
.dark .text-red-900 { color: #fca5a5 !important; }
.dark .text-purple-900 { color: #d8b4fe !important; }
.dark .text-orange-900 { color: #fdba74 !important; }
.dark .text-blue-800 { color: #93c5fd !important; }
.dark .text-green-800 { color: #86efac !important; }

/* Dark mode colored borders */
.dark .border-blue-100 { border-color: rgba(30, 58, 138, 0.35) !important; }
.dark .border-theme-200 { border-color: rgba(30, 58, 138, 0.4) !important; }
.dark .border-green-200 { border-color: rgba(20, 83, 45, 0.4) !important; }
.dark .border-yellow-200 { border-color: rgba(113, 63, 18, 0.4) !important; }
.dark .border-red-200 { border-color: rgba(127, 29, 29, 0.4) !important; }
.dark .border-purple-200 { border-color: rgba(88, 28, 135, 0.4) !important; }
.dark .border-orange-200 { border-color: rgba(124, 45, 18, 0.4) !important; }
.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) { border-color: #30363d !important; }
.dark .text-theme-600 { color: var(--theme-400) !important; }
.dark .text-theme-700 { color: var(--theme-400) !important; }
.dark .backdrop-blur-lg { backdrop-filter: blur(16px) !important; }
.dark .search-input {
  background-color: #161b22 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
.dark .search-placeholder { color: #8b949e !important; }
.dark .hover\:bg-gray-800:hover { background-color: #2d333b !important; }
.dark .bg-white.text-gray-700 { color: #c9d1d9 !important; }
.dark .bg-gray-100.text-gray-400 { color: #6e7681 !important; }
.dark .border-dashed { border-color: #484f58 !important; }

/* ====== GLOBAL DARK MODE OVERRIDES – Core Tailwind Utilities ====== */
.dark .bg-white { background-color: #161b22 !important; }
.dark .bg-white\/50 { background-color: rgba(22, 27, 34, 0.5) !important; }
.dark .bg-gray-50 { background-color: #09090b !important; }
.dark .bg-gray-100 { background-color: #111113 !important; }
.dark .bg-gray-200 { background-color: #21262d !important; }
.dark .bg-gray-300 { background-color: #484f58 !important; }
.dark .bg-gray-50\/50 { background-color: rgba(12, 15, 20, 0.5) !important; }
.dark .bg-gray-50\/80 { background-color: rgba(12, 15, 20, 0.8) !important; }
.dark .bg-gray-100\/50 { background-color: rgba(22, 27, 34, 0.5) !important; }
.dark .bg-gray-100\/80 { background-color: rgba(22, 27, 34, 0.8) !important; }
.dark .text-gray-900 { color: #e6edf3 !important; }
.dark .text-gray-800 { color: #e6edf3 !important; }
.dark .text-gray-700 { color: #c9d1d9 !important; }
.dark .text-gray-600 { color: #c9d1d9 !important; }
.dark .text-gray-500 { color: #8b949e !important; }
.dark .text-gray-400 { color: #8b949e !important; }
.dark .text-gray-300 { color: #c9d1d9 !important; }
.dark .text-black { color: #e6edf3 !important; }
.dark .border-gray-200 { border-color: #30363d !important; }
.dark .border-gray-300 { border-color: #484f58 !important; }
.dark .border-gray-400 { border-color: #6e7681 !important; }
.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #30363d !important; }
.dark .divide-gray-300 > :not([hidden]) ~ :not([hidden]) { border-color: #484f58 !important; }
.dark .hover\:bg-gray-50:hover { background-color: #2d333b !important; }
.dark .hover\:bg-gray-100:hover { background-color: #2d333b !important; }
.dark .hover\:bg-gray-200:hover { background-color: #484f58 !important; }
.dark .hover\:bg-white:hover { background-color: #2d333b !important; }
.dark .hover\:text-gray-700:hover { color: #c9d1d9 !important; }
.dark .hover\:text-gray-900:hover { color: #e6edf3 !important; }
.dark .hover\:border-gray-300:hover { border-color: #484f58 !important; }
.dark .hover\:border-gray-400:hover { border-color: #6e7681 !important; }
.dark .ring-gray-300 { --tw-ring-color: #484f58 !important; }
.dark .ring-slate-200 { --tw-ring-color: #484f58 !important; }
.dark .ring-slate-300 { --tw-ring-color: #6e7681 !important; }
.dark .focus\:ring-gray-200:focus { --tw-ring-color: #484f58 !important; }
.dark .focus\:ring-gray-300:focus { --tw-ring-color: #484f58 !important; }
.dark .placeholder-gray-400::placeholder { color: #6e7681 !important; }
.dark .placeholder-gray-500::placeholder { color: #6e7681 !important; }
.dark input::placeholder,
.dark textarea::placeholder,
.dark select::placeholder { color: #6e7681 !important; }
.dark .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important; }
.dark .shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4) !important; }
.dark .shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4) !important; }
.dark .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4) !important; }
.dark .shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4) !important; }
.dark .shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important; }
.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not(.no-dark),
.dark textarea:not(.no-dark),
.dark select:not(.no-dark) {
  background-color: #0d1117 !important;
  border-color: #30363d !important;
  color: #e6edf3 !important;
}
.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not(.no-dark):focus,
.dark textarea:not(.no-dark):focus,
.dark select:not(.no-dark):focus {
  border-color: var(--theme-500) !important;
}
.dark table { border-color: #30363d !important; }
.dark thead { background-color: #161b22 !important; }
.dark th { color: #c9d1d9 !important; border-color: #30363d !important; }
.dark td { border-color: #30363d !important; }
.dark tbody tr { border-color: #30363d !important; }
.dark tbody tr:hover { background-color: rgba(22, 27, 34, 0.5) !important; }
.dark .even\:bg-gray-50:nth-child(even) { background-color: #0c0f14 !important; }
.dark .odd\:bg-white:nth-child(odd) { background-color: #161b22 !important; }
.dark .bg-black\/50 { background-color: rgba(0, 0, 0, 0.7) !important; }
.dark [class*="modal"] .bg-white,
.dark [x-show] .bg-white,
.dark [x-data] .bg-white { background-color: #161b22 !important; }
.dark .bg-white.rounded-lg,
.dark .bg-white.rounded-xl,
.dark .bg-white.rounded-2xl,
.dark .bg-white.shadow,
.dark .bg-white.shadow-sm,
.dark .bg-white.shadow-md,
.dark .bg-white.shadow-lg,
.dark .bg-white.shadow-xl { background-color: #161b22 !important; }
.dark .from-gray-200 { --tw-gradient-from: #21262d !important; }
.dark .to-gray-200 { --tw-gradient-to: #21262d !important; }
.dark .via-white { --tw-gradient-via: #161b22 !important; }
.dark .via-gray-50 { --tw-gradient-via: #0c0f14 !important; }
.dark .text-blue-600 { color: #60a5fa !important; }
.dark .text-blue-700 { color: #60a5fa !important; }
.dark .text-green-600 { color: #4ade80 !important; }
.dark .text-green-700 { color: #4ade80 !important; }
.dark .text-red-600 { color: #f87171 !important; }
.dark .text-red-700 { color: #f87171 !important; }
.dark .text-yellow-600 { color: #facc15 !important; }
.dark .text-yellow-700 { color: #facc15 !important; }
.dark .text-purple-600 { color: #c084fc !important; }
.dark .text-purple-700 { color: #c084fc !important; }
.dark .text-orange-600 { color: #fb923c !important; }
.dark .text-orange-700 { color: #fb923c !important; }
.dark .text-indigo-600 { color: #818cf8 !important; }
.dark .text-indigo-700 { color: #818cf8 !important; }
.dark .text-pink-600 { color: #f472b6 !important; }
.dark .text-pink-700 { color: #f472b6 !important; }
.dark .text-teal-600 { color: #2dd4bf !important; }
.dark .text-teal-700 { color: #2dd4bf !important; }
.dark .text-emerald-600 { color: #34d399 !important; }
.dark .text-emerald-700 { color: #34d399 !important; }
.dark .text-amber-600 { color: #fbbf24 !important; }
.dark .text-amber-700 { color: #fbbf24 !important; }
.dark .text-cyan-600 { color: #22d3ee !important; }
.dark .text-cyan-700 { color: #22d3ee !important; }
.dark .text-rose-600 { color: #fb7185 !important; }
.dark .text-rose-700 { color: #fb7185 !important; }
.dark .border-blue-200 { border-color: rgba(30, 58, 138, 0.4) !important; }
.dark .border-green-100 { border-color: rgba(20, 83, 45, 0.35) !important; }
.dark .border-red-100 { border-color: rgba(127, 29, 29, 0.35) !important; }
.dark .border-red-200 { border-color: rgba(127, 29, 29, 0.4) !important; }
.dark .border-yellow-100 { border-color: rgba(113, 63, 18, 0.35) !important; }
.dark .border-purple-100 { border-color: rgba(88, 28, 135, 0.35) !important; }
.dark .border-indigo-200 { border-color: rgba(49, 46, 129, 0.4) !important; }
.dark .border-pink-200 { border-color: rgba(131, 24, 67, 0.4) !important; }
.dark .border-amber-200 { border-color: rgba(120, 53, 15, 0.4) !important; }
.dark .border-teal-200 { border-color: rgba(19, 78, 74, 0.4) !important; }
.dark .border-emerald-200 { border-color: rgba(6, 78, 59, 0.4) !important; }
.dark .border-cyan-200 { border-color: rgba(22, 78, 99, 0.4) !important; }
.dark .border-orange-100 { border-color: rgba(124, 45, 18, 0.35) !important; }
.dark .border-rose-200 { border-color: rgba(136, 19, 55, 0.4) !important; }
.dark .border-violet-200 { border-color: rgba(91, 33, 182, 0.4) !important; }
.dark .border-sky-200 { border-color: rgba(12, 74, 110, 0.4) !important; }
.dark .border-theme-100 { border-color: rgba(var(--theme-400-rgb, 96, 165, 250), 0.3) !important; }
.dark .bg-amber-100 { background-color: rgba(120, 53, 15, 0.25) !important; }
.dark .bg-teal-100 { background-color: rgba(19, 78, 74, 0.25) !important; }
.dark .bg-cyan-100 { background-color: rgba(22, 78, 99, 0.25) !important; }
.dark .bg-indigo-100 { background-color: rgba(49, 46, 129, 0.25) !important; }
.dark .bg-rose-100 { background-color: rgba(136, 19, 55, 0.25) !important; }
.dark .bg-violet-100 { background-color: rgba(91, 33, 182, 0.25) !important; }
.dark .bg-orange-100 { background-color: rgba(124, 45, 18, 0.25) !important; }
.dark .bg-pink-100 { background-color: rgba(131, 24, 67, 0.25) !important; }
.dark .bg-theme-50 { background-color: rgba(var(--theme-500-rgb, 99, 102, 241), 0.15) !important; }
.dark .bg-theme-100 { background-color: rgba(var(--theme-500-rgb, 99, 102, 241), 0.2) !important; }
.dark ::-webkit-scrollbar-track { background: #0c0f14 !important; }
.dark ::-webkit-scrollbar-thumb { background: #484f58 !important; }
.dark ::-webkit-scrollbar-thumb:hover { background: #6e7681 !important; }
.dark hr { border-color: #30363d !important; }
.dark pre { background-color: #0c0f14 !important; color: #c9d1d9 !important; }
.dark code { background-color: #0c0f14 !important; color: #c9d1d9 !important; }
.dark .breadcrumb a { color: #8b949e !important; }
.dark .breadcrumb a:hover { color: #c9d1d9 !important; }
.dark .swal2-popup { background-color: #161b22 !important; color: #e6edf3 !important; }
.dark .swal2-title { color: #e6edf3 !important; }
.dark .swal2-html-container { color: #c9d1d9 !important; }
.dark .swal2-input { background-color: #0d1117 !important; border-color: #30363d !important; color: #e6edf3 !important; }
.dark [x-show][class*="bg-white"] { background-color: #161b22 !important; }
.dark [x-show][class*="border-gray"] { border-color: #30363d !important; }
.dark option { background-color: #161b22 !important; color: #e6edf3 !important; }
.dark .from-white { --tw-gradient-from: #09090b !important; }
.dark .to-white { --tw-gradient-to: #09090b !important; }
.dark .via-white { --tw-gradient-via: #111113 !important; }
.dark .from-gray-50 { --tw-gradient-from: #09090b !important; }
.dark .from-gray-100 { --tw-gradient-from: #111113 !important; }
.dark .to-gray-100 { --tw-gradient-to: #111113 !important; }
.dark .to-gray-50 { --tw-gradient-to: #09090b !important; }
.dark .bg-\[\#f7f8fa\] { background-color: #09090b !important; }
.dark .bg-\[\#f8fafc\] { background-color: #09090b !important; }
.dark .bg-\[radial-gradient\(circle_at_20\%_50\%\,rgba\(255\,255\,255\,0\.1\)_0\%\,transparent_50\%\)\] {
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 0%, transparent 50%) !important;
}
/* ====== END GLOBAL DARK MODE OVERRIDES ====== */

.nav-link {
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--theme-500);
  transition: width 0.3s ease-in-out;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
#mobileMenu.hidden { display: none; }
input:focus, button:focus, a:focus {
  outline: 2px solid var(--theme-500);
  outline-offset: 2px;
  border-color: transparent;
}

/* ── RTL helper utilities ── */
[dir="rtl"] .rtl-flex-row-reverse { flex-direction: row-reverse; }
[dir="rtl"] .rtl-ml-2 { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .rtl-ml-1 { margin-left: 0; margin-right: 0.25rem; }
[dir="rtl"] .rtl-ml-0 { margin-left: 0; }
[dir="rtl"] .rtl-mr-2 { margin-right: 0.5rem; }
[dir="rtl"] .rtl-mr-0 { margin-right: 0; }
[dir="rtl"] .rtl-text-right { text-align: right; }
[dir="rtl"] .rtl-text-left { text-align: left; }
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }

/* ── Alpine cloak ── */
[x-cloak] { display: none !important; }

/* ── Navigation loader ── */
.loader-spinner {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.8);
  animation: loader-spin 0.9s linear infinite;
}
@keyframes loader-spin { to { transform: rotate(360deg); } }
.loader-bar {
  transform: translateX(-100%);
  animation: loader-bar 1.2s ease-in-out infinite;
}
@keyframes loader-bar {
  0%   { transform: translateX(-100%); opacity: 0.4; }
  50%  { opacity: 1; }
  100% { transform: translateX(200%); opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
  .loader-spinner, .loader-bar { animation: none !important; }
}

/* ── Shared text overflow helpers ── */
.truncate-soft {
  min-width: 0; max-width: 11rem;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom;
}
.truncate-soft-sm {
  min-width: 0; max-width: 8.5rem;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom;
}
.text-fit {
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; min-width: 0;
}

/* ── User avatar SVG dark mode ── */
.ua-bg { fill: var(--theme-100, #e2e8f0) !important; }
.ua-text { fill: var(--theme-600, #475569) !important; }
.dark .ua-bg { fill: var(--theme-900, #161b22) !important; }
.dark .ua-text { fill: var(--theme-300, #94a3b8) !important; }

/* ── Language dropdown fade indicator ── */
:root { --lang-dd-bg: #ffffff; }
.dark { --lang-dd-bg: #121218; }

/* ── Side menu scroll ── */
.side-menu-scroll {
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── Mobile glass header ── */
.mobile-glass-header {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(var(--theme-500-rgb), 0.1);
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.06), 0 2px 8px -1px rgba(0, 0, 0, 0.04);
}
.menu-btn {
  position: relative;
  background: linear-gradient(135deg, var(--theme-50) 0%, var(--theme-100) 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-btn:hover {
  background: linear-gradient(135deg, var(--theme-100) 0%, var(--theme-200) 100%);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(var(--theme-500-rgb), 0.15);
}
.menu-btn:active { transform: scale(0.98); }
.logo-container { transition: all 0.3s ease; }
.logo-container:hover { transform: translateY(-1px); }
.logo-container img {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
  transition: filter 0.3s ease;
}
.logo-container:hover img { filter: drop-shadow(0 4px 8px rgba(var(--theme-500-rgb), 0.15)); }
.balance-btn {
  background: linear-gradient(135deg, var(--theme-50) 0%, var(--theme-100) 100%);
  border: 1.5px solid rgba(var(--theme-500-rgb), 0.2);
  box-shadow: 0 2px 8px rgba(var(--theme-500-rgb), 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.balance-btn:hover {
  background: linear-gradient(135deg, var(--theme-100) 0%, var(--theme-200) 100%);
  border-color: rgba(var(--theme-500-rgb), 0.4);
  box-shadow: 0 4px 16px rgba(var(--theme-500-rgb), 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}
.balance-btn:active { transform: translateY(0); }
.balance-btn .coin-icon { animation: coinFloat 2s ease-in-out infinite; }
@keyframes coinFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(5deg); }
}
.auth-btn-login {
  background: white;
  border: 2px solid var(--theme-600);
  color: var(--theme-600);
  box-shadow: 0 2px 8px rgba(var(--theme-500-rgb), 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600; letter-spacing: 0.025em;
}
.auth-btn-login:hover {
  background: linear-gradient(135deg, var(--theme-50) 0%, var(--theme-100) 100%);
  border-color: var(--theme-700);
  box-shadow: 0 4px 16px rgba(var(--theme-500-rgb), 0.2);
  transform: translateY(-1px);
}
.auth-btn-register {
  background: linear-gradient(135deg, var(--theme-500) 0%, var(--theme-700) 100%);
  color: white; border: none;
  box-shadow: 0 4px 12px rgba(var(--theme-500-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600; letter-spacing: 0.025em;
}
.auth-btn-register:hover {
  background: linear-gradient(135deg, var(--theme-700) 0%, var(--theme-800) 100%);
  box-shadow: 0 6px 20px rgba(var(--theme-500-rgb), 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}
.auth-btn-register:active { transform: translateY(0); }
.auth-btn-register .arrow-icon { transition: transform 0.3s ease; }
.auth-btn-register:hover .arrow-icon { transform: translateX(2px); }
@media (max-width: 640px) {
  .mobile-glass-header { padding-left: 1rem; padding-right: 1rem; }
}

/* ── Language bottom sheet ── */
#langSheetBackdrop { transition: opacity 0.25s ease; }
#langSheet { transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
#langSheet .lang-row:active { background: rgba(var(--theme-500-rgb), 0.08); }
.dark #langSheet { background: #09090b !important; border-top: 1px solid rgba(255,255,255,0.06); }
.dark #langSheet .lang-sheet-title { color: #e6edf3 !important; }
.dark #langSheet .lang-row { border-color: rgba(255,255,255,0.04); }
.dark #langSheet .lang-row:hover { background: rgba(255,255,255,0.04) !important; }
.dark #langSheet .lang-row-active { background: rgba(var(--theme-500-rgb), 0.1) !important; }
.dark #langSheet .lang-row span { color: #e6edf3 !important; }
.dark #langSheet .lang-drag-handle { background: rgba(255,255,255,0.15); }
.dark #langSheet .lang-close-btn { background: rgba(255,255,255,0.08); color: #8b949e; }
.dark #langSheet .lang-close-btn:hover { background: rgba(255,255,255,0.13); }
.dark #langSheet .lang-sheet-header { border-bottom-color: rgba(255,255,255,0.06); }

/* ── Side drawer ── */
.premium-side-menu {
  background: #ffffff;
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.10), 1px 0 0 rgba(0, 0, 0, 0.04);
}
.drawer-profile-hd {
  background: #f8fafc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.dark .drawer-profile-hd {
  background: #121218 !important;
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}
.drawer-section-label {
  display: block; font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #94a3b8; padding: 0 1rem;
  margin-top: 1.5rem; margin-bottom: 0.375rem;
}
.dark .drawer-section-label { color: #64748b !important; }
.drawer-nav-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1rem; margin: 0 0.5rem;
  border-radius: 0.75rem; color: #334155;
  font-size: 0.9rem; font-weight: 500;
  transition: background-color 0.15s ease;
  cursor: pointer; width: calc(100% - 1rem); text-align: left;
}
.dark .drawer-nav-row { color: #cbd5e1 !important; }
.drawer-nav-row:hover { background-color: #f1f5f9; }
.dark .drawer-nav-row:hover { background-color: rgba(255, 255, 255, 0.05) !important; }
.drawer-nav-row:active { background-color: #e2e8f0; }
.dark .drawer-nav-row:active { background-color: rgba(255, 255, 255, 0.08) !important; }
.drawer-logout {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 1rem 0; color: #ef4444;
  font-weight: 600; font-size: 0.875rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  transition: background-color 0.15s ease;
  margin-top: auto; flex-shrink: 0;
}
.drawer-logout:hover { background-color: #fef2f2; }
.dark .drawer-logout { border-top-color: rgba(255, 255, 255, 0.05) !important; }
.dark .drawer-logout:hover { background-color: rgba(239, 68, 68, 0.08) !important; }
.drawer-login {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 1rem 0; color: var(--theme-600);
  font-weight: 600; font-size: 0.875rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  transition: background-color 0.15s ease;
  margin-top: auto; flex-shrink: 0;
}
.drawer-login:hover { background-color: var(--theme-50, #eff6ff); }
.dark .drawer-login { color: var(--theme-400) !important; border-top-color: rgba(255, 255, 255, 0.05) !important; }
.dark .drawer-login:hover { background-color: rgba(var(--theme-500-rgb), 0.08) !important; }

/* ── Desktop premium styles ── */
.desktop-glass-header {
  background: #ffffff; backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(var(--theme-500-rgb), 0.08);
  box-shadow: 0 4px 30px -2px rgba(0, 0, 0, 0.05), 0 2px 12px -2px rgba(var(--theme-500-rgb), 0.04);
}
.desktop-logo-container { position: relative; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.desktop-logo-container::before {
  content: ''; position: absolute; inset: -4px;
  background: linear-gradient(135deg, rgba(var(--theme-500-rgb), 0.1), rgba(var(--theme-300-rgb), 0.05));
  border-radius: 12px; opacity: 0; transition: opacity 0.3s ease;
}
.desktop-logo-container:hover::before { opacity: 1; }
.desktop-logo-container img {
  position: relative;
  filter: drop-shadow(0 2px 6px rgba(var(--theme-500-rgb), 0.08));
  transition: all 0.3s ease;
}
.desktop-logo-container:hover img {
  filter: drop-shadow(0 4px 12px rgba(var(--theme-500-rgb), 0.15));
  transform: translateY(-1px);
}
.premium-search-container {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1.5px solid rgba(var(--theme-500-rgb), 0.12);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px -2px rgba(var(--theme-500-rgb), 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-search-container:hover {
  border-color: rgba(var(--theme-500-rgb), 0.25);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px -4px rgba(var(--theme-500-rgb), 0.1), inset 0 1px 0 rgba(255, 255, 255, 1);
}
.premium-search-container:focus-within {
  border-color: rgba(var(--theme-500-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--theme-500-rgb), 0.12), 0 8px 24px -4px rgba(var(--theme-500-rgb), 0.14);
  background: #FFFFFF;
}
.premium-search-input {
  background: transparent; border: none; outline: none;
  color: #1F2937; font-weight: 500; letter-spacing: 0.01em; line-height: 1.5;
}
.premium-search-input::placeholder { color: #9CA3AF; font-weight: 400; }
.search-icon-wrapper {
  background: linear-gradient(135deg, var(--theme-50) 0%, var(--theme-100) 100%);
  border-radius: 10px; width: 32px; height: 32px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-search-container:hover .search-icon-wrapper {
  background: linear-gradient(135deg, var(--theme-100) 0%, var(--theme-200) 100%);
  transform: scale(1.05);
}
.premium-search-container:focus-within .search-icon-wrapper {
  background: linear-gradient(135deg, var(--theme-500) 0%, var(--theme-700) 100%);
  box-shadow: 0 2px 8px rgba(var(--theme-500-rgb), 0.3);
}
.premium-search-container:focus-within .search-icon-wrapper svg { color: white !important; }
.search-shortcut-badge {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  font-size: 12px; font-weight: 600; color: #9CA3AF;
  background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
  border: 1px solid #E5E7EB; border-radius: 6px; padding: 2px 8px; line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease; align-items: center; justify-content: center;
}
.premium-nav-shell {
  background: linear-gradient(135deg, rgba(var(--theme-50-rgb), 0.85) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1.5px solid rgba(var(--theme-500-rgb), 0.12);
  border-radius: 9999px; padding: 6px 10px;
  box-shadow: 0 8px 24px -10px rgba(var(--theme-500-rgb), 0.25), 0 2px 8px -4px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.premium-nav-link {
  position: relative; padding: 8px 12px; border-radius: 10px;
  font-weight: 600; letter-spacing: 0.01em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-nav-link::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--theme-500-rgb), 0.08), rgba(var(--theme-300-rgb), 0.05));
  border-radius: 10px; opacity: 0; transition: opacity 0.3s ease;
}
.premium-nav-link:hover::before { opacity: 1; }
.premium-nav-link::after {
  content: ''; position: absolute; bottom: 2px; left: 12px; right: 12px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--theme-500), var(--theme-400));
  border-radius: 2px; transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-nav-link:hover::after, .premium-nav-link.active::after { transform: scaleX(1); }
.premium-nav-link.active { color: var(--theme-700); }
.premium-nav-link span { position: relative; z-index: 1; }
.premium-support-btn {
  background: linear-gradient(135deg, #FFFFFF 0%, #F3F4F6 100%);
  border: 1.5px solid rgba(var(--theme-500-rgb), 0.2);
  border-radius: 12px; box-shadow: 0 2px 10px rgba(var(--theme-500-rgb), 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-support-btn:hover {
  background: linear-gradient(135deg, var(--theme-50) 0%, var(--theme-100) 100%);
  border-color: rgba(var(--theme-500-rgb), 0.4);
  box-shadow: 0 4px 16px rgba(var(--theme-500-rgb), 0.15);
  transform: translateY(-2px);
}
.premium-support-btn i { transition: all 0.3s ease; }
.premium-support-btn:hover i { color: var(--theme-700); transform: scale(1.1); }
.premium-balance-display {
  background: linear-gradient(135deg, var(--theme-50) 0%, var(--theme-100) 100%);
  border: 1.5px solid rgba(var(--theme-500-rgb), 0.25); border-radius: 9999px;
  box-shadow: 0 2px 12px rgba(var(--theme-500-rgb), 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 700; letter-spacing: 0.02em;
}
.premium-balance-display:hover {
  background: linear-gradient(135deg, var(--theme-100) 0%, var(--theme-200) 100%);
  border-color: rgba(var(--theme-500-rgb), 0.4);
  box-shadow: 0 4px 20px rgba(var(--theme-500-rgb), 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}
.premium-balance-display .coin-icon { animation: desktopCoinFloat 2.5s ease-in-out infinite; }
@keyframes desktopCoinFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(8deg); }
}
.premium-user-avatar {
  background: linear-gradient(135deg, var(--theme-500) 0%, var(--theme-700) 100%);
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(var(--theme-500-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-user-avatar:hover {
  background: linear-gradient(135deg, var(--theme-700) 0%, var(--theme-800) 100%);
  box-shadow: 0 6px 24px rgba(var(--theme-500-rgb), 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px) scale(1.05);
}
.premium-user-avatar:active { transform: translateY(0) scale(1); }
.premium-dropdown {
  background: white; border: 1px solid rgba(var(--theme-500-rgb), 0.12);
  border-radius: 16px;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.15), 0 4px 16px -4px rgba(var(--theme-500-rgb), 0.1);
  overflow: hidden; min-width: 0;
}
.premium-dropdown-item { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; }
.premium-dropdown-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--theme-500), var(--theme-400));
  transform: scaleY(0); transition: transform 0.2s ease;
}
.premium-dropdown-item:hover::before { transform: scaleY(1); }
.premium-dropdown-item:hover {
  background: linear-gradient(90deg, rgba(var(--theme-500-rgb), 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}
.desktop-auth-btn-login {
  background: white; border: 2px solid var(--theme-600); color: var(--theme-600);
  border-radius: 12px; box-shadow: 0 2px 12px rgba(var(--theme-500-rgb), 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600; letter-spacing: 0.025em;
}
.desktop-auth-btn-login:hover {
  background: linear-gradient(135deg, var(--theme-50) 0%, var(--theme-100) 100%);
  border-color: var(--theme-700); box-shadow: 0 4px 20px rgba(var(--theme-500-rgb), 0.25);
  transform: translateY(-2px);
}
.desktop-auth-btn-register {
  background: linear-gradient(135deg, var(--theme-500) 0%, var(--theme-700) 100%);
  color: white; border: none; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(var(--theme-500-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600; letter-spacing: 0.025em;
}
.desktop-auth-btn-register:hover {
  background: linear-gradient(135deg, var(--theme-700) 0%, var(--theme-800) 100%);
  box-shadow: 0 6px 24px rgba(var(--theme-500-rgb), 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}
.desktop-auth-btn-register:active { transform: translateY(0); }
.desktop-auth-btn-register .arrow-icon { transition: transform 0.3s ease; }
.desktop-auth-btn-register:hover .arrow-icon { transform: translateX(3px); }

/* ── Flip animation for search placeholder ── */
.flip-wrapper { width: 14rem; height: 1.5em; overflow: hidden; perspective: 1000px; }
.flip { display: flex; flex-direction: column; animation: flipCube 10s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
.flip div {
  height: 1.5em; line-height: 1.5em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  transform-origin: top; backface-visibility: hidden;
}
@keyframes flipCube {
  0%, 18%   { transform: translateY(0); }
  22%, 43%  { transform: translateY(-1.5em); }
  47%, 68%  { transform: translateY(-3em); }
  72%, 93%  { transform: translateY(-4.5em); }
  97%, 100% { transform: translateY(0); }
}

/* ── Desktop header layout ── */
#desktopHeader { height: 64px; align-items: center; }
@media (min-width: 1024px) { #desktopHeader { display: flex; align-items: center; } }
#desktopHeader > a,
#desktopHeader > form,
#desktopHeader > div { align-self: center; }

/* ── Search bar — revamped ── */
#desktopHeader .hdr-search {
  background: #f4f4f5; border: 1.5px solid transparent;
  border-radius: 14px; position: relative;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
#desktopHeader .hdr-search:hover { background: #f9fafb; border-color: #e5e7eb; }
#desktopHeader .hdr-search:focus-within {
  background: #ffffff; border-color: rgba(var(--theme-500-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--theme-500-rgb), 0.1), 0 2px 16px -4px rgba(0,0,0,0.08);
}
.dark #desktopHeader .hdr-search { background: rgba(255,255,255,0.06); }
.dark #desktopHeader .hdr-search:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.12); }
.dark #desktopHeader .hdr-search:focus-within {
  background: rgba(255,255,255,0.1); border-color: rgba(var(--theme-500-rgb),0.5);
  box-shadow: 0 0 0 3px rgba(var(--theme-500-rgb),0.12), 0 2px 16px -4px rgba(0,0,0,0.3);
}
.dark #desktopHeader .hdr-search input { color: #e6edf3; }
.dark #desktopHeader .hdr-search input::placeholder { color: #6e7681; }
.dark #desktopHeader .hdr-search input { background: transparent !important; color-scheme: light; }
#desktopHeader .hdr-search #searchGlassIcon { color: #9ca3af; transition: color 0.2s; }
#desktopHeader .hdr-search:focus-within #searchGlassIcon { color: var(--theme-500, #6366f1); }
.dark #desktopHeader .hdr-search #searchGlassIcon { color: #6e7681; }
.dark #desktopHeader .hdr-search:focus-within #searchGlassIcon { color: var(--theme-400, #818cf8); }

/* Clear (×) button */
.hdr-search-clear {
  width: 20px; height: 20px; display: none;
  align-items: center; justify-content: center;
  border-radius: 50%; background: #e5e7eb; color: #6b7280;
  flex-shrink: 0; transition: background 0.15s, color 0.15s, transform 0.15s;
  border: none; cursor: pointer; padding: 0;
}
.hdr-search-clear:hover { background: #d1d5db; color: #111827; transform: scale(1.1); }
.dark .hdr-search-clear { background: rgba(255,255,255,0.1); color: #8b949e; }
.dark .hdr-search-clear:hover { background: rgba(255,255,255,0.15); color: #e6edf3; }
.hdr-search-clear.visible { display: flex; }

/* Suggestions dropdown panel */
.hdr-search-dropdown {
  display: none; position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  background: #ffffff; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 8px 32px -4px rgba(0,0,0,0.12), 0 2px 8px -2px rgba(0,0,0,0.06);
  z-index: 200; overflow: hidden;
  animation: searchDropdownIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.hdr-search-dropdown.visible { display: block; }
@keyframes searchDropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dark .hdr-search-dropdown {
  background: #161b22; border-color: rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px -4px rgba(0,0,0,0.5), 0 2px 8px -2px rgba(0,0,0,0.3);
}
.hdr-search-dropdown-inner { padding: 14px 14px 12px; }
.hdr-search-dropdown-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: #9ca3af; margin-bottom: 10px;
}
.dark .hdr-search-dropdown-label { color: #6e7681; }
.hdr-search-chip {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 500; color: #374151;
  background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 8px; padding: 5px 10px; cursor: pointer;
  transition: all 0.15s ease; white-space: nowrap; line-height: 1.4;
}
.hdr-search-chip:hover {
  background: var(--theme-50, #eff6ff);
  border-color: rgba(var(--theme-500-rgb), 0.3);
  color: var(--theme-700, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(var(--theme-500-rgb), 0.1);
}
.dark .hdr-search-chip { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: #c9d1d9; }
.dark .hdr-search-chip:hover {
  background: rgba(var(--theme-500-rgb),0.12); border-color: rgba(var(--theme-500-rgb),0.3);
  color: var(--theme-300, #93c5fd); box-shadow: 0 2px 8px rgba(var(--theme-500-rgb),0.15);
}
.hdr-search-hint {
  display: none; align-items: center; gap: 6px;
  padding: 8px 14px; border-top: 1px solid #f3f4f6;
  font-size: 11.5px; color: #9ca3af;
}
.hdr-search-hint.visible { display: flex; }
.dark .hdr-search-hint { border-top-color: rgba(255,255,255,0.05); color: #6e7681; }
.hdr-search-hint kbd {
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10.5px;
  background: #f3f4f6; border: 1px solid #e5e7eb;
  border-radius: 4px; padding: 1px 6px; color: #6b7280; line-height: 1.5;
}
.dark .hdr-search-hint kbd { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); color: #8b949e; }

/* ── Desktop header icon/action buttons ── */
#desktopHeader .hdr-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; color: #6b7280;
  transition: background 0.15s, color 0.15s; flex-shrink: 0;
}
#desktopHeader .hdr-btn:hover { background: #f3f4f6; color: #111827; }
.dark #desktopHeader .hdr-btn { color: #8b949e; }
.dark #desktopHeader .hdr-btn:hover { background: rgba(255,255,255,0.08); color: #e6edf3; }
#desktopHeader .hdr-text-btn {
  height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 10px; font-size: 0.875rem; font-weight: 600;
  color: #374151; transition: background 0.15s, color 0.15s; flex-shrink: 0;
}
#desktopHeader .hdr-text-btn:hover { background: #f3f4f6; }
.dark #desktopHeader .hdr-text-btn { color: #c9d1d9; }
.dark #desktopHeader .hdr-text-btn:hover { background: rgba(255,255,255,0.08); }
#desktopHeader .hdr-balance {
  height: 36px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 9999px; background: var(--theme-50, #eff6ff);
  border: 1.5px solid rgba(var(--theme-500-rgb), 0.22);
  color: var(--theme-700, #1d4ed8);
  font-size: 0.875rem; font-weight: 700;
  transition: background 0.15s, border-color 0.15s; flex-shrink: 0; min-width: 0;
}
#desktopHeader .hdr-balance:hover { background: var(--theme-100, #dbeafe); border-color: rgba(var(--theme-500-rgb), 0.4); }
.dark #desktopHeader .hdr-balance { background: rgba(var(--theme-500-rgb),.15); border-color: rgba(var(--theme-500-rgb),.3); color: var(--theme-300, #93c5fd); }
.dark #desktopHeader .hdr-balance:hover { background: rgba(var(--theme-500-rgb),.22); }
#desktopHeader .hdr-login {
  height: 36px; padding: 0 16px; border-radius: 10px;
  border: 2px solid var(--theme-500, #6366f1); color: var(--theme-600, #4f46e5);
  font-size: 0.875rem; font-weight: 600; transition: background 0.15s; white-space: nowrap;
}
#desktopHeader .hdr-login:hover { background: var(--theme-50, #eff6ff); }
.dark #desktopHeader .hdr-login { border-color: rgba(var(--theme-500-rgb),.6); color: var(--theme-400); background: transparent; }
#desktopHeader .hdr-register {
  height: 36px; padding: 0 16px; border-radius: 10px;
  background: var(--theme-600, #4f46e5); color: #fff;
  font-size: 0.875rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 1px 4px rgba(var(--theme-500-rgb),.35);
  transition: background 0.15s, box-shadow 0.15s; white-space: nowrap;
}
#desktopHeader .hdr-register:hover { background: var(--theme-700, #4338ca); box-shadow: 0 4px 12px rgba(var(--theme-500-rgb),.4); }
.dark #desktopHeader .hdr-register { background: var(--theme-500, #6366f1); }
.dark #desktopHeader .hdr-register:hover { background: var(--theme-600, #4f46e5); }
