/* David Whittaker Fan Site — C64 Blue & Gold Visual Identity */
/* Fonts: Syne 800 (headings), DM Sans (body) */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&display=swap');

/* ── Custom properties ── */
:root {
  --bg:             #14153a;
  --bg-card:        #1c1e50;
  --bg-alt:         #1a1d5e;
  --bg-overlay:     rgba(20,21,58,0.97);
  --text:           #e8e4d0;
  --text-muted:     #8883a0;
  --accent:         #f5c800;
  --accent-dim:     #c8a000;
  --accent-glow:    rgba(245,200,0,0.15);
  --accent-glow-lg: rgba(245,200,0,0.30);
  --border:         #2a2d6e;
  --border-accent:  #f5c800;
  --font-heading:   'Syne', 'Arial Black', sans-serif;
  --font-body:      'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --nav-height:     56px;
  --player-height:  140px;
  --container-max:  1100px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.7;
  background: var(--bg);
  padding-top: var(--nav-height);
  padding-bottom: var(--player-height);
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--text);
}

h1 { font-size: clamp(2.8rem, 7vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: #fff; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

strong { color: var(--accent); font-weight: 700; }
em { color: var(--text); font-style: italic; }

code {
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  color: var(--accent);
  background: rgba(245,200,0,0.08);
  padding: 0.1em 0.4em;
  border: 1px solid var(--border);
}

/* ── Layout utilities ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.mt-sm { margin-top: 0.75rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 3rem; }

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  font-weight: 700;
  z-index: 9000;
  transition: top 0.1s;
}
.skip-link:focus { top: 0; }

/* ── Navigation ── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-overlay);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.nav-inner {
  display: flex;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  gap: 1.5rem;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand:hover { color: #fff; }

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.1rem;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.nav-link {
  display: block;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}
.nav-link.active { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-accent);
  color: var(--accent);
  padding: 0.3rem 0.6rem;
  font-size: 1rem;
  cursor: pointer;
  margin-left: auto;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover {
  background: var(--accent-glow);
  color: #fff;
}

/* ── Hero ── */
#hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 4rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.25;
  filter: sepia(0.4) brightness(0.7);
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(245,200,0,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 70%, rgba(245,200,0,0.03) 0%, transparent 55%);
  pointer-events: none;
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 0.75rem;
}

.hero-rule {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1.25rem 0;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.hero-hook {
  background: rgba(245,200,0,0.08);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--text);
}
.hero-hook strong { color: var(--accent); }

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.stat-block { text-align: left; }
.stat-block .num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-block .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Sections ── */
.site-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.section-header { margin-bottom: 2.5rem; }
.section-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.section-title {
  color: #fff;
  margin-bottom: 0.5rem;
}

/* ── Cards ── */
.game-card {
  background: var(--bg-card);
  border-top: 2px solid var(--accent);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  padding: 1.25rem;
  transition: border-top-color 0.2s, box-shadow 0.2s;
}
.game-card:hover {
  box-shadow: 0 4px 24px rgba(245,200,0,0.12);
}

.game-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.2rem;
}
.game-card__year { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ── Tags / badges ── */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid;
}
.tag--platform { border-color: var(--accent-dim); color: var(--accent); background: var(--accent-glow); }
.tag--year     { border-color: var(--border); color: var(--text-muted); }
.tag--publisher { border-color: var(--border); color: var(--text-muted); }

/* ── History / timeline ── */
.history-body { max-width: 800px; }
.history-chapter { margin-bottom: 2.5rem; }
.history-chapter h3 {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-dim), transparent);
}
.timeline-entry {
  position: relative;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 2rem;
  width: 10px;
  height: 10px;
  background: var(--accent);
}
.timeline-year {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}
.timeline-entry h3 { color: #fff; font-size: 1.1rem; margin-bottom: 0.4rem; }

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── SID catalogue (music.html) ── */
.catalogue-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.catalogue-controls input[type="search"],
.catalogue-controls select {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.45rem 0.75rem;
}
.catalogue-controls input[type="search"]:focus,
.catalogue-controls select:focus {
  outline: none;
  border-color: var(--accent);
}

.sort-btn {
  padding: 0.35rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.sort-btn.active, .sort-btn:hover { color: var(--accent); border-color: var(--accent-dim); }

/* ── SID groups ── */
.sid-group {
  background: var(--bg-card);
  border-top: 2px solid var(--accent-dim);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  margin-bottom: 0.6rem;
  overflow: hidden;
  transition: border-top-color 0.2s;
}
.sid-group:hover { border-top-color: var(--accent); }
.sid-group.playing { border-top-color: var(--accent); box-shadow: 0 0 20px rgba(245,200,0,0.15); }

.sid-group-header {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  gap: 0.75rem;
  cursor: pointer;
}

.group-play-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  font-weight: 700;
}
.group-play-btn:hover { background: #fff; }

.game-title { font-family: var(--font-heading); font-size: 1rem; font-weight: 800; color: #fff; }
.game-meta  { font-size: 0.72rem; color: var(--text-muted); display: flex; gap: 0.6rem; }

.group-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.group-toggle:hover { color: var(--accent); border-color: var(--accent-dim); }

.subtune-list {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.sid-group.expanded .subtune-list { display: flex; }

.subtune-item {
  display: flex;
  align-items: center;
  padding: 0.55rem 1rem 0.55rem 3.5rem;
  gap: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  user-select: none;
}
.subtune-item:last-child { border-bottom: none; }
.subtune-item:hover { background: var(--bg-alt); }
.subtune-item.playing {
  background: var(--accent-glow);
  color: var(--accent);
}
.subtune-item.playing .sub-name { color: var(--accent); }

.sub-num  { font-size: 0.7rem; color: var(--text-muted); min-width: 1.5rem; }
.sub-name { font-size: 0.85rem; }
.sub-dur  { font-size: 0.7rem; color: var(--text-muted); margin-left: auto; }

/* ── Featured works carousel (index) ── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.featured-card {
  background: var(--bg-card);
  border-top: 2px solid var(--accent);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  padding: 1rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-decoration: none;
  display: block;
  color: var(--text);
}
.featured-card:hover { box-shadow: 0 4px 20px rgba(245,200,0,0.15); color: var(--text); }

.featured-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.2rem;
}
.featured-card__year { font-size: 0.72rem; color: var(--text-muted); }
.featured-card__note { font-size: 0.78rem; color: var(--accent); margin-top: 0.4rem; }

/* ── Video embeds ── */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.video-card { }
.video-card h3 { font-size: 0.95rem; color: #fff; margin: 0.6rem 0 0.2rem; font-family: var(--font-heading); font-weight: 800; }
.video-card p  { font-size: 0.78rem; color: var(--text-muted); }
.video-card .video-category {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.3rem;
  display: block;
}

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

.gallery-item {
  background: var(--bg-card);
  border-top: 2px solid var(--accent-dim);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: border-top-color 0.2s;
}
.gallery-item:hover { border-top-color: var(--accent); }
.gallery-item img { width: 100%; display: block; }
.gallery-item figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Resources ── */
.resource-list { list-style: none; }
.resource-list li {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.resource-list li:last-child { border-bottom: none; }
.resource-list .res-title { font-size: 0.9rem; color: var(--accent); }
.resource-list .res-desc  { font-size: 0.78rem; color: var(--text-muted); }

/* ── Deep-dive / flagship ── */
.flagship-article {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}
.flagship-article:last-child { border-bottom: none; margin-bottom: 0; }
.flagship-article h3 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.25rem;
}
.flagship-article .fa-hook {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
  display: block;
}
.flagship-article .fa-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.flagship-article .fa-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.flagship-article .fa-play-btn:hover { background: #fff; }

/* ── Interviews ── */
.quote-block {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(245,200,0,0.04);
  font-style: italic;
  color: var(--text-muted);
}
.quote-block cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--accent-dim);
}

/* ── Catalogue page ── */
.catalogue-group-heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  padding: 0.5rem 0 0.3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
  margin-top: 2rem;
}
.catalogue-group-heading:first-of-type { margin-top: 0; }

.catalogue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.catalogue-table th {
  text-align: left;
  padding: 0.4rem 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.catalogue-table td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.catalogue-table tr:last-child td { border-bottom: none; }
.catalogue-table tr:hover td { background: rgba(245,200,0,0.03); }
.catalogue-table .ct-title { color: #fff; font-weight: 500; }
.catalogue-table .ct-flagship { color: var(--accent); }

/* ── Player bar ── */
#player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(20,21,58,0.98);
  border-top: 2px solid var(--accent-dim);
  backdrop-filter: blur(8px);
  min-height: var(--player-height);
  display: grid;
  grid-template-rows: auto auto;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "controls info  secondary"
    "vu       subs  secondary";
  align-items: start;
  gap: 0;
}

/* VU meter */
#pb-vu {
  grid-area: vu;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 1rem 0.6rem;
  height: 40px;
}

.vu-bar {
  width: 5px;
  height: 2px;
  background: var(--accent);
  transition: height 0.07s ease;
}

/* Transport controls */
.pb-controls {
  grid-area: controls;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.7rem 1rem 0.3rem;
}

.pb-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1;
}
.pb-btn:hover { color: var(--accent); border-color: var(--accent-dim); }

.pb-btn--primary {
  background: var(--accent-glow);
  border-color: var(--accent-dim);
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  font-size: 1rem;
}
.pb-btn--primary:hover {
  background: var(--accent);
  color: var(--bg);
}

.pb-btn--toggle.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* Now-playing info */
.pb-info {
  grid-area: info;
  padding: 0.7rem 0.5rem 0.3rem;
  overflow: hidden;
}

.pb-now-playing {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  overflow: hidden;
}

#pb-composer {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  flex-shrink: 0;
}

#pb-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pb-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

#pb-platform { color: var(--accent); font-size: 0.7rem; }
#pb-subtune  { color: var(--text-muted); font-size: 0.7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pb-progress {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.pb-progress-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  overflow: hidden;
  max-width: 200px;
  cursor: pointer;
}

#pb-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 1s linear;
}

/* Subtune list */
#pb-subtune-list {
  grid-area: subs;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.3rem;
  padding: 0 0.5rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) var(--bg);
}

.pb-sub-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.pb-sub-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.pb-sub-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* Secondary controls */
.pb-secondary {
  grid-area: secondary;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  padding: 0.7rem 1rem 0.5rem;
}

.pb-vol-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#pb-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
#pb-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

.pb-mode-row {
  display: flex;
  gap: 0.3rem;
}

/* ── Stardust easter egg overlay ── */
#stardust-egg {
  position: fixed;
  inset: 0;
  z-index: 9800;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
#stardust-egg.active { opacity: 1; }

.egg-screen {
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 40px rgba(245,200,0,0.25);
  padding: 2.5rem 3rem;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  max-width: 560px;
  width: 90%;
}

.egg-line {
  color: var(--accent);
  margin-bottom: 0.4rem;
  white-space: pre;
}
.egg-line--blink { animation: blink 1s step-start infinite; }
.egg-line--accent { color: #fff; font-weight: 700; }
.egg-line--muted { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.8rem; }

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Footer ── */
.site-footer {
  background: rgba(0,0,8,0.5);
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
}
.site-footer__inner { text-align: center; }
.site-footer__brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.site-footer__text {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Flagship article images ── */
.flagship-article figure {
  margin: 1.25rem 0;
}
.flagship-article figure img {
  max-width: 280px;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  display: block;
}
.flagship-article figure figcaption {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  :root { --player-height: 220px; }

  .nav-list { display: none; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--bg-overlay); border-bottom: 1px solid var(--border); padding: 0.5rem; }
  .nav-list.open { display: flex; }
  .nav-toggle { display: block; }

  #player-bar {
    grid-template-areas:
      "controls controls"
      "info      info"
      "subs      subs"
      "vu        secondary";
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
  }
  #pb-vu { padding-bottom: 0.4rem; }
  .pb-secondary { padding: 0.4rem 0.75rem 0.4rem; }
  .games-grid, .video-grid, .featured-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Game cover images & lightbox
   -------------------------------------------------------------------------- */
.game-cover { margin: 0 0 0.75rem; max-width: 180px; }
.game-screenshot {
  width: 100%; display: block; object-fit: contain;
  border: 1px solid var(--border-dim, #333);
  border-radius: var(--radius, 4px);
  background: var(--bg-secondary, #111);
  cursor: zoom-in; transition: border-color 0.2s;
}
.game-screenshot:hover { border-color: var(--accent-cyan, #00e5ff); }
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.93);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; cursor: zoom-out; padding: 1rem;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-overlay img {
  max-width: 95vw; max-height: 90vh; object-fit: contain;
  border: 1px solid var(--border-dim, #333); border-radius: var(--radius, 4px); cursor: zoom-out;
}
.lightbox-close {
  position: fixed; top: 1rem; right: 1.5rem; background: none; border: none;
  color: var(--accent-cyan, #00e5ff); font-size: 2.5rem; line-height: 1;
  cursor: pointer; z-index: 10000; padding: 0.25rem 0.5rem;
}
.lightbox-close:hover { color: var(--accent-yellow, #ffd700); }
