/* ════════════════════════════════════════════════════════════════
   NoodleHub.cam — Master Polished Stylesheet (ALWAYS LIGHT THEME)
   Fixed Card Graphics, Always-Visible Titles, Clean Image Borders
════════════════════════════════════════════════════════════════ */

:root {
  /* Poki-style vibrant cyan theme */
  --page-bg:       #0ea5e9;
  --surface:       #ffffff;
  --surface-2:     #f0f9ff;
  --border:        #bae6fd;

  --green:         #10b981;
  --green-dark:    #059669;
  --blue:          #3b82f6;
  --pink:          #f43f5e;
  --yellow:        #f59e0b;
  --purple:        #8b5cf6;

  --text-1:        #0f172a;
  --text-2:        #334155;
  --text-3:        #64748b;

  --card-radius:   14px;
  --card-shadow:   0 4px 14px rgba(0, 0, 0, 0.15);
  --card-hover-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);

  --ease:          cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button { cursor: pointer; font-family: inherit; }
a { text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── HEADER ─────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 56px;
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}

.logo-name {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-1);
  letter-spacing: -0.5px;
}

.search-wrapper {
  flex: 1;
  max-width: 460px;
  position: relative;
}

.search-icon-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 40px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-1);
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  background: #ffffff;
}

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

.btn-surprise {
  height: 36px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 3px 12px rgba(139, 92, 246, 0.3);
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
  white-space: nowrap;
}

.btn-surprise:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.45);
}

.btn-publisher {
  width: 36px;
  height: 36px;
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.btn-publisher:hover {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
}

/* ─── CATEGORY NAV BAR ───────────────────────────────── */
.cat-nav {
  position: sticky;
  top: 56px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }

.cat-pill {
  height: 32px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  transition: all 0.15s var(--ease-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cat-pill:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}

.cat-pill.active {
  background: #ffffff;
  color: var(--text-1);
  border-color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  text-shadow: none;
}

/* ─── PAGE BODY ──────────────────────────────────────── */
.page-body {
  padding: 14px 12px 80px;
  max-width: 1440px;
  margin: 0 auto;
}

/* ─── HERO SECTION ───────────────────────────────────── */
.hero-section {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 240px;
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .hero-section { grid-template-columns: 1fr 1fr; }
  .hero-card:nth-child(3) { display: none; }
}
@media (max-width: 540px) {
  .hero-section { grid-template-columns: 1fr; grid-template-rows: 180px; }
  .hero-card:nth-child(2), .hero-card:nth-child(3) { display: none; }
}

.hero-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: transform 0.22s var(--ease), box-shadow 0.22s;
  background: #1e293b;
}

.hero-card:hover {
  transform: scale(1.02);
  box-shadow: var(--card-hover-shadow);
}

.hero-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s var(--ease-smooth);
}

.hero-card:hover > img { transform: scale(1.06); }

.hero-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 30%, rgba(15, 23, 42, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  z-index: 3;
}

.hero-card-badge {
  display: inline-flex;
  align-items: center;
  background: var(--green);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-card-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  z-index: 4;
  transition: opacity 0.2s, transform 0.2s var(--ease);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-card:hover .hero-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ─── SECTION HEADER ─────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 12px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.section-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

/* ─── GAMES GRID (Poki-Dense Bento Collage) ───────────── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  grid-auto-flow: dense;
  gap: 10px;
}

@media (min-width: 640px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 12px;
  }
}

@media (min-width: 1100px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }
}

/* ─── GAME CARD ──────────────────────────────────────── */
.game-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #1e293b;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.22s var(--ease), box-shadow 0.22s;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Poki Bento Spans */
@media (min-width: 640px) {
  .game-card.card-big-2x2 {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 1 / 1;
  }
  .game-card.card-wide-2x1 {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 2 / 1;
  }
  .game-card.card-tall-1x2 {
    grid-column: span 1;
    grid-row: span 2;
    aspect-ratio: 1 / 2;
  }
}

.game-card:hover {
  transform: scale(1.06) translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 0 20px rgba(16, 185, 129, 0.35);
  border-color: rgba(255, 255, 255, 0.95);
  z-index: 10;
}

.game-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
}

/* ─── POKI-STYLE ANIMATED GAMEPLAY PREVIEW ON HOVER ───────── */
@keyframes gameplayPreviewPan {
  0% {
    transform: scale(1.05) translate(0%, 0%);
    filter: brightness(1);
  }
  25% {
    transform: scale(1.22) translate(-5%, -4%);
    filter: brightness(1.1) contrast(1.08);
  }
  50% {
    transform: scale(1.28) translate(4%, 5%);
    filter: brightness(1.15) contrast(1.1);
  }
  75% {
    transform: scale(1.22) translate(-4%, 3%);
    filter: brightness(1.1) contrast(1.08);
  }
  100% {
    transform: scale(1.15) translate(0%, 0%);
    filter: brightness(1.08);
  }
}

@keyframes scanlineSweep {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.game-card-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease;
}

.game-card:hover .game-card-thumb {
  animation: gameplayPreviewPan 3.5s ease-in-out infinite alternate;
}

/* Animated Gameplay Scanline / Shimmer Overlay on Hover */
.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(16, 185, 129, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.game-card:hover::after {
  opacity: 1;
  animation: scanlineSweep 1.8s linear infinite;
}

/* ALWAYS VISIBLE Card Footer Scrim & Title */
.game-card-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 10px 10px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.5) 45%, rgba(15, 23, 42, 0.95) 100%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform 0.25s var(--ease);
}

.game-card:hover .game-card-footer {
  transform: translateY(-2px);
}

.game-card-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* Play Icon on Hover (Spring Pop & Pulse) */
.game-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 4;
  transition: opacity 0.22s ease, backdrop-filter 0.22s ease;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(2px);
}

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

@keyframes playPopPulse {
  0% { transform: scale(0.7) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(3deg); opacity: 1; }
  100% { transform: scale(1.1) rotate(0deg); opacity: 1; }
}

@keyframes playGlowRing {
  0%, 100% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5), 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 6px 28px rgba(16, 185, 129, 0.8), 0 0 0 10px rgba(16, 185, 129, 0); }
}

.play-icon {
  width: 52px;
  height: 52px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #10b981;
  padding-left: 3px;
}

.game-card:hover .play-icon {
  animation: playPopPulse 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, playGlowRing 1.8s infinite 0.35s;
}

/* Badges */
.card-hot-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: var(--pink);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-new-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: var(--green);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ─── PLAYER VIEW — PREMIUM POKI-STYLE LAYOUT ─────── */

#player-view {
  background: #132613;
  min-height: 100vh;
  padding-bottom: 60px;
}

.player-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 10px;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.btn-back {
  height: 36px;
  padding: 0 16px;
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  transition: all 0.18s;
  backdrop-filter: blur(6px);
}

.btn-back:hover {
  background: #ffffff;
  color: #132613;
  border-color: #ffffff;
}

#player-breadcrumb-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

/* 3-panel scene layout */
.player-scene {
  display: grid;
  grid-template-columns: 90px 1fr 290px;
  gap: 10px;
  padding: 12px 10px;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 1100px) {
  .player-scene { grid-template-columns: 90px 1fr; }
  .player-sidebar { display: none; }
}

@media (max-width: 700px) {
  .player-scene { grid-template-columns: 1fr; }
  .player-left-bar { display: none; }
}

/* LEFT ICON BAR */
.player-left-bar {
  position: sticky;
  top: 68px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.left-bar-games {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: none;
  padding-right: 4px;
}

.left-bar-card {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(0,0,0,0.5);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  border: 2px solid transparent;
}

.left-bar-card:hover {
  transform: scale(1.12) translateX(4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
  border-color: rgba(255,255,255,0.35);
  z-index: 5;
}

.left-bar-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.left-bar-card .lbc-name {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 5px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s;
  line-height: 1.2;
}

.left-bar-card:hover .lbc-name { opacity: 1; }

/* CENTER COLUMN */
.player-center {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

/* Game iframe box with ambient glow */
.player-frame-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 80px rgba(16, 185, 129, 0.18),
    0 24px 64px rgba(0,0,0,0.7);
}

/* Preroll Overlay */
.preroll-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.preroll-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 380px;
  padding: 24px;
}

.preroll-brand {
  font-size: 0.95rem;
  font-weight: 800;
  color: rgba(255,255,255,0.7);
}

.preroll-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  overflow: hidden;
}

.preroll-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 0.1s linear;
}

.preroll-countdown {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}

.btn-skip {
  height: 42px;
  padding: 0 26px;
  background: var(--green);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45);
  transition: transform 0.15s var(--ease);
}

.btn-skip:hover { transform: scale(1.06); }

/* Controls bar below iframe */
.player-controls {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  border-radius: 0 0 18px 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid rgba(255,255,255,0.07);
  border-top: none;
}

.player-game-info { flex: 1; min-width: 0; }

.player-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.player-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-btns {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.ctrl-btn {
  height: 36px;
  padding: 0 14px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(6px);
}

.ctrl-btn:hover {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
}

/* BOTTOM GAMES STRIP */
.bottom-games-section {
  margin-top: 18px;
  padding: 0 2px;
}

.bottom-games-label {
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bottom-games-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 9px;
}

.bottom-game-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: #1a2e1a;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.bottom-game-card:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.6);
}

.bottom-game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bottom-game-card .bgc-name {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 6px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,0.88));
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-game-card .bgc-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.18s;
  font-size: 1.8rem;
}

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

/* RIGHT SIDEBAR */
.player-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 68px;
}

.sidebar-label {
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  padding: 0 2px;
}

.sidebar-games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
  padding-right: 2px;
}

.sidebar-game-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: #1e293b;
  transition: transform 0.18s var(--ease);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-game-card:hover { transform: scale(1.06); }
.sidebar-game-card img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-game-name {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 6px 6px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.85));
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--surface);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-top h3 { font-size: 1.15rem; font-weight: 900; color: var(--text-1); }

.modal-close {
  width: 32px; height: 32px;
  background: var(--surface-2); border: none; border-radius: 50%;
  font-size: 0.9rem; color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
}

.modal-close:hover { background: var(--border); }

.status-banner {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

.modal-field-group label {
  font-size: 0.8rem; font-weight: 800;
  color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.5px; display: block; margin-bottom: 8px;
}

.modal-input-row { display: flex; gap: 8px; }

.modal-input {
  flex: 1; height: 40px; padding: 0 14px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 10px; font-family: inherit;
  font-size: 0.88rem; font-weight: 600; color: var(--text-1); outline: none;
  transition: border-color 0.15s;
}

.modal-input:focus { border-color: var(--green); }

.btn-save {
  height: 40px; padding: 0 18px;
  background: var(--green); color: #ffffff; border: none;
  border-radius: 10px; font-family: inherit;
  font-size: 0.88rem; font-weight: 800;
  transition: background 0.15s;
}

.btn-save:hover { background: var(--green-dark); }
.modal-status-msg { font-size: 0.82rem; font-weight: 700; color: var(--green); margin-top: 8px; min-height: 18px; }

.btn-sync-feed {
  width: 100%; height: 44px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #ffffff; border: none; border-radius: 12px;
  font-family: inherit; font-size: 0.92rem; font-weight: 800;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  transition: opacity 0.2s, transform 0.15s;
}

.btn-sync-feed:hover { opacity: 0.9; transform: scale(1.01); }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-box { background: var(--surface-2); border-radius: 10px; padding: 10px 8px; text-align: center; }
.stat-val { font-size: 1.15rem; font-weight: 900; color: var(--blue); }
.stat-lbl { font-size: 0.68rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; margin-top: 3px; }

@media (max-width: 640px) {
  .header { padding: 0 10px; }
  .logo-name { display: none; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .hero-section { grid-template-columns: 1fr; height: 180px; }
}

/* ─── SITE FOOTER (AdSense Approval Standard) ───────── */
footer.site-footer {
  background: #0f172a !important;
  color: #94a3b8 !important;
  margin-top: 60px !important;
  padding: 48px 24px 24px !important;
  border-top: 4px solid #10b981 !important;
  width: 100% !important;
  display: block !important;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: 2fr 1fr 1fr !important;
  gap: 40px;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

.footer-logo {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 440px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--green);
}

.footer-bottom {
  max-width: 1200px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}

/* ─── LEGAL & POLICY MODALS ──────────────────────────── */
.legal-modal {
  max-width: 640px !important;
}

.legal-content {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #334155;

  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
}

.legal-content h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 14px 0 6px;
}

.legal-content p {
  margin-bottom: 10px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.legal-content a {
  color: var(--blue);
  word-break: break-all;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

/* ─── COOKIE CONSENT BANNER ──────────────────────────── */
.cookie-banner {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  left: auto !important;
  width: 440px !important;
  max-width: calc(100vw - 40px) !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  padding: 16px 20px !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  z-index: 9999 !important;
  border: 1px solid #334155 !important;
}

@media (max-width: 520px) {
  .cookie-banner { flex-direction: column; text-align: center; }
}

.cookie-text {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.cookie-text a {
  color: var(--green);
  text-decoration: underline;
}

.btn-cookie-accept {
  height: 36px;
  padding: 0 16px;
  background: var(--green);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.15s;
}

.btn-cookie-accept:hover {
  transform: scale(1.04);
}

