@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Outfit:wght@600;700;800;900&family=Poppins:wght@500;600;700;800;900&display=swap');

/* =====================================================================
   SenseBoard Arcade Suite - Premium Teal Dark Glassmorphism Theme
   (Applied exclusively to the Main Index & SPA Portal Shell)
   ===================================================================== */
:root {
  /* Vibrant Clean Light Arcade Palette */
  --bg-main: #f0f4f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-color: #e2e8f0;
  --border-glow: var(--primary);

  /* Bright Kid-Friendly Accents */
  --neon-cyan: #0ea5e9;
  --neon-pink: #ec4899;
  --neon-yellow: #eab308;
  --neon-blue: #3b82f6;
  --neon-purple: #8b5cf6;
  --neon-green: #10b981;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;

  --hud-height: 60px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 25px -4px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

/* Custom 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: #818cf8;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: var(--bg-main);
  background-image:
    url('../images/portal-bg.svg'),
    radial-gradient(circle at 10% 10%, rgba(var(--theme-primary-rgb, 83, 162, 170), 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(236, 72, 153, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 70%, rgba(14, 165, 233, 0.07) 0%, transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(234, 179, 8, 0.08) 0%, transparent 45%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

@keyframes bgMeshPulse {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 5% 5%;
  }
}

/* ================================================================== */
/* SPA View Management (Zero Refresh Engine)                           */
/* ================================================================== */
#spa-app {
  position: relative;
  width: 100%;
  min-height: 100%;
}

.spa-view {
  width: 100%;
  min-height: 100vh;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.spa-view.hidden,
.hidden,
.settings-modal-backdrop.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ================================================================== */
/* LOBBY VIEW: Header & Navigation (Teal Theme)                       */
/* ================================================================== */
/* ================================================================== */
/* LOBBY VIEW: TRENDY GLASS HEADER & NAVIGATION                      */
/* ================================================================== */
.portal-header {
  position: sticky;
  top: 0;
  display: none;
  z-index: 100;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  padding: 12px 32px;
  /* display: flex; */
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #0f172a;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-wrapper:hover {
  transform: scale(1.03);
}

.brand-logo-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #3b82f6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.35);
  position: relative;
}

.brand-logo-badge::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 8px #10b981;
}

.brand-info h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #0f172a, var(--primary), #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-info p {
  font-size: 11px;
  color: var(--primary-hover);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  opacity: 0.9;
}

/* Toolbar Team Score Counter (Light Theme) */
.team-scoreboard-hud {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 10px;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: all 0.25s ease;
}

.team-scoreboard-hud:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.score-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.score-chip.gold {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.score-chip.blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.vs-divider {
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 900;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.score-val {
  font-size: 15px;
  font-weight: 900;
  min-width: 18px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
}

.score-ctrl-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s ease;
  padding: 0;
}

.score-ctrl-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.15);
}

.score-reset-btn {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 4px 9px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.15s ease;
}

.score-reset-btn:hover {
  color: #ffffff;
  background: #dc2626;
  border-color: #dc2626;
  transform: scale(1.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-btn {
  background: rgba(24, 32, 56, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.header-btn:hover {
  border-color: var(--neon-cyan);
  color: #fff;
  background: rgba(36, 48, 84, 0.95);
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.35);
  transform: translateY(-2px);
}

.header-btn.active {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  border-color: var(--teal-light);
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.45);
}

/* ================================================================== */
/* HERO SHOWCASE (Teal Banner)                                        */
/* ================================================================== */
.hero-container {
  max-width: 1400px;
  margin: 28px auto 16px;
  padding: 0 32px;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(15, 74, 82, 0.92) 0%, rgba(6, 43, 48, 0.96) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 650px;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(45, 212, 191, 0.16);
  border: 1px solid rgba(45, 212, 191, 0.45);
  color: var(--teal-light);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
  color: #fff;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.hero-stats-row {
  display: flex;
  gap: 24px;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-item .num {
  font-size: 24px;
  font-weight: 800;
  color: var(--teal-light);
  font-family: var(--font-heading);
}

.hero-stat-item .lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-quick-card {
  z-index: 1;
  background: rgba(3, 26, 29, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hero-quick-card .feat-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.hero-quick-card .feat-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #fff;
}

.hero-quick-card .feat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn-launch-featured {
  width: 100%;
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
  color: #022629;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(45, 212, 191, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-launch-featured:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.65);
}

/* ================================================================== */
/* TOOLBAR: Search & Filters (Teal Theme)                             */
/* ================================================================== */
.toolbar-container {
  max-width: 1400px;
  margin: 16px auto 24px;
  padding: 0 32px;
}

.toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 260px;
}

.hero-search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.hero-search-box .search-input {
  width: 100%;
  height: 46px;
  background: rgba(4, 36, 40, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0 42px 0 44px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-search-box .search-input:focus {
  border-color: var(--teal-light);
  background: rgba(8, 48, 54, 0.95);
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-search-box .search-input::placeholder {
  color: var(--text-muted);
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  display: none;
  transition: all 0.15s;
}

.search-clear-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

.search-clear-btn.visible {
  display: flex;
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pill {
  background: rgba(4, 36, 40, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-pill:hover {
  background: var(--bg-card);
  color: #fff;
  border-color: var(--teal-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.25);
}

.filter-pill.active {
  background: linear-gradient(135deg, #14b8a6, #0284c7);
  color: #fff;
  border-color: #2dd4bf;
  box-shadow: 0 4px 18px rgba(45, 212, 191, 0.45);
}

.filter-pill .pill-count {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

/* ================================================================== */
/* GAME GRID & CARDS (Teal Aesthetic)                                */
/* ================================================================== */
.games-grid-container {
  max-width: 1400px;
  margin: 0 auto 64px;
  padding: 0 32px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--teal-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ================================================================== */
/* KIDS ARCADE GAME CARDS (Clean & Vibrant Palette)                   */
/* ================================================================== */
/* ================================================================== */
/* KIDS ARCADE GAME CARDS (Spacious 5-Column Arcade Poster Cards)    */
/* ================================================================== */
.kids-games-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1400px) {
  .kids-games-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .kids-games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .kids-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .kids-games-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================== */
/* REFERENCE MATCH: 5-COL GRID & COMPACT EDUCATIONAL CARDS            */
/* ================================================================== */
.game-card.arcade-ref-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
/*  border: 1.5px solid #f1f5f9;*/
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
  position: relative;
}

.game-card.arcade-ref-card:hover {
/*  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.09), 0 4px 8px -2px rgba(15, 23, 42, 0.04);*/
}

/* THUMBNAIL WRAPPER */
.ref-thumb-wrap {
  width: 100%;
  height: 150px;
  position: relative;
  overflow: hidden;
  background: #f8fafc;
  flex-shrink: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.ref-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.game-card.arcade-ref-card:hover .ref-thumb-wrap img {
  transform: scale(1.03);
}

/* SUBJECT BADGE (Top-Left) */
.ref-subject-badge {
    position: absolute;
    top: 0px;
    left: 0px;
    font-size: 10px;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    /* font-weight: 700; */
    background-color: var(--primary) !important;
    /* border: 1px solid #000; */
    padding: 5px 15px;
    border-radius: 10px 0;
    color: #ffffff;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    letter-spacing: 0.2px;
}

/* CARD BODY */
.ref-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border-top: 2px solid #53a2aa;
    gap: 5px;
    flex: 1;
}

/* TITLE ROW */
.ref-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ref-title-icon {
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ref-card-title {
  font-family: 'Fredoka', 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.game-card.arcade-ref-card:hover .ref-card-title {
  color: var(--primary, #2563eb);
}

/* FOOTER ROW */
.ref-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ref-class-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.ref-users-icon {
  color: #94a3b8;
  flex-shrink: 0;
}

/* PLAY BUTTON */
.ref-btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--primary) !important;
    border: none;
    font-family: 'Fredoka', 'Outfit', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.ref-btn-play:hover {
  opacity: 0.92;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.poster-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  transition: transform 0.3s ease;
}

.game-card.arcade-poster-card:hover .poster-thumb-wrap img {
  transform: scale(1.03);
}

.poster-gradient-overlay {
  display: none;
}

.poster-subject-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-family: 'Fredoka', 'Poppins', sans-serif;
  padding: 4px 12px;
  border-radius: 999px;
  color: #ffffff;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  letter-spacing: 0.3px;
}

.poster-mode-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10.5px;

  font-family: 'Fredoka', 'Poppins', sans-serif;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  letter-spacing: 0.3px;
}

.poster-mode-badge.team {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.poster-mode-badge.solo {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.poster-play-trigger {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--theme-primary-rgb, 83, 162, 170), 0.2);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.28s ease;
  z-index: 1;
}

.play-trigger-circle {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #ffffff;
  font-size: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.6) rotate(-15deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
  border: 2.5px solid #ffffff;
}

.game-card.arcade-poster-card:hover .poster-play-trigger {
  opacity: 1;
}

.game-card.arcade-poster-card:hover .play-trigger-circle {
  transform: scale(1) rotate(0deg);
}

/* POSTER CARD BODY */
.poster-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 8px;
  background: #ffffff;
}

/* POSTER CARD TITLE HIGHLIGHT BOX */
.poster-title-highlight-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-left-width: 4.5px;
  border-left-color: var(--primary, #478c94);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
  min-height: 38px;
  box-sizing: border-box;
}

.game-card.arcade-poster-card:hover .poster-title-highlight-box {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.title-icon-badge {
  font-size: 19px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.12));
}

.poster-card-title {
  font-family: 'Fredoka', 'Outfit', sans-serif;
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  letter-spacing: -0.2px;
  flex: 1;
}

.game-card.arcade-poster-card:hover .poster-card-title {
  color: var(--primary);
}

.poster-card-subtitle {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.group-only-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #854d0e;
  background: #fef9c3;
  border: 1px solid #fde047;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  width: fit-content;
}

.solo-support-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  width: fit-content;
}

/* POSTER CARD META ROW */
.poster-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.difficulty-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.difficulty-pill .diff-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.difficulty-pill.easy {
  color: #16a34a;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.difficulty-pill.easy .diff-dot {
  background: #16a34a;
}

.difficulty-pill.medium {
  color: #d97706;
  border-color: #fef3c7;
  background: #fffbeb;
}

.difficulty-pill.medium .diff-dot {
  background: #d97706;
}

.difficulty-pill.hard {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.difficulty-pill.hard .diff-dot {
  background: #dc2626;
}

.class-pill-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mode-pill-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mode-pill-tag.team-mode {
  color: #7c3aed;
  background: #f3e8ff;
  border: 1px solid #e9d5ff;
}

.mode-pill-tag.solo-mode {
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

/* FULL-WIDTH GLOWING PLAY BUTTON */
.btn-poster-play {
  width: 100%;
  padding: 11px 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-size: 13px;

  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.35), inset 0 1.5px 0 rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-poster-play:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 22px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.55), inset 0 1.5px 0 rgba(255, 255, 255, 0.6);
}

.game-card.horizontal-card:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(0, 198, 255, 0.5);
  box-shadow: 0 12px 30px rgba(0, 114, 255, 0.3), 0 0 16px rgba(0, 198, 255, 0.2);
  background: linear-gradient(145deg, rgba(16, 38, 70, 0.98), rgba(9, 24, 46, 0.98));
}

.game-card.horizontal-card:hover::before {
  opacity: 1;
  box-shadow: 0 0 10px #00c6ff;
}

/* THUMBNAIL CONTAINER & BADGES */
.game-card.horizontal-card .card-thumb-wrap {
  width: 100px;
  min-width: 100px;
  height: 100%;
  overflow: hidden;
  background: rgba(3, 10, 20, 0.9);
  position: relative;
  flex-shrink: 0;
}

.game-card.horizontal-card .card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-card.horizontal-card:hover .card-thumb-wrap img {
  transform: scale(1.12);
}

.thumb-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}

.thumb-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 114, 255, 0.25);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.thumb-play-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(0, 114, 255, 0.6);
  transform: scale(0.8);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card.horizontal-card:hover .thumb-play-overlay {
  opacity: 1;
}

.game-card.horizontal-card:hover .thumb-play-icon {
  transform: scale(1);
}

.card-subject-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  padding: 2px 7px;
  border-radius: 999px;
  color: #ffffff;
  white-space: nowrap;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* CARD BODY */
.game-card.horizontal-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 8px 12px;
}

.game-card.horizontal-card .card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-card.horizontal-card .card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

.game-card.horizontal-card:hover .card-title {
  color: #7dd3fc;
}

.game-card.horizontal-card .card-subtitle-line {
  font-size: 10.5px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* CARD FOOTER ROW & TAGS */
.game-card.horizontal-card .card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.card-tags-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.difficulty-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.difficulty-tag .diff-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.difficulty-tag.easy {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.2);
}

.difficulty-tag.easy .diff-dot {
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}

.difficulty-tag.medium {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.2);
}

.difficulty-tag.medium .diff-dot {
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
}

.difficulty-tag.hard {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.2);
}

.difficulty-tag.hard .diff-dot {
  background: #f87171;
  box-shadow: 0 0 6px #f87171;
}

.meta-tag {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* VIBRANT GLOWING PLAY BUTTON */
.game-card.horizontal-card .btn-play-now {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 10px rgba(0, 114, 255, 0.45);
  letter-spacing: 0.3px;
}

.game-card.horizontal-card .btn-play-now:hover {
  background: linear-gradient(135deg, #38ef7d, #11998e);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(56, 239, 125, 0.55);
}

.card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.card-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.card-badge.team {
  background: rgba(251, 191, 36, 0.2);
  color: var(--gold);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}

.card-badge.subject {
  background: rgba(45, 212, 191, 0.2);
  color: var(--teal-light);
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.25);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 14px;
  margin-top: auto;
}

.card-players-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-play-card {
  background: linear-gradient(135deg, #14b8a6, #0284c7);
  color: #fff;
  border: 1px solid rgba(45, 212, 191, 0.4);
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(20, 184, 166, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-card:hover .btn-play-card {
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
  color: #011417;
  border-color: #2dd4bf;
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.6);
  transform: scale(1.05);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ================================================================== */
/* RUNNER VIEW: Fullscreen In-App Game Player (Teal HUD)              */
/* ================================================================== */
#runner-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  background: #000000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Modern Floating Arcade HUD (Bottom Positioned) */
.runner-hud-bar {
  height: var(--hud-height);
  background: #ffffff;
  border-top: 2px solid #e2e8f0;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 14px;
  z-index: 100;
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hud-btn-lobby {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.12);
}

.hud-btn-lobby:hover {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.hud-game-info {
  display: none;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 12px;
  border-radius: 999px;
}

.hud-game-icon {
  font-size: 20px;
}

.hud-game-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.2px;
}

/* Quick Switcher dropdown in HUD (Pops UPWARDS) */
.hud-switcher-wrapper {
  position: relative;
}

.hud-btn-switch {
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  color: var(--primary-hover);
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 6px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-btn-switch:hover {
  background: var(--primary);
  border-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.3);
}

.switcher-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  top: auto;
  left: 0;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  width: 290px;
  max-height: 420px;
  overflow-y: auto;
  box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.16);
  display: none;
  z-index: 120;
  padding: 6px;
}

.switcher-dropdown-menu.open {
  display: block;
}

.switcher-item {
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 8px;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.18s ease;
}

.switcher-item:hover {
  background: #f1f5f9;
}

.switcher-item.active {
  background: #e0e7ff;
  border-left: 4px solid var(--primary);
}

.switcher-item .sw-icon {
  font-size: 20px;
}

.switcher-item .sw-name {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.switcher-item .sw-cat {
  font-size: 10.5px;
  font-weight: 500;
  color: #64748b;
}

/* Center HUD Score Keeper (Light Theme) */
.hud-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-score-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.hud-score-pill b {
  font-size: 15px;
  font-weight: 900;
  min-width: 18px;
  text-align: center;
}

.hud-score-pill.gold {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.hud-score-pill.blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.hud-score-pill.green {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.hud-score-pill.red {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

@keyframes winScoreBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); filter: brightness(1.2); }
  100% { transform: scale(1); }
}

.hud-score-pill.win-bump {
  animation: winScoreBump 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hud-score-pill .score-ctrl-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s ease;
  padding: 0;
}

.hud-score-pill .score-ctrl-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.15);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-icon-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.hud-icon-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.35);
}

/* The Game Frame Viewport */
.runner-stage-wrap {
  flex: 1;
  width: 100%;
  height: calc(100vh - var(--hud-height));
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating Top Arcade Game Header */
.runner-top-header {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.runner-top-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  padding: 8px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.25);
  animation: runner-badge-float 3s ease-in-out infinite alternate;
}

@keyframes runner-badge-float {
  0% { transform: translateY(0); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.2); }
  100% { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.4); }
}

.runner-top-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.runner-top-title {
  font-family: 'Fredoka', 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
}

.runner-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.runner-loader.hidden {
  opacity: 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--teal-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================================================== */
/* RESPONSIVE DESIGN                                                  */
/* ================================================================== */
@media (max-width: 900px) {
  .portal-header {
    padding: 10px 16px;
  }

  .hero-container,
  .toolbar-container,
  .games-grid-container {
    padding: 0 16px;
  }

  .hero-banner {
    flex-direction: column;
    padding: 24px;
  }

  .hero-quick-card {
    width: 100%;
  }

  .hud-center {
    display: none;
  }

  .age-selector-bar {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .settings-window {
    width: 95vw !important;
    height: 92vh !important;
  }
}

/* ================================================================== */
/* SETTINGS MODAL & AGE-WISE RECOMMENDED CATALOG (Teal Theme)          */
/* ================================================================== */
.settings-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.settings-modal-backdrop.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Floating Right-Side Settings Button in Game Screen */
.floating-right-settings-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99;
  background: rgba(3, 26, 29, 0.9);
  border: 1px solid var(--teal-light);
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(45, 212, 191, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-right-settings-btn:hover {
  background: var(--teal-light);
  color: #022629;
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 6px 24px rgba(45, 212, 191, 0.6);
}

.floating-right-settings-btn .gear-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.floating-right-settings-btn:hover .gear-icon {
  transform: rotate(90deg);
}

@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(18px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Single-Page Desktop Settings Window (Compact & Sleek Dark Glass UI) */
.settings-window,
.settings-window.single-page-desktop {
  background: rgba(16, 28, 48, 0.96);
  border: 2px solid rgba(255, 193, 7, 0.35);
  border-top: 8px solid #FFC107;
  border-radius: 24px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.65), 0 0 40px rgba(255, 193, 7, 0.2);
  width: 90vw;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
  color: #f8fafc;
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.desktop-settings-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.desktop-col-left {
  border-right: none;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.desktop-col-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-group-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: var(--radius-md);
  padding: 12px;
}

.section-group-card .group-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: #FFC107;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-group-card .group-desc {
  font-size: 10.5px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.btn-apply-settings {
  background: linear-gradient(180deg, #FFC928, #FF9F1C);
  color: #1c1500;
  border: none;
  padding: 10px 22px;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 193, 7, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-apply-settings:hover {
  background: linear-gradient(180deg, #FFD54F, #FFA000);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(255, 193, 7, 0.55);
}

.btn-settings-done {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-settings-done:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Compact Modal Header (Dark Glass Aesthetic) */
.settings-window-header {
  padding: 16px 24px;
  background: linear-gradient(90deg, rgba(255, 193, 7, 0.18) 0%, rgba(16, 28, 48, 0.7) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-icon {
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 193, 7, 0.08));
  border: 1.5px solid rgba(255, 193, 7, 0.5);
  color: #FFC107;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 193, 7, 0.3);
  transition: transform 0.3s ease;
}

.settings-title-wrap:hover .settings-icon {
  transform: rotate(20deg) scale(1.08);
}

.settings-title-wrap h3 {
  font-family: 'Fredoka', 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #FFC107;
  margin: 0;
  line-height: 1.2;
}

.settings-title-wrap p {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 500;
}

.settings-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-close-btn:hover {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* Navigation Tabs */
.settings-nav-tabs {
  display: flex;
  background: rgba(2, 26, 29, 0.6);
  border-bottom: 1px solid var(--border-color);
  padding: 0 28px;
  gap: 12px;
}

.settings-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-tab-btn:hover {
  color: #fff;
}

.settings-tab-btn.active {
  color: var(--teal-light);
  border-bottom-color: var(--teal-light);
  background: rgba(45, 212, 191, 0.08);
}

/* Modal Body */
.settings-window-body {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
}

.settings-tab-pane {
  display: none;
}

.settings-tab-pane.active {
  display: block;
}

.settings-section-head {
  margin-bottom: 18px;
}

.settings-section-head h4 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.settings-section-head p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Age Selector Bar */
.age-selector-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.age-pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.age-pill-btn:hover {
  border-color: var(--teal-light);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.age-pill-btn.active {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  border-color: var(--teal-light);
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.4);
}

.age-pill-btn .age-icon {
  font-size: 24px;
}

.age-pill-btn .age-text {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.age-pill-btn .age-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

.age-pill-btn.active .age-desc {
  color: #ccfbf1;
}

/* Catalog Summary Bar */
.catalog-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(3, 26, 29, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 13px;
}

#catalog-count-badge {
  font-weight: 700;
  color: var(--teal-light);
}

.catalog-hint {
  color: var(--text-muted);
  font-size: 12px;
}

/* Recommended Game Cards Grid */
.recommended-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.rec-game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.rec-game-card:hover {
  transform: translateY(-3px);
  border-color: var(--teal-light);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(45, 212, 191, 0.3);
}

.rec-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rec-card-icon {
  font-size: 32px;
}

.rec-card-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(45, 212, 191, 0.2);
  color: var(--teal-light);
  border: 1px solid rgba(45, 212, 191, 0.4);
}

.rec-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.rec-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 14px;
  flex: 1;
}

.rec-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.rec-age-label {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
}

.btn-rec-play {
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
  color: #022629;
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-rec-play:hover {
  transform: scale(1.05);
}

/* General Settings Form */
.settings-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-field-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.setting-field-card .field-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.setting-field-card .field-desc {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 14px;
}

.team-inputs-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.team-input-wrap label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.team-input-wrap input {
  width: 100%;
  height: 38px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  color: #0f172a;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.team-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.25);
}

.field-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #0f172a;
}

.btn-setting-action {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  border: 1px solid rgba(var(--theme-primary-rgb, 83, 162, 170), 0.3);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.25);
}

.btn-setting-action:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  color: #ffffff;
}

.btn-setting-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-setting-danger:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Modal Footer */
.settings-window-footer {
  padding: 16px 28px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-note {
  font-size: 12px;
  color: var(--text-muted);
}

.setting-field-card {
  background: rgba(var(--theme-primary-rgb, 83, 162, 170), 0.03);
  border: 1px solid rgba(var(--theme-primary-rgb, 83, 162, 170), 0.18);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.2s ease;
}

.setting-field-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.12);
}

.game-settings-segment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.game-seg-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 7px;
}

.game-seg-btn:hover {
  background: #ffffff;
  color: #b45309;
  border-color: #f59e0b;
  transform: translateY(-1px);
}

.game-seg-btn.active {
  background: #FFC107 !important;
  color: #1c1500 !important;
  border-color: #FFC107 !important;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 193, 7, 0.4);
}

.settings-window .game-seg-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  border-radius: 12px;
}

.settings-window .game-seg-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 193, 7, 0.5);
}

.settings-window .game-seg-btn.active {
  background: #FFC107 !important;
  color: #1c1500 !important;
  border-color: #FFC107 !important;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 193, 7, 0.4);
}

.settings-window .setting-field-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
}

.settings-window .setting-field-card .field-title {
  color: #FFC107;
  font-size: 13.5px;
  font-weight: 800;
}

.settings-window .setting-field-card .field-title i {
  color: #FFC107 !important;
}

.settings-window .game-setting-select {
  background: rgba(16, 28, 48, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 12px;
}

.settings-window .game-setting-select:focus {
  border-color: #FFC107;
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.35);
}

.game-setting-select {
  width: 100%;
  height: 40px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  color: #0f172a;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  margin-top: 8px;
}

.game-setting-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.25);
}

.flow-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
}

.btn-settings-done {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.4);
  transition: transform 0.15s ease;
}

.btn-settings-done:hover {
  transform: translateY(-1px);
}

/* =====================================================================
   HOME PAGE 2-SECTION ARCHITECTURE (Section 1: Listing & Section 2: Settings)
   ===================================================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Home Page Sections Sticky Navigator */
.home-sections-nav {
  position: sticky;
  top: 68px;
  z-index: 90;
  max-width: 1400px;
  margin: 0 auto 28px;
  padding: 0 32px;
}

.home-sections-nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(6, 43, 48, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.sec-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.sec-nav-btn:hover {
  background: rgba(45, 212, 191, 0.08);
  color: #fff;
  border-color: rgba(45, 212, 191, 0.3);
}

.sec-nav-btn.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(6, 182, 212, 0.25));
  border-color: var(--teal-light);
  color: #fff;
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.25);
}

.sec-nav-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s;
}

.sec-nav-btn.active .sec-nav-badge {
  background: var(--teal-light);
  color: #022629;
  border-color: var(--teal-light);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.5);
}

.sec-nav-icon {
  font-size: 24px;
  line-height: 1;
}

.sec-nav-meta {
  display: flex;
  flex-direction: column;
}

.sec-nav-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.sec-nav-sub {
  font-size: 11px;
  color: var(--teal-light);
  opacity: 0.85;
}

/* Home Section Layout */
.home-section-container {
  max-width: 1400px;
  margin: 0 auto 56px;
  padding: 0 32px;
}

.home-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
  background: rgba(6, 43, 48, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}

.home-section-badge-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-section-badge-pill {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(45, 212, 191, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: var(--teal-light);
}

.home-section-badge-pill.settings-pill {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.4);
  color: var(--gold);
}

.home-section-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.home-section-subtitle {
  width: 100%;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: -6px;
}

.home-section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-jump-link {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--teal-light);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-jump-link:hover {
  background: var(--teal-light);
  color: #022629;
  border-color: var(--teal-light);
  box-shadow: 0 2px 10px rgba(45, 212, 191, 0.4);
}

.auto-save-pill {
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: pulse-subtle 2.5s infinite;
}

@keyframes pulse-subtle {

  0%,
  100% {
    opacity: 0.9;
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.3);
  }
}

/* Section 2 Settings Styles */
.settings-home-section {
  border-top: 1px solid rgba(23, 90, 99, 0.5);
  padding-top: 36px;
}

.home-settings-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.highlight-field-card {
  border-color: var(--teal-light) !important;
  background: linear-gradient(135deg, rgba(6, 43, 48, 0.9), rgba(10, 58, 64, 0.9)) !important;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.15);
}

/* Fallback Kiosk Fullscreen Mode */
body.kiosk-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  overflow: auto !important;
}

@media (max-width: 900px) {
  .home-sections-nav {
    padding: 0 16px;
  }

  .sec-nav-sub {
    display: none;
  }

  .sec-nav-title {
    font-size: 13px;
  }

  .home-section-container {
    padding: 0 16px;
  }

  .home-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-section-actions {
    width: 100%;
    justify-content: space-between;
  }

  .desktop-settings-two-col {
    grid-template-columns: 1fr !important;
  }

  .desktop-col-left {
    border-right: none !important;
    padding-right: 0 !important;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
  }
}

/* =====================================================================
   CLEAN & SPACIOUS STUDENT ARCADE DASHBOARD
   ===================================================================== */
.clean-lobby-container,
.kids-lobby-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 10px 15px 10px;
}

/* Compact Student Hero Banner */
.compact-hero-banner {
  background: linear-gradient(135deg, rgba(8, 48, 54, 0.9), rgba(4, 36, 40, 0.95));
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}

.hero-text-wrap h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  background: linear-gradient(90deg, #ffffff, #99f6e4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text-wrap p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-search-box {
  position: relative;
  min-width: 320px;
  max-width: 420px;
}

.hero-search-box .search-input {
  height: 48px;
  background: rgba(1, 20, 23, 0.85);
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 999px;
  padding: 0 42px 0 46px;
  font-size: 14px;
  color: #fff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.hero-search-box .search-input:focus {
  border-color: #2dd4bf;
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.45);
}

/* ================================================================== */
/* CREATIVE & MODERN TOP FILTER TOOLBAR (CREATIVE ARCADE HUB)        */
/* ================================================================== */
.top-filters-toolbar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 4px solid var(--primary);
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 28px -4px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* TOP ROW: SEARCH + SCOREBOARD HUD + CLASS TABS */
.top-filters-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* BRAND NEW ULTRA-MODERN 3D ARCADE SEARCH CAPSULE */
.kids-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 340px;
  max-width: 460px;
  height: 48px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  padding: 4px 8px 4px 6px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05), inset 0 1.5px 2px #ffffff;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.kids-search-box:hover {
  border-color: #818cf8;
  background: #ffffff;
  box-shadow: 0 6px 22px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.14);
  transform: translateY(-1px);
}

.kids-search-box:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.2), 0 8px 28px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.18);
  transform: translateY(-2px);
}

.kids-search-box .search-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kids-search-box:focus-within .search-icon {
  transform: scale(1.1) rotate(-8deg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 6px 18px rgba(67, 56, 202, 0.45);
}

.kids-search-box .search-input {
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  color: #0f172a !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 0 8px !important;
  margin: 0 !important;
}

.kids-search-box .search-input:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.kids-search-box .search-input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  font-size: 13.5px !important;
}

.search-shortcut-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 4px 9px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.5px;
  white-space: nowrap;
  pointer-events: none;
  margin-right: 6px;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.kids-search-box:focus-within .search-shortcut-badge {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.2);
}

.search-clear-btn {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #ef4444;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

.search-clear-btn:hover {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);


  margin-left: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

.search-clear-btn:hover {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
  transform: scale(1.12);
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
}

/* CLASS LEVEL SEGMENTED BAR */
.class-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.segmented-label {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.class-pills-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.class-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 7px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.class-pill:hover {
  color: var(--primary);
  background: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.12);
}

.class-pill.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.35) !important;
}

/* VIBRANT SUBJECT & MODE CATEGORY CHIPS */
.filter-pills-row {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;

}

.filter-pills-row::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 7px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.filter-pill .pill-icon {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.filter-pill:hover {
  color: #0f172a;
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.filter-pill:hover .pill-icon {
  transform: scale(1.2) rotate(4deg);
}

/* INDIVIDUAL CATEGORY GLOW THEMES FOR ACTIVE PILLS */
.filter-pill.active {
  color: #ffffff;
  font-weight: 700;
  border-color: transparent;
  transform: translateY(-1px);
}

.filter-pill.pill-all.active {
  background: linear-gradient(135deg, #0d9488, #0284c7);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}

.filter-pill.pill-maths.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.filter-pill.pill-science.active {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.filter-pill.pill-language.active {
  background: linear-gradient(135deg, #9333ea, #c084fc);
  box-shadow: 0 4px 16px rgba(192, 132, 252, 0.35);
}

.filter-pill.pill-team.active {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.filter-pill.pill-class.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.35);
}

.game-count-strip {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
}

/* Clean Games Grid */
.clean-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

@media (max-width: 768px) {
  .compact-hero-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }

  .hero-search-box {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
  }

  .clean-lobby-container {
    padding: 16px;
  }
}

/* =====================================================================
   TWO-COLUMN DASHBOARD LAYOUT: CARDS LEFT, SIDEBAR RIGHT
   ===================================================================== */
.dashboard-split-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
  align-items: start;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 10px 0 48px;
}

@media (max-width: 1100px) {
  .dashboard-split-layout {
    grid-template-columns: 1fr;
  }

  .lobby-right-sidebar {
    order: -1;
  }
}

/* Left Grid Section Header */
.lobby-grid-header {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  background-color: #ffffff;
  border-radius: 10px;
  padding: 10px 15px;
  margin-bottom: 20px;
  border-top: 4px solid var(--primary) !important;
  /* padding-bottom: 12px; */
  border-bottom: 1px solid #e2e8f0;
}

.lobby-grid-title-wrap {
  display: none;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.lobby-grid-filters-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  /* flex-wrap: wrap; */
}

.grid-section-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.grid-count-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-hover);
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  padding: 4px 12px;
  border-radius: 999px;
}

/* On Left Column, Game Grid strictly displays 5 columns on desktop */
.lobby-left-content .kids-games-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 1350px) {
  .lobby-left-content .kids-games-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .lobby-left-content .kids-games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .lobby-left-content .kids-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .lobby-left-content .kids-games-grid {
    grid-template-columns: 1fr;
  }
}

/* Right Sticky/Fixed Sidebar */
.lobby-right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 15px;
  align-self: start;
  max-height: calc(100vh - 30px);
  overflow-y: auto;
  padding-right: 4px;
  z-index: 20;
}

.lobby-right-sidebar::-webkit-scrollbar {
  width: 5px;
}

.lobby-right-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.lobby-right-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.lobby-right-sidebar::-webkit-scrollbar-thumb:hover {
  background: #818cf8;
}

/* =====================================================================
   CREATIVE & ULTRA-MODERN BASIC SETTINGS ARCADE CONTROL HUB
   ===================================================================== */
.sticky-settings-panel {
  background: #ffffff !important;
  border: 1.5px solid rgba(255, 193, 7, 0.3) !important;
  border-top: 4px solid #FFC107 !important;
  border-radius: 10px !important;
  padding: 18px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(20px) !important;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Panel Header Badge */
.panel-header-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1.5px solid rgba(255, 193, 7, 0.2);
}

.header-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-title-wrap .header-icon {
  font-size: 20px;
}

.header-title-wrap .widget-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.header-title-wrap .panel-subtitle {
  font-size: 10.5px;
  font-weight: 700;
  color: #d97706;
  display: block;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.live-status-dot {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981, 0 0 4px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

/* Settings Subcards (Grouped Sections) */
.settings-subcard {
/*  background: rgba(var(--theme-primary-rgb, 83, 162, 170), 0.03);
  border: 1px solid rgba(var(--theme-primary-rgb, 83, 162, 170), 0.18);
  border-radius: 14px;
  padding: 12px 14px;*/
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
}

.settings-subcard:hover {
/*  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.12);*/
}

.subcard-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.subcard-icon {
  font-size: 13px;
}

.subcard-title {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Field Labels */
.field-label-small {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* Segmented Button Groups */
.game-seg-btn-group {
  display: flex;
  gap: 4px;
  background: #e2e8f0;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
}

.game-seg-btn-group .game-seg-btn {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: #475569;
  font-family: 'Poppins', sans-serif;
  font-size: 10.5px;
  /* font-weight: 700; */

  justify-content: center;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.game-seg-btn-group .game-seg-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

.game-seg-btn-group .game-seg-btn.active {
  background: #FFC107 !important;
  color: #1c1500 !important;
  font-weight: 800;
  border-color: #FFC107 !important;
  box-shadow: 0 3px 10px rgba(255, 193, 7, 0.4);
}

/* Color Coded Difficulty Segments */
.level-seg-group .game-seg-btn.level-easy.active {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #ffffff;

  justify-content: center;
}

.level-seg-group .game-seg-btn.level-med.active {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;

}

.level-seg-group .game-seg-btn.level-hard.active {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #ffffff;

}

/* Sound & Score Toggle Buttons (Modern UI) */
.sidebar-setting-field.row-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(var(--theme-primary-rgb, 83, 162, 170), 0.03);
  border: 1px solid rgba(var(--theme-primary-rgb, 83, 162, 170), 0.18);
  border-radius: 12px;
  padding: 7px 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-setting-field.row-flex:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.12);
  transform: translateY(-1px);
}

.sidebar-setting-field.row-flex .field-label-small {
  font-size: 10.5px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border: 1px solid rgba(var(--theme-primary-rgb, 83, 162, 170), 0.3);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 3px 12px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.28);
}

.sidebar-toggle-btn:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  color: #ffffff;
  border-color: var(--primary-hover);
  box-shadow: 0 5px 16px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.42);
  transform: scale(1.03) translateY(-1px);
}

.sidebar-toggle-btn.muted,
.sidebar-toggle-btn.is-muted {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.28);
}

.sidebar-toggle-btn.danger {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

.sidebar-toggle-btn.danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border-color: #b91c1c;
  box-shadow: 0 5px 16px rgba(220, 38, 38, 0.4);
  transform: scale(1.03) translateY(-1px);
}

/* Team Input Styling */
.team-label {
  font-size: 11px;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 2px;
  display: block;
}

.team-label.gold {
  color: #d97706;
}

.team-label.blue {
  color: #2563eb;
}

.sidebar-input-text.team-input {
  width: 100%;
  height: 36px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  transition: all 0.25s ease;
}

.sidebar-input-text.gold-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

/* Sidebar Select & Text Input Styling */
select.sidebar-input-text,
input.sidebar-input-text {
  width: 100%;
  height: 36px;
  background: #ffffff;
  border: 1.5px solid rgba(var(--theme-primary-rgb, 83, 162, 170), 0.25);
  border-radius: 10px;
  padding: 0 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  transition: all 0.25s ease;
}

select.sidebar-input-text {
  padding-right: 36px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23478c94' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

select.sidebar-input-text:focus,
select.sidebar-input-text:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(var(--theme-primary-rgb, 83, 162, 170), 0.25);
}

.team-label.green {
  color: #10b981;
}

.team-label.red {
  color: #ef4444;
}

.sidebar-input-text.green-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.sidebar-input-text.red-input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

/* Auto Save Pill */
.auto-save-pill {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

/* Sidebar Team Score Display Badge (Non-button Badge Display) */
.sidebar-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.04);
}

.sidebar-score-badge .score-item.gold {
  color: #d97706;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-score-badge .score-item.gold strong {
  font-size: 14px;
  font-weight: 800;
  color: #b45309;
}

.sidebar-score-badge .score-divider {
  color: #94a3b8;
  font-weight: 800;
  margin: 0 2px;
}

.sidebar-score-badge .score-item.blue {
  color: #2563eb;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-score-badge .score-item.blue strong {
  font-size: 14px;
  font-weight: 800;
  color: #1d4ed8;
}

/* ========================================================================== */
/* IN-GAME STAGE CLEANUP: HIDE TOPBAR ACROSS ALL GAMES                        */
/* ========================================================================== */
.topbar,
header.topbar,
#stage .topbar,
body .topbar,
div.topbar {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ========================================================================== */
/* GAME-SPECIFIC PARTICULAR SETTINGS CARD IN MODAL                            */
/* ========================================================================== */
.particular-game-settings-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 193, 7, 0.35);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255, 193, 7, 0.05);
  transition: all 0.3s ease;
}

.particular-game-settings-card .particular-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.particular-game-settings-card .particular-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.particular-game-settings-card .particular-icon {
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.25), rgba(16, 28, 48, 0.6));
  border: 1px solid rgba(255, 193, 7, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.particular-game-settings-card .particular-title {
  font-family: 'Fredoka', 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.particular-game-settings-card .particular-subtitle {
  font-size: 11px;
  font-weight: 700;
  color: #FFC107;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.particular-game-settings-card .particular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.particular-field {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.particular-field label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.particular-field select,
.particular-field input[type="text"],
.particular-field input[type="number"] {
  width: 100%;
  background: rgba(30, 41, 59, 0.9);
  border: 1.5px solid rgba(255, 193, 7, 0.4);
  border-radius: 10px;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.particular-field select:focus,
.particular-field input[type="text"]:focus,
.particular-field input[type="number"]:focus {
  border-color: #FFC107;
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.4);
}

.particular-field select option {
  background: #0f172a;
  color: #ffffff;
}