/* System 3 Software Fan Site — Stylesheet */

:root {
  --primary: #FFD700;   /* approximation of C64 loading-screen gold */
  --secondary: #FF9900; /* secondary amber accent */
  --bg: #08080f;
  --surface: #0f0f1c;
  --surface2: #171726;
  --text: #f0f0f0;
  --text-muted: #999999;
  --border: #24243a;
  --border-light: #2e2e48;
  --glow: rgba(255,215,0,0.12);
  --glow-strong: rgba(255,215,0,0.25);
}

html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Courier New', Courier, monospace;
  color: var(--primary);
  line-height: 1.3;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--primary);
}

h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 0.75rem; }

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

a:hover,
a:focus {
  color: var(--primary);
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.5rem;
}

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

/* ── Layout ── */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

section {
  margin-bottom: 3rem;
}

/* ── Header & Navigation ── */

header {
  background-color: rgba(15, 15, 28, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 24px rgba(0,0,0,0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}

header::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 30%, var(--primary) 70%, transparent 100%);
  opacity: 0.4;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-logo:hover {
  color: var(--secondary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: color 0.15s;
  position: relative;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--primary);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--primary);
}

.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--primary);
}

/* ── Hamburger nav toggle ── */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border-light);
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: background 0.15s;
}

.nav-toggle:hover .nav-toggle-bar {
  background: var(--primary);
}

/* ── Hero ── */

.hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  background: linear-gradient(180deg, #151520 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255,215,0,0.018) 3px,
    rgba(255,215,0,0.018) 4px
  );
  pointer-events: none;
}

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

.hero-title {
  font-size: 2.8rem;
  color: var(--primary);
  text-shadow: 0 0 32px rgba(255, 215, 0, 0.4), 0 0 8px rgba(255, 215, 0, 0.2);
  margin-bottom: 0.4rem;
  letter-spacing: 4px;
}

.hero-tagline {
  font-size: 0.95rem;
  color: var(--secondary);
  letter-spacing: 3px;
  margin-bottom: 1.25rem;
}

.hero-desc {
  max-width: 640px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Page hero (gallery) ── */

.page-hero {
  background: var(--surface);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: var(--primary);
}

.page-hero h1 {
  margin-bottom: 0.25rem;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ── Timeline ── */

.timeline {
  list-style: none;
  border-left: 2px solid var(--primary);
  padding-left: 1.75rem;
  margin-top: 1rem;
}

.timeline li {
  position: relative;
  margin-bottom: 1.25rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -2.05rem;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  background-color: var(--primary);
  border-radius: 50%;
}

.timeline-year {
  color: var(--primary);
  font-weight: bold;
  margin-right: 0.5rem;
}

/* ── People grid ── */

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

.person-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.person-card:hover {
  border-color: rgba(255,215,0,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,215,0,0.08);
  transform: translateY(-2px);
}

.person-name {
  color: var(--primary);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.person-role {
  color: var(--secondary);
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

.person-detail {
  color: var(--text);
  font-size: 0.82rem;
  margin-bottom: 0;
}

.person-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
  border-left: 2px solid var(--border-light);
  padding-left: 0.5rem;
}

/* ── Game cards (index featured + gallery) ── */

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

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

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

.game-card:hover {
  border-color: rgba(255,215,0,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,215,0,0.08);
  transform: translateY(-2px);
}

.game-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
}

.card-title {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.card-year {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.platform-badge {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-c64     { background: #1a3380; color: #c8d8ff; }
.badge-amiga   { background: #6a0000; color: #ffcccc; }
.badge-dos     { background: #0f4a0f; color: #c8ffc8; }
.badge-console { background: #4a2c00; color: #ffdda0; }
.badge-nes     { background: #380055; color: #e8c8ff; }

.card-credits {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}

.card-credits span {
  color: var(--text);
}

.card-desc {
  font-size: 0.83rem;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.card-caveat {
  font-size: 0.74rem;
  color: var(--secondary);
  font-style: italic;
  border-left: 2px solid var(--secondary);
  padding-left: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* ── Music section ── */

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

.video-embed {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
}

.video-label {
  color: var(--primary);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.video-embed iframe {
  width: 100%;
  height: 200px;
  border: none;
}

.fallback-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.fallback-link a {
  font-size: inherit;
}

.music-note {
  margin-top: 1rem;
  background: var(--surface);
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

.music-note p {
  margin-bottom: 0;
}

/* ── Trivia ── */

.trivia-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.trivia-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.trivia-list li:last-child {
  border-bottom: none;
}

.sales-attr {
  color: var(--primary);
  font-weight: bold;
}

.easter-hint {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--secondary);
  padding: 0.5rem 1rem;
  color: var(--secondary);
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

/* ── External links ── */

.ext-links-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.ext-links-list li {
  margin-bottom: 0.75rem;
}

.ext-links-list a {
  font-size: 0.95rem;
}

.link-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  display: block;
  margin-top: 0.15rem;
}

/* ── Gallery filter buttons ── */

.filter-section {
  margin-bottom: 1.5rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.filter-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.4rem 1.1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}

.filter-btn:hover,
.filter-btn:focus {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
  box-shadow: 0 0 8px var(--glow);
}

.filter-btn.active {
  background: var(--primary);
  color: #000000;
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--glow-strong);
}

/* ── Footer ── */

footer {
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
  text-align: center;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: var(--primary);
}

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

.footer-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.footer-image-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0;
}

/* ── History page ── */

.history-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.history-entry:hover {
  border-color: rgba(255,215,0,0.4);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.history-entry h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: var(--primary);
}

.history-date {
  color: var(--secondary);
  font-weight: bold;
}

/* ── People page additions ── */

.person-era {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 0.4rem;
}

/* ── Music CTA teaser ── */

.music-cta {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  background: var(--surface2);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
}

/* ── Text-only reference (no href) ── */

.link-text-only {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Responsive ── */

@media (max-width: 700px) {
  .hero-title   { font-size: 1.5rem; }
  h2            { font-size: 1.2rem; }
  .people-grid  { grid-template-columns: 1fr; }
  .games-grid   { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .music-grid   { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }

  nav           { flex-direction: row; align-items: center; flex-wrap: nowrap; }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    border-top: 1px solid var(--border);
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links li {
    padding: 0.4rem 0;
  }
}

/* ── Reviews page ── */

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

.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.review-card:hover {
  border-color: rgba(255,215,0,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,215,0,0.08);
  transform: translateY(-2px);
}

.review-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.review-game-title {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.review-pub-badge {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--secondary);
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  text-transform: uppercase;
}

.review-issue {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.review-body {
  padding: 0.875rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.review-score {
  display: inline-block;
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: 1;
  text-shadow: 0 0 12px var(--glow-strong);
}

.review-excerpt {
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 0;
}

.review-source-link {
  display: inline-block;
  font-size: 0.76rem;
  color: var(--secondary);
  margin-top: auto;
  padding-top: 0.25rem;
}

/* ── SID Music Player (music.html) ── */

.sid-player-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sid-now-playing {
  margin-bottom: 1.25rem;
}

.sid-now-playing-label {
  display: block;
  font-size: 0.7rem;
  color: var(--secondary);
  letter-spacing: 2px;
  margin-bottom: 0.3rem;
}

.sid-now-playing-title {
  display: block;
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.sid-now-playing-composer {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sid-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.sid-play-btn {
  background: var(--surface2);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.5rem 1.75rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  min-width: 130px;
  transition: background 0.15s, color 0.15s;
}

.sid-play-btn:hover,
.sid-play-btn:focus {
  background: var(--primary);
  color: #000;
  outline: none;
}

.sid-play-btn[aria-pressed="true"] {
  background: var(--secondary);
  color: #000;
  border-color: var(--secondary);
}

.sid-error {
  padding: 0.65rem 0.9rem;
  background: #2a0a0a;
  border-left: 3px solid #cc2222;
  color: #ff8888;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.sid-tracklist-section {
  margin-bottom: 1.5rem;
}

.sid-tracklist-section h3 {
  margin-bottom: 0.5rem;
}

.sid-track-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
}

.sid-track-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}

.sid-track-item:last-child {
  border-bottom: none;
}

.sid-track-item:hover,
.sid-track-item:focus {
  background: var(--surface2);
  outline: none;
}

.sid-track-active {
  background: var(--surface2);
  border-left: 3px solid var(--primary);
  padding-left: calc(0.9rem - 3px);
}

.sid-track-title {
  color: var(--text);
  font-size: 0.9rem;
}

.sid-track-active .sid-track-title {
  color: var(--primary);
}

.sid-track-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.sid-no-tracks {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  margin-bottom: 1.5rem;
}

.sid-attribution-note {
  margin-top: 1.5rem;
}

@media (max-width: 700px) {
  .sid-track-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Resources page ── */

.resource-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.resource-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.resource-item:last-child {
  border-bottom: none;
}

.resource-item > a {
  font-size: 1rem;
  font-weight: bold;
  color: var(--secondary);
}

.resource-item > a:hover,
.resource-item > a:focus {
  color: var(--primary);
}

.resource-item .resource-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  margin-bottom: 0;
  line-height: 1.55;
}

/* ── Games reference page ── */

.game-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.game-entry:last-of-type {
  margin-bottom: 0;
}

.game-entry-title {
  color: var(--primary);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.game-entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.game-entry-year {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.game-entry-credits {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}

.game-entry-credits span {
  color: var(--text);
}

.game-entry-desc p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.game-entry-desc p:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .game-entry { padding: 1rem; }
}
