/* ===================================================
   PrimeGameHub - Gaming Theme CSS
   Dark neon aesthetic with animated effects
=================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --neon-green:   #00ff88;
  --neon-blue:    #00c8ff;
  --neon-purple:  #b400ff;
  --neon-orange:  #ff6a00;
  --bg-darkest:   #080b10;
  --bg-dark:      #0d1117;
  --bg-card:      #111827;
  --bg-card2:     #161d2e;
  --border-glow:  rgba(0,255,136,0.25);
  --text-primary: #e8edf5;
  --text-muted:   #8892a4;
  --accent:       #00ff88;
  --accent2:      #00c8ff;
  --font-display: 'Orbitron', sans-serif;
  --font-body:    'Rajdhani', sans-serif;
  --font-ui:      'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-darkest);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,255,136,0.08) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--neon-green); border-radius: 3px; }

/* ── Typography ─────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); letter-spacing: 0.04em; }
a { color: inherit; text-decoration: none; }

/* ── Neon text glow ─────────────────────────────── */
.neon-text {
  color: var(--neon-green);
  text-shadow: 0 0 10px var(--neon-green), 0 0 30px rgba(0,255,136,0.4);
}
.neon-text-blue {
  color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue), 0 0 30px rgba(0,200,255,0.4);
}

/* ══════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8,11,16,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,255,136,0.15);
  box-shadow: 0 2px 30px rgba(0,0,0,0.5), 0 1px 0 rgba(0,255,136,0.1);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.site-logo img { height: 40px; width: auto; filter: drop-shadow(0 0 8px rgba(0,255,136,0.5)); }
.site-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0,255,136,0.6);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Search bar */
.header-search {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.header-search input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 8px;
  padding: 9px 44px 9px 16px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search input:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 0 3px rgba(0,255,136,0.12);
}
.header-search .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Nav links */
.header-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.header-nav a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.header-nav a:hover { background: rgba(0,255,136,0.1); color: var(--neon-green); }
.header-nav .btn-login {
  background: transparent;
  border: 1px solid rgba(0,255,136,0.4);
  color: var(--neon-green);
}
.header-nav .btn-login:hover { background: rgba(0,255,136,0.15); }
.header-nav .btn-register {
  background: var(--neon-green);
  color: #000;
  font-weight: 700;
}
.header-nav .btn-register:hover { background: #00e07a; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--neon-green);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8,11,16,0.97);
  z-index: 999;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1rem;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0,255,136,0.1);
  color: var(--text-primary);
  transition: background 0.2s, color 0.2s;
}
.mobile-menu a:hover { background: rgba(0,255,136,0.1); color: var(--neon-green); }
.mobile-menu .mobile-search {
  position: relative;
  margin-bottom: 16px;
}
.mobile-menu .mobile-search input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

/* ══════════════════════════════════════════════════
   CATEGORY PILL STRIP
══════════════════════════════════════════════════ */
.cat-strip-wrap {
  background: rgba(13,17,23,0.8);
  border-bottom: 1px solid rgba(0,255,136,0.08);
  position: sticky;
  top: 64px;
  z-index: 990;
}
.cat-strip {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.cat-strip::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  display: inline-block;
  padding: 7px 16px;
  margin: 8px 0;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  transition: all 0.25s;
  white-space: nowrap;
  text-transform: uppercase;
}
.cat-pill:hover, .cat-pill.active {
  background: rgba(0,255,136,0.15);
  border-color: rgba(0,255,136,0.5);
  color: var(--neon-green);
  box-shadow: 0 0 12px rgba(0,255,136,0.15);
}

/* ══════════════════════════════════════════════════
   HERO FEATURED SLIDER
══════════════════════════════════════════════════ */
.hero-slider-wrap {
  position: relative;
  overflow: hidden;
  max-height: 540px;
}
.hero-slide {
  position: relative;
  height: 540px;
  overflow: hidden;
}
.hero-slide .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45) saturate(1.2);
  transform: scale(1.05);
  transition: transform 8s ease;
}
.hero-slide.swiper-slide-active .hero-bg { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(8,11,16,0.95) 0%,
    rgba(8,11,16,0.6) 50%,
    transparent 100%
  );
}
.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 48px;
  max-width: 600px;
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #000;
  background: var(--neon-green);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-cat {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--neon-green);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--neon-green);
  color: #000;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s;
  box-shadow: 0 0 20px rgba(0,255,136,0.35);
}
.hero-play-btn:hover {
  background: #fff;
  box-shadow: 0 0 40px rgba(0,255,136,0.6);
  transform: translateY(-2px);
}
.hero-play-btn svg { width: 18px; height: 18px; }

/* Slider arrows */
.swiper-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,255,136,0.15);
  border: 1px solid rgba(0,255,136,0.3);
  color: var(--neon-green);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
}
.swiper-btn:hover { background: rgba(0,255,136,0.3); }
.swiper-btn.left { left: 20px; }
.swiper-btn.right { right: 20px; }

/* ══════════════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════════════ */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 20px;
  /* Prevent ANY child from punching wider than the viewport */
  overflow-x: hidden;
  /* Ensure container never exceeds viewport itself */
  box-sizing: border-box;
  width: 100%;
}

/* ══════════════════════════════════════════════════
   SECTION HEADINGS
══════════════════════════════════════════════════ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,255,136,0.1);
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: var(--neon-green);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--neon-green);
}
.section-title .icon { font-size: 1.1em; }
.section-viewall {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neon-green);
  border: 1px solid rgba(0,255,136,0.3);
  padding: 6px 16px;
  border-radius: 6px;
  transition: all 0.2s;
}
.section-viewall:hover { background: rgba(0,255,136,0.12); }

/* ══════════════════════════════════════════════════
   GAME GRID
══════════════════════════════════════════════════ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.games-grid.large-first .game-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

/* Game Card */
.game-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  display: block;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s;
  text-decoration: none;
}
.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0,255,136,0.15);
  border-color: rgba(0,255,136,0.3);
  z-index: 2;
}
.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.game-card:hover img { transform: scale(1.08); }

/* Card overlay */
.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
  opacity: 0.7;
  transition: opacity 0.3s;
}
.game-card:hover .game-card-overlay { opacity: 1; }

/* Card title */
.game-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

/* Play hover button */
.game-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  width: 48px;
  height: 48px;
  background: var(--neon-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 3;
}
.game-card-play svg { width: 20px; height: 20px; color: #000; margin-left: 3px; }
.game-card:hover .game-card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Hot badge */
.game-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 4;
}
.badge-hot { background: #ff3366; color: #fff; }
.badge-new { background: var(--neon-green); color: #000; }

/* ══════════════════════════════════════════════════
   ADVERTISEMENT BLOCKS - Responsive
══════════════════════════════════════════════════ */
.ad-block {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 32px 0;
  min-height: 90px;
  border-radius: 10px;
  /* Clip any ad creative that is wider than its container */
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
}
.ad-block .banner {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}
/* Force every AdSense tag to honour its container width */
.ad-block ins.adsbygoogle,
.ad-block > ins,
ins.adsbygoogle {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Hide leaderboard-size ads on mobile, show mobile-size instead */
@media (max-width: 768px) {
  .ad-block { min-height: 60px; margin: 16px 0; }
  .ad-block-leaderboard { display: none; }
  .ad-block-mobile { display: flex; }
}
.ad-block-mobile { display: none; }

/* Sticky sidebar ad */
.ad-sidebar {
  position: sticky;
  top: 140px;
}
.ad-sidebar .ad-block { margin: 0 0 16px; min-height: 250px; }

/* GPT ad – must never impose a fixed width wider than viewport */
#div-gpt-ad-1732038226938-0 {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
/* The inner GPT iframe must not inherit the game-iframe aspect-ratio rule */
#div-gpt-ad-1732038226938-0 iframe,
.ad-block iframe {
  max-width: 100% !important;
  aspect-ratio: unset !important;
  height: auto !important;
  min-height: 50px;
}

/* ══════════════════════════════════════════════════
   SINGLE GAME PAGE
══════════════════════════════════════════════════ */
.single-layout {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 20px;
  align-items: start;
  /* Prevent any column from blowing out the grid */
  min-width: 0;
  width: 100%;
}

/* Every direct child must not overflow its column */
.single-layout > * {
  min-width: 0;
  overflow: hidden;
}

/* Sidebar mini game list */
.sidebar-games {
  width: 100%;
}
.sidebar-games .games-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sidebar-games .game-card { aspect-ratio: 1; }

/* Game viewport – the core fix */
.game-viewport {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,255,136,0.2);
  box-shadow: 0 0 40px rgba(0,255,136,0.05);
  /* Force the box to never exceed its grid column */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* iframe: use aspect-ratio so height is always proportional,
   never a fixed pixel value that overflows on small screens.
   We keep a min-height so desktop still looks tall. */
.game-viewport iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  /* Responsive height: 56.25% of width = 16:9 ratio */
  aspect-ratio: 16 / 9;
  min-height: 280px;
  border: none;
  /* Remove any inherited height overrides */
  height: auto;
}

/* On larger screens restore a comfortable fixed minimum */
@media (min-width: 1025px) {
  .game-viewport iframe {
    aspect-ratio: unset;
    height: 560px;
  }
}

.game-fullscreen-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(0,255,136,0.3);
  color: var(--neon-green);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.game-fullscreen-btn:hover { background: rgba(0,255,136,0.2); }

/* Game meta bar */
.game-meta-bar {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.game-meta-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
}
.game-meta-cat {
  font-size: 0.8rem;
  color: var(--neon-green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-ui);
}
.game-actions { display: flex; gap: 8px; }
.game-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  text-decoration: none;
}
.game-action-btn:hover { background: rgba(0,255,136,0.15); color: var(--neon-green); border-color: rgba(0,255,136,0.3); }
.played-count { font-family: var(--font-ui); font-size: 0.8rem; color: var(--text-muted); }

/* Description */
.game-description-block {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 20px;
  margin-top: 12px;
}
.game-description-block h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neon-green);
  margin-bottom: 10px;
  font-family: var(--font-ui);
  font-weight: 700;
}
.game-description-block p {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Comments */
.comment-form-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.comment-form-row textarea {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  resize: none;
  outline: none;
  height: 46px;
  transition: border-color 0.2s;
}
.comment-form-row textarea:focus { border-color: var(--neon-green); }
.comment-form-row button {
  background: var(--neon-green);
  color: #000;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.05em;
}
.comment-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.comment-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(0,255,136,0.3); flex-shrink: 0; }
.comment-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.comment-date { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.comment-text { font-family: var(--font-ui); font-size: 0.88rem; color: var(--text-muted); margin-top: 6px; }

/* ══════════════════════════════════════════════════
   CATEGORY PAGE
══════════════════════════════════════════════════ */
.cat-hero {
  text-align: center;
  padding: 60px 20px 40px;
  background: radial-gradient(ellipse at center top, rgba(0,255,136,0.07) 0%, transparent 70%);
}
.cat-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.cat-hero p {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════
   SEARCH PAGE
══════════════════════════════════════════════════ */
.search-hero {
  text-align: center;
  padding: 48px 20px 32px;
}
.search-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════ */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(0,255,136,0.1);
  background: rgba(8,11,16,0.9);
}
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 20px 24px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0,255,136,0.5);
  margin-bottom: 12px;
  display: block;
}
.footer-tagline {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--neon-green); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════
   SEO CONTENT BLOCK (homepage intro paragraph)
══════════════════════════════════════════════════ */
.seo-intro {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 32px;
  margin: 40px 0 0;
}
.seo-intro h2 {
  font-size: 1rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--neon-green);
  margin-bottom: 12px;
}
.seo-intro p {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 900px;
}

/* ══════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════ */
@keyframes neon-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0,255,136,0.3); }
  50%       { box-shadow: 0 0 20px rgba(0,255,136,0.7), 0 0 40px rgba(0,255,136,0.2); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
@keyframes scanline {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100vh; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeInUp 0.5s ease both; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 10px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ══════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .single-layout { grid-template-columns: 180px 1fr 180px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  /* Stack game + sidebars into single column */
  .single-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  /* Hide sidebars on tablet/mobile — game takes full width */
  .sidebar-left, .sidebar-right { display: none; }
  /* Game screen gets full width */
  .game-screen { width: 100%; min-width: 0; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .header-search { display: none; }
  .hamburger { display: flex; }
  .hero-content { padding: 24px; }
  .hero-slide { height: 380px; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .games-grid.large-first .game-card:first-child { grid-column: span 1; grid-row: span 1; }
  /* Reduce horizontal padding so game + ads have maximum width */
  .main-container { padding: 12px 10px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  /* iframe: use aspect-ratio only, no fixed height overrides */
  .game-viewport iframe {
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    min-height: 220px;
  }
  .game-meta-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  /* Ensure meta bar never overflows */
  .game-meta-bar > div { width: 100%; min-width: 0; }
  .game-actions { flex-wrap: wrap; }
  /* Remove border-radius on viewport so it bleeds edge-to-edge on phone */
  .game-viewport { border-radius: 8px; }
  /* Pull the game-screen article to full bleed */
  .game-screen { margin: 0; }
}

@media (max-width: 480px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .hero-slide { height: 260px; }
  .hero-title { font-size: 1.3rem; }
  .hero-play-btn { padding: 9px 16px; font-size: 0.75rem; }
  /* Zero out horizontal padding on smallest screens for maximum game width */
  .main-container { padding: 8px 6px; }
  .game-viewport {
    border-radius: 0;
    margin: 0 -6px; /* bleed to edge */
    width: calc(100% + 12px);
  }
  .game-viewport iframe {
    aspect-ratio: 16 / 9 !important;
    min-height: 200px;
    height: auto !important;
  }
  /* Stack comment form vertically */
  .comment-form-row { flex-direction: column; }
  .comment-form-row button { width: 100%; padding: 12px; }
}

/* ══════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════ */
.section-gap { margin-bottom: 48px; }
.text-neon { color: var(--neon-green); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
