/* System 3 Software Fan Site — Stylesheet */

:root {
  --primary: #FFD700;   /* approximation of C64 loading-screen gold */
  --secondary: #FF9900; /* secondary amber accent */
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #999999;
  --border: #2a2a2a;
}

*,
*::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(--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: var(--surface);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

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);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: color 0.15s;
}

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

/* ── Hero ── */

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

.hero-title {
  font-size: 2.4rem;
  color: var(--primary);
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.25);
  margin-bottom: 0.4rem;
  letter-spacing: 2px;
}

.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);
  border-bottom: 2px solid var(--primary);
  padding: 2rem 1.5rem;
  text-align: center;
}

.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;
}

.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;
  font-style: italic;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* ── 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.15s;
}

.game-card:hover {
  border-color: var(--primary);
}

.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: #2244aa; color: #f0f0f0; }
.badge-amiga   { background: #8a0000; color: #f0f0f0; }
.badge-dos     { background: #1a5c1a; color: #f0f0f0; }
.badge-console { background: #5c3800; color: #f0f0f0; }
.badge-nes     { background: #4a1a6b; color: #f0f0f0; }

.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;
  padding-left: 0.75rem;
  border-left: 2px solid var(--secondary);
  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;
}

.filter-btn:hover,
.filter-btn:focus {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}

.filter-btn.active {
  background: var(--primary);
  color: #000000;
  border-color: var(--primary);
}

/* ── Footer ── */

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

.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;
}

.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; }
  nav           { flex-direction: column; align-items: flex-start; }
  .reviews-grid { grid-template-columns: 1fr; }
}

/* ── 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;
}

.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;
}

.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; }
}
