/* ===================================================================
   YonoLootZone Core UI/UX Framework - 2026 Premium Upgrade
   Modern Mobile-First, Glassmorphism, Multi-Theme (Light, Dark, Eye-Care)
   =================================================================== */

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Brand Palette: Red, White, Pink */
  --primary: #e00068;
  --primary-hover: #c4005b;
  --primary-glow: rgba(224, 0, 104, 0.35);
  --primary-subtle: #fff1f6;
  --secondary: #ff2d78;
  --accent-red: #ef4444;
  --accent-gradient: linear-gradient(135deg, #e00068 0%, #ff2d78 50%, #dc2626 100%);
  --gold: #f59e0b;
  
  /* Light Mode (Default) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-strong: rgba(255, 255, 255, 0.95);
  --border: rgba(224, 0, 104, 0.12);
  --border-strong: rgba(224, 0, 104, 0.25);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 20px 25px -5px rgba(224, 0, 104, 0.15), 0 8px 10px -6px rgba(224, 0, 104, 0.1);
  --bottom-nav-bg: rgba(255, 255, 255, 0.92);
  --skeleton-bg: #e2e8f0;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #131b2e;
  --bg-surface-elevated: #1a243d;
  --bg-glass: rgba(19, 27, 46, 0.82);
  --bg-glass-strong: rgba(19, 27, 46, 0.95);
  --border: rgba(255, 90, 162, 0.18);
  --border-strong: rgba(255, 90, 162, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --primary-subtle: rgba(224, 0, 104, 0.15);
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 25px -5px rgba(224, 0, 104, 0.25), 0 8px 10px -6px rgba(224, 0, 104, 0.2);
  --bottom-nav-bg: rgba(19, 27, 46, 0.94);
  --skeleton-bg: #1e293b;
}

/* Eye-Protection Mode (Warm Sepia) */
[data-theme="eye"] {
  --bg-body: #fbf0d9;
  --bg-surface: #f4e6c7;
  --bg-surface-elevated: #eedcba;
  --bg-glass: rgba(244, 230, 199, 0.88);
  --bg-glass-strong: rgba(244, 230, 199, 0.96);
  --border: rgba(163, 116, 58, 0.22);
  --border-strong: rgba(163, 116, 58, 0.4);
  --text-main: #3d2f1f;
  --text-muted: #70593e;
  --text-subtle: #8c7355;
  --primary: #c2185b;
  --primary-subtle: rgba(194, 24, 91, 0.12);
  --card-shadow: 0 4px 20px -2px rgba(61, 47, 31, 0.08);
  --card-shadow-hover: 0 20px 25px -5px rgba(194, 24, 91, 0.15);
  --bottom-nav-bg: rgba(244, 230, 199, 0.94);
  --skeleton-bg: #e2d2b4;
}

/* Base Resets & Typography */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  max-width: 100%;
  overflow-x: clip;
  margin: 0;
  padding: 0;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

.glass-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

/* Brand Button Styling */
.btn-yono-primary {
  background: var(--accent-gradient);
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px var(--primary-glow);
  text-decoration: none;
}

.btn-yono-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--primary-glow);
  opacity: 0.95;
}

.btn-yono-outline {
  background: transparent;
  color: var(--primary) !important;
  font-weight: 600;
  border-radius: 12px;
  padding: 9px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-yono-outline:hover {
  background: var(--primary-subtle);
  transform: translateY(-1px);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

/* Top Announcement Banner */
.top-announcement-bar {
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 40px 8px 16px;
  text-align: center;
  position: relative;
  z-index: 105;
  max-width: 100%;
}

@media (max-width: 639px) {
  .top-announcement-bar {
    font-size: 12px;
    line-height: 1.35;
    padding: 8px 36px 8px 12px;
  }
}

.top-announcement-bar a {
  color: #fff;
  text-decoration: underline;
  margin-left: 6px;
}

.top-announcement-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

/* Category Filter Pills */
.filter-pill {
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: var(--accent-gradient);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.filter-pill .badge-count {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
}

.filter-pill.active .badge-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Advanced Game Cards */
.yono-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--card-shadow);
  height: 100%;
}

.yono-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--card-shadow-hover);
}

.yono-card .card-thumb-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background: var(--skeleton-bg);
}

.yono-card .card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.yono-card:hover .card-thumb {
  transform: scale(1.08);
}

/* Card Badges */
.card-badge {
  position: absolute;
  top: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.badge-new {
  left: 10px;
  background: #ef4444;
  color: #fff;
}

.badge-featured {
  left: 10px;
  background: #f59e0b;
  color: #fff;
}

/* Favorite Heart Button */
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-subtle);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}

.fav-btn:hover {
  color: #ef4444;
  transform: scale(1.15);
}

.fav-btn.active {
  color: #ef4444 !important;
  background: #fee2e2;
  border-color: #fca5a5;
  animation: heartPulse 0.3s ease;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Compare Checkbox / Button */
.compare-checkbox-wrap {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  margin-top: 6px;
}

/* Card Content Typography */
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  margin: 0 auto 8px;
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.card-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bottom-nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }
  
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    padding: 6px;
    transition: all 0.2s ease;
    flex: 1;
  }
  
  .mobile-nav-item svg, .mobile-nav-item i {
    width: 20px;
    height: 20px;
    margin-bottom: 3px;
    font-size: 18px;
  }
  
  .mobile-nav-item.active, .mobile-nav-item:hover {
    color: var(--primary);
  }
  
  .mobile-nav-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 16px);
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 8px;
    min-width: 14px;
    text-align: center;
  }
  
  body {
    padding-bottom: 74px !important;
  }
}

/* Live Search Modal */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.search-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-box {
  width: 100%;
  max-width: 640px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform: translateY(-20px) scale(0.96);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-modal-backdrop.open .search-modal-box {
  transform: translateY(0) scale(1);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.search-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--text-main);
  outline: none;
  font-family: var(--font-main);
}

.search-results-area {
  max-height: 420px;
  overflow-y: auto;
  padding: 16px;
}

/* Floating Game Comparison Dock */
.comparison-dock {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--primary);
  border-radius: 50px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(224, 0, 104, 0.3);
  z-index: 990;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.comparison-dock.visible {
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 769px) {
  .comparison-dock {
    bottom: 30px;
  }
}

/* Scroll To Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 84px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 900;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 769px) {
  .scroll-top-btn {
    bottom: 30px;
  }
}

.scroll-top-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

/* Toast Notifications */
.yono-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.yono-toast {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

.yono-toast.show {
  transform: translateX(0);
}

/* AI Search Assistant Drawer */
.ai-assistant-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ai-assistant-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.ai-assistant-box {
  width: 100%;
  max-width: 580px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--primary);
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

/* ===================================================================
   Missing Tailwind Utilities + Responsive Visibility & Mobile Guards
   Must come after component classes (.btn-yono-primary / .btn-icon)
   so Tailwind visibility utilities are never overridden.
   =================================================================== */
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }
.break-all { word-break: break-all; overflow-wrap: anywhere; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.max-w-7xl { max-width: 80rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-md { max-width: 28rem; }
.w-28 { width: 7rem; }
.h-28 { height: 7rem; }
.w-1\/3 { width: 33.333333%; }
.h-18 { height: 4.5rem; }
.-right-1 { right: -0.25rem; }
.ml-3 { margin-left: 0.75rem; }
.mr-1 { margin-right: 0.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-20 { padding-bottom: 5rem; }
.pt-14 { padding-top: 3.5rem; }
.pl-4 { padding-left: 1rem; }
.bg-transparent { background-color: transparent; }
.border-none { border-style: none; }
.border-2 { border-width: 2px; }
.border-pink-500 { border-color: #ec4899; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }
.text-decoration-none { text-decoration: none; }
.tracking-tight { letter-spacing: -0.025em; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-blue-500 { color: #3b82f6; }
.text-purple-500 { color: #a855f7; }
.text-amber-500 { color: #f59e0b; }
.hover\:text-pink-600:hover { color: #db2777; }
.hover\:bg-pink-50:hover { background-color: #fdf2f8; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }

.glass-panel,
main {
  max-width: 100%;
  overflow-wrap: break-word;
}

.hidden {
  display: none;
}

@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:inline-flex { display: inline-flex; }
  .sm\:flex { display: flex; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:gap-3 { gap: 0.75rem; }
  .sm\:gap-6 { gap: 1.5rem; }
  .sm\:gap-10 { gap: 2.5rem; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:w-32 { width: 8rem; }
  .sm\:h-32 { height: 8rem; }
  .sm\:items-start { align-items: flex-start; }
  .sm\:justify-start { justify-content: flex-start; }
  .sm\:text-left { text-align: left; }
  .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .sm\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:inline-flex { display: inline-flex; }
  .md\:hidden { display: none; }
  .md\:items-center { align-items: center; }
  .md\:pb-12 { padding-bottom: 3rem; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:col-span-1 { grid-column: span 1 / span 1; }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Mobile Header, Grid & Overlay Refinements */
.game-card,
.yono-card,
#games-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 639px) {
  .glass-header {
    width: 100%;
    max-width: 100%;
  }

  .glass-header > div:first-child {
    height: 60px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 8px;
    max-width: 100%;
  }

  .glass-header > div:first-child > a:first-child {
    gap: 8px !important;
    min-width: 0;
    flex: 1 1 auto;
  }

  .glass-header > div:first-child > a:first-child > div:first-child {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0;
  }

  .glass-header > div:first-child > a:first-child > div:last-child {
    min-width: 0;
    overflow: hidden;
  }

  .glass-header > div:first-child > a:first-child > div:last-child > div:first-child {
    font-size: 16px !important;
    white-space: nowrap;
  }

  .glass-header > div:first-child > a:first-child > div:last-child > div:last-child {
    font-size: 9px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .glass-header > div:first-child > div:last-child {
    gap: 5px !important;
    flex-shrink: 0;
  }

  .glass-header .btn-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 13px;
    flex-shrink: 0;
  }

  .glass-header .btn-yono-outline {
    padding: 6px 10px !important;
    font-size: 11px !important;
    white-space: nowrap;
  }

  #games-grid {
    gap: 10px !important;
  }

  .game-card {
    padding: 12px 10px !important;
  }

  .comparison-dock {
    max-width: calc(100vw - 24px);
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .yono-toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
  }

  .yono-toast {
    max-width: 100%;
  }
}

@media (max-width: 479px) {
  /* Theme toggle is already present in the bottom mobile nav bar */
  header.glass-header:has(#mobile-menu-toggle) .theme-toggle-btn {
    display: none;
  }

  .glass-header .btn-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    width: 100%;
    max-width: 100%;
  }

  .mobile-nav-item {
    min-width: 0;
    padding: 6px 2px;
  }
}

/* ===================================================================
   Sort / Filters / View Switcher Toolbar + A-Z Alphabet + List View
   =================================================================== */
.yono-controls-wrap {
  margin-bottom: 20px;
}

.yono-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px 14px;
  box-shadow: var(--card-shadow);
}

.yono-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.yono-toolbar-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.yono-pill-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  white-space: nowrap;
}

.yono-pill-control:hover {
  border-color: #15803d;
}

.yono-pill-select {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding-right: 2px;
}

.yono-pill-select option {
  background: var(--bg-surface);
  color: var(--text-main);
}

.yono-filters-btn.active {
  border-color: #15803d;
  background: rgba(21, 128, 61, 0.08);
  color: #15803d;
}

.yono-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: #15803d;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.yono-view-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: var(--bg-surface);
  gap: 2px;
  height: 38px;
}

.yono-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.yono-view-btn:hover {
  color: var(--text-main);
  background: rgba(148, 163, 184, 0.12);
}

.yono-view-btn.active {
  background: #15803d;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.28);
}

/* Collapsible Filters Drawer */
.yono-filters-drawer {
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}

.yono-filters-drawer.hidden {
  display: none;
}

.yono-drawer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.yono-drawer-search {
  flex: 1 1 200px;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: var(--bg-body);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.yono-drawer-search:focus {
  border-color: #15803d;
}

/* A-Z Alphabet Filter Bar */
.az-filter-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}

.az-filter-bar::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .az-filter-bar {
    flex-wrap: wrap;
    justify-content: center;
  }
}

.az-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-right: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.az-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: var(--bg-body);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.az-btn:hover:not(:disabled) {
  border-color: #15803d;
  color: #15803d;
}

.az-btn.active {
  background: #15803d;
  color: #ffffff !important;
  border-color: #15803d;
  box-shadow: 0 2px 6px rgba(21, 128, 61, 0.25);
}

.az-btn:disabled,
.az-btn.az-empty {
  opacity: 0.38;
  cursor: default;
}

@media (max-width: 639px) {
  .yono-toolbar {
    padding: 8px 10px;
    gap: 8px;
  }

  .yono-pill-control {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .yono-pill-select {
    font-size: 12px;
    max-width: 155px;
  }

  .yono-view-toggle {
    height: 34px;
  }

  .yono-view-btn {
    width: 30px;
    height: 26px;
  }

  .yono-card {
    padding: 12px 10px !important;
    border-radius: 16px;
  }

  .yono-card .card-meta-row {
    gap: 5px;
    font-size: 10.5px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
  }

  .yono-card .card-meta-row > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
  }

  .yono-card .compare-checkbox-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
  }

  .yono-card .card-actions-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 5px;
  }

  .yono-card .card-actions-grid > a {
    padding: 6px 4px !important;
    font-size: 11px !important;
    gap: 4px !important;
    min-width: 0;
    width: 100%;
    justify-content: center;
    white-space: nowrap;
    border-radius: 10px;
  }
}

/* List View Mode for #games-grid (Index .game-card & All-Games .yono-card) */
#games-grid.games-list-view {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
}

@media (min-width: 900px) {
  #games-grid.games-list-view {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

/* Home page .game-card in List View */
#games-grid.games-list-view .game-card {
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  text-align: left !important;
  padding: 10px 12px !important;
  border-radius: 14px;
}

#games-grid.games-list-view .game-card > div:first-child {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 56px !important;
  height: 56px !important;
  margin-bottom: 0 !important;
  border-radius: 12px;
}

#games-grid.games-list-view .game-card > h4 {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 0 !important;
  align-self: end;
  font-size: 14px;
}

#games-grid.games-list-view .game-card > p {
  grid-column: 2;
  grid-row: 2;
  margin-bottom: 0 !important;
  align-self: start;
}

#games-grid.games-list-view .game-card > div:last-child {
  grid-column: 3;
  grid-row: 1 / 3;
  width: auto !important;
  margin-top: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 80px;
}

#games-grid.games-list-view .game-card > div:last-child > * {
  margin-top: 0 !important;
  padding: 5px 10px !important;
  text-align: center;
  white-space: nowrap;
}

@media (min-width: 520px) {
  #games-grid.games-list-view .game-card > div:last-child {
    flex-direction: row;
    gap: 6px;
  }
}

/* Directory .yono-card in List View */
#games-grid.games-list-view .yono-card {
  display: grid !important;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  column-gap: 12px;
  row-gap: 3px;
  align-items: center;
  text-align: left !important;
  padding: 12px !important;
  height: auto !important;
  border-radius: 16px;
}

#games-grid.games-list-view .yono-card .card-thumb-wrap {
  grid-column: 1;
  grid-row: 1 / 4;
  width: 60px !important;
  height: 60px !important;
  margin: 0 !important;
  border-radius: 14px;
}

#games-grid.games-list-view .yono-card .card-title {
  grid-column: 2;
  grid-row: 1;
  text-align: left;
  margin: 0;
}

#games-grid.games-list-view .yono-card .card-category {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  justify-self: start;
}

#games-grid.games-list-view .yono-card .card-desc {
  grid-column: 2;
  grid-row: 3;
  text-align: left;
  margin: 0;
  -webkit-line-clamp: 1;
}

#games-grid.games-list-view .yono-card .card-meta-row {
  display: none;
}

#games-grid.games-list-view .yono-card .card-badge {
  top: 6px;
  left: 6px;
  font-size: 9px;
  padding: 2px 5px;
}

#games-grid.games-list-view .yono-card .fav-btn {
  top: 6px;
  left: 52px;
  right: auto;
  width: 24px;
  height: 24px;
  font-size: 11px;
}

#games-grid.games-list-view .yono-card .card-actions-grid {
  grid-column: 3;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 0;
  min-width: 78px;
}

#games-grid.games-list-view .yono-card .card-actions-grid > a {
  padding: 6px 10px !important;
  font-size: 11px !important;
  white-space: nowrap;
}

@media (min-width: 520px) {
  #games-grid.games-list-view .yono-card .card-actions-grid {
    flex-direction: row;
    gap: 6px;
  }
}

/* Preserve JS filter hiding in List View */
#games-grid.games-list-view .game-card[style*="display: none"],
#games-grid.games-list-view .game-card[style*="display:none"],
#games-grid.games-list-view .yono-card[style*="display: none"],
#games-grid.games-list-view .yono-card[style*="display:none"],
.yono-filter-hidden {
  display: none !important;
}

/* ── Mobile Header: shrink btn-icon and limit header control overflow ── */
@media (max-width: 479px) {
  .btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 13px;
  }
  .glass-header .flex.items-center.gap-2,
  .glass-header .flex.items-center.gap-3 {
    gap: 6px !important;
  }
  /* Keep logo text on one line, truncate if needed */
  .glass-header a[href] div[style*="font-size:20px"],
  .glass-header a[href] div[style*="font-size: 20px"] {
    font-size: 16px !important;
  }
  .glass-header a[href] div[style*="font-size:10px"],
  .glass-header a[href] div[style*="font-size: 10px"] {
    display: none;
  }
}

/* ── Mobile Game Grid: fix gap so left column is not clipped ── */
@media (max-width: 639px) {
  #games-grid.grid {
    gap: 10px !important;
    padding: 0 2px;
  }
  /* Home game-card on mobile */
  .game-card {
    padding: 10px 8px !important;
  }
  .game-card > div:first-child {
    width: 72px !important;
    height: 72px !important;
    margin-bottom: 8px !important;
  }
}

/* === YonoLootZone SEO & Game Page Pro Upgrades === */
@media (min-width: 768px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

.yono-store-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 560px) {
  .yono-store-card {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 12px;
  }
}
.yono-store-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.yono-store-icon {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 170px;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  box-shadow: var(--card-shadow);
  background: var(--skeleton-bg);
}
.yono-btn-apk {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #00a878 0%, #059669 100%);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  transition: transform 0.15s ease;
}
.yono-btn-apk:hover {
  transform: translateY(-1px);
}
.yono-btn-tg {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #0088cc 0%, #006da3 100%);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.28);
}
.yono-store-specs {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.yono-spec-row {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.yono-spec-row:last-child {
  border-bottom: none;
}
.yono-spec-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
}
.yono-spec-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
}

.yono-stars {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.yono-star-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  color: #f59e0b;
}
.yono-star-btn.dim {
  color: #cbd5e1;
}

.yono-share-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.yono-share-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 9999px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.yono-share-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Floating Sticky Bottom Download Bar */
.yono-sticky-dl {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 90;
  width: calc(100% - 24px);
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #065f46 0%, #047857 50%, #059669 100%);
  color: #ffffff !important;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(4, 120, 87, 0.42);
}
.yono-sticky-dl-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fde68a;
  color: #065f46;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  body.has-sticky-dl {
    padding-bottom: 84px;
  }
}

.yono-toc-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 18px;
  margin-bottom: 24px;
  box-shadow: var(--card-shadow);
}
.yono-toc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.yono-toc-list {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  font-size: 12.5px;
}
@media (max-width: 639px) {
  .yono-toc-list {
    grid-template-columns: 1fr;
  }
}
.yono-toc-list.hidden {
  display: none;
}
.yono-toc-list a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.yono-highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 767px) {
  .yono-highlights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 479px) {
  .yono-highlights-grid {
    grid-template-columns: 1fr;
  }
}
.yono-highlight-card {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}
.yono-highlight-card h3 {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px;
}
.yono-highlight-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.yono-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.yono-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 9999px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
}
.yono-tag-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.yono-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.yono-modal-backdrop.open {
  display: flex;
}
.yono-modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.yono-gplay-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 8px;
  background: #000;
  color: #fff !important;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.2;
  border: 1px solid #333;
  transition: opacity 0.15s ease;
}
.yono-gplay-badge:hover {
  opacity: 0.85;
}
.yono-gplay-badge span {
  font-size: 12px;
  font-weight: 800;
}
.yono-spec-row--badge {
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--border-strong);
}

.yono-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.yono-data-table thead th {
  font-size: 12px;
  letter-spacing: 0.3px;
  padding: 10px 16px;
}
.yono-data-table tbody tr:last-child td {
  border-bottom: none;
}
.yono-data-table td, .yono-data-table th {
  vertical-align: middle;
}
@media (max-width: 479px) {
  .yono-data-table thead th,
  .yono-data-table td {
    padding: 8px 10px;
    font-size: 11px;
  }
}
