/* ========== VARIABLES ========== */
:root {
  --teal: #00e5ff;
  --teal-dark: #00b8d4;
  --teal-light: #0a1628;
  --pink: #ff2d78;
  --neon: #00e5ff;
  --neon2: #7c3aed;
  --gold: #ffd700;
  --kids-color: #f59e0b;
  --kids-light: #1a1200;
  --kids-dark: #d97706;
  --adult-color: #ef4444;
  --adult-light: #1a0606;
  --adult-dark: #dc2626;
  --bg: #060b14;
  --surface: #0d1627;
  --surface2: #111d30;
  --border: #1e3a5f;
  --text: #e2eaf5;
  --text2: #8ba8c8;
  --muted: #4a6a8a;
  --nav-h: 62px;
  --sidebar-w: 230px;
  --sidebar-collapsed-w: 14px;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,229,255,0.08);
  --shadow-lg: 0 8px 40px rgba(0,229,255,0.18);
  --bnav-h: 64px;
  --glow: 0 0 20px rgba(0,229,255,0.35);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  padding-bottom: var(--bnav-h);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(0,229,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 0%, rgba(124,58,237,0.06) 0%, transparent 50%);
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========== TOPNAV ========== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 11, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,229,255,0.15);
  box-shadow: 0 2px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,229,255,0.05);
}

.topnav-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: var(--nav-h);
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #00e5ff22, #7c3aed33);
  border: 1px solid rgba(0,229,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(0,229,255,0.2);
  flex-shrink: 0;
}

.logo-icon ion-icon {
  font-size: 20px;
  color: var(--neon);
}

.logo-icon.sm {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.logo-icon.sm ion-icon {
  font-size: 16px;
}

.logo-text {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 1px;
  white-space: nowrap;
}

.logo-accent {
  color: var(--neon);
  text-shadow: 0 0 12px rgba(0,229,255,0.7);
}

.search-wrap {
  flex: 1;
  min-width: 0;
  max-width: 500px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid transparent;
  border-radius: 50px;
  padding: 7px 14px;
  transition: all 0.22s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

.search-box:focus-within {
  border-color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.search-box ion-icon {
  color: var(--muted);
  font-size: 17px;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--muted);
  font-weight: 500;
}

.search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  flex-shrink: 0;
}

.search-clear:hover {
  color: var(--pink);
}

.topnav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
}

.theme-toggle ion-icon {
  font-size: 16px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
}

.nav-btn ion-icon {
  font-size: 18px;
}

.burger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

/* ========== LAYOUT & SIDEBAR ========== */
.layout-body {
  display: flex;
  flex: 1;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.pc-sidebar {
  display: none;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  flex-shrink: 0;
  width: var(--sidebar-collapsed-w);
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
  z-index: 50;
}

.sidebar-trigger {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-collapsed-w);
  background: linear-gradient(180deg, var(--teal) 0%, var(--teal-dark) 100%);
  cursor: pointer;
  z-index: 2;
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.32s;
  border-radius: 0 6px 6px 0;
}

.sidebar-toggle-btn {
  position: absolute;
  top: 50%;
  left: calc(var(--sidebar-collapsed-w) / 2);
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--teal);
  box-shadow: 0 2px 10px rgba(0, 180, 160, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.sidebar-toggle-btn span {
  font-size: 16px;
  font-weight: 900;
  color: var(--teal-dark);
}

.sidebar-toggle-btn .icon-open {
  display: flex;
}

.sidebar-toggle-btn .icon-close {
  display: none;
}

.sidebar-panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 2px solid var(--border);
  box-shadow: 4px 0 24px rgba(0, 180, 160, 0.12);
  overflow-y: auto;
  transform: translateX(calc(-1 * var(--sidebar-w) + var(--sidebar-collapsed-w)));
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 12px 12px 0;
}

.pc-sidebar:hover .sidebar-panel {
  transform: translateX(0);
}

.pc-sidebar:hover .sidebar-trigger {
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.pc-sidebar:hover .sidebar-toggle-btn {
  left: var(--sidebar-w);
}

.pc-sidebar:hover .sidebar-toggle-btn .icon-open {
  display: none;
}

.pc-sidebar:hover .sidebar-toggle-btn .icon-close {
  display: flex;
}

.sidebar-inner {
  padding: 16px 10px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: var(--sidebar-w);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-label {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.18s;
  white-space: nowrap;
}

.sidebar-item ion-icon {
  font-size: 18px;
  color: var(--teal);
  flex-shrink: 0;
}

.sidebar-item:hover {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.sidebar-item.active {
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 900;
  box-shadow: inset 3px 0 0 var(--teal);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 6px;
}

/* ========== MAIN CONTENT ========== */
.main {
  flex: 1;
  min-width: 0;
  padding: 0 16px 32px;
}

.home-row {
  margin-bottom: 28px;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.row-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

.row-title ion-icon {
  color: var(--teal);
  font-size: 19px;
}

.row-seeall {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 2px solid var(--teal);
  border-radius: 50px;
  color: var(--teal-dark);
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  padding: 5px 12px;
  transition: all 0.2s;
  white-space: nowrap;
}

.row-seeall:hover {
  background: var(--teal);
  color: #fff;
}

.row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.games-header h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.35rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.games-header h2 ion-icon {
  color: var(--teal);
  font-size: 20px;
}

.game-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--teal-light);
  border-radius: 50px;
  padding: 4px 12px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
}

/* ========== GAME CARD ========== */
.game-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}

.game-img-wrap {
  position: relative;
  overflow: hidden;
  padding-top: 100%;
  background: linear-gradient(135deg, #e0fffe, #b2f0ec);
}

.game-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10px;
  transition: transform 0.32s ease;
}

.game-img-wrap img.game-art-local {
  object-fit: contain;
  object-position: center;
  padding: 8px;
}

.game-img-wrap img.game-art-partner {
  object-fit: cover;
  object-position: center;
  padding: 0;
}

.game-card:hover .game-img-wrap img {
  transform: scale(1.07);
}

.game-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.cat-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 50px;
  color: #fff;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.22s;
}

.game-card:hover .play-overlay {
  opacity: 1;
}

.play-circle {
  width: 46px;
  height: 46px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: var(--teal-dark);
  transform: scale(0.7);
  transition: transform 0.22s;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.game-card:hover .play-circle {
  transform: scale(1);
}

.fav-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 4;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
  opacity: 0;
}

.game-card:hover .fav-btn {
  opacity: 1;
}

.fav-btn.fav-active {
  opacity: 1;
  background: rgba(225, 29, 72, 0.85);
}

.game-info {
  padding: 9px 11px 11px;
}

.game-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-genre {
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-stars {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #f59e0b;
}

/* ========== MODAL ========== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 40, 38, 0.7);
  backdrop-filter: blur(16px);
  justify-content: center;
  align-items: center;
  padding: 12px;
}

.modal.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: min(1500px, 98vw);
  height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.modal-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

.modal-thumb {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
}

.modal-meta {
  flex: 1;
}

.modal-meta h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: var(--text);
}

.modal-cat {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--teal-dark);
  text-transform: uppercase;
}

.modal-actions {
  display: flex;
  gap: 6px;
}

.modal-fs,
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  flex: 1;
  overflow: hidden;
  background: #0b1110;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  background: #fff;
}

.game-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    radial-gradient(circle at top, rgba(255, 215, 0, 0.12), transparent 30%),
    rgba(11, 17, 16, 0.94);
  color: #fff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.game-loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.game-loading-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: #2dd4bf;
  animation: gameSpin 0.9s linear infinite;
}

.game-loading-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.25rem;
}

.game-loading-sub {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

@keyframes gameSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ========== AUTH MODAL - GOOGLE ONLY ========== */
.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 30, 28, 0.75);
  backdrop-filter: blur(18px);
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.auth-modal.open {
  display: flex;
}

.auth-box {
  background: #fff;
  border-radius: 28px;
  width: 100%;
  max-width: 400px;
  padding: 32px 28px 36px;
  position: relative;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}

.auth-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--teal-dark), var(--pink));
  border-radius: 28px 28px 0 0;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--teal-light);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-dark);
}

.auth-close:hover {
  background: var(--teal);
  color: #fff;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-icon ion-icon {
  font-size: 24px;
  color: #fff;
}

.auth-logo-text {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  color: var(--text);
}

.auth-logo-accent {
  color: var(--teal);
}

.auth-sub {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.google-only-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 50px;
  background: #fff;
  color: #444;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid #ddd;
  transition: all 0.25s;
}

.google-only-btn:hover {
  border-color: var(--teal);
  background: var(--teal-light);
  transform: translateY(-2px);
}

.google-only-btn ion-icon {
  font-size: 20px;
  color: #ea4335;
}

.auth-divider {
  margin: 28px 0 16px;
  color: var(--muted);
  font-size: 0.7rem;
}

.auth-switch {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.auth-error {
  margin-top: 20px;
  padding: 10px;
  border-radius: 12px;
  background: #ffe4ec;
  color: #b5004d;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-success {
  text-align: center;
}

.success-icon ion-icon {
  font-size: 64px;
  color: var(--teal);
  margin-bottom: 12px;
}

.auth-success h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 6px;
}

/* ========== PROFILE PAGE ========== */
.user-page-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 20px;
  background: linear-gradient(135deg, #6366f1, var(--teal));
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 20px;
}

.uph-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 3px solid rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 2.2rem;
  color: #fff;
}

.uph-name {
  font-family: 'Fredoka One', cursive;
  font-size: 1.7rem;
  color: #fff;
}

.uph-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
}

.uph-stats {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.uph-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.uph-stat-val {
  font-family: 'Fredoka One', cursive;
  font-size: 1.35rem;
  color: #fff;
}

.uph-stat-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
}

.up-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  margin: 20px 0 12px;
}

/* ========== SETTINGS PAGE ========== */
.settings-body {
  max-width: 600px;
}

.settings-group {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
}

.settings-group-title {
  font-size: 0.66rem;
  font-weight: 900;
  padding: 11px 16px 8px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.sr-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
}

.sr-val {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}

.sr-btn {
  padding: 7px 14px;
  border-radius: 50px;
  border: 2px solid var(--teal);
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 800;
  cursor: pointer;
}

.sr-btn.danger {
  border-color: #e11d48;
  background: #ffe4ec;
  color: #e11d48;
}

/* ========== BOTTOM NAV & DRAWER ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--bnav-h);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(240, 255, 254, 0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 200, 176, 0.2);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(0, 80, 70, 0.45);
  font-family: 'Nunito', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 6px 0;
}

.bnav-item ion-icon {
  font-size: 22px;
}

.bnav-item.active {
  color: var(--teal-dark);
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 40, 38, 0.5);
  backdrop-filter: blur(4px);
}

.drawer-overlay.open {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  left: -100%;
  z-index: 300;
  width: min(280px, 85vw);
  height: 100vh;
  background: #fff;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  transition: left 0.32s;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  left: 0;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--teal);
  color: #fff;
}

.drawer-head .logo {
  cursor: pointer;
}

.drawer-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

.drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text2);
  font-weight: 700;
}

.drawer-item ion-icon {
  font-size: 18px;
  color: var(--teal);
}

.drawer-item:hover,
.drawer-item.active {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.drawer-divider {
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px 6px;
}

.drawer-theme-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text2);
  font-weight: 700;
}

.drawer-theme-item:hover {
  background: var(--teal-light);
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.user-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffd700;
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.profile-dropdown {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border-radius: 18px;
  min-width: 210px;
  box-shadow: 0 16px 50px rgba(0, 40, 38, 0.22);
  border: 1.5px solid var(--border);
  padding: 6px;
}

.pd-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.pd-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
}

.pd-name {
  font-weight: 900;
  color: var(--text);
}

.pd-tag {
  font-size: 0.7rem;
  color: var(--teal-dark);
}

.pd-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.pd-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  background: none;
  border: none;
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--text2);
  cursor: pointer;
}

.pd-item:hover {
  background: var(--teal-light);
}

.pd-logout {
  color: #e11d48;
}

.pd-logout ion-icon {
  color: #e11d48;
}

/* ========== COOKIE BANNER ========== */
.cookie-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: calc(var(--bnav-h) + 16px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1.5px solid rgba(0, 199, 176, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(0, 199, 176, 0.16), rgba(255, 61, 127, 0.08)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 48px rgba(15, 44, 42, 0.18);
  backdrop-filter: blur(14px);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-copy {
  max-width: 760px;
}

.cookie-banner-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.cookie-banner-text {
  color: var(--text2);
  line-height: 1.55;
  font-size: 0.92rem;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.cookie-btn:hover {
  transform: translateY(-2px);
}

.cookie-btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 167, 150, 0.22);
}

.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border: 1.5px solid rgba(0, 199, 176, 0.16);
}

/* ========== ABOUT PAGE ========== */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 18px;
  margin-bottom: 20px;
}

.about-copy,
.about-highlight,
.about-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.about-copy {
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(0, 199, 176, 0.15), rgba(59, 130, 246, 0.08)),
    var(--surface);
}

.about-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 167, 150, 0.12);
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.about-copy h2 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.12;
  margin-bottom: 10px;
}

.about-copy p,
.about-highlight p,
.about-card p {
  color: var(--text2);
  line-height: 1.65;
}

.about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.about-chips span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 199, 176, 0.12);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.about-highlight {
  padding: 24px;
  background: linear-gradient(180deg, rgba(0, 199, 176, 0.1), rgba(255, 215, 0, 0.06)), var(--surface);
}

.about-highlight-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  font-size: 26px;
}

.about-highlight h3,
.about-card h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.18rem;
  margin: 16px 0 8px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.about-card {
  padding: 22px;
}

/* ========== CONTACT PAGE ========== */
.contact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 18px;
  margin-bottom: 20px;
}

.contact-copy,
.contact-card,
.contact-form,
.contact-info-panel {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.contact-copy {
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(0, 199, 176, 0.16), rgba(255, 61, 127, 0.08)),
    var(--surface);
}

.contact-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 167, 150, 0.12);
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.contact-copy h2 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.12;
  margin-bottom: 10px;
}

.contact-copy p {
  color: var(--text2);
  font-size: 0.98rem;
  max-width: 640px;
}

.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.contact-chips span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 199, 176, 0.12);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.contact-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 199, 176, 0.1), rgba(255, 61, 127, 0.05)), var(--surface);
}

.contact-card-icon,
.contact-info-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  font-size: 24px;
  flex-shrink: 0;
}

.contact-card h3,
.contact-info-block h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  margin: 16px 0 8px;
}

.contact-card p,
.contact-info-block p {
  color: var(--text2);
  line-height: 1.6;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.85fr);
  gap: 18px;
}

.contact-form {
  padding: 24px;
}

.contact-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.contact-field span {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-field textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 199, 176, 0.12);
  transform: translateY(-1px);
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.contact-submit-btn,
.footer-contact-link {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.contact-submit-btn {
  padding: 13px 22px;
  box-shadow: 0 12px 24px rgba(0, 167, 150, 0.2);
}

.contact-submit-btn:hover,
.footer-contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 167, 150, 0.24);
}

.contact-status {
  min-height: 22px;
  color: var(--teal-dark);
  font-size: 0.83rem;
  font-weight: 800;
}

.contact-status.error {
  color: #e11d48;
}

.contact-status.success {
  color: #15803d;
}

.contact-info-panel {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface2);
}

/* ========== PRIVACY POLICY PAGE ========== */
.privacy-hero {
  margin-bottom: 18px;
}

.privacy-copy {
  padding: 28px;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(0, 199, 176, 0.16), rgba(59, 130, 246, 0.08)),
    var(--surface);
  box-shadow: var(--shadow);
}

.privacy-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 167, 150, 0.12);
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.privacy-copy h1,
.privacy-card h3 {
  font-family: 'Fredoka One', cursive;
  margin: 0 0 10px;
}

.privacy-copy h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.12;
}

.privacy-copy p {
  color: var(--text2);
  font-size: 0.98rem;
  max-width: 820px;
}

.privacy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.privacy-meta span {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(0, 199, 176, 0.12);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.privacy-card {
  padding: 22px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.privacy-card p,
.privacy-card li {
  color: var(--text2);
  line-height: 1.65;
}

.privacy-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.privacy-callout {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  background: rgba(0, 199, 176, 0.08);
  border-radius: 14px;
  color: var(--text);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--teal-dark);
  padding: 18px 20px;
  margin-top: 12px;
}

.footer-inner {
  max-width: 1800px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 600;
}

.footer-contact-link {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
  color: #fff;
}

/* ========== DARK MODE STYLES ========== */
body.dark-mode {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #334155;
  --border: #475569;
  --text: #f1f5f9;
  --text2: #cbd5e1;
  --muted: #94a3b8;
  --teal-light: #1a4a44;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.dark-mode .game-card {
  background: var(--surface);
  border-color: #334155;
}

body.dark-mode .sidebar-panel {
  background: #1e293b;
  border-right-color: #334155;
}

body.dark-mode .drawer {
  background: #1e293b;
}

body.dark-mode .drawer-item {
  color: #cbd5e1;
}

body.dark-mode .auth-box {
  background: #1e293b;
}

body.dark-mode .auth-box .auth-logo-text,
body.dark-mode .auth-box h3 {
  color: #f1f5f9;
}

body.dark-mode .settings-group {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .search-box {
  background: #334155;
}

body.dark-mode .search-box input {
  color: #f1f5f9;
}

body.dark-mode .search-box input::placeholder {
  color: #94a3b8;
}

body.dark-mode .modal-box {
  background: #1e293b;
}

body.dark-mode .modal-hdr {
  background: #334155;
  border-bottom-color: #475569;
}

body.dark-mode .modal-meta h3 {
  color: #f1f5f9;
}

body.dark-mode .pd-item {
  color: #cbd5e1;
}

body.dark-mode .pd-item:hover {
  background: #334155;
}

body.dark-mode .profile-dropdown {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .pd-name {
  color: #f1f5f9;
}

body.dark-mode .contact-copy,
body.dark-mode .contact-card,
body.dark-mode .contact-form,
body.dark-mode .contact-info-panel,
body.dark-mode .about-copy,
body.dark-mode .about-highlight,
body.dark-mode .about-card,
body.dark-mode .privacy-copy,
body.dark-mode .privacy-card {
  background-color: var(--surface);
  border-color: #334155;
}

body.dark-mode .about-copy {
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(0, 199, 176, 0.18), rgba(59, 130, 246, 0.08)),
    var(--surface);
}

body.dark-mode .about-highlight {
  background: linear-gradient(180deg, rgba(0, 199, 176, 0.12), rgba(255, 215, 0, 0.06)), var(--surface);
}

body.dark-mode .contact-copy {
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(0, 199, 176, 0.18), rgba(255, 61, 127, 0.08)),
    var(--surface);
}

body.dark-mode .contact-card {
  background: linear-gradient(180deg, rgba(0, 199, 176, 0.16), rgba(255, 61, 127, 0.06)), var(--surface);
}

body.dark-mode .cookie-banner {
  border-color: rgba(77, 209, 196, 0.2);
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(0, 199, 176, 0.18), rgba(255, 61, 127, 0.08)),
    rgba(10, 29, 28, 0.92);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

body.dark-mode .cookie-banner-text {
  color: #b7d8d4;
}

body.dark-mode .cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #eefcfa;
  border-color: rgba(77, 209, 196, 0.18);
}

body.dark-mode .contact-field input,
body.dark-mode .contact-field textarea,
body.dark-mode .contact-info-block {
  background: #334155;
  border-color: #475569;
}

body.dark-mode .contact-chips span {
  background: rgba(30, 41, 59, 0.88);
  border-color: #334155;
}

body.dark-mode .privacy-meta span {
  background: rgba(30, 41, 59, 0.88);
  border-color: #334155;
  color: #f8fafc;
}

body.dark-mode .privacy-callout {
  background: rgba(0, 199, 176, 0.12);
  color: #e2e8f0;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 1024px) {
  .pc-sidebar {
    display: block;
  }
  .bottom-nav {
    display: none;
  }
  body {
    padding-bottom: 0;
  }
  .main {
    padding: 16px 28px 40px;
    margin-left: var(--sidebar-collapsed-w);
  }
}

@media (max-width: 640px) {
  .topnav-right .theme-toggle span {
    display: none;
  }
  .topnav-right .theme-toggle {
    padding: 7px 10px;
  }
  .topnav-right {
    display: none;
  }
  .burger {
    display: flex;
  }
  .about-hero,
  .about-grid,
  .contact-hero,
  .contact-layout,
  .contact-field-grid,
  .privacy-grid {
    grid-template-columns: 1fr;
  }
  .about-copy,
  .about-highlight,
  .contact-copy,
  .contact-card,
  .contact-form,
  .contact-info-panel,
  .privacy-copy,
  .privacy-card {
    padding: 20px;
  }
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: calc(var(--bnav-h) + 12px);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .cookie-banner-actions {
    width: 100%;
  }
  .cookie-btn {
    flex: 1;
  }
  .contact-submit-btn,
  .footer-contact-link {
    width: 100%;
  }
  .modal {
    padding: 8px;
  }
  .modal-box {
    height: 94vh;
    border-radius: 16px;
  }
  .modal-hdr {
    padding: 8px 12px;
  }
  .modal-thumb {
    width: 32px;
    height: 32px;
  }
  .row-grid,
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* =============================================
   GAMENXG — DARK FUTURISTIC REDESIGN OVERRIDE
   ============================================= */

/* SEARCH BOX DARK */
.search-box {
  background: rgba(13, 22, 39, 0.9) !important;
  border: 1.5px solid rgba(0,229,255,0.2) !important;
  box-shadow: 0 0 0 0 transparent !important;
}
.search-box:focus-within {
  border-color: rgba(0,229,255,0.6) !important;
  box-shadow: 0 0 0 3px rgba(0,229,255,0.1) !important;
}
.search-box ion-icon { color: var(--neon) !important; }
.search-box input { color: var(--text) !important; }
.search-box input::placeholder { color: var(--muted) !important; }

/* NAV BUTTONS DARK */
.theme-toggle, .nav-btn {
  border: 1.5px solid rgba(0,229,255,0.25) !important;
  background: rgba(0,229,255,0.07) !important;
  color: var(--text) !important;
  transition: all 0.2s !important;
}
.theme-toggle:hover, .nav-btn:hover {
  background: rgba(0,229,255,0.15) !important;
  border-color: var(--neon) !important;
  box-shadow: 0 0 12px rgba(0,229,255,0.2) !important;
  color: var(--neon) !important;
}

/* SIDEBAR DARK */
.sidebar-trigger {
  background: linear-gradient(180deg, var(--neon) 0%, var(--teal-dark) 100%) !important;
}
.sidebar-toggle-btn {
  background: var(--surface) !important;
  border-color: var(--neon) !important;
  box-shadow: 0 0 12px rgba(0,229,255,0.3) !important;
}
.sidebar-toggle-btn span { color: var(--neon) !important; }
.sidebar-panel {
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
  box-shadow: 4px 0 30px rgba(0,0,0,0.5) !important;
}
.sidebar-item:hover {
  background: rgba(0,229,255,0.08) !important;
  color: var(--neon) !important;
}
.sidebar-item.active {
  background: rgba(0,229,255,0.12) !important;
  color: var(--neon) !important;
  box-shadow: inset 3px 0 0 var(--neon) !important;
}
.sidebar-item ion-icon { color: var(--neon) !important; }
.sidebar-divider { background: var(--border) !important; }

/* MAIN AREA */
.main {
  background: transparent !important;
  padding: 16px 20px 40px !important;
}

/* ===== VIRAL GAMES HERO SECTION ===== */
.viral-hero {
  margin-bottom: 32px;
  position: relative;
}

.viral-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 10px;
  padding: 4px 12px;
  border: 1px solid rgba(0,229,255,0.3);
  border-radius: 50px;
  background: rgba(0,229,255,0.07);
}

.viral-hero-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.viral-hero-title span.fire {
  font-size: 1.8rem;
}

.viral-scroll-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.viral-scroll-track::-webkit-scrollbar { display: none; }

.viral-card {
  flex-shrink: 0;
  width: 200px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1.5px solid rgba(0,229,255,0.12);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s, border-color 0.25s;
  animation: viralCardIn 0.5s ease both;
}
.viral-card:nth-child(1) { animation-delay: 0.0s; }
.viral-card:nth-child(2) { animation-delay: 0.06s; }
.viral-card:nth-child(3) { animation-delay: 0.12s; }
.viral-card:nth-child(4) { animation-delay: 0.18s; }
.viral-card:nth-child(5) { animation-delay: 0.24s; }
.viral-card:nth-child(6) { animation-delay: 0.30s; }
.viral-card:nth-child(7) { animation-delay: 0.36s; }
.viral-card:nth-child(8) { animation-delay: 0.42s; }
@keyframes viralCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.viral-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 12px 40px rgba(0,229,255,0.22), 0 0 0 1.5px var(--neon);
  border-color: var(--neon);
}

.viral-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.viral-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.viral-card:hover .viral-img-wrap img {
  transform: scale(1.08);
}
.viral-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: 'Fredoka One', cursive;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #ff2d78, #ff6b35);
  color: #fff;
  border-radius: 8px;
  padding: 2px 9px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(255,45,120,0.4);
}
.viral-rank.top3 {
  background: linear-gradient(135deg, var(--gold), #ff9a00);
  box-shadow: 0 2px 8px rgba(255,215,0,0.5);
  color: #1a0a00;
}
.viral-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s;
  z-index: 3;
}
.viral-card:hover .viral-play-overlay { opacity: 1; }
.viral-play-circle {
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: #060b14;
  transform: scale(0.7);
  transition: transform 0.22s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.viral-card:hover .viral-play-circle { transform: scale(1); }
.viral-info {
  padding: 10px 12px 12px;
}
.viral-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.viral-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
}
.viral-cat {
  font-weight: 700;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 50px;
  background: rgba(0,229,255,0.1);
  color: var(--neon);
}
.viral-stars {
  display: flex; align-items: center; gap: 3px;
  font-weight: 700;
  color: var(--gold);
}
.viral-stars ion-icon { font-size: 12px; }

/* HOT BADGE */
.hot-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.6rem; font-weight: 900;
  letter-spacing: 1px; text-transform: uppercase;
  background: linear-gradient(135deg, #ff2d78, #ff6b35);
  color: #fff; border-radius: 50px;
  padding: 2px 8px;
  position: absolute; top: 8px; right: 8px; z-index: 2;
}

/* ===== ROW SECTION REDESIGN ===== */
.home-row {
  margin-bottom: 32px;
  position: relative;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.row-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.15rem;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.row-title ion-icon { color: var(--neon) !important; font-size: 20px; }

.row-seeall {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(0,229,255,0.07) !important;
  border: 1.5px solid rgba(0,229,255,0.25) !important;
  border-radius: 50px !important;
  color: var(--neon) !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  padding: 5px 14px !important;
  transition: all 0.2s !important;
}
.row-seeall:hover {
  background: rgba(0,229,255,0.15) !important;
  border-color: var(--neon) !important;
  box-shadow: 0 0 12px rgba(0,229,255,0.2) !important;
}

.row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

/* ===== GAME CARD REDESIGN ===== */
.game-card {
  background: var(--surface) !important;
  border-radius: 12px !important;
  border: 1.5px solid rgba(30,58,95,0.7) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s, border-color 0.25s !important;
}
.game-card:hover {
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: 0 10px 35px rgba(0,229,255,0.2), 0 0 0 1.5px var(--neon) !important;
  border-color: var(--neon) !important;
}

.game-img-wrap {
  background: linear-gradient(135deg, #0d1627, #111d30) !important;
}

.play-circle {
  background: rgba(0,229,255,0.95) !important;
  color: #060b14 !important;
}

.game-title {
  color: var(--text) !important;
  font-size: 0.84rem !important;
}

.game-stars {
  color: var(--gold) !important;
  font-weight: 700 !important;
}
.game-stars ion-icon { color: var(--gold) !important; }

.cat-badge {
  font-size: 0.55rem !important;
  font-weight: 900 !important;
}

/* ===== SECTION TITLES ===== */
.games-header h2 {
  color: #fff !important;
}
.games-header h2 ion-icon { color: var(--neon) !important; }
.game-count {
  background: rgba(0,229,255,0.1) !important;
  color: var(--neon) !important;
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(6,11,20,0.95) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--muted) !important;
}
.footer-contact-link {
  color: var(--muted) !important;
  border-color: var(--border) !important;
}
.footer-contact-link:hover {
  background: rgba(0,229,255,0.08) !important;
  color: var(--neon) !important;
  border-color: var(--neon) !important;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  background: rgba(6,11,20,0.97) !important;
  border-top: 1px solid var(--border) !important;
  backdrop-filter: blur(16px) !important;
}
.bnav-item {
  color: var(--muted) !important;
}
.bnav-item.active, .bnav-item:hover {
  color: var(--neon) !important;
}
.bnav-item.active ion-icon { color: var(--neon) !important; }

/* ===== MODAL ===== */
.modal-box {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7) !important;
}
.modal-hdr {
  background: var(--surface2) !important;
  border-bottom: 1px solid var(--border) !important;
}
.modal-meta h3 { color: var(--text) !important; }
.modal-close, .modal-fs {
  background: rgba(255,255,255,0.05) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}
.modal-close:hover, .modal-fs:hover {
  background: rgba(0,229,255,0.15) !important;
  color: var(--neon) !important;
  border-color: var(--neon) !important;
}
.modal-cat {
  background: rgba(0,229,255,0.12) !important;
  color: var(--neon) !important;
}

/* ===== AUTH MODAL ===== */
.auth-box {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,229,255,0.1) !important;
}
.auth-logo-text { color: #fff !important; }
.auth-logo-accent { color: var(--neon) !important; text-shadow: 0 0 10px rgba(0,229,255,0.5) !important; }
.auth-sub { color: var(--muted) !important; }
.auth-logo-icon {
  background: linear-gradient(135deg, rgba(0,229,255,0.15), rgba(124,58,237,0.15)) !important;
  border: 1px solid rgba(0,229,255,0.3) !important;
}
.auth-logo-icon ion-icon { color: var(--neon) !important; }
.google-only-btn {
  background: rgba(255,255,255,0.06) !important;
  border: 1.5px solid rgba(255,255,255,0.15) !important;
  color: #fff !important;
}
.google-only-btn:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.3) !important;
}
.auth-switch { color: var(--muted) !important; }

/* ===== DRAWER ===== */
.drawer {
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
}
.drawer-head {
  border-bottom: 1px solid var(--border) !important;
}
.drawer-item {
  color: var(--text2) !important;
}
.drawer-item:hover {
  background: rgba(0,229,255,0.08) !important;
  color: var(--neon) !important;
}
.drawer-close {
  background: rgba(255,255,255,0.05) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

/* ===== SETTINGS ===== */
.settings-group {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}
.settings-group-title { color: var(--neon) !important; }
.sr-label { color: var(--muted) !important; }
.sr-val { color: var(--text) !important; }
.sr-btn {
  background: rgba(0,229,255,0.1) !important;
  border: 1px solid rgba(0,229,255,0.25) !important;
  color: var(--neon) !important;
}
.sr-btn:hover {
  background: rgba(0,229,255,0.2) !important;
}
.sr-btn.danger {
  background: rgba(239,68,68,0.1) !important;
  border-color: rgba(239,68,68,0.3) !important;
  color: #ef4444 !important;
}

/* ===== PROFILE PAGE ===== */
.user-page-hero {
  background: linear-gradient(135deg, rgba(0,229,255,0.08), rgba(124,58,237,0.12)) !important;
  border: 1px solid var(--border) !important;
}
.uph-name { color: #fff !important; }
.uph-sub { color: var(--neon) !important; }
.uph-stat-val { color: var(--neon) !important; }
.uph-stat-label { color: var(--muted) !important; }
.uph-avatar {
  background: linear-gradient(135deg, var(--neon), var(--neon2)) !important;
  color: #060b14 !important;
}
.up-section-title {
  color: var(--text) !important;
  border-bottom-color: var(--border) !important;
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  background: rgba(13,22,39,0.97) !important;
  border: 1px solid rgba(0,229,255,0.2) !important;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.5) !important;
}
.cookie-banner-title { color: #fff !important; }
.cookie-banner-text { color: var(--text2) !important; }
.cookie-btn-primary {
  background: linear-gradient(135deg, var(--neon), var(--teal-dark)) !important;
  color: #060b14 !important;
  font-weight: 900 !important;
}
.cookie-btn-secondary {
  background: rgba(255,255,255,0.06) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

/* Negate old dark mode overrides since we're always dark now */
body.dark-mode .game-card,
body.dark-mode .sidebar-panel,
body.dark-mode .drawer,
body.dark-mode .auth-box,
body.dark-mode .settings-group,
body.dark-mode .search-box,
body.dark-mode .modal-box,
body.dark-mode .modal-hdr,
body.dark-mode .cookie-banner {
  /* already handled above */
}

/* Section divider strip */
.section-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.section-strip-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border));
}
.section-strip-badge {
  font-size: 0.68rem; font-weight: 900;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--muted);
  padding: 3px 12px;
  border: 1px solid var(--border);
  border-radius: 50px;
}

/* Glow pulse on #1 viral card */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255,215,0,0.3), 0 0 0 1.5px rgba(255,215,0,0.4); }
  50%       { box-shadow: 0 0 28px rgba(255,215,0,0.55), 0 0 0 1.5px rgba(255,215,0,0.6); }
}
.viral-card.rank-1 {
  animation: viralCardIn 0.5s ease both, glowPulse 2.5s ease-in-out 0.6s infinite;
  border-color: rgba(255,215,0,0.35) !important;
}

/* Scroll hint arrow */
.viral-scroll-hint {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  background: linear-gradient(270deg, var(--bg) 40%, transparent);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 4;
}


/* ORBITRON LOGO */
.logo-text, .auth-logo-text {
  font-family: 'Orbitron', 'Fredoka One', cursive !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  letter-spacing: 2px !important;
  color: #fff !important;
}
.logo-accent, .auth-logo-accent {
  color: var(--neon) !important;
  text-shadow: 0 0 14px rgba(0,229,255,0.8) !important;
}

/* NAV height fix */
.topnav-inner { height: var(--nav-h) !important; }

/* Fav btn */
.fav-btn {
  background: rgba(0,0,0,0.55) !important;
}
.fav-btn.fav-active {
  background: rgba(255,45,120,0.85) !important;
}

/* Profile dropdown */
.profile-dropdown {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5) !important;
}
.pd-item { color: var(--text2) !important; }
.pd-item:hover {
  background: rgba(0,229,255,0.08) !important;
  color: var(--neon) !important;
}
.pd-name { color: var(--text) !important; }

/* Game loading */
.game-loading { background: var(--surface) !important; }
.game-loading-title { color: var(--text) !important; }
.game-loading-sub { color: var(--muted) !important; }
.game-loading-spinner {
  border-color: rgba(0,229,255,0.15) !important;
  border-top-color: var(--neon) !important;
}

/* Favourites empty */
.empty-state { color: var(--muted) !important; }

/* Drawer nav items */
.drawer-nav { border-top: 1px solid var(--border) !important; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,229,255,0.3); }

