/* ==========================================================================
   ABCya! Games Arcade - Vooks-Inspired Bright Educational UI/UX
   Clean, Warm, Delightful & Family-Friendly Light Theme
   Dual-Mode: High-End PC Desktop Experience & Native-Feel Mobile PWA
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens (Vooks Aesthetic: Warm, Clean, Friendly)
   -------------------------------------------------------------------------- */
:root {
  /* Vooks Color Palette */
  --vooks-navy: #013870;
  --vooks-blue: #0284c7;
  --vooks-blue-cta: #2563eb;
  --vooks-blue-hover: #1d4ed8;
  --vooks-blue-soft: #eff6ff;
  --vooks-blue-border: #bfdbfe;

  --vooks-gold: #ffbe2e;
  --vooks-gold-hover: #f59e0b;
  --vooks-gold-soft: #fefce8;

  --vooks-coral: #ff6b81;
  --vooks-emerald: #10b981;
  --vooks-emerald-soft: #ecfdf5;
  --vooks-purple: #8b5cf6;
  --vooks-purple-soft: #f5f3ff;
  --vooks-rose: #f43f5e;
  --vooks-rose-soft: #fff1f2;

  /* Backgrounds & Canvas (Bright, Warm, Welcoming) */
  --bg-main: #f8fafc;
  --bg-warm-hero: #fdfaf5;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-elevated: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.94);

  /* Typography Colors */
  --text-title: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Borders & Dividers */
  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #0284c7;

  /* Shadows (Natural, Soft, Never Dark or Murky) */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 3px 12px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 14px 28px rgba(1, 56, 112, 0.12), 0 3px 8px rgba(0, 0, 0, 0.04);
  --shadow-hero: -10px 16px 36px rgba(1, 56, 112, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-cta: 0 4px 14px rgba(37, 99, 235, 0.35);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: 'Fredoka', 'Baloo 2', 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Fredoka', 'Baloo 2', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Dimensions */
  --header-height: 68px;
  --bottom-nav-height: 64px;
  --max-content-width: 1480px;
}

/* --------------------------------------------------------------------------
   2. Reset & Global Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-body);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --------------------------------------------------------------------------
   3. Top Navbar (Vooks Clean White Navigation)
   -------------------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 3.5vw, 44px);
  gap: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

/* Brand Link */
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-badge {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 50%, #ffa502 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  letter-spacing: -0.5px;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.35);
  transform: rotate(-2deg);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand-link:hover .brand-badge {
  transform: rotate(0deg) scale(1.05);
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--vooks-navy);
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--vooks-gold-hover);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Center Search Box */
.header-search-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-box {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 40px;
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-title);
  font-size: 0.92rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.search-input-box:focus {
  background: #ffffff;
  border-color: var(--vooks-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-input-box::placeholder {
  color: var(--text-light);
}

.search-icon-left {
  position: absolute;
  left: 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-kbd-hint {
  position: absolute;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  color: var(--text-muted);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  transition: all 0.15s ease;
}
.search-clear-btn:hover {
  background: #f43f5e;
  color: #fff;
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* View Mode Selector (Auto / PC / Phone PWA) */
.view-mode-pill {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 3px;
}

.view-mode-item {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}

.view-mode-item:hover {
  color: var(--text-title);
}

.view-mode-item.active {
  background: #ffffff;
  color: var(--vooks-navy);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Circle Action Buttons (Vooks style) */
.nav-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}
.nav-circle-btn:hover {
  background: #f1f5f9;
  color: var(--vooks-navy);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}
.nav-circle-btn.active {
  background: var(--vooks-blue-soft);
  color: var(--vooks-blue);
  border-color: var(--vooks-blue-border);
}

/* PWA Install Button */
.btn-install-app {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--vooks-blue-cta);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-cta);
  transition: all 0.2s ease;
}
.btn-install-app:hover {
  background: var(--vooks-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}
.btn-install-app:active {
  transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   4. Hero Spotlight Carousel (Warm Vooks-Style Showcase)
   -------------------------------------------------------------------------- */
.hero-container {
  position: relative;
  width: 100%;
  background: var(--bg-warm-hero);
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
  margin-bottom: 20px;
}

.hero-content-wrap {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 32px clamp(16px, 3.5vw, 44px) 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 36px;
  min-height: 330px;
  position: relative;
}

.hero-text-side {
  max-width: 600px;
  z-index: 5;
}

.hero-spotlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--vooks-gold-soft);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  color: var(--text-body);
  line-height: 1.55;
  margin-bottom: 18px;
  max-width: 520px;
}

.hero-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.hero-tag-grade {
  background: var(--vooks-blue-soft);
  color: var(--vooks-navy);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--vooks-blue-border);
}

.hero-tag-cat {
  background: #fdf2f8;
  color: #db2777;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid #fbcfe8;
}

.hero-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-hero-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 32px;
  background: var(--vooks-blue-cta);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-cta);
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}
.btn-hero-play:hover {
  background: var(--vooks-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}
.btn-hero-play:active {
  transform: translateY(1px);
}

.btn-hero-surprise {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  color: var(--vooks-navy);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.btn-hero-surprise:hover {
  background: #f8fafc;
  border-color: var(--vooks-blue);
  color: var(--vooks-blue);
  transform: translateY(-2px);
}

/* Hero Showcase Visual (3D Perspective Card) */
.hero-visual-side {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.hero-3d-card {
  width: 280px;
  height: 210px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hero);
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 3px solid #ffffff;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  transform: rotate(2deg);
  cursor: pointer;
}
.hero-3d-card:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.04);
  box-shadow: -14px 22px 42px rgba(1, 56, 112, 0.2);
}

.hero-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Carousel Dots */
.hero-dots-row {
  position: absolute;
  bottom: 12px;
  left: clamp(16px, 3.5vw, 44px);
  display: flex;
  gap: 7px;
  z-index: 6;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hero-dot.active {
  width: 22px;
  background: var(--vooks-blue-cta);
}

/* --------------------------------------------------------------------------
   5. Category Circles Row (Vooks-Style Circular Badges)
   -------------------------------------------------------------------------- */
.categories-circles-section {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 4px clamp(16px, 3.5vw, 44px) 14px;
}

.category-circles-scroll {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 2px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-circles-scroll::-webkit-scrollbar {
  display: none;
}

.category-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  transition: all 0.2s ease;
}

.category-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-circle-item:hover .category-icon-badge {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 18px rgba(1, 56, 112, 0.12);
  border-color: var(--vooks-blue);
}

.category-circle-item.active .category-icon-badge {
  background: var(--vooks-blue-soft);
  border-color: var(--vooks-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25), 0 4px 12px rgba(2, 132, 199, 0.15);
  transform: scale(1.06);
}

.category-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.category-circle-item:hover .category-label {
  color: var(--text-title);
}

.category-circle-item.active .category-label {
  color: var(--vooks-blue-cta);
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   6. Grade Level Filter Pills (Vooks Sub-bar Style)
   -------------------------------------------------------------------------- */
.grade-subbar-section {
  max-width: var(--max-content-width);
  margin: 0 auto 16px;
  padding: 0 clamp(16px, 3.5vw, 44px);
}

.grade-subbar {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.grade-pills-list {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.grade-pills-list::-webkit-scrollbar {
  display: none;
}

.grade-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.grade-pill:hover {
  background: #f1f5f9;
  color: var(--text-title);
  border-color: #cbd5e1;
}

.grade-pill.active {
  background: var(--vooks-navy);
  color: #ffffff;
  border-color: var(--vooks-navy);
  box-shadow: 0 2px 8px rgba(1, 56, 112, 0.25);
}

/* Filter Summary Info */
.filter-summary-col {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.filter-badge-text {
  font-weight: 700;
  color: var(--vooks-navy);
}

.btn-reset-filters {
  background: #fee2e2;
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  display: none;
  transition: all 0.15s ease;
}
.btn-reset-filters:hover {
  background: #ef4444;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   7. Games Grid (Vooks Clean Card Shelves)
   -------------------------------------------------------------------------- */
.games-shelf-section {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 44px) 60px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

/* Game Card */
.game-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-card-hover);
}

/* Thumbnail Wrap */
.game-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f1f5f9;
}

.game-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.game-card:hover .game-thumb-img {
  transform: scale(1.06);
}

/* Fallback Artwork */
.fallback-cover-art {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}
.fallback-emoji {
  font-size: 2.2rem;
  margin-bottom: 6px;
}
.fallback-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--vooks-navy);
}

/* Grade Badge on Thumbnail */
.game-grade-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: var(--vooks-navy);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Heart Favorite Button */
.game-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.game-fav-btn:hover {
  transform: scale(1.18);
  background: #ffffff;
}
.game-fav-btn.is-favorite {
  background: #fff1f2;
  border-color: #fecdd3;
}

/* Play Hover Overlay */
.game-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(1, 56, 112, 0.35);
  backdrop-filter: blur(1.5px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}
.game-card:hover .game-play-overlay {
  opacity: 1;
}

.play-circle-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--vooks-blue-cta);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
  transform: scale(0.85);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.game-card:hover .play-circle-icon {
  transform: scale(1);
}

/* Card Body */
.game-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-card-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.25;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 6px;
}

.game-cat-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--vooks-navy);
  text-transform: capitalize;
  background: var(--vooks-blue-soft);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  display: inline-block;
}

.game-grades-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Empty State */
.empty-state-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-light);
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-title);
  margin-bottom: 6px;
}
.empty-state-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   8. Mobile PWA Bottom Navigation Dock (Ergonomic Phone Layout)
   -------------------------------------------------------------------------- */
.mobile-bottom-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  height: var(--bottom-nav-height);
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  border-left: 1.5px solid var(--border-light);
  border-right: 1.5px solid var(--border-light);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.bottom-dock-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 4px;
}

.dock-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  flex: 1;
  height: 100%;
  transition: all 0.15s ease;
  position: relative;
}

.dock-item-icon {
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-item-btn:hover,
.dock-item-btn.active {
  color: var(--vooks-blue-cta);
}

.dock-item-btn.active .dock-item-icon {
  transform: translateY(-2px) scale(1.12);
}

.dock-item-btn.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  background: var(--vooks-blue-cta);
  border-radius: 0 0 3px 3px;
}

/* --------------------------------------------------------------------------
   9. Mobile Bottom Sheets (Drawers)
   -------------------------------------------------------------------------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sheet-backdrop.open {
  display: block;
  opacity: 1;
}

.sheet-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  right: auto;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-top: 1px solid var(--border-light);
  border-left: 1.5px solid var(--border-light);
  border-right: 1.5px solid var(--border-light);
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.12);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-sizing: border-box;
  z-index: 201;
}

.sheet-backdrop.open .sheet-container {
  transform: translateX(-50%) translateY(0);
}

.sheet-grab-bar {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: var(--radius-full);
  margin: 0 auto 16px;
}

.sheet-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sheet-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-title);
}

.sheet-close-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.sheet-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sheet-option-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--text-title);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.sheet-option-tile:hover,
.sheet-option-tile.active {
  background: var(--vooks-blue-soft);
  color: var(--vooks-navy);
  border-color: var(--vooks-blue-border);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12);
}

/* --------------------------------------------------------------------------
   10. Forced Mobile PWA Simulation Mode (.mode-mobile-pwa)
   -------------------------------------------------------------------------- */
html.mode-mobile-pwa-active,
html:has(body.mode-mobile-pwa) {
  background-color: #f1f5f9;
}

body.mode-mobile-pwa {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.12);
  border-left: 1.5px solid var(--border-light);
  border-right: 1.5px solid var(--border-light);
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
  position: relative;
  background: var(--bg-main);
  box-sizing: border-box;
}

body.mode-mobile-pwa .hero-content-wrap {
  grid-template-columns: 1fr;
  min-height: auto;
  padding: 20px 16px;
}

body.mode-mobile-pwa .hero-visual-side {
  display: none;
}

body.mode-mobile-pwa .hero-dots-row {
  display: none;
}

body.mode-mobile-pwa .mobile-bottom-dock {
  display: block !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 440px !important;
  border-left: 1.5px solid var(--border-light) !important;
  border-right: 1.5px solid var(--border-light) !important;
  box-sizing: border-box !important;
}

body.mode-mobile-pwa .bottom-dock-nav {
  width: 100% !important;
  max-width: 100% !important;
}

body.mode-mobile-pwa .header-search-wrap,
body.mode-mobile-pwa .btn-install-app,
body.mode-mobile-pwa .btn-cloud-status {
  display: none !important;
}

body.mode-mobile-pwa .header-actions {
  gap: 8px;
}

body.mode-mobile-pwa .games-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
}

body.mode-mobile-pwa .sheet-container {
  max-width: 440px !important;
  left: 50% !important;
  border-left: 1.5px solid var(--border-light);
  border-right: 1.5px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   11. Responsive Media Queries (Mobile & Tablet)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-content-wrap {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-visual-side {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--bottom-nav-height) + 16px);
  }

  .mobile-bottom-dock {
    display: block;
  }

  .header-search-wrap {
    display: none;
  }

  .btn-install-app {
    display: none;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .game-card-title {
    font-size: 0.92rem;
  }

  .game-card-body {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .game-thumb-box {
    aspect-ratio: 1 / 1;
  }
}

/* --------------------------------------------------------------------------
   Category SVG Icon Badges & Enhanced Circles
   -------------------------------------------------------------------------- */
.category-icon-badge {
  background: #ffffff;
  border: 2px solid var(--border-light);
  padding: 8px;
}
.category-icon-badge img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.category-circle-item:hover .category-icon-badge img {
  transform: scale(1.15) rotate(4deg);
}

/* --------------------------------------------------------------------------
   Featured Category Picture Cards Showcase
   -------------------------------------------------------------------------- */
.featured-categories-section {
  max-width: var(--max-content-width);
  margin: 10px auto 26px;
  padding: 0 clamp(16px, 3.5vw, 44px);
}

.featured-categories-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--vooks-navy);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.featured-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.cat-picture-card {
  position: relative;
  height: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  border: 1px solid var(--border-light);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
  text-decoration: none;
  display: block;
}

.cat-picture-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.cat-picture-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.cat-picture-card:hover img {
  transform: scale(1.08);
}

.cat-picture-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(1, 56, 112, 0.15) 0%, rgba(1, 56, 112, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 14px;
  color: #ffffff;
}

.cat-picture-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.cat-picture-count {
  font-size: 0.74rem;
  opacity: 0.95;
  font-weight: 700;
  color: #bae6fd;
}

/* --------------------------------------------------------------------------
   Pagination Bar (Smooth, Fast, Easy Pages)
   -------------------------------------------------------------------------- */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  color: var(--text-title);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
}

.page-btn:hover:not(:disabled) {
  background: var(--vooks-blue-soft);
  color: var(--vooks-blue);
  border-color: var(--vooks-blue-border);
  transform: translateY(-2px);
}

.page-btn.active {
  background: var(--vooks-blue-cta);
  color: #ffffff;
  border-color: var(--vooks-blue-cta);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-info {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Lucide/Vector Icon Utilities & Grade Typography Badges
   -------------------------------------------------------------------------- */
.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.grade-code-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
  font-family: var(--font-body);
  letter-spacing: -0.2px;
}

.tag-all { background: #eff6ff; color: #0284c7; }
.tag-pk  { background: #fff1f2; color: #f43f5e; }
.tag-k   { background: #fff7ed; color: #ea580c; }
.tag-g1  { background: #ecfdf5; color: #059669; }
.tag-g2  { background: #ecfeff; color: #0891b2; }
.tag-g3  { background: #f5f3ff; color: #7c3aed; }
.tag-g4  { background: #fdf2f8; color: #c026d3; }
.tag-g5  { background: #eff6ff; color: #2563eb; }
.tag-g6  { background: #fef2f2; color: #dc2626; }

.grade-pill.active .grade-code-tag {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.sheet-option-tile.active .grade-code-tag {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.game-fav-btn svg {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), fill 0.2s ease, stroke 0.2s ease;
}
.game-fav-btn.is-favorite svg {
  fill: #f43f5e;
  stroke: #f43f5e;
}
.game-fav-btn:hover svg {
  transform: scale(1.15);
}

.dock-item-icon svg {
  display: block;
}
