/*
Theme Name: NSP ROM - Nintendo Switch ROMs
Theme URI: https://nsproms.net
Author: NSP ROM Team
Author URI: https://nsproms.net
Description: A fast, modern, and SEO-optimized WordPress theme for Nintendo Switch ROM downloads. Features dark gaming aesthetic, lightning-fast performance, and conversion-optimized download pages.
Version: 1.1.3
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: roroms
Tags: dark, gaming, downloads, custom-post-types, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --color-bg:          #0d0e14;
  --color-surface:     #14151f;
  --color-surface-2:   #1a1b28;
  --color-surface-3:   #1f2135;
  --color-border:      #2c2c36;
  --color-primary:     #e4002b;
  --color-primary-h:   #ff1a3e;
  --color-accent:      #e8eaf0;
  --color-accent-h:    #ffffff;
  --color-text:        #e8eaf0;
  --color-text-muted:  #8b91b0;
  --color-text-dim:    #5a5f7a;
  --color-green:       #00e676;
  --color-orange:      #ff9800;
  --color-gold:        #ffd600;
  --font-sans:         'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:      'Rajdhani', 'Inter', sans-serif;
  --font-mono:         'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm:         6px;
  --radius-md:         10px;
  --radius-lg:         16px;
  --radius-xl:         24px;
  --shadow-card:       0 4px 24px rgba(0,0,0,.45);
  --shadow-glow:       0 0 20px rgba(228,0,43,.3);
  --shadow-glow-blue:  0 0 20px rgba(0,212,255,.25);
  --transition:        0.2s ease;
  --header-h:          64px;
  --sidebar-w:         300px;
  --max-w:             1400px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-h); }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.01em;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ============================================================
   SELECTION
   ============================================================ */
::selection { background: var(--color-primary); color: #fff; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.text-green { color: var(--color-green); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--red    { background: rgba(228,0,43,.15); color: var(--color-primary); border: 1px solid rgba(228,0,43,.3); }
.badge--blue   { background: rgba(0,212,255,.12); color: var(--color-accent); border: 1px solid rgba(0,212,255,.25); }
.badge--green  { background: rgba(0,230,118,.12); color: var(--color-green); border: 1px solid rgba(0,230,118,.25); }
.badge--orange { background: rgba(255,152,0,.12); color: var(--color-orange); border: 1px solid rgba(255,152,0,.25); }
.badge--gold   { background: rgba(255,214,0,.12); color: var(--color-gold); border: 1px solid rgba(255,214,0,.25); }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(13,14,20,.96);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: none !important;
  border-bottom: 1px solid #1e1e26 !important;
  box-shadow: none !important;
  outline: none !important;
}
html, body {
  border-top: none !important;
  box-shadow: none !important;
}
body::before,
body::after,
.site-header::before,
.site-header::after,
#page::before,
#page::after {
  display: none !important;
  content: none !important;
  border: none !important;
  height: 0 !important;
  background: none !important;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo__icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), #8b0020);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.site-logo__text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}

.site-logo__text span { color: var(--color-primary); }

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.header-search__form { position: relative; }

.header-search__input {
  width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 9px 44px 9px 18px;
  color: var(--color-text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header-search__input::placeholder { color: var(--color-text-dim); }
.header-search__input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,.1);
}

.header-search__btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.header-search__btn:hover { color: var(--color-accent); }

.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.header-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.current-menu-item {
  background: var(--color-surface-2);
  color: #fff;
}

.header-nav .btn-nav-primary {
  background: var(--color-primary);
  color: #fff !important;
  padding: 7px 18px;
  border-radius: 100px;
}
.header-nav .btn-nav-primary:hover {
  background: var(--color-primary-h);
  box-shadow: var(--shadow-glow);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--color-text);
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: all 0.3s;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.site-main { min-height: calc(100vh - var(--header-h)); }

.layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 28px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 20px;
  align-items: start;
}

.layout--full { grid-template-columns: 1fr; }
.layout--content { max-width: var(--max-w); margin: 0 auto; padding: 28px 20px; }

/* ============================================================
   HERO / FEATURED BANNER
   ============================================================ */
.hero-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0d0e14 0%, #1a0d1a 50%, #0d0e14 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero-banner__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-banner__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 70% 50%, rgba(228,0,43,.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 30%, rgba(0,212,255,.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-banner__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.hero-banner__title {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero-banner__title .accent { color: var(--color-primary); }

.hero-banner__desc {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 28px;
  max-width: 480px;
  line-height: 1.7;
}

.hero-banner__actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hero-banner__cover {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: 0 24px 80px rgba(0,0,0,.6), var(--shadow-glow);
}

.hero-banner__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner__cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 50%);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-header__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.section-header__title::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-header__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.section-header__link:hover { color: var(--color-accent); }

/* ============================================================
   GAME CARD GRID
   ============================================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.games-grid--lg {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.game-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(228,0,43,.5);
  box-shadow: 0 12px 40px rgba(0,0,0,.5), var(--shadow-glow);
}

.game-card__cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--color-surface-2);
}

.game-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card__cover img { transform: scale(1.06); }

.game-card__cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-surface-2), var(--color-surface-3));
  color: var(--color-text-dim);
  font-size: 36px;
}

.game-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.game-card__rating {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-gold);
  display: flex;
  align-items: center;
  gap: 3px;
}

.game-card__body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.game-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.game-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.game-card__footer {
  padding: 10px 14px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.game-card__size {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-card__dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-card__dl-btn:hover {
  background: var(--color-primary-h);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

/* ============================================================
   FEATURED GAME CARD (HORIZONTAL)
   ============================================================ */
.game-card--featured {
  flex-direction: row;
  min-height: 140px;
}

.game-card--featured .game-card__cover {
  width: 200px;
  aspect-ratio: unset;
  flex-shrink: 0;
}

/* ============================================================
   CATEGORY CHIPS
   ============================================================ */
.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  scrollbar-width: none;
}
.category-strip::-webkit-scrollbar { display: none; }

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}

.cat-chip:hover,
.cat-chip.active {
  background: rgba(228,0,43,.12);
  border-color: var(--color-primary);
  color: #fff;
}

.cat-chip .cat-chip__count {
  background: var(--color-surface-3);
  border-radius: 100px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-dim);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-h);
  color: #fff;
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover {
  background: var(--color-surface-3);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}

.btn--accent {
  background: var(--color-accent);
  color: #000;
  font-weight: 800;
}
.btn--accent:hover {
  background: var(--color-accent-h);
  color: #000;
  box-shadow: var(--shadow-glow-blue);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.btn--ghost:hover {
  background: var(--color-surface-2);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}

.btn--lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn--sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn--xl { padding: 16px 36px; font-size: 18px; border-radius: var(--radius-lg); }

.btn--download {
  background: linear-gradient(135deg, var(--color-primary), #8b0020);
  color: #fff;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}
.btn--download::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.1), transparent);
  pointer-events: none;
}
.btn--download:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(228,0,43,.5);
}

/* ============================================================
   SINGLE GAME PAGE
   ============================================================ */
.game-single { display: grid; grid-template-columns: 1fr var(--sidebar-w); gap: 28px; }

.game-single__header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.game-single__hero {
  position: relative;
  height: 320px;
  overflow: hidden;
}

.game-single__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-single__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, rgba(20,21,31,.95) 100%);
}

.game-single__hero-content {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-end;
}

.game-single__cover {
  width: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  border: 3px solid rgba(255,255,255,.1);
}

.game-single__cover img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

.game-single__info { flex: 1; }

.game-single__title {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 900;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.game-single__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

.game-single__quick-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.quick-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.quick-stat strong { color: #fff; }

/* ============================================================
   GAME SPECS TABLE
   ============================================================ */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr { border-bottom: 1px solid var(--color-border); }
.specs-table tr:last-child { border-bottom: none; }

.specs-table td {
  padding: 12px 0;
  font-size: 14px;
  vertical-align: top;
}

.specs-table td:first-child {
  width: 40%;
  color: var(--color-text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.specs-table td:last-child { color: #fff; font-weight: 600; }

/* ============================================================
   DOWNLOAD BOX
   ============================================================ */
.download-box {
  background: linear-gradient(135deg, var(--color-surface-2), var(--color-surface-3));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.download-box::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(228,0,43,.08) 0%, transparent 70%);
  pointer-events: none;
}

.download-box__title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-box__links { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.download-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-decoration: none;
  transition: all var(--transition);
}

.download-link:hover {
  border-color: rgba(0,212,255,.4);
  background: var(--color-surface-3);
  transform: translateX(3px);
}

.download-link__left { display: flex; align-items: center; gap: 12px; }

.download-link__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.download-link__name { font-weight: 700; font-size: 14px; color: #fff; }
.download-link__meta { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }

.download-link__arrow {
  color: var(--color-text-dim);
  font-size: 16px;
  transition: transform var(--transition), color var(--transition);
}

.download-link:hover .download-link__arrow {
  transform: translateX(3px);
  color: var(--color-accent);
}

.download-box__notice {
  background: rgba(0,212,255,.06);
  border: 1px solid rgba(0,212,255,.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* ============================================================
   SCREENSHOTS GALLERY
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  font-size: 24px;
  color: transparent;
}

.gallery-item:hover .gallery-item__overlay {
  background: rgba(0,0,0,.5);
  color: #fff;
}

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 16px); }

.widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.widget__header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget__body { padding: 16px 18px; }

.widget-game-list { display: flex; flex-direction: column; gap: 12px; }

.widget-game-item {
  display: flex;
  gap: 10px;
  text-decoration: none;
  align-items: center;
  transition: opacity var(--transition);
}

.widget-game-item:hover { opacity: 0.8; }

.widget-game-item__thumb {
  width: 56px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-surface-2);
}

.widget-game-item__thumb img { width: 100%; height: 100%; object-fit: cover; }

.widget-game-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.widget-game-item__sub { font-size: 11px; color: var(--color-text-dim); margin-top: 2px; }

/* Tag cloud widget */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a {
  padding: 5px 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition);
}
.tag-cloud a:hover {
  background: var(--color-surface-3);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.pagination a {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.pagination a:hover {
  background: var(--color-surface-2);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}

.pagination .current,
.pagination span.current {
  background: var(--color-primary);
  color: #fff;
  border: none;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-text-dim);
  padding: 14px 0;
}

.breadcrumbs a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs .sep { color: var(--color-text-dim); opacity: 0.5; }
.breadcrumbs .current { color: var(--color-text); }

/* ============================================================
   CARD SECTION WRAPPER
   ============================================================ */
.section { margin-bottom: 40px; }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  display: flex;
  gap: 1px;
  background: var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 28px;
}

.stat-item {
  flex: 1;
  padding: 16px 20px;
  background: var(--color-surface);
  text-align: center;
}

.stat-item__value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-item__value .unit { font-size: 14px; color: var(--color-text-muted); font-weight: 600; }

.stat-item__label {
  font-size: 11px;
  color: var(--color-text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   CONTENT TYPOGRAPHY (for descriptions)
   ============================================================ */
.content-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text-muted);
}

.content-body p { margin-bottom: 16px; }
.content-body p:last-child { margin-bottom: 0; }
.content-body h2, .content-body h3 {
  color: #fff;
  margin: 24px 0 12px;
}
.content-body ul, .content-body ol {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}
.content-body li { margin-bottom: 6px; }
.content-body strong { color: #fff; font-weight: 700; }
.content-body a { color: var(--color-accent); }
.content-body code {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-accent);
}

/* ============================================================
   NOTICE / ALERT
   ============================================================ */
.notice {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
}

.notice--info {
  background: rgba(0,212,255,.07);
  border: 1px solid rgba(0,212,255,.2);
  color: var(--color-text-muted);
}

.notice--warning {
  background: rgba(255,152,0,.07);
  border: 1px solid rgba(255,152,0,.25);
  color: var(--color-text-muted);
}

.notice--success {
  background: rgba(0,230,118,.07);
  border: 1px solid rgba(0,230,118,.2);
  color: var(--color-text-muted);
}

.notice__icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   TABS
   ============================================================ */
.tabs { }
.tabs__nav {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
  color: #fff;
  border-bottom-color: var(--color-primary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 28px;
}

.search-header h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

.search-header p { color: var(--color-text-muted); font-size: 15px; }
.search-header span { color: var(--color-accent); font-weight: 700; }

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.error-404__code {
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.error-404__title { font-size: 28px; margin-bottom: 12px; }
.error-404__desc { color: var(--color-text-muted); margin-bottom: 28px; max-width: 400px; }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: 60px;
}

.site-footer__top {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 20px 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-about__logo { margin-bottom: 16px; }

.footer-about__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 320px;
}

.footer-social { display: flex; gap: 10px; }

.social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--color-surface-3);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.footer-col__title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 9px; }

.footer-col ul li a {
  font-size: 14px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul li a:hover { color: var(--color-accent); }

.site-footer__bottom {
  border-top: 1px solid var(--color-border);
  padding: 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer__bottom p {
  font-size: 13px;
  color: var(--color-text-dim);
}

.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a {
  font-size: 13px;
  color: var(--color-text-dim);
  text-decoration: none;
}
.footer-bottom-links a:hover { color: var(--color-text-muted); }

/* ============================================================
   MOBILE MENU OVERLAY
   ============================================================ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  flex-direction: column;
  background: var(--color-bg);
  padding: 20px;
  overflow-y: auto;
}

.mobile-menu.open { display: flex; }

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.mobile-menu__close {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--color-text);
}

.mobile-menu__nav { display: flex; flex-direction: column; gap: 4px; }

.mobile-menu__nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition);
}

.mobile-menu__nav a:hover { background: var(--color-surface-2); color: #fff; }

/* ============================================================
   LOAD MORE / SPINNER
   ============================================================ */
.load-more-wrap { display: flex; justify-content: center; padding: 24px 0; }

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.filter-select {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238b91b0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.filter-select:focus { border-color: var(--color-accent); }

.filter-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--color-text-dim);
}

.filter-count strong { color: var(--color-text); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  color: #fff;
  font-size: 18px;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-glow);
  z-index: 500;
}

.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--color-primary-h); transform: translateY(-3px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr 260px; }
  .game-single { grid-template-columns: 1fr 260px; }
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .layout { grid-template-columns: 1fr; }
  .game-single { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .hero-banner__inner { grid-template-columns: 1fr; }
  .hero-banner__cover { display: none; }
  .header-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-search { max-width: 100%; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .stats-bar { grid-template-columns: 1fr 1fr; display: grid; }
  .site-footer__top { grid-template-columns: 1fr; }
  .game-single__hero { height: 220px; }
  .game-single__hero-content { flex-direction: column; align-items: flex-start; }
  .game-single__cover { width: 80px; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero-banner__inner { padding: 36px 20px; }
  .hero-banner__actions { flex-direction: column; align-items: flex-start; }
  .site-footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 400px) {
  .games-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .sidebar, .site-footer, .back-to-top { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ============================================================
   LOGO TEXT (header/footer)
   ============================================================ */
.logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.logo-text__nsp  { color: #fff; }
.logo-text__rom  { color: var(--color-primary); }
.logo-text__ro,
.logo-text__roms,
.logo-badge { display: none !important; }
.site-header__logo { text-decoration: none; }
.footer-logo { text-decoration: none; }

/* ============================================================
   HEADER SEARCH FORM
   ============================================================ */
.site-header__search { flex: 1; max-width: 460px; }
.search-form__wrap {
  display: flex;
  align-items: center;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-form__wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(228,0,43,.12);
}
.search-form__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 14px;
  color: var(--color-text);
  font-size: 14px;
}
.search-form__input::placeholder { color: var(--color-text-dim); }
.search-form__btn {
  background: transparent;
  border: none;
  padding: 0 14px;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.search-form__btn:hover { color: var(--color-primary); }

/* ============================================================
   NAV TOGGLE (mobile hamburger)
   ============================================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--color-text);
  flex-shrink: 0;
}
.nav-toggle__bar {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Primary nav — professional red theme, no blue lines */
.site-nav {
  background: var(--color-surface);
  border-bottom: 1px solid #1e1e26;
  position: relative;
  box-shadow: none;
}
.site-nav::after,
.site-nav::before,
.site-header::after,
.site-header::before,
.genre-strip-wrap::after,
.genre-strip-wrap::before {
  display: none !important;
  content: none !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}
.site-nav .container,
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-nav__social .social-icons { margin: 0; }
.site-nav__social .social-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}
.site-nav__social .social-icon svg { width: 14px; height: 14px; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li { position: relative; }
.nav-menu a {
  display: block;
  padding: 14px 18px;
  color: var(--color-text-muted) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  border: none !important;
  border-bottom: none !important;
  margin-bottom: 0;
  transition: color var(--transition);
  white-space: nowrap;
  box-shadow: none !important;
  outline: none;
  background-image: none !important;
}
.nav-menu a:hover,
.nav-menu a:focus {
  color: #fff !important;
  text-decoration: none !important;
  border: none !important;
}
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a,
.nav-menu .current-menu-parent > a,
.nav-menu .current-post-ancestor > a {
  color: var(--color-primary) !important;
  border: none !important;
  border-bottom: none !important;
}
/* Kill any WP/theme cyan decorations on nav */
.site-nav a::after,
.site-nav a::before,
.nav-menu a::after,
.nav-menu a::before {
  display: none !important;
  content: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* ============================================================
   GENRE STRIP WRAP
   ============================================================ */
.genre-strip-wrap {
  background: var(--color-surface);
  border-bottom: 1px solid #1e1e26;
  overflow-x: auto;
  scrollbar-width: none;
}
.genre-strip-wrap::-webkit-scrollbar { display: none; }
.genre-strip-wrap .container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ============================================================
   HERO (homepage)
   ============================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 420px;
  padding: 60px 0 48px;
  overflow: hidden;
  margin: 0 -20px;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(228,0,43,.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 10% 80%, rgba(228,0,43,.05) 0%, transparent 60%),
    var(--color-bg);
  z-index: 0;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Ccircle cx='20' cy='20' r='1' fill='%232a2d45' fill-opacity='0.4'/%3E%3C/g%3E%3C/svg%3E") repeat;
  opacity: 0.5;
}
.hero__content {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 0 20px;
  max-width: 680px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
  padding: 6px 14px;
  background: rgba(228,0,43,.1);
  border: 1px solid rgba(228,0,43,.2);
  border-radius: 100px;
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  color: #fff;
}
.hero__title-accent { color: var(--color-primary); }
.hero__subtitle {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 28px;
  max-width: 500px;
  line-height: 1.65;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero__stats {
  display: flex;
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}
.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
}
.hero__stat span { font-size: 12px; color: var(--color-text-muted); }
.hero__visual {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 380px;
  height: 260px;
  pointer-events: none;
}
.hero__console {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(228,0,43,.15), transparent);
  border-radius: 50%;
  filter: blur(40px);
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.section-header__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.section-header__title svg { color: var(--color-primary); }
.section-header__link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.section-header__link:hover { color: var(--color-accent); }

/* ============================================================
   GAMES GRID — portrait Switch box art
   ============================================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

/* ============================================================
   GAME CARD — portrait 2:3 (Nintendo box art style)
   ============================================================ */
.game-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(228,0,43,.5);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(228,0,43,.12);
}
.game-card__thumb-link {
  display: block;
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--color-surface-2);
}
.game-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}
.game-card:hover .game-card__thumb { transform: scale(1.04); }
.game-card__thumb--placeholder {
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface-3));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
  width: 100%;
  height: 100%;
}
.game-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
}
.badge--format { background: rgba(228,0,43,.92); color: #fff; border: none; font-size: 10px; padding: 3px 8px; border-radius: 4px; }
.badge--region { background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.15); font-size: 10px; padding: 3px 8px; border-radius: 4px; }
.game-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,14,20,.85) 0%, rgba(13,14,20,.2) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1;
}
.game-card:hover .game-card__overlay { opacity: 1; }
.game-card__dl-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-glow);
}
.game-card__body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.game-card__genre {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-decoration: none;
}
.game-card__genre:hover { color: var(--color-primary-h); }
.game-card__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-card__title a { color: var(--color-text); text-decoration: none; }
.game-card__title a:hover { color: #fff; }
.game-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.game-card__rating .star-rating { font-size: 12px; gap: 1px; }
.game-card__rating-avg { font-size: 11px; font-weight: 700; color: var(--color-gold); }
.game-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.game-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--color-text-muted);
}

/* List view — horizontal with portrait thumb */
.games-grid--list { grid-template-columns: 1fr; }
.games-grid--list .game-card { flex-direction: row; }
.games-grid--list .game-card__thumb-link {
  flex-shrink: 0;
  width: 90px;
  aspect-ratio: 2 / 3;
}
.games-grid--list .game-card__body { padding: 14px 16px; justify-content: center; }
.games-grid--list .game-card__title { font-size: 16px; -webkit-line-clamp: 1; }
.games-grid--list .game-card__overlay { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.2;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--color-primary-h); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn--ghost {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn--ghost:hover { border-color: var(--color-text-muted); color: #fff; background: var(--color-surface-2); }
.btn--lg { padding: 13px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn--glow { box-shadow: var(--shadow-glow); }
.btn--glow:hover { box-shadow: 0 0 30px rgba(228,0,43,.5); }
.btn-size-badge {
  background: rgba(255,255,255,.2);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
   ARCHIVE HEADER
   ============================================================ */
.archive-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}
.archive-header__eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 6px;
}
.archive-header__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}
.archive-header__title svg { color: var(--color-primary); }
.archive-header__count { font-size: 14px; color: var(--color-text-muted); }
.archive-header__count strong { color: var(--color-text); }
.archive-header__desc { font-size: 15px; color: var(--color-text-muted); margin-bottom: 8px; }

/* ============================================================
   ARCHIVE TOOLBAR
   ============================================================ */
.archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.toolbar-select {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.archive-toolbar__view { display: flex; gap: 4px; }
.view-btn {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
}
.view-btn.active, .view-btn:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ============================================================
   LOAD MORE
   ============================================================ */
.load-more-wrap { text-align: center; margin: 32px 0; }
.load-more-btn { min-width: 200px; justify-content: center; }
.btn-spinner { animation: spin 1s linear infinite; display: none; }
.load-more-btn.is-loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   NO RESULTS / 404
   ============================================================ */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-text-muted);
}
.no-results svg { margin: 0 auto 20px; color: var(--color-text-dim); }
.no-results h2 { font-size: 24px; color: var(--color-text); margin-bottom: 8px; }
.no-results .btn { margin-top: 20px; }

.error-404 { text-align: center; padding: 80px 20px; }
.error-404__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  line-height: 1;
  color: var(--color-surface-3);
  margin-bottom: 12px;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--color-primary), rgba(228,0,43,.3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.error-404__title { font-size: 32px; margin-bottom: 12px; }
.error-404__message { font-size: 16px; color: var(--color-text-muted); margin-bottom: 28px; max-width: 420px; margin-left: auto; margin-right: auto; }
.error-404__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.error-404__search { max-width: 400px; margin: 0 auto; }
.error-404__search p { color: var(--color-text-muted); margin-bottom: 10px; font-size: 14px; }

/* ============================================================
   SINGLE GAME — LAYOUT
   ============================================================ */
.single-game { padding: 0 0 60px; }
.game-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 32px;
  align-items: start;
}
.game-layout__main { min-width: 0; }
.game-layout__sidebar { position: sticky; top: calc(var(--header-h) + 80px); }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 16px 0;
  margin-bottom: 8px;
}
.breadcrumbs a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-text); }
.breadcrumbs .sep { color: var(--color-text-dim); }
.breadcrumbs .current { color: var(--color-text); }

/* ============================================================
   GAME HERO (single-game.php)
   ============================================================ */
.game-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.game-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(32px) brightness(0.25) saturate(1.5);
  transform: scale(1.1);
  z-index: 0;
}
.game-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  padding: 28px;
  align-items: flex-start;
}
.game-hero__cover { flex-shrink: 0; width: 180px; }
.game-hero__cover-img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  aspect-ratio: 3/4;
  object-fit: cover;
}
.game-hero__cover-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
}
.game-hero__format-badge {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  background: var(--color-primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.game-hero__info { flex: 1; min-width: 0; }
.game-hero__genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.game-hero__title {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 6px;
  color: #fff;
}
.game-hero__dev { font-size: 14px; color: var(--color-text-muted); margin-bottom: 0; }
.game-hero__dl-cta { margin-top: 20px; }

/* Tag chip */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(228,0,43,.1);
  border: 1px solid rgba(228,0,43,.2);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: all var(--transition);
}
.tag:hover { background: rgba(228,0,43,.2); color: var(--color-primary-h); }

/* ============================================================
   QUICK FACTS
   ============================================================ */
.game-quick-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.quick-fact {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}
.quick-fact svg { color: var(--color-primary); flex-shrink: 0; }
.quick-fact span { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; }
.quick-fact strong { font-size: 13px; color: var(--color-text); margin-left: auto; white-space: nowrap; }
.quick-fact--tid { grid-column: 1 / -1; }
.copy-tid-btn {
  background: none;
  border: none;
  color: var(--color-text-dim);
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
}
.copy-tid-btn:hover { color: var(--color-accent); }

/* ============================================================
   TABS
   ============================================================ */
.tabs { margin-bottom: 32px; }
.tabs__nav {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 24px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: var(--color-text); }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.section-title svg { color: var(--color-primary); }

/* ============================================================
   SPECS TABLE
   ============================================================ */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.specs-table th, .specs-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.specs-table tr:last-child th,
.specs-table tr:last-child td { border-bottom: none; }
.specs-table th {
  width: 35%;
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
  background: rgba(255,255,255,.02);
}
.specs-table td { color: var(--color-text); }
.specs-table tr:hover { background: rgba(255,255,255,.02); }

/* ============================================================
   DOWNLOAD SECTION
   ============================================================ */
.download-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.download-section__size { font-size: 14px; color: var(--color-text-muted); }
.download-section__size strong { color: var(--color-text); }
.download-links-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.dl-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: border-color var(--transition);
}
.dl-link-row:hover { border-color: var(--color-primary); }
.dl-link-row__icon { font-size: 22px; width: 32px; text-align: center; flex-shrink: 0; }
.dl-link-row__info { flex: 1; min-width: 0; }
.dl-link-row__name { display: block; font-size: 14px; font-weight: 600; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-link-row__host { font-size: 12px; color: var(--color-text-muted); }
.dl-link-row__size { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }
.dl-link-row__btn { flex-shrink: 0; }

.how-to-notice {
  display: flex;
  gap: 12px;
  background: rgba(0,212,255,.06);
  border: 1px solid rgba(0,212,255,.15);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.55;
}
.how-to-notice svg { color: var(--color-accent); flex-shrink: 0; margin-top: 2px; }
.how-to-notice strong { color: var(--color-text); }

/* ============================================================
   GAME TRAILER / VIDEO
   ============================================================ */
.game-trailer { margin-bottom: 28px; }
.video-embed {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ============================================================
   SCREENSHOTS GRID
   ============================================================ */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.screenshot-item {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid var(--color-border);
  transition: border-color var(--transition), transform var(--transition);
}
.screenshot-item img { width: 100%; height: 100%; object-fit: cover; }
.screenshot-item:hover { border-color: var(--color-accent); transform: scale(1.02); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.9); cursor: pointer; }
.lightbox__content { position: relative; z-index: 1; max-width: 90vw; max-height: 90vh; }
.lightbox__img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius-md); display: block; }
.lightbox__counter { text-align: center; color: rgba(255,255,255,.6); font-size: 13px; margin-top: 8px; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: var(--radius-md);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background var(--transition);
}
.lightbox__close:hover,.lightbox__prev:hover,.lightbox__next:hover { background: var(--color-primary); }
.lightbox__close { top: 16px; right: 16px; width: 40px; height: 40px; }
.lightbox__prev { top: 50%; left: 16px; transform: translateY(-50%); width: 44px; height: 60px; }
.lightbox__next { top: 50%; right: 16px; transform: translateY(-50%); width: 44px; height: 60px; }

/* ============================================================
   GAME DESCRIPTION / PROSE
   ============================================================ */
.game-description.prose { margin-bottom: 28px; }
.prose p { color: var(--color-text-muted); line-height: 1.7; margin-bottom: 14px; font-size: 15px; }
.prose h2,.prose h3,.prose h4 { color: #fff; margin: 20px 0 10px; }
.prose ul,.prose ol { padding-left: 20px; color: var(--color-text-muted); }
.prose li { margin-bottom: 6px; font-size: 15px; }

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.sidebar-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.sidebar-widget .widget__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--color-border);
}
.sidebar-widget .widget__header svg { color: var(--color-primary); }
.sidebar-widget .widget__body { padding: 12px; }

/* Sidebar game list */
.sidebar-game-list { display: flex; flex-direction: column; gap: 4px; }
.sidebar-game-item__link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition);
}
.sidebar-game-item__link:hover { background: var(--color-surface-2); }
.sidebar-game-item__thumb {
  width: 48px;
  height: 72px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.sidebar-game-item__thumb--placeholder {
  background: var(--color-surface-2);
}
.sidebar-game-item__info { flex: 1; min-width: 0; }
.sidebar-game-item__title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.sidebar-game-item__size,
.sidebar-game-item__date { display: block; font-size: 11px; color: var(--color-text-muted); }

/* Genre list */
.genre-list { display: flex; flex-direction: column; }
.genre-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all var(--transition);
}
.genre-list__item:hover { background: var(--color-surface-2); color: var(--color-text); }
.genre-list__count {
  font-size: 11px;
  background: var(--color-surface-2);
  padding: 2px 7px;
  border-radius: 100px;
  color: var(--color-text-dim);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: 60px;
}
.site-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 40px;
}
.footer-col--brand {}
.footer-tagline { font-size: 14px; color: var(--color-text-muted); margin-top: 12px; margin-bottom: 12px; line-height: 1.55; }
.footer-disclaimer { font-size: 12px; color: var(--color-text-dim); line-height: 1.55; }
.footer-col__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.footer-menu { display: flex; flex-direction: column; gap: 6px; list-style: none; }
.footer-menu a { font-size: 13px; color: var(--color-text-muted); text-decoration: none; transition: color var(--transition); }
.footer-menu a:hover { color: var(--color-text); }
.site-footer__bottom {
  border-top: 1px solid var(--color-border);
  padding: 16px 0;
}
.site-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 13px; color: var(--color-text-dim); }
.footer-copy a { color: var(--color-text-muted); }
.footer-tech { font-size: 13px; color: var(--color-text-dim); }
.footer-tech a { color: var(--color-text-muted); }

/* ============================================================
   BACK TO TOP FIX (class name used in JS)
   ============================================================ */
.back-to-top.is-visible { opacity: 1; pointer-events: auto; }

/* ============================================================
   GAME SECTIONS
   ============================================================ */
.games-section { padding: 32px 0; }
.site-main.container { padding-top: 0; padding-bottom: 60px; }

/* ============================================================
   POST CARDS (blog posts in index)
   ============================================================ */
.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.post-card__title { font-size: 18px; margin-bottom: 6px; }
.post-card__title a { color: #fff; text-decoration: none; }
.post-card__title a:hover { color: var(--color-primary); }
.post-card__meta { font-size: 13px; color: var(--color-text-muted); margin-bottom: 10px; }
.post-card__excerpt { font-size: 14px; color: var(--color-text-muted); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-wrap { margin: 32px 0; display: flex; justify-content: center; }
.pagination-wrap .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination-wrap .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: all var(--transition);
}
.pagination-wrap .page-numbers:hover,
.pagination-wrap .page-numbers.current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ============================================================
   RESPONSIVE ADDITIONS
   ============================================================ */
@media (max-width: 1100px) {
  .game-layout { grid-template-columns: 1fr 260px; }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 999;
    border-top: 1px solid var(--color-border);
  }
  .site-nav.is-open { display: block; }
  .site-nav .container { flex-direction: column; padding: 8px 20px; }
  .nav-menu { flex-direction: column; width: 100%; }
  .nav-menu a { padding: 12px 0; border-bottom: 1px solid var(--color-border); }
  .game-layout { grid-template-columns: 1fr; }
  .game-layout__sidebar { position: static; }
  .game-hero__inner { flex-direction: column; padding: 20px; }
  .game-hero__cover { width: 130px; }
  .site-header__search { max-width: 100%; }
  .hero { padding: 40px 20px 36px; }
  .hero__visual { display: none; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 600px) {
  .site-footer__top { grid-template-columns: 1fr; gap: 24px; padding: 32px 0 24px; }
  .site-footer__bottom-inner { flex-direction: column; text-align: center; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__stats { gap: 16px; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-hero__inner { padding: 16px; }
  .game-hero__title { font-size: 1.4rem; }
  .game-quick-facts { grid-template-columns: 1fr 1fr; }
  .quick-fact--tid { grid-column: 1 / -1; }
  .tabs__nav { overflow-x: auto; }
  .dl-link-row { flex-wrap: wrap; }
  .dl-link-row__btn { width: 100%; justify-content: center; }
  .archive-toolbar { flex-direction: column; align-items: stretch; }
}

@media (max-width: 400px) {
  .games-grid { grid-template-columns: 1fr; }
  .game-quick-facts { grid-template-columns: 1fr; }
}

/* ============================================================
   COMMENTS — dark professional form (eye-friendly)
   ============================================================ */
.comments-area,
.game-comments {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.comments-title,
.comment-reply-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.comments-title svg { color: var(--color-primary); }
.comment-notes {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 20px;
}

.comment-list { list-style: none; margin: 0 0 28px; padding: 0; }
.comment-item { margin-bottom: 12px; }
.comment-item .children { list-style: none; margin: 12px 0 0 24px; padding: 0; }
.comment-body {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.comment-avatar img {
  border-radius: 50%;
  display: block;
  border: 2px solid var(--color-border);
}
.comment-meta__info { flex: 1; min-width: 0; }
.comment-author { display: block; font-size: 14px; font-weight: 700; color: #fff; }
.comment-time { font-size: 12px; color: var(--color-text-muted); }
.comment-actions a {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary) !important;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(228,0,43,.1);
}
.comment-actions a:hover { background: rgba(228,0,43,.2); color: #fff !important; }
.comment-content { font-size: 14px; color: var(--color-text-muted); line-height: 1.65; }
.comment-content p { margin-bottom: 8px; }
.comment-awaiting-moderation { font-size: 13px; color: var(--color-orange); margin-bottom: 8px; }
.no-comments { color: var(--color-text-muted); font-size: 14px; padding: 20px 0; }

/* Dark comment form card */
.comment-respond--dark,
#respond.comment-respond {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 24px 28px 28px;
  margin-top: 8px;
}
.roroms-comment-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.roroms-comment-form .cf-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.roroms-comment-form .cf-row--full,
.roroms-comment-form .comment-form-comment,
.roroms-comment-form .comment-notes,
.roroms-comment-form .form-submit,
.roroms-comment-form .comment-form-cookies-consent,
.roroms-comment-form .comment-subscription-form {
  grid-column: 1 / -1;
}
.roroms-comment-form .cf-row--half { grid-column: span 1; }

.roroms-comment-form label,
.comment-respond label,
#respond label {
  display: block !important;
  float: none !important;
  width: auto !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--color-text-muted) !important;
  margin: 0 0 2px !important;
  padding: 0 !important;
}
.required { color: var(--color-primary); }

.comments-area input[type="text"],
.comments-area input[type="email"],
.comments-area input[type="url"],
.comments-area textarea,
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea,
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"],
#respond textarea,
.roroms-comment-form input[type="text"],
.roroms-comment-form input[type="email"],
.roroms-comment-form textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  background: #0d0e14 !important;
  background-color: #0d0e14 !important;
  border: 1px solid #2c2c36 !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  color: #e8eaf0 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  line-height: 1.45 !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.comments-area textarea,
.comment-respond textarea,
#respond textarea,
.roroms-comment-form textarea {
  min-height: 130px !important;
  resize: vertical !important;
}
.comments-area input::placeholder,
.comments-area textarea::placeholder,
#respond input::placeholder,
#respond textarea::placeholder {
  color: #5a5f7a !important;
  opacity: 1 !important;
}
.comments-area input:focus,
.comments-area textarea:focus,
#respond input:focus,
#respond textarea:focus,
.roroms-comment-form input:focus,
.roroms-comment-form textarea:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(228,0,43,.12) !important;
}

.comment-form-cookies-consent {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 4px 0 0 !important;
}
.comment-form-cookies-consent label {
  margin: 0 !important;
  font-weight: 400 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  color: var(--color-text-muted) !important;
}
.comment-form-cookies-consent input[type="checkbox"] {
  width: auto !important;
  margin-top: 3px !important;
  accent-color: var(--color-primary);
}

.form-submit { margin-top: 4px; }
.comment-submit,
#respond .form-submit .btn,
#respond input[type="submit"],
#respond button[type="submit"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 12px 28px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  width: auto !important;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s !important;
}
.comment-submit:hover,
#respond .form-submit .btn:hover,
#respond input[type="submit"]:hover,
#respond button[type="submit"]:hover {
  background: var(--color-primary-h) !important;
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* Kill WP default comment layout */
.comment-respond p { margin: 0; }
#respond .comment-form-author,
#respond .comment-form-email,
#respond .comment-form-url {
  display: contents; /* won't apply if we use divs */
}
@media (max-width: 600px) {
  .roroms-comment-form { grid-template-columns: 1fr; }
  .roroms-comment-form .cf-row--half { grid-column: 1 / -1; }
  .comment-respond--dark,
  #respond.comment-respond { padding: 20px; }
}

/* Hide nav toggle when nav is not rendered */
body.page-template-about .nav-toggle,
body.page-template-contact .nav-toggle,
body.page-template-privacy .nav-toggle,
.page-id-about .nav-toggle {
  display: none !important;
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content { max-width: 820px; margin: 0 auto; padding: 32px 0 60px; }
.page-content .archive-header { margin-bottom: 28px; }

/* ============================================================
   STAR RATING
   ============================================================ */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text-dim);
}
.star--full, .star--half { color: var(--color-gold); }
.star--half { opacity: 0.7; }
.star-rating--interactive .star {
  background: none;
  border: none;
  padding: 0 1px;
  cursor: pointer;
  font-size: 26px;
  color: var(--color-text-dim);
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.star-rating--interactive .star:hover,
.star-rating--interactive .star.is-hover,
.star-rating--interactive .star.star--full {
  color: var(--color-gold);
  transform: scale(1.12);
}
.user-rating-box {
  display: none; /* old bulky box removed */
}
.game-hero__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 16px;
}
.game-hero__dev {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}
.game-hero__rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.game-hero__rating .star-rating {
  font-size: 16px;
}
.game-hero__rating .star-rating--interactive .star {
  font-size: 20px;
  padding: 0;
}
.game-hero__rating .rating-avg {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gold);
  font-family: var(--font-display);
}
.game-hero__rating .rating-count {
  font-size: 12px;
  color: var(--color-text-muted);
}
.game-hero__rating .user-rating-box__msg {
  font-size: 12px;
  color: var(--color-green);
  margin: 0;
  min-height: 0;
}
.game-hero__dl-cta { margin-top: 20px; }
.game-hero__actions-row { display: none; }

.game-comments {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.user-rating-box__label,
.user-rating-box__meta {
  display: none;
}
.game-hero__actions-row {
  display: none !important;
}

/* ============================================================
   INSTALL STEPS
   ============================================================ */
.install-intro {
  color: var(--color-text-muted);
  margin-bottom: 20px;
  font-size: 15px;
}
.install-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.install-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.install-step__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}
.install-step__title {
  display: block;
  font-size: 15px;
  color: #fff;
  margin-bottom: 4px;
}
.install-step__text {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item[open] { border-color: rgba(228,0,43,.35); }
.faq-item__q {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--color-primary);
  flex-shrink: 0;
}
.faq-item[open] .faq-item__q::after { content: '−'; }
.faq-item__a {
  padding: 0 18px 16px;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
}
.faq-item__a p { margin: 0; }
.faq-more { margin-top: 20px; }

/* ============================================================
   SOCIAL ICONS
   ============================================================ */
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted) !important;
  text-decoration: none !important;
  transition: all var(--transition);
}
.social-icon:hover {
  color: #fff !important;
  border-color: var(--color-primary);
  background: var(--color-primary);
  transform: translateY(-2px);
}
.social-icons--lg .social-icon { width: 44px; height: 44px; }
.social-icons--bottom { margin: 0; }
.social-icon--telegram:hover { background: #229ED9; border-color: #229ED9; }
.social-icon--discord:hover  { background: #5865F2; border-color: #5865F2; }
.social-icon--youtube:hover  { background: #FF0000; border-color: #FF0000; }
.social-icon--twitter:hover  { background: #111; border-color: #fff; }
.social-icon--facebook:hover { background: #1877F2; border-color: #1877F2; }
.social-icon--instagram:hover{ background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); border-color: #dc2743; }
.social-icon--reddit:hover   { background: #FF4500; border-color: #FF4500; }

/* ============================================================
   STATIC PAGES + CONTACT FORM
   ============================================================ */
.static-page { max-width: 900px; margin: 0 auto; padding: 24px 0 60px; }
.static-page--contact { max-width: 1000px; }
.static-page__content { margin-bottom: 28px; }
.static-page__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}
.contact-form-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.contact-form .form-row { margin-bottom: 16px; }
.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.required { color: var(--color-primary); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--color-text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--color-primary); }
.contact-form__submit { margin-top: 8px; }
.contact-form__status {
  margin-top: 14px;
  font-size: 14px;
  min-height: 20px;
}
.contact-form__status.is-success { color: var(--color-green); }
.contact-form__status.is-error { color: var(--color-primary); }

/* Comment form two-col handled above in COMMENTS section */
.comment-notes { font-size: 13px; color: var(--color-text-muted); margin-bottom: 16px; }

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .game-hero__actions-row { display: none !important; }
  .user-rating-box { display: none !important; }
  .game-hero__meta-row { gap: 8px 14px; }
}

@media (max-width: 600px) {
  .games-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .install-step { padding: 12px; }
}

/* ============================================================
   HOMEPAGE INFO / EMULATORS SECTION
   ============================================================ */
.info-section {
  padding: 48px 0 24px;
  margin-top: 16px;
  border-top: 1px solid var(--color-border);
}
.info-section__lead {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 820px;
  margin: 0 0 24px;
}
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.info-card__title {
  font-size: 16px;
  color: #fff;
  margin: 0 0 10px;
}
.info-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
}
.info-formats {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.info-formats__title {
  font-size: 16px;
  color: #fff;
  margin: 0 0 14px;
}
.info-formats__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.info-formats__list li {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.55;
  padding-left: 14px;
  border-left: 2px solid var(--color-primary);
}
.info-formats__list strong { color: #fff; }
.info-note {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  padding: 14px 16px;
  background: rgba(228,0,43,.06);
  border: 1px solid rgba(228,0,43,.15);
  border-radius: var(--radius-md);
}
.info-note strong { color: var(--color-primary); }

/* Social icons — footer only */
.site-nav__social { display: none !important; }
.social-icons--bottom { display: none !important; }
.social-icons--footer {
  margin: 16px 0 12px;
}
.social-icons--footer .social-icon {
  width: 40px;
  height: 40px;
}
