/**
 * Beastroms Theme v4.0 - RomsGames-Inspired Clean Design
 * Font: Rubik (Google Fonts)
 * Dark mode default, light mode toggle
 */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  --bg-body: #111827;
  --bg-card: #020617;
  --bg-nav: #0f172a;
  --bg-search: rgba(255,255,255,0.2);
  --bg-search-hover: rgba(255,255,255,0.3);
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #ffeb00;
  --text-primary: var(--text-main);
  --text-secondary: var(--text-muted);
  --border-color: var(--border);
  --accent-color: var(--accent);
  --accent-hover: #8df0ad;
  --accent-cyan: #8df0ad;
  --accent-blue: #60a5fa;
  --border: #1e293b;
  --shadow-card: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -4px rgba(0,0,0,0.5);
  --shadow-lift: 0 25px 50px -12px rgba(0,0,0,0.7);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

[data-theme="light"] {
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #111827;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border: #cbd5e1;
  --shadow-card: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-lift: 0 25px 50px -12px rgba(0,0,0,0.15);
}

/* ========================================
   BASE RESETS
   ======================================== */
* { box-sizing: border-box; }

body {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ========================================
   NAVIGATION BAR (Always dark, solid)
   ======================================== */
.beastroms-header {
  background: var(--bg-nav);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
  padding: 0;
  position: relative;
  z-index: 100;
}

.beastroms-nav {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.6rem;
  padding: 0.48rem 1.5rem;
  position: relative;
}

.beastroms-brand {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 1.08rem;
  color: #fff;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}

/* Search */
.beastroms-search-form {
  flex: 1;
  max-width: 350px;
  margin: 0 1.1rem;
  position: relative;
}

.beastroms-search-form input.beastroms-search-input {
  width: 100%;
  background: #192336;
  border: 1px solid #26344d;
  color: #fff;
  padding: 0.625rem 0.8rem 0.625rem 2.25rem;
  border-radius: 9px;
  font-family: inherit;
  font-weight: 300;
  font-size: 0.82rem;
  outline: none;
  transition: background 0.2s;
}

.beastroms-search-form input.beastroms-search-input::placeholder {
  color: rgba(255,255,255,0.6);
}

.beastroms-search-form input.beastroms-search-input:hover,
.beastroms-search-form input.beastroms-search-input:focus {
  background: #22324c;
}

.beastroms-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Live Search Results */
.beastroms-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}
.beastroms-search-results.active { display: block; }

.beastroms-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.beastroms-result-item:hover { background: rgba(255,255,255,0.04); }
.beastroms-result-item img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0,0,0,0.2);
}
.beastroms-result-meta h4 { margin: 0; font-size: 0.88rem; font-weight: 400; }
.beastroms-result-meta span { font-size: 0.78rem; color: var(--text-muted); }

.beastroms-search-empty {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Nav Links */
.beastroms-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.beastroms-menu li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.78rem;
  font-weight: 400;
  font-size: 0.84rem;
  color: #fff;
  transition: color 0.2s;
  white-space: nowrap;
}

.beastroms-menu li a:hover {
  color: var(--accent);
}

.beastroms-menu li a.active {
  color: #102319;
  background: #8df0ad;
  border-radius: 0.48rem;
}

.beastroms-menu li a i {
  font-size: 0.9rem;
}

/* Theme Toggle */
#beastroms-theme-toggle {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.42rem;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
#beastroms-theme-toggle:hover { color: var(--accent); }

/* Mobile search toggle */
.beastroms-search-toggle-mobile {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile bottom nav */
.beastroms-mobile-nav {
  display: none;
  position: static;
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 0.25rem 0;
  justify-content: center;
  text-align: center;
  gap: 0;
}
.beastroms-mobile-nav a {
  flex: 1;
  padding: 0.42rem 0.4rem;
  font-size: 0.78rem;
  font-weight: 400;
  color: #fff;
}
.beastroms-mobile-nav a i {
  margin-right: 4px;
}

@media (max-width: 768px) {
  .beastroms-search-form { display: none; }
  .beastroms-menu { display: none; }
  .beastroms-search-toggle-mobile { display: flex; }
  .beastroms-mobile-nav { display: flex; }
  .beastroms-nav { padding: 0.8rem 1rem; }
  .beastroms-brand { font-size: 1.15rem; }
  
  .beastroms-search-form.active {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0;
    max-width: 100%;
    margin: 0;
    z-index: 300;
    padding: 0;
  }
  .beastroms-search-form.active .beastroms-search-input {
    border-radius: 0;
    padding: 1.2rem 1rem 1.2rem 2.8rem;
    font-size: 1rem;
    background: var(--bg-nav);
  }
}

@media (min-width: 769px) and (max-width: 1050px) {
  .beastroms-search-form {
    max-width: 260px;
    margin-inline: 0.7rem;
  }

  .beastroms-menu li a {
    padding-inline: 0.55rem;
  }
}

/* ========================================
   MAIN LAYOUT (Sidebar + Content Grid)
   ======================================== */
.beastroms-container {
  max-width: 1400px;
  margin: 1.5rem auto 4rem;
  padding: 0 1.5rem;
}

.beastroms-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.beastroms-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.beastroms-main-content {
  min-width: 0;
}

.beastroms-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.beastroms-section-title h2 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
}

.beastroms-section-title > a {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.beastroms-clean-hero {
  padding: 1.8rem 1.5rem;
  background: linear-gradient(120deg, rgba(141, 240, 173, 0.12), transparent 55%);
  border-bottom: 1px solid var(--border);
}

.beastroms-clean-hero > div {
  max-width: 1370px;
  margin: 0 auto;
}

.beastroms-clean-hero h1 {
  margin: 0 0 0.35rem;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.beastroms-clean-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (min-width: 768px) {
  .beastroms-layout {
    grid-template-columns: 3fr 9fr;
    gap: 2rem;
  }
}

@media (min-width: 900px) {
  .beastroms-layout-grid {
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
  }

  .beastroms-sidebar {
    position: sticky;
    top: 1rem;
  }
}

/* ========================================
   SIDEBAR - Console List
   ======================================== */
.beastroms-sidebar-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.7rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.beastroms-sidebar-title::before,
.beastroms-sidebar-header::before {
  content: 'B';
  display: grid;
  place-items: center;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  color: #102319;
  background: #8df0ad;
  border-radius: 0.55rem;
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(16, 35, 25, 0.12);
}

.beastroms-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  margin-top: 0.85rem;
  padding: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.beastroms-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.15rem 0.15rem 0.9rem;
  font-family: 'Manrope', sans-serif;
}

.beastroms-sidebar-header > span {
  min-width: 0;
  margin-right: auto;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.beastroms-sidebar-header > span i {
  display: none;
}

.beastroms-sidebar-header > a {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.beastroms-sidebar-header > a:hover {
  color: #65d98a;
}

.beastroms-console-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.beastroms-sidebar-card > .beastroms-console-item + .beastroms-console-item {
  margin-top: 0.6rem;
}

.beastroms-console-item,
.beastroms-console-list > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.beastroms-console-item:hover,
.beastroms-console-list > li > a:hover {
  color: #d8f9e2;
  background: rgba(141, 240, 173, 0.13);
  border-color: rgba(141, 240, 173, 0.22);
  transform: translateY(-1px);
}

[data-theme="light"] .beastroms-console-item,
[data-theme="light"] .beastroms-console-list > li > a {
  color: #4b5550;
  background: #f3f6f3;
}

[data-theme="light"] .beastroms-console-item:hover,
[data-theme="light"] .beastroms-console-list > li > a:hover {
  color: #12331d;
  background: #d8f9e2;
  border-color: #b8ecc8;
}

.beastroms-console-item::after,
.beastroms-console-list > li > a::after {
  content: '\203A';
  flex: 0 0 auto;
  color: currentColor;
  font-family: sans-serif;
  font-size: 1.15rem;
  line-height: 0.8;
  opacity: 0.45;
}

.beastroms-console-list .count-badge {
  margin-left: auto;
  padding: 0.12rem 0.4rem;
  color: var(--text-dim);
  background: rgba(148, 163, 184, 0.1);
  border-radius: 999px;
  font-family: 'Rubik', sans-serif;
  font-size: 0.62rem;
  font-weight: 400;
}

.beastroms-console-item.view-all,
.beastroms-console-list > li > a.view-all {
  justify-content: center;
  color: #fff;
  background: #17271d;
  border-color: #294232;
}

.beastroms-console-item.view-all::after,
.beastroms-console-list > li > a.view-all::after {
  opacity: 0.8;
}

@media (min-width: 1180px) {
  .beastroms-console-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .beastroms-console-list > li:last-child {
    grid-column: 1 / -1;
  }
}

/* ========================================
   CONTENT AREA
   ======================================== */
.beastroms-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.beastroms-page-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0;
}

.beastroms-sort-select {
  appearance: none;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.6rem 2.5rem 0.6rem 1.2rem;
  font-family: inherit;
  font-weight: 400;
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

/* ========================================
   GAME CARD GRID (2/3/4 col responsive)
   ======================================== */
.beastroms-game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .beastroms-game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .beastroms-game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* ========================================
   GAME CARD (Clean, minimal, shadow-lift hover)
   ======================================== */
.beastroms-game-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  padding-bottom: 1rem;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  cursor: pointer;
}

.beastroms-game-card-wrap {
  min-width: 0;
}

.beastroms-game-card-wrap .beastroms-game-card {
  height: 100%;
}

.beastroms-card-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.75rem;
  overflow: hidden;
  color: var(--text-dim);
  background: rgba(148, 163, 184, 0.08);
  border-radius: var(--radius-sm);
}

.beastroms-card-thumb img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
}

.beastroms-card-thumb > i {
  font-size: 2.4rem;
}

.beastroms-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.45rem 0.25rem 0;
  color: var(--text-dim);
  font-size: 0.72rem;
}

@media (min-width: 768px) {
  .beastroms-game-card {
    border-radius: var(--radius-lg);
    padding: 1rem;
    padding-bottom: 1rem;
  }
}

@media (hover: hover) {
  .beastroms-game-card:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: var(--shadow-lift);
    z-index: 10;
  }
}

.beastroms-game-card img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.beastroms-card-title {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.3;
  margin-left: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   PAGINATION
   ======================================== */
.beastroms-pagination {
  text-align: center;
  margin-top: 3rem;
}

.beastroms-btn-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--text-main);
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

[data-theme="dark"] .beastroms-btn-next {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

@media (hover: hover) {
  .beastroms-btn-next:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: var(--shadow-lift);
  }
}

.beastroms-pagination-info {
  color: var(--text-dim);
  margin-top: 1.5rem;
  font-weight: 300;
}

.beastroms-page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2rem;
}

.beastroms-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  transition: background 0.2s;
  font-weight: 400;
}

.beastroms-page-num:hover {
  background: rgba(255,255,255,0.05);
}

[data-theme="light"] .beastroms-page-num:hover {
  background: #e2e8f0;
}

.beastroms-page-num.active {
  background: #e2e8f0;
  color: #000;
}

[data-theme="dark"] .beastroms-page-num.active {
  background: var(--accent);
  color: #000;
}

/* ========================================
   SINGLE ROM PAGE
   ======================================== */
.beastroms-single-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .beastroms-single-layout {
    grid-template-columns: 280px 1fr;
  }
}

.beastroms-cover-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.beastroms-cover-card img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.beastroms-single-info {
  padding: 0;
}

.beastroms-console-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.beastroms-single-title {
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.beastroms-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.beastroms-rating .stars { color: #f59e0b; }
.beastroms-rating .count { color: var(--text-muted); font-weight: 300; }

.beastroms-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 480px) {
  .beastroms-specs-grid { grid-template-columns: 1fr; }
}

.beastroms-spec-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
}
[data-theme="light"] .beastroms-spec-item {
  background: #f8fafc;
}
.beastroms-spec-item i {
  color: var(--text-muted);
  font-size: 1rem;
  width: 20px;
  text-align: center;
}
.beastroms-spec-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.beastroms-spec-value {
  font-weight: 400;
  font-size: 0.88rem;
}

/* Save Game Button */
.beastroms-btn-save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 2rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,235,0,0.3);
  transition: all 0.2s;
  margin-bottom: 1rem;
}
.beastroms-btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,235,0,0.4);
}

.beastroms-emu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.beastroms-emu-card h4 {
  margin: 0 0 0.4rem;
  font-weight: 400;
  font-size: 0.92rem;
}
.beastroms-emu-card p {
  margin: 0 0 0.6rem;
  font-weight: 300;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.beastroms-emu-link {
  color: var(--accent);
  font-weight: 400;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Download Gateway Box */
.beastroms-download-box {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  display: none;
}
.beastroms-download-box.active { display: block; }

.beastroms-dl-status {
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}
.beastroms-countdown-display {
  font-size: 3rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1rem;
}
.beastroms-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #000;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 1rem;
  transition: opacity 0.2s;
}
.beastroms-btn-primary:hover { opacity: 0.9; }

/* About / Description Card */
.beastroms-about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2rem 0;
}
.beastroms-about-card h3 {
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
}
.beastroms-about-card p {
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* Section title */
.beastroms-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.beastroms-section-header h2 {
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0;
}
.beastroms-section-header a {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 400;
}
.beastroms-section-header a:hover { color: var(--accent); }

/* Match the WordPress single-ROM template to the theme's existing components. */
.single-rom .beastroms-single-hero {
  padding: 0.75rem 0 1.75rem;
}
.single-rom .beastroms-single-grid {
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  align-items: start;
  gap: 2rem;
  margin-top: 0;
}
.single-rom .beastroms-single-grid > * {
  min-width: 0;
}
.single-rom .beastroms-cover-card {
  box-shadow: none;
}
.single-rom .beastroms-cover-card img {
  width: 100%;
  height: auto;
}
.single-rom .beastroms-single-title {
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.single-rom .beastroms-rating {
  flex-wrap: wrap;
}
.single-rom .beastroms-specs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}
.single-rom .beastroms-spec-item {
  align-items: flex-start;
  min-width: 0;
}
.single-rom .beastroms-spec-item > div {
  min-width: 0;
}
.single-rom .beastroms-spec-label,
.single-rom .beastroms-spec-value {
  display: block;
}
.single-rom .beastroms-spec-value {
  color: var(--text-main);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.single-rom .beastroms-action-box {
  display: grid;
  gap: 1rem;
}
.single-rom .beastroms-btn-save {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 0;
  font-size: 0.88rem;
  font-weight: 700;
}
.single-rom .beastroms-btn-save:disabled {
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}
.single-rom .beastroms-emu-link {
  font-weight: 600;
}
.single-rom .beastroms-emu-link span {
  min-width: 0;
}
.single-rom .beastroms-article-content {
  margin-top: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.single-rom .beastroms-article-content h2 {
  margin: 1.5rem 0 0.75rem;
  color: var(--text-main);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
}
.single-rom .beastroms-article-content > h2:first-child {
  margin-top: 0;
}
.single-rom .beastroms-article-content p,
.single-rom .beastroms-article-content ul,
.single-rom .beastroms-article-content ol {
  max-width: 88ch;
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.single-rom .beastroms-article-content > :last-child {
  margin-bottom: 0;
}
.single-rom .beastroms-breadcrumbs {
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.single-rom .beastroms-card-thumb {
  position: relative;
}
.single-rom .beastroms-card-thumb img {
  margin-bottom: 0;
  object-fit: contain;
}
.single-rom .beastroms-badge-floating {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1;
  max-width: calc(100% - 1rem);
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}
.single-rom .beastroms-card-title {
  font-weight: 500;
}
@media (max-width: 1100px) {
  .single-rom .beastroms-single-grid {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
  }
  .single-rom .beastroms-action-box {
    grid-column: 2;
  }
}
@media (max-width: 767px) {
  .single-rom .beastroms-single-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .single-rom .beastroms-cover-wrapper {
    width: 100%;
    max-width: 280px;
    margin-inline: auto;
  }
  .single-rom .beastroms-action-box {
    grid-column: auto;
  }
}
@media (max-width: 480px) {
  .single-rom .beastroms-specs-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ========================================
   BREADCRUMBS
   ======================================== */
.beastroms-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  padding: 0.75rem 0;
}
.beastroms-breadcrumbs a {
  color: var(--text-muted);
  font-weight: 300;
}
.beastroms-breadcrumbs a:hover { color: var(--text-main); }
.beastroms-breadcrumbs .sep {
  font-size: 0.65rem;
  color: var(--text-dim);
}

/* ========================================
   FOOTER
   ======================================== */
.beastroms-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
  text-align: center;
  background: var(--bg-card);
}

.beastroms-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.beastroms-footer-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.beastroms-footer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: all 0.15s;
}
.beastroms-footer-pill:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.04);
}
[data-theme="light"] .beastroms-footer-pill:hover {
  background: #f1f5f9;
}
[data-theme="dark"] .beastroms-footer-pill {
  border-color: transparent;
  background: rgba(255,255,255,0.05);
}

.beastroms-footer-tagline {
  font-weight: 300;
  font-size: 1rem;
  padding-top: 1.5rem;
  color: var(--text-muted);
}
.beastroms-footer-tagline i {
  color: #ef4444;
  margin: 0 0.5rem;
}

/* ========================================
   ARCHIVES, SEARCH, AND EMULATOR DETAIL
   ======================================== */
.beastroms-archive-header {
  max-width: 760px;
  margin: 0 0 2rem;
}

.beastroms-kicker {
  display: inline-block;
  margin-bottom: 0.55rem;
  color: #8df0ad;
  font-family: 'Manrope', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.beastroms-archive-header h1,
.beastroms-emulator-content h1 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.beastroms-archive-header p {
  margin: 0.7rem 0 0;
  color: var(--text-muted);
}

.beastroms-pagination .nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.beastroms-pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
}

.beastroms-pagination .page-numbers.current,
.beastroms-pagination .page-numbers:hover {
  color: #102319;
  background: #8df0ad;
  border-color: #8df0ad;
}

.beastroms-empty-state {
  padding: clamp(2.5rem, 8vw, 5rem) 1.5rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.beastroms-empty-state > i {
  color: #8df0ad;
  font-size: 2.5rem;
}

.beastroms-empty-state h2 {
  margin: 0.8rem 0 0.25rem;
  color: var(--text-main);
  font-family: 'Manrope', sans-serif;
}

.beastroms-empty-search {
  display: flex;
  max-width: 480px;
  margin: 1.25rem auto 0;
}

.beastroms-empty-search input {
  min-width: 0;
  flex: 1;
  padding: 0.8rem 1rem;
  color: var(--text-main);
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 0.6rem 0 0 0.6rem;
}

.beastroms-empty-search button,
.beastroms-download-button {
  padding: 0.8rem 1.1rem;
  color: #102319;
  background: #8df0ad;
  border: 0;
  border-radius: 0 0.6rem 0.6rem 0;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  cursor: pointer;
}

.beastroms-emulator-single {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.beastroms-emulator-cover {
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.beastroms-emulator-cover img {
  width: 100%;
  height: auto;
}

.beastroms-emulator-cover i {
  font-size: 4rem;
}

.beastroms-entry-content {
  margin: 1.5rem 0;
  color: var(--text-muted);
}

.beastroms-pill {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.45rem 0.8rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
}

.beastroms-file-size {
  color: var(--text-muted);
}

.beastroms-download-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 0.65rem;
}

@media (min-width: 760px) {
  .beastroms-emulator-single {
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  }
}
