/* ============================================================
   GameBase — Modern Stylesheet
   Aesthetic: Dark editorial. Bebas Neue display. DM Sans body.
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --bg:          #0d0d14;
  --bg-2:        #13131f;
  --bg-3:        #1c1c2e;
  --surface:     #1e1e2f;
  --surface-2:   #252538;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);

  --accent:      #e8f033;   /* electric yellow-green */
  --accent-2:    #ff6b6b;   /* coral for scores/alerts */
  --accent-3:    #64dfdf;   /* teal for tags */

  --text:        #eeeef0;
  --text-2:      #9898a8;
  --text-3:      #5a5a6e;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;

  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.7);

  --transition:  0.2s ease;
  --container:   1280px;
}

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

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

body {
  background:  var(--bg);
  color:       var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  min-height:  100vh;
  overflow-x:  hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img { display: block; max-width: 100%; height: auto; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.site-main { min-height: 60vh; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position:   sticky;
  top:        0;
  z-index:    100;
  background: rgba(13,13,20,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display:     flex;
  align-items: center;
  gap:         1.5rem;
  height:      64px;
}

/* Logo */
.site-logo {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  flex-shrink: 0;
}

.logo-mark {
  display:          grid;
  place-items:      center;
  width:            36px;
  height:           36px;
  background:       var(--accent);
  color:            #0d0d14;
  font-family:      var(--font-display);
  font-size:        1.4rem;
  letter-spacing:   0.02em;
  border-radius:    var(--radius-sm);
  flex-shrink:      0;
}

.logo-text {
  font-family:   var(--font-display);
  font-size:     1.5rem;
  letter-spacing: 0.08em;
  color:         var(--text);
}

/* Nav */
.main-nav {
  display:  flex;
  gap:      0.25rem;
  margin-left: 1rem;
}

.nav-link {
  padding:       0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size:     0.85rem;
  font-weight:   500;
  color:         var(--text-2);
  letter-spacing: 0.03em;
  transition:    background var(--transition), color var(--transition);
}

.nav-link:hover {
  color:      var(--text);
  background: var(--surface);
}

/* Header search */
.header-search {
  display:     flex;
  align-items: stretch;
  margin-left: auto;
  background:  var(--surface);
  border:      1px solid var(--border);
  border-radius: var(--radius);
  overflow:    hidden;
  transition:  border-color var(--transition);
}

.header-search:focus-within { border-color: var(--accent); }

.search-input {
  background:  transparent;
  border:      none;
  outline:     none;
  color:       var(--text);
  font-family: var(--font-body);
  font-size:   0.875rem;
  padding:     0 1rem;
  width:       220px;
}

.search-input::placeholder { color: var(--text-3); }

.search-btn {
  background:  transparent;
  border:      none;
  cursor:      pointer;
  padding:     0 0.875rem;
  color:       var(--text-2);
  display:     grid;
  place-items: center;
  transition:  color var(--transition);
}

.search-btn:hover { color: var(--accent); }

/* Mobile toggle */
.nav-toggle {
  display:     none;
  flex-direction: column;
  gap:         5px;
  background:  none;
  border:      none;
  cursor:      pointer;
  padding:     4px;
  margin-left: auto;
}

.nav-toggle span {
  display:      block;
  width:        24px;
  height:       2px;
  background:   var(--text);
  border-radius: 2px;
  transition:   transform 0.3s, opacity 0.3s;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position:  relative;
  height:    clamp(420px, 72vh, 740px);
  overflow:  hidden;
}

.hero-slider { height: 100%; }

.hero-slide {
  position:   absolute;
  inset:      0;
  background: var(--bg) var(--bg) center/cover no-repeat;
  background-image: var(--bg);
  opacity:    0;
  transition: opacity 0.9s ease;
  display:    flex;
  align-items: flex-end;
}

.hero-slide.active { opacity: 1; z-index: 1; }

.hero-overlay {
  position:   absolute;
  inset:      0;
  background: linear-gradient(
    to right,
    rgba(13,13,20,0.95) 0%,
    rgba(13,13,20,0.7)  50%,
    rgba(13,13,20,0.1)  100%
  ),
  linear-gradient(to top, rgba(13,13,20,0.8) 0%, transparent 60%);
}

.hero-content {
  position:     relative;
  z-index:      2;
  padding-bottom: clamp(2.5rem, 6vh, 5rem);
  max-width:    640px;
}

.hero-meta {
  display:    flex;
  gap:        0.5rem;
  margin-bottom: 0.75rem;
}

.hero-genre {
  font-family:    var(--font-mono);
  font-size:      0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--accent);
  padding:        0.2rem 0.6rem;
  border:         1px solid var(--accent);
  border-radius:  4px;
}

.hero-score {
  font-family: var(--font-mono);
  font-size:   0.7rem;
  color:       #0d0d14;
  background:  var(--accent);
  padding:     0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
}

.hero-title {
  font-family:   var(--font-display);
  font-size:     clamp(2.5rem, 7vw, 5.5rem);
  line-height:   0.95;
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
  text-shadow:   0 2px 20px rgba(0,0,0,0.5);
}

.hero-desc {
  font-size:     0.95rem;
  color:         var(--text-2);
  max-width:     480px;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display:     flex;
  align-items: center;
  gap:         1.25rem;
  flex-wrap:   wrap;
  margin-bottom: 1rem;
}

.hero-rating {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  font-size:   0.875rem;
  color:       var(--text-2);
}

.hero-platforms {
  display:  flex;
  gap:      0.4rem;
  flex-wrap: wrap;
}

.hero-dots {
  position:  absolute;
  bottom:    1.5rem;
  right:     2rem;
  z-index:   10;
  display:   flex;
  gap:       0.5rem;
}

.hero-dot {
  width:       8px;
  height:      8px;
  border-radius: 50%;
  background:  var(--text-3);
  border:      none;
  cursor:      pointer;
  transition:  background var(--transition), transform var(--transition);
}

.hero-dot.active {
  background: var(--accent);
  transform:  scale(1.3);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display:       inline-flex;
  align-items:   center;
  gap:           0.5rem;
  padding:       0.65rem 1.4rem;
  border-radius: var(--radius);
  font-family:   var(--font-body);
  font-size:     0.875rem;
  font-weight:   500;
  letter-spacing: 0.02em;
  cursor:        pointer;
  border:        none;
  transition:    background var(--transition), transform 0.15s, box-shadow var(--transition);
  white-space:   nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color:      #0d0d14;
}
.btn-primary:hover {
  background:  #f5ff47;
  box-shadow:  0 0 24px rgba(232,240,51,0.3);
}

.btn-secondary {
  background: var(--surface-2);
  color:      var(--text);
  border:     1px solid var(--border-2);
}
.btn-secondary:hover { background: var(--surface); }

.btn-full { width: 100%; justify-content: center; }

/* ── Sections ───────────────────────────────────────────────── */
.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section--dark {
  background: var(--bg-2);
  padding:    clamp(3rem, 7vw, 5rem) 0;
}

.section-header {
  display:       flex;
  align-items:   baseline;
  gap:           1rem;
  margin-bottom: 2rem;
}

.section-title {
  font-family:   var(--font-display);
  font-size:     clamp(1.6rem, 3.5vw, 2.5rem);
  letter-spacing: 0.04em;
}

.section-more {
  margin-left: auto;
  font-size:   0.875rem;
  color:       var(--accent);
  font-weight: 500;
}
.section-more:hover { text-decoration: underline; }

/* ── Game Cards ─────────────────────────────────────────────── */
.game-grid {
  display: grid;
  gap:     1.25rem;
}

.game-grid--4 {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.game-grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.game-card {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  overflow:      hidden;
  display:       flex;
  flex-direction: column;
  transition:    transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
  transform:     translateY(-4px);
  box-shadow:    var(--shadow-lg);
  border-color:  var(--border-2);
}

.game-card__img {
  aspect-ratio:  16/9;
  background:    var(--bg-3) center/cover no-repeat;
  position:      relative;
}

.game-card__score {
  position:     absolute;
  top:          0.5rem;
  right:        0.5rem;
  background:   var(--accent);
  color:        #0d0d14;
  font-family:  var(--font-mono);
  font-size:    0.7rem;
  font-weight:  600;
  padding:      0.15rem 0.4rem;
  border-radius: 4px;
  line-height:  1.4;
}

.game-card__body {
  padding:        0.9rem 1rem;
  flex-grow:      1;
  display:        flex;
  flex-direction: column;
  gap:            0.4rem;
}

.game-card__title {
  font-size:   0.95rem;
  font-weight: 500;
  line-height: 1.35;
  display:     -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:    hidden;
}

.game-card__meta {
  display:   flex;
  gap:       0.75rem;
  font-size: 0.78rem;
  color:     var(--text-3);
  flex-wrap: wrap;
}

.game-card__rating { color: var(--accent); }

.game-card__genres,
.game-card__platforms {
  display:  flex;
  gap:      0.3rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

/* ── Tags & Chips ───────────────────────────────────────────── */
.genre-tag {
  font-size:    0.7rem;
  padding:      0.15rem 0.55rem;
  background:   rgba(100,223,223,0.1);
  color:        var(--accent-3);
  border-radius: 100px;
  font-weight:  500;
  letter-spacing: 0.02em;
  border:       1px solid rgba(100,223,223,0.2);
}

.plain-tag {
  font-size:   0.72rem;
  padding:     0.15rem 0.55rem;
  background:  var(--surface-2);
  color:       var(--text-2);
  border-radius: 100px;
  border:      1px solid var(--border);
}

.platform-chip {
  font-size:   0.72rem;
  padding:     0.2rem 0.6rem;
  background:  var(--surface-2);
  color:       var(--text-2);
  border-radius: 100px;
  border:      1px solid var(--border);
  transition:  background var(--transition), color var(--transition);
}

.platform-chip:hover {
  background: var(--surface);
  color:      var(--text);
}

.meta-chip {
  font-size:   0.8rem;
  padding:     0.3rem 0.75rem;
  background:  rgba(255,255,255,0.07);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}

.meta-chip--score {
  background: var(--accent);
  color:      #0d0d14;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ── Star Rating ────────────────────────────────────────────── */
.star-bar {
  display:        inline-flex;
  position:       relative;
  width:          80px;
  height:         14px;
  vertical-align: middle;
}

.star-bar::before {
  content:  '★★★★★';
  position: absolute;
  color:    var(--text-3);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 2px;
}

.star-fill {
  position:  absolute;
  overflow:  hidden;
  color:     var(--accent);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 2px;
  white-space: nowrap;
}

.star-fill::after { content: '★★★★★'; }

/* ── Game Detail Page ───────────────────────────────────────── */
.game-hero {
  position:  relative;
  height:    clamp(280px, 45vh, 520px);
  background: var(--bg) var(--bg) center/cover no-repeat;
  background-image: var(--bg);
  display:   flex;
  align-items: flex-end;
}

.game-hero__overlay {
  position:   absolute;
  inset:      0;
  background: linear-gradient(
    to top, rgba(13,13,20,1) 0%, rgba(13,13,20,0.5) 60%, rgba(13,13,20,0.2) 100%
  );
}

.game-hero__content {
  position:      relative;
  z-index:       2;
  padding-bottom: 2.5rem;
}

.game-hero__title {
  font-family:   var(--font-display);
  font-size:     clamp(2rem, 6vw, 4rem);
  letter-spacing: 0.02em;
  line-height:   0.95;
  margin-bottom: 0.75rem;
}

.game-hero__meta,
.game-hero__platforms {
  display:  flex;
  gap:      0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
  display:       flex;
  align-items:   center;
  gap:           0.4rem;
  font-size:     0.8rem;
  color:         var(--text-3);
  margin-bottom: 1rem;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { color: var(--text-2); }

/* Two-column layout */
.game-layout {
  display:               grid;
  grid-template-columns: 1fr 300px;
  gap:                   2.5rem;
  padding-block:         2.5rem;
  align-items:           start;
}

.game-main { min-width: 0; }

/* Tabs */
.tab-nav {
  display:       flex;
  gap:           0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.tab-btn {
  background:    none;
  border:        none;
  border-bottom: 2px solid transparent;
  color:         var(--text-2);
  cursor:        pointer;
  font-family:   var(--font-body);
  font-size:     0.875rem;
  font-weight:   500;
  padding:       0.75rem 1rem;
  margin-bottom: -1px;
  transition:    color var(--transition), border-color var(--transition);
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color:         var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Description */
.game-description { margin-bottom: 2rem; }

.prose {
  color:       var(--text-2);
  font-size:   0.925rem;
  line-height: 1.75;
  max-height:  300px;
  overflow:    hidden;
  position:    relative;
  transition:  max-height 0.5s ease;
}

.prose.expanded { max-height: none; }

.prose-fade {
  position:   absolute;
  bottom:     0;
  left:       0;
  right:      0;
  height:     80px;
  background: linear-gradient(transparent, var(--bg));
}

.read-more-btn {
  background:  none;
  border:      none;
  color:       var(--accent);
  cursor:      pointer;
  font-family: var(--font-body);
  font-size:   0.875rem;
  margin-top:  0.5rem;
  padding:     0;
}

/* Detail blocks */
.detail-block {
  margin-bottom: 1.5rem;
}

.detail-block h3 {
  font-size:      0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--text-3);
  font-family:    var(--font-mono);
  margin-bottom:  0.6rem;
}

.tag-list {
  display:  flex;
  flex-wrap: wrap;
  gap:      0.4rem;
}

.store-list {
  display:  flex;
  flex-wrap: wrap;
  gap:      0.5rem;
}

.store-btn {
  font-size:   0.8rem;
  padding:     0.4rem 0.9rem;
  background:  var(--surface-2);
  border:      1px solid var(--border);
  border-radius: var(--radius-sm);
  color:       var(--text);
  transition:  background var(--transition), border-color var(--transition);
}
.store-btn:hover { background: var(--surface); border-color: var(--border-2); }

/* Screenshots */
.screenshot-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap:                   0.75rem;
}

.screenshot-thumb {
  border-radius: var(--radius-sm);
  overflow:      hidden;
  aspect-ratio:  16/9;
  display:       block;
  cursor:        zoom-in;
}

.screenshot-thumb img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.screenshot-thumb:hover img { transform: scale(1.04); }

/* Sidebar */
.game-sidebar { position: sticky; top: 80px; }

.sidebar-cover {
  width:         100%;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  aspect-ratio:  3/4;
  object-fit:    cover;
}

.sidebar-details,
.sidebar-platforms {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       1.25rem;
  margin-bottom: 1rem;
}

.sidebar-details h3,
.sidebar-platforms h3 {
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--text-3);
  margin-bottom:  1rem;
}

.detail-list {
  display:               grid;
  grid-template-columns: auto 1fr;
  gap:                   0.5rem 1rem;
  font-size:             0.82rem;
}

.detail-list dt { color: var(--text-3); }
.detail-list dd { color: var(--text);   }

.score-badge {
  font-family: var(--font-mono);
  font-size:   0.8rem;
  font-weight: 600;
  padding:     0.15rem 0.5rem;
  border-radius: 4px;
}
.score-badge--good { background: rgba(34,197,94,0.15); color: #22c55e; }
.score-badge--mixed { background: rgba(234,179,8,0.15); color: #eab308; }
.score-badge--bad   { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ── Listing page ───────────────────────────────────────────── */
.page-header { padding-block: 2.5rem 1.5rem; }

.page-title {
  font-family:   var(--font-display);
  font-size:     clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.04em;
  line-height:   1;
}

.page-subtitle {
  color:      var(--text-3);
  font-size:  0.875rem;
  margin-top: 0.4rem;
}

.listing-layout {
  display:               grid;
  grid-template-columns: 240px 1fr;
  gap:                   2rem;
  padding-bottom:        4rem;
  align-items:           start;
}

.listing-main { min-width: 0; }

/* Filters */
.filters-panel {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       1.5rem;
  position:      sticky;
  top:           80px;
}

.filters-title {
  font-family:    var(--font-mono);
  font-size:      0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--text-3);
  margin-bottom:  1.25rem;
}

.filter-group {
  border:        none;
  margin-bottom: 1.5rem;
}

.filter-group legend {
  font-size:     0.78rem;
  font-weight:   500;
  color:         var(--text-2);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.radio-label {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  font-size:   0.82rem;
  color:       var(--text-2);
  cursor:      pointer;
  padding:     0.25rem 0;
  transition:  color var(--transition);
}
.radio-label:hover { color: var(--text); }
.radio-label small { color: var(--text-3); }

.radio-label input[type=radio] {
  accent-color: var(--accent);
  cursor:       pointer;
}

/* ── Search page ────────────────────────────────────────────── */
.search-form-large {
  display:  flex;
  gap:      0.75rem;
  max-width: 700px;
  margin-bottom: 2rem;
}

.search-input-large {
  flex:        1;
  background:  var(--surface);
  border:      1px solid var(--border);
  border-radius: var(--radius);
  color:       var(--text);
  font-family: var(--font-body);
  font-size:   1rem;
  padding:     0.75rem 1.25rem;
  outline:     none;
  transition:  border-color var(--transition);
}
.search-input-large:focus { border-color: var(--accent); }
.search-input-large::placeholder { color: var(--text-3); }

/* ── Platforms listing ──────────────────────────────────────── */
.platform-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap:                   1.25rem;
  padding-bottom:        4rem;
}

.platform-card {
  position:      relative;
  border-radius: var(--radius);
  overflow:      hidden;
  aspect-ratio:  16/9;
  background:    var(--surface);
  border:        1px solid var(--border);
  transition:    transform 0.2s ease, box-shadow 0.2s ease;
}

.platform-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.platform-card__bg {
  position:       absolute;
  inset:          0;
  background:     center/cover no-repeat;
  filter:         brightness(0.35);
  transition:     filter 0.3s;
}

.platform-card:hover .platform-card__bg { filter: brightness(0.5); }

.platform-card__body {
  position:  absolute;
  inset:     0;
  display:   flex;
  flex-direction: column;
  justify-content: flex-end;
  padding:   1rem;
}

.platform-card__name {
  font-family:   var(--font-display);
  font-size:     1.3rem;
  letter-spacing: 0.03em;
  line-height:   1;
}

.platform-card__count {
  font-size:  0.75rem;
  color:      var(--text-3);
  margin-top: 0.25rem;
}

/* Platform hero */
.platform-hero {
  background: var(--bg) center/cover no-repeat;
  background-image: var(--bg);
  padding: 5rem 0 3rem;
  position: relative;
}
.platform-hero__overlay {
  position: absolute;
  inset:    0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(13,13,20,0.6) 100%);
}
.platform-hero__content { position: relative; z-index: 2; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display:         flex;
  justify-content: center;
  gap:             0.4rem;
  padding-top:     2.5rem;
  flex-wrap:       wrap;
}

.page-btn {
  display:       grid;
  place-items:   center;
  min-width:     40px;
  height:        40px;
  padding:       0 0.75rem;
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size:     0.875rem;
  color:         var(--text-2);
  transition:    background var(--transition), color var(--transition), border-color var(--transition);
}

.page-btn:hover { background: var(--surface-2); color: var(--text); }
.page-btn.active {
  background:   var(--accent);
  color:        #0d0d14;
  border-color: var(--accent);
  font-weight:  600;
}

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align:  center;
  padding:     4rem 1rem;
  color:       var(--text-3);
}
.empty-state h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 0.5rem; color: var(--text-2); }
.empty-state a  { color: var(--accent); }

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  position:        fixed;
  inset:           0;
  z-index:         1000;
  background:      rgba(0,0,0,0.93);
  display:         flex;
  align-items:     center;
  justify-content: center;
  opacity:         0;
  pointer-events:  none;
  transition:      opacity 0.3s ease;
}

.lightbox.open {
  opacity:        1;
  pointer-events: all;
}

.lightbox-img {
  max-width:    90vw;
  max-height:   85vh;
  border-radius: var(--radius);
  box-shadow:   var(--shadow-lg);
}

.lightbox-close {
  position:  absolute;
  top:       1.5rem;
  right:     1.5rem;
  background: var(--surface);
  border:    1px solid var(--border);
  color:     var(--text);
  font-size: 1.5rem;
  line-height: 1;
  width:     44px;
  height:    44px;
  border-radius: 50%;
  cursor:    pointer;
  display:   grid;
  place-items: center;
  transition: background var(--transition);
}
.lightbox-close:hover { background: var(--surface-2); }

/* ── Comments ───────────────────────────────────────────────── */
.comments-section { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background:   var(--bg-2);
  border-top:   1px solid var(--border);
  padding:      2.5rem 0;
  margin-top:   4rem;
}

.footer-inner {
  display:     flex;
  align-items: center;
  gap:         2rem;
  flex-wrap:   wrap;
}

.footer-tagline {
  font-size: 0.8rem;
  color:     var(--text-3);
  margin-top: 0.3rem;
}

.footer-nav {
  display:  flex;
  gap:      1rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.footer-nav a {
  font-size: 0.83rem;
  color:     var(--text-3);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--text); }

.footer-credit {
  font-size: 0.78rem;
  color:     var(--text-3);
  width:     100%;
}
.footer-credit a { color: var(--accent); }

/* ── Not found ──────────────────────────────────────────────── */
.not-found {
  text-align: center;
  padding:    6rem 1rem;
}
.not-found h1 {
  font-family: var(--font-display);
  font-size:   3rem;
  margin-bottom: 1.5rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .listing-layout {
    grid-template-columns: 200px 1fr;
  }
  .game-layout {
    grid-template-columns: 1fr 260px;
  }
}

@media (max-width: 768px) {
  .main-nav { display: none; }

  .main-nav.open {
    display:    flex;
    flex-direction: column;
    position:   absolute;
    top:        64px;
    left:       0;
    right:      0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding:    1rem;
    gap:        0.25rem;
    z-index:    99;
  }

  .nav-toggle { display: flex; }

  .search-input { width: 150px; }

  .listing-layout {
    grid-template-columns: 1fr;
  }

  .filters-panel { position: static; }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .game-sidebar { position: static; }

  .hero-content { max-width: 100%; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav   { margin-left: 0; }
}

@media (max-width: 480px) {
  .hero { height: 70vh; }
  .hero-title { font-size: 2.4rem; }
  .game-grid--4 { grid-template-columns: 1fr 1fr; }
  .game-grid--3 { grid-template-columns: 1fr 1fr; }
  .header-search { display: none; }
}

/* ── Utilities & Animations ─────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content { animation: fadeInUp 0.7s ease both; }

/* Focus styles for accessibility */
:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 3px;
  border-radius:  4px;
}

/* ── Buy Buttons ────────────────────────────────────────────── */
.buy-buttons {
  background:    var(--surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       1.25rem;
  margin-bottom: 1rem;
}

.buy-title {
  font-family:    var(--font-mono);
  font-size:      .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color:          var(--text-3);
  margin-bottom:  .85rem;
}

.buy-buttons .store-btn {
  display:       flex;
  align-items:   center;
  padding:       .6rem .9rem;
  border-radius: var(--radius-sm);
  font-size:     .82rem;
  font-weight:   500;
  margin-bottom: .4rem;
  transition:    filter .18s, transform .15s;
  border:        none;
  cursor:        pointer;
}

.buy-buttons .store-btn:last-child { margin-bottom: 0; }

.buy-buttons .store-btn:hover {
  filter:    brightness(1.15);
  transform: translateX(3px);
}

.store-btn--amazon {
  background: #ff9900 !important;
  color:      #0d0d14 !important;
}

/* ── Ad Slots ───────────────────────────────────────────────── */
.ad-slot {
  overflow: hidden;
  text-align: center;
}
