/* ═══════════════════════════════════════════
   GAMEHATCH.TOP — Retro Pixel Vaporwave Theme
   Pure CSS · Mobile-first · No frameworks
   ═══════════════════════════════════════════ */

/* ── Fonts ── */
/* Fonts loaded via <link> in HTML */

/* ── CSS Custom Properties ── */
:root {
  --bg-primary: #1a0a2e;
  --bg-secondary: #120624;
  --bg-card: #1e0e32;
  --bg-card-hover: #2a1045;
  --accent-salmon: #ff6b6b;
  --accent-mint: #00ff88;
  --accent-purple: #7c3aed;
  --accent-pink: #ff3ea5;
  --accent-yellow: #ffe74c;
  --text-primary: #e8e0f0;
  --text-secondary: #9a8ab0;
  --text-muted: #6a5a80;
  --border-pixel: #3a2050;
  --border-glow: rgba(124, 58, 237, 0.3);
  --font-heading: 'Press Start 2P', monospace;
  --font-body: 'VT323', 'Courier New', monospace;
  --shadow-neon-salmon: 0 0 10px rgba(255, 107, 107, 0.5), 0 0 20px rgba(255, 107, 107, 0.2);
  --shadow-neon-mint: 0 0 10px rgba(0, 255, 136, 0.5), 0 0 20px rgba(0, 255, 136, 0.2);
  --shadow-neon-purple: 0 0 10px rgba(124, 58, 237, 0.5), 0 0 20px rgba(124, 58, 237, 0.2);
  --pixel-size: 2px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  font-size: 1.05rem;
  position: relative;
}

/* CRT Scanline Overlay removed for performance */

/* ── CRT Screen Flicker Animation ── */
@keyframes crt-flicker {
  0% { opacity: 0.98; }
  5% { opacity: 0.95; }
  10% { opacity: 1; }
  15% { opacity: 0.97; }
  20% { opacity: 1; }
  50% { opacity: 0.99; }
  80% { opacity: 1; }
  90% { opacity: 0.96; }
  100% { opacity: 0.98; }
}

/* ── Pixel Border Utility ── */
.pixel-border {
  border: var(--pixel-size) solid var(--border-pixel);
  box-shadow:
    inset calc(var(--pixel-size) * -1) calc(var(--pixel-size) * -1) 0 0 rgba(0,0,0,0.3),
    inset var(--pixel-size) var(--pixel-size) 0 0 rgba(255,255,255,0.1);
  image-rendering: pixelated;
}

.pixel-border-light {
  border: var(--pixel-size) solid var(--accent-purple);
  box-shadow:
    inset calc(var(--pixel-size) * -1) calc(var(--pixel-size) * -1) 0 0 rgba(0,0,0,0.2),
    inset var(--pixel-size) var(--pixel-size) 0 0 rgba(255,255,255,0.15),
    0 0 8px var(--border-glow);
}

/* ── Neon Glow ── */
.neon-salmon { text-shadow: 0 0 7px rgba(255,107,107,0.6), 0 0 14px rgba(255,107,107,0.3); }
.neon-mint { text-shadow: 0 0 7px rgba(0,255,136,0.6), 0 0 14px rgba(0,255,136,0.3); }
.neon-purple { text-shadow: 0 0 7px rgba(124,58,237,0.6), 0 0 14px rgba(124,58,237,0.3); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.4;
  color: var(--text-primary);
}
h1 { font-size: 1rem; letter-spacing: 0.05em; }
h2 { font-size: 0.85rem; }
h3 { font-size: 0.7rem; }
h4 { font-size: 0.6rem; }

a { color: var(--accent-mint); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-salmon); }

img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; color: inherit; }
input { font-family: var(--font-body); outline: none; }

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-purple); border-radius: 0; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ═══════════════════════════════════════════
   HEADER & NAVIGATION
   ═══════════════════════════════════════════ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(18, 6, 36, 0.98) 0%, rgba(26, 10, 46, 0.95) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--border-pixel);
  padding: 8px 16px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-salmon), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.5rem;
  border: 2px solid var(--accent-mint);
  position: relative;
  overflow: hidden;
}
.logo-icon::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--accent-mint), transparent, var(--accent-salmon));
  z-index: -1;
  opacity: 0.5;
}

.logo span {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  color: var(--accent-mint);
  letter-spacing: 0.1em;
}

/* Desktop Search */
.desktop-search-wrap {
  display: none;
  flex: 1;
  max-width: 360px;
  position: relative;
}
.desktop-search-wrap input {
  width: 100%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-pixel);
  padding: 10px 16px;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.2s;
  font-family: var(--font-body);
}
.desktop-search-wrap input:focus {
  border-color: var(--accent-mint);
  box-shadow: var(--shadow-neon-mint);
}
.desktop-search-wrap input::placeholder { color: var(--text-muted); }
.desktop-search-wrap .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

/* Desktop Nav */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
}
.desktop-nav a {
  font-family: var(--font-heading);
  font-size: 0.4rem;
  color: var(--text-secondary);
  padding: 6px 8px;
  transition: all 0.2s;
  white-space: nowrap;
}
.desktop-nav a:hover {
  color: var(--accent-mint);
  text-shadow: var(--shadow-neon-mint);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 2px solid var(--border-pixel);
  cursor: pointer;
  gap: 4px;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent-mint);
  transition: all 0.3s ease;
  image-rendering: pixelated;
}
.hamburger.menu-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.menu-open span:nth-child(2) { opacity: 0; }
.hamburger.menu-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile Drawer ── */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: none;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: var(--bg-secondary);
  border-left: 2px solid var(--border-pixel);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-overlay.open { display: block; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-pixel);
  margin-bottom: 16px;
}
.drawer-header h3 {
  font-size: 0.5rem;
  color: var(--accent-mint);
}
.drawer-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-pixel);
  color: var(--accent-salmon);
  font-size: 1.2rem;
  background: var(--bg-card);
}

.mobile-drawer .drawer-link {
  font-family: var(--font-heading);
  font-size: 0.45rem;
  color: var(--text-secondary);
  padding: 12px 8px;
  border-bottom: 1px solid rgba(58, 32, 80, 0.5);
  transition: all 0.2s;
}
.mobile-drawer .drawer-link:hover {
  color: var(--accent-mint);
  padding-left: 16px;
  background: rgba(0, 255, 136, 0.05);
}
.drawer-section-title {
  font-family: var(--font-heading);
  font-size: 0.4rem;
  color: var(--accent-purple);
  padding: 16px 8px 8px;
  letter-spacing: 0.1em;
}
.drawer-footer-links {
  margin-top: auto;
  padding-top: 16px;
  border-top: 2px solid var(--border-pixel);
}

/* ── Mobile Search Modal ── */
.mobile-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  z-index: 300;
  display: none;
  flex-direction: column;
  padding: 16px;
}
.mobile-search-modal.open { display: flex; }
.mobile-search-modal .search-top {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.mobile-search-modal input {
  flex: 1;
  background: var(--bg-primary);
  border: 2px solid var(--accent-purple);
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}
.mobile-search-modal input:focus { border-color: var(--accent-mint); }
.mobile-search-modal .search-back-btn {
  padding: 8px 16px;
  border: 2px solid var(--border-pixel);
  color: var(--accent-salmon);
  font-family: var(--font-heading);
  font-size: 0.4rem;
  background: var(--bg-card);
}

.mobile-search-results {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ═══════════════════════════════════════════
   BOTTOM NAV (Mobile)
   ═══════════════════════════════════════════ */

.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(0deg, var(--bg-secondary) 0%, rgba(18, 6, 36, 0.98) 100%);
  border-top: 2px solid var(--border-pixel);
  z-index: 100;
  padding: 4px 0;
  justify-content: space-around;
}

.bottom-nav a, .bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  font-family: var(--font-heading);
  font-size: 0.3rem;
  color: var(--text-muted);
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
}
.bottom-nav a:hover, .bottom-nav a.active,
.bottom-nav button:hover {
  color: var(--accent-mint);
}
.bottom-nav .nav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* ═══════════════════════════════════════════
   HERO SECTION (CRT Monitor Frame)
   ═══════════════════════════════════════════ */

.hero {
  padding: 24px 16px 32px;
  position: relative;
  overflow: hidden;
}

/* Grid background */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* CRT Monitor Frame */
.crt-frame {
  position: relative;
  max-width: 700px;
  margin: 0 auto 20px;
  background: #0a0318;
  border: 4px solid var(--accent-purple);
  border-radius: 12px;
  padding: 4px;
  box-shadow:
    0 0 20px rgba(124, 58, 237, 0.3),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.crt-frame::before {
  content: '';
  display: block;
  padding-bottom: 56.25%;
}

.crt-frame-inner {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  background: linear-gradient(135deg, #0a0318 0%, #1a0a2e 50%, #0a0318 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 8px;
  overflow: hidden;
}

/* Inner CRT scanlines */
.crt-frame-inner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.15) 1px,
    rgba(0, 0, 0, 0.15) 2px
  );
  pointer-events: none;
}

/* CRT power-on glow animation */
@keyframes crt-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 107, 107, 0.3), 0 0 30px rgba(124, 58, 237, 0.2); }
  50% { box-shadow: 0 0 25px rgba(255, 107, 107, 0.5), 0 0 50px rgba(124, 58, 237, 0.3); }
}
.crt-frame {
  animation: crt-glow 3s ease-in-out infinite;
}

.crt-hero-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border: 2px solid var(--accent-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(0, 255, 136, 0.1);
  position: relative;
}

.crt-hero-title {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  color: var(--accent-salmon);
  margin-bottom: 8px;
  letter-spacing: 0.15em;
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.crt-hero-sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 450px;
}

.crt-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-size: 0.4rem;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-salmon), var(--accent-pink));
  border: 2px solid var(--accent-mint);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.crt-hero-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}
.crt-hero-btn:active { transform: scale(0.95); }
.crt-hero-btn .btn-arrow {
  font-size: 0.6rem;
}

/* CRTs at corners of frame */
.crt-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-purple);
  z-index: 2;
}
.crt-corner-tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.crt-corner-tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.crt-corner-bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.crt-corner-br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

/* Hero stats row */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}
.hero-stat {
  text-align: center;
}
.hero-stat .stat-num {
  font-family: var(--font-heading);
  font-size: 0.5rem;
  color: var(--accent-mint);
  display: block;
}
.hero-stat .stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* ── Pixel Pills (Category Tags) ── */
.pixel-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 16px;
  -webkit-overflow-scrolling: touch;
}
.pixel-pills a, .pixel-pills .pill {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 0.35rem;
  padding: 8px 14px;
  border: 2px solid var(--border-pixel);
  color: var(--text-secondary);
  transition: all 0.2s;
  background: var(--bg-card);
  white-space: nowrap;
}
.pixel-pills a:hover, .pixel-pills a.active {
  border-color: var(--accent-mint);
  color: var(--accent-mint);
  box-shadow: var(--shadow-neon-mint);
  background: rgba(0, 255, 136, 0.08);
}
.pixel-pills a.pill-active {
  border-color: var(--accent-salmon);
  color: var(--accent-salmon);
  box-shadow: var(--shadow-neon-salmon);
  background: rgba(255, 107, 107, 0.08);
}

/* ═══════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════ */

.section {
  padding: 20px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
}
.section-header .section-icon {
  font-size: 1rem;
}
.section-header .section-arrow {
  font-family: var(--font-heading);
  font-size: 0.35rem;
  color: var(--accent-purple);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.section-header .section-arrow:hover { color: var(--accent-mint); }

/* ═══════════════════════════════════════════
   HORIZONTAL STRIPS (Trending / Top Rated)
   ═══════════════════════════════════════════ */

.horizontal-strip-wrap {
  position: relative;
}
.horizontal-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
}
.strip-scroll-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 2px solid var(--border-pixel);
  color: var(--accent-mint);
  font-size: 1rem;
  z-index: 5;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.strip-scroll-btn:hover {
  border-color: var(--accent-mint);
  box-shadow: var(--shadow-neon-mint);
}
.strip-scroll-btn-left { left: -8px; }
.strip-scroll-btn-right { right: -8px; }

/* ═══════════════════════════════════════════
   GAME CARDS (Pixel-art borders)
   ═══════════════════════════════════════════ */

/* Strip Card (horizontal) */
.strip-card {
  flex-shrink: 0;
  width: 130px;
  border: 2px solid var(--border-pixel);
  background: var(--bg-card);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.strip-card:hover {
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon-purple);
  background: var(--bg-card-hover);
}
.strip-card .card-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-bottom: 2px solid var(--border-pixel);
  position: relative;
  background: var(--bg-secondary);
}
.strip-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.strip-card .card-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-family: var(--font-heading);
  font-size: 0.3rem;
  padding: 3px 6px;
  color: var(--bg-primary);
  z-index: 2;
}
.strip-card .card-badge-hot {
  background: var(--accent-salmon);
}
.strip-card .card-badge-rating {
  background: var(--accent-yellow);
  color: #1a0a2e;
}
.strip-card .card-body {
  padding: 8px;
}
.strip-card .card-title {
  font-family: var(--font-heading);
  font-size: 0.3rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  line-height: 1.6;
}
.strip-card .card-category {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Grid Card (main grid) */
.grid-card {
  border: 2px solid var(--border-pixel);
  background: var(--bg-card);
  transition: all 0.2s;
  overflow: hidden;
  position: relative;
}
.grid-card:hover {
  border-color: var(--accent-mint);
  transform: translateY(-3px);
  box-shadow: var(--shadow-neon-mint);
  background: var(--bg-card-hover);
}
.grid-card .card-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-bottom: 2px solid var(--border-pixel);
  position: relative;
  background: var(--bg-secondary);
}
.grid-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 0.3s;
}
.grid-card:hover .card-img-wrap img {
  transform: scale(1.08);
}
.grid-card .card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.grid-card .card-overlay span {
  font-family: var(--font-heading);
  font-size: 0.35rem;
  color: var(--accent-mint);
  border: 2px solid var(--accent-mint);
  padding: 6px 14px;
}
.grid-card:hover .card-overlay { display: flex; }
.grid-card .card-body {
  padding: 10px 8px;
}
.grid-card .card-title {
  font-family: var(--font-heading);
  font-size: 0.3rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  line-height: 1.6;
}
.grid-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.grid-card .card-category {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.grid-card .card-rating {
  font-size: 0.8rem;
  color: var(--accent-yellow);
}

/* ── Pixel corner decorations on cards ── */
.pixel-corners {
  position: absolute;
  width: 6px;
  height: 6px;
  z-index: 3;
  pointer-events: none;
}
.pixel-corners-tl { top: -1px; left: -1px; border-top: 2px solid var(--accent-purple); border-left: 2px solid var(--accent-purple); }
.pixel-corners-tr { top: -1px; right: -1px; border-top: 2px solid var(--accent-purple); border-right: 2px solid var(--accent-purple); }
.pixel-corners-bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--accent-purple); border-left: 2px solid var(--accent-purple); }
.pixel-corners-br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent-purple); border-right: 2px solid var(--accent-purple); }

/* ═══════════════════════════════════════════
   GAME GRID
   ═══════════════════════════════════════════ */

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.game-grid .grid-card { display: flex; flex-direction: column; }

.game-count {
  font-family: var(--font-heading);
  font-size: 0.3rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
}

/* Load More */
.load-more-wrap {
  text-align: center;
  padding: 20px 0 10px;
}
.load-more-btn {
  font-family: var(--font-heading);
  font-size: 0.4rem;
  color: var(--accent-mint);
  padding: 12px 32px;
  border: 2px solid var(--accent-mint);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.load-more-btn:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: var(--shadow-neon-mint);
}
.load-more-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  border-color: var(--border-pixel);
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   GAME DETAIL PAGE
   ═══════════════════════════════════════════ */

.game-detail {
  padding: 16px 0 80px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 0.3rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 0 16px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.breadcrumb a { color: var(--accent-purple); }
.breadcrumb a:hover { color: var(--accent-mint); }
.breadcrumb .sep { color: var(--text-muted); }

/* Play Panel */
.play-panel-wrap {
  max-width: 900px;
  margin: 0 auto 20px;
  padding: 0 16px;
}

.play-frame {
  position: relative;
  background: #0a0318;
  border: 3px solid var(--border-pixel);
  overflow: hidden;
}
.play-frame::before {
  content: '';
  display: block;
  padding-bottom: 56.25%;
}

.play-screen {
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  background: #0a0318;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
}
.play-screen.hidden { display: none; }

.play-screen-icon {
  width: 64px;
  height: 64px;
  border: 2px solid var(--accent-salmon);
  margin-bottom: 12px;
  object-fit: cover;
}
.play-screen h2 {
  font-family: var(--font-heading);
  font-size: 0.5rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.play-screen p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.play-btn-primary {
  font-family: var(--font-heading);
  font-size: 0.4rem;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-salmon), var(--accent-pink));
  border: 2px solid var(--accent-mint);
  padding: 12px 32px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.play-btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.game-iframe {
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border: none;
  display: none;
  background: #000;
}
.game-iframe.active { display: block; }

.fullscreen-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-pixel);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.3rem;
  padding: 6px 12px;
  cursor: pointer;
  display: none;
  transition: all 0.2s;
}
.fullscreen-btn:hover {
  color: var(--accent-mint);
  border-color: var(--accent-mint);
}
.fullscreen-btn.visible { display: block; }

/* Game Info Panel */
.game-info-panel {
  max-width: 900px;
  margin: 0 auto 20px;
  padding: 0 16px;
}
.game-info-card {
  border: 2px solid var(--border-pixel);
  background: var(--bg-card);
  padding: 20px;
}
.game-info-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-pixel);
  margin-bottom: 16px;
}
.game-info-header h1 {
  font-family: var(--font-heading);
  font-size: 0.55rem;
  color: var(--accent-salmon);
}
.game-info-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.game-info-tags .tag {
  font-family: var(--font-heading);
  font-size: 0.3rem;
  padding: 4px 10px;
  border: 1px solid var(--border-pixel);
  color: var(--accent-purple);
}
.game-info-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}
.game-info-rating .rating-num {
  font-family: var(--font-heading);
  font-size: 0.5rem;
  color: var(--accent-yellow);
}
.game-info-rating .rating-stars {
  color: var(--accent-yellow);
}

.game-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.game-description h3 {
  font-family: var(--font-heading);
  font-size: 0.45rem;
  color: var(--accent-mint);
  margin-bottom: 8px;
}
.game-description p {
  white-space: pre-line;
}
.game-description strong {
  color: var(--text-primary);
}

/* Game Stats */
.game-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
  border-top: 2px solid var(--border-pixel);
  padding-top: 16px;
}
.game-stat-item {
  padding: 8px;
  border: 1px solid var(--border-pixel);
  background: rgba(0,0,0,0.2);
}
.game-stat-item .stat-label {
  font-family: var(--font-heading);
  font-size: 0.25rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}
.game-stat-item .stat-value {
  font-size: 1rem;
  color: var(--text-primary);
}

/* Detail Sidebar */
.detail-sidebar {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}
.detail-sidebar h3 {
  font-family: var(--font-heading);
  font-size: 0.45rem;
  color: var(--accent-purple);
  margin-bottom: 12px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.related-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border-pixel);
  background: var(--bg-card);
  transition: all 0.2s;
}
.related-item:hover {
  border-color: var(--accent-mint);
  background: var(--bg-card-hover);
}
.related-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--border-pixel);
  flex-shrink: 0;
}
.related-item .related-name {
  font-family: var(--font-heading);
  font-size: 0.25rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-item .related-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   CATEGORY PAGE
   ═══════════════════════════════════════════ */

.category-page {
  padding: 16px 0 80px;
}

.category-header {
  text-align: center;
  padding: 24px 16px;
  border-bottom: 2px solid var(--border-pixel);
  margin-bottom: 20px;
}
.category-header .cat-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}
.category-header h1 {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--accent-salmon);
}
.category-header p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

.footer {
  border-top: 2px solid var(--border-pixel);
  background: var(--bg-secondary);
  padding: 24px 16px 80px;
  margin-top: 20px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.4rem;
  color: var(--accent-mint);
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent-salmon); }

.footer-bottom {
  border-top: 2px solid var(--border-pixel);
  padding-top: 16px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--accent-purple); }
.footer-bottom a:hover { color: var(--accent-mint); }

/* ═══════════════════════════════════════════
   STATIC PAGES (404, privacy, terms)
   ═══════════════════════════════════════════ */

.static-page {
  padding: 40px 16px 80px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.static-page h1 {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--accent-salmon);
  margin-bottom: 16px;
}
.static-page p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.static-page .static-content {
  max-width: 700px;
  text-align: left;
  width: 100%;
}
.static-page .static-content h2 {
  font-family: var(--font-heading);
  font-size: 0.5rem;
  color: var(--accent-purple);
  margin: 24px 0 8px;
}
.static-page .static-content h3 {
  font-family: var(--font-heading);
  font-size: 0.35rem;
  color: var(--accent-mint);
  margin: 16px 0 8px;
}
.static-page .static-content p {
  margin-bottom: 12px;
}
.static-page .static-content ul {
  margin: 8px 0 12px 20px;
  color: var(--text-secondary);
  font-size: 1rem;
}
.static-page .static-content li {
  margin-bottom: 4px;
}

/* 404 icon */
.four-oh-four-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  display: block;
}

/* ── 404 pixel art character ── */
.pixel-404 {
  font-family: monospace;
  font-size: 0.5rem;
  line-height: 1;
  color: var(--accent-salmon);
  white-space: pre;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* Small mobile (up to 480px: 2 cols to avoid card overflow) */
@media (max-width: 480px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .strip-card { width: 110px; }
  .crt-hero-title { font-size: 0.5rem; }
  .logo span { font-size: 0.45rem; }
}

/* Mobile (481px-767px: 3 cols) */
@media (min-width: 481px) and (max-width: 767px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .bottom-nav { display: flex; }
  .footer { padding-bottom: 70px; }
  .game-detail, .category-page, .static-page { padding-bottom: 70px; }
}

/* Tablet */
@media (min-width: 768px) {
  .bottom-nav { display: none; }
  .desktop-search-wrap { display: block; }
  .desktop-nav { display: flex; }
  .hamburger { display: none; }
  .game-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .strip-card { width: 150px; }
  .crt-hero-title { font-size: 0.8rem; }
  .crt-hero-sub { font-size: 1.4rem; }
  .crt-hero-icon { width: 80px; height: 80px; font-size: 2.5rem; }
  .game-info-header { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .game-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .related-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .strip-scroll-btn { display: flex; }
  .hero { padding: 32px 16px 40px; }
  .logo span { font-size: 0.7rem; }
  .logo-icon { width: 36px; height: 36px; font-size: 0.6rem; }
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1rem; }
  .play-frame { border-width: 4px; }
  .play-frame::before { padding-bottom: 52%; }
}

/* Desktop */
@media (min-width: 1024px) {
  .game-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .strip-card { width: 160px; }
  .hero-stats { gap: 40px; }
  .footer { padding-bottom: 24px; }
}

/* ── Ad container (basic, no external deps) ── */
.ad-container {
  text-align: center;
  margin: 16px 0;
  min-height: 90px;
}
.ad-label {
  font-family: var(--font-heading);
  font-size: 0.25rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0.15em;
}
.ad-box {
  display: inline-block;
  border: 1px solid var(--border-pixel);
  padding: 4px;
  background: rgba(0, 0, 0, 0.2);
}

/* ── Animation ── */
@keyframes pixel-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px var(--border-glow); }
  50% { box-shadow: 0 0 15px var(--border-glow), 0 0 25px var(--border-glow); }
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ── Helper ── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
