/* =============================================
   LATE MISSION BBS – style.css
   Palette from EP2 photo: warm sunset, steel sky,
   amber glow, muted green road, red tail lights.
   VT323 for all text including the title.
   ============================================= */

:root {
  --bg:       #0c0a08;
  --green:    #5a8060;
  --amber:    #e87830;
  --blue:     #88aacc;
  --brown:    #9a7850;
  --white:    #ede8e0;
  --gold:     #c89820;
  --gray:     #5a5040;
  --dim:      #1e1a14;
  --header-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: #c0b8aa;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 18px;
  line-height: 1.4;
  overflow-x: hidden;
}

/* ─── CRT ─────────────────────────────────────── */

.crt-wrap {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(154,120,80,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 15%, rgba(136,170,204,0.05) 0%, transparent 50%),
    var(--bg);
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 2px,
    rgba(0,0,0,0.18) 2px, rgba(0,0,0,0.18) 4px
  );
  pointer-events: none;
  z-index: 998;
}

/* ─── HEADER ──────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(12,10,8,0.94);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--brown);
  box-shadow: 0 0 18px rgba(154,120,80,0.15);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.header-left {
  color: var(--green);
  text-shadow: 0 0 10px rgba(90,128,96,0.5);
  font-size: 18px;
  white-space: nowrap;
}

.header-right {
  color: var(--gray);
  font-size: 15px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.header-clock { color: var(--gold); text-shadow: 0 0 6px rgba(200,152,32,0.4); }
.header-counter span { color: var(--green); text-shadow: 0 0 8px rgba(90,128,96,0.5); }

/* ─── MAIN ────────────────────────────────────── */

.bbs {
  max-width: 82ch;
  margin: 0 auto;
  padding: calc(var(--header-h) + 20px) 14px 60px;
}

/* ─── CONNECTION SEQUENCE ─────────────────────── */

.conn-seq {
  color: #6a7850;
  font-size: 15px;
  white-space: pre;
  min-height: 5em;
  margin-bottom: 14px;
  text-shadow: 0 0 6px rgba(106,120,80,0.4);
  overflow-x: hidden;
}

/* ─── TITLE BOX ───────────────────────────────── */

.title-box {
  border: 1px solid var(--blue);
  text-align: center;
  padding: 18px 16px 14px;
  box-shadow: 0 0 20px rgba(136,170,204,0.1), inset 0 0 30px rgba(0,0,0,0.3);
  margin-bottom: 4px;
}

.bbs-title {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: normal;
  color: var(--amber);
  text-shadow: 0 0 20px rgba(232,120,48,0.7), 0 0 50px rgba(232,120,48,0.3);
  line-height: 1.2;
  display: block;
  letter-spacing: 0;
}

.title-sub {
  font-size: 14px;
  margin-top: 8px;
  letter-spacing: 0.04em;
  color: var(--gray);
}

/* ─── NAV ─────────────────────────────────────── */

.nav-section { margin: 10px 0 6px; }

.nav-menu {
  list-style: none;
  padding: 4px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
}

.nav-menu a {
  display: inline-block;
  color: var(--white);
  text-decoration: none;
  padding: 1px 6px;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 18px;
  transition: background 0.1s, color 0.1s;
}

.nav-menu a:hover,
.nav-menu a:focus {
  background: var(--amber);
  color: #000;
  text-shadow: none;
  outline: none;
  box-shadow: 0 0 12px rgba(232,120,48,0.6);
}

.nav-key { color: var(--gold); text-shadow: 0 0 6px rgba(200,152,32,0.4); }

/* ─── SECTION HEADERS ─────────────────────────── */

.section-head {
  border: 1px solid var(--amber);
  color: var(--amber);
  text-shadow: 0 0 6px rgba(232,120,48,0.3);
  padding: 3px 10px;
  margin-top: 14px;
  margin-bottom: 10px;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 18px;
}

/* ─── DIVIDER ─────────────────────────────────── */

hr.divider {
  border: none;
  border-top: 1px solid var(--dim);
  margin: 14px 0;
}

/* ─── HERO ────────────────────────────────────── */

.hero-panel { margin: 6px 0 14px; }

.hero-img-wrap { display: block; cursor: pointer; line-height: 0; }

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 0 40px rgba(154,120,80,0.3), 0 0 80px rgba(232,120,48,0.15);
  border: 1px solid var(--dim);
}

.hero-img-fallback {
  display: none;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg,
    #0c0a08 0%, rgba(136,170,204,0.15) 20%,
    rgba(154,120,80,0.2) 40%, rgba(232,120,48,0.25) 60%,
    rgba(90,128,96,0.1) 80%, #0c0a08 100%
  );
  border: 1px solid var(--dim);
}

.hero-img.errored { display: none; }
.hero-img.errored + .hero-img-fallback { display: block; }

.hero-caption { font-size: 14px; margin-top: 4px; text-align: center; }

.hero-bio {
  margin-top: 12px;
  color: var(--green);
  text-shadow: 0 0 6px rgba(90,128,96,0.3);
  border-left: 2px solid var(--green);
  padding-left: 12px;
  font-size: 18px;
  line-height: 1.5;
}

/* ─── ABOUT ───────────────────────────────────── */

.about-block { padding: 4px 0 8px; }

.fields {
  border-collapse: collapse;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 17px;
  margin-bottom: 10px;
}

.fields td { padding: 1px 4px; vertical-align: top; }
.field-label { color: var(--gray); white-space: nowrap; }
.field-sep   { color: var(--dim); padding: 0 6px; }
.field-value { color: var(--blue); }
.field-value.loc { color: var(--white); }
.field-value a { color: var(--blue); text-decoration: none; }
.field-value a:hover { color: var(--amber); }

.about-bio {
  color: #9a9080;
  border-left: 2px solid var(--dim);
  padding-left: 12px;
  margin-top: 8px;
  line-height: 1.55;
  font-size: 17px;
}

/* ─── MUSIC / DISCOGRAPHY ─────────────────────── */

.release-block {
  margin: 10px 0 18px;
  border: 1px solid var(--dim);
  padding: 10px 12px 12px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

.release-header {
  color: var(--gold);
  text-shadow: 0 0 6px rgba(200,152,32,0.35);
  font-size: 20px;
  margin-bottom: 4px;
}

.release-meta {
  color: var(--gray);
  font-size: 15px;
  margin-bottom: 8px;
}

/* ─── TRACKLIST + INLINE PLAYER ───────────────── */

.tracklist {
  width: 100%;
  border-collapse: collapse;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 17px;
  margin-bottom: 10px;
}

.tracklist td { padding: 2px 4px; vertical-align: middle; }

.track-num { color: var(--gold); width: 2.5ch; }

.track-dur {
  color: var(--gray);
  text-align: right;
  white-space: nowrap;
  padding-left: 8px;
}

/* clickable rows */
.track-row {
  cursor: pointer;
  user-select: none;
}

.track-row td { transition: background 0.12s, color 0.12s; }

.track-row:hover td { background: rgba(255,255,255,0.04); }

.track-row.playing td { background: rgba(232,120,48,0.08); }

/* ▶ / ■ indicator injected via CSS – no extra markup needed */
.track-name::before {
  content: '\25B6  ';   /* ▶ */
  color: var(--dim);
  font-size: 0.7em;
  vertical-align: middle;
}

.track-row.playing .track-name::before {
  content: '\25A0  ';   /* ■ */
  color: var(--amber);
  text-shadow: 0 0 6px rgba(232,120,48,0.7);
}

.track-row.paused .track-name::before {
  content: '\25B6  ';   /* ▶ back to play arrow when paused mid-track */
  color: var(--amber);
  opacity: 0.6;
}

.track-name { color: var(--white); word-break: break-word; }

.track-row:hover .track-name { color: var(--amber); }

.track-row.playing .track-name { color: var(--amber); text-shadow: 0 0 6px rgba(232,120,48,0.4); }

/* ─── RELEASE ACTIONS ─────────────────────────── */

.release-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.btn-bandcamp {
  display: inline-block;
  color: var(--amber);
  text-decoration: none;
  border: 1px solid var(--amber);
  padding: 2px 10px;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 17px;
  text-shadow: 0 0 6px rgba(232,120,48,0.4);
  transition: background 0.1s, color 0.1s;
}

.btn-bandcamp:hover,
.btn-bandcamp:focus {
  background: var(--amber);
  color: #000;
  text-shadow: none;
  box-shadow: 0 0 18px rgba(232,120,48,0.6);
  outline: none;
}

/* ─── CONTACT ─────────────────────────────────── */

.contact-block {
  color: #a8a090;
  padding: 8px 0 12px;
  line-height: 1.9;
  font-size: 17px;
}

.contact-block a { color: var(--blue); text-decoration: none; text-shadow: 0 0 6px rgba(136,170,204,0.3); }
.contact-block a:hover { color: var(--amber); text-shadow: 0 0 8px rgba(232,120,48,0.5); }

/* ─── FOOTER ──────────────────────────────────── */

.bbs-footer {
  color: var(--gray);
  padding: 8px 0 24px;
  line-height: 1.8;
  font-size: 16px;
}

.bbs-footer a { color: var(--blue); text-decoration: none; }
.bbs-footer a:hover { color: var(--amber); }
.footer-render { color: #2e2820; font-size: 14px; }

/* ─── LIGHTBOX ────────────────────────────────── */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 500;
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
}

#lightbox.open { display: flex; }

#lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(154,120,80,0.4);
}

/* ─── UTILITIES ───────────────────────────────── */

.c-green  { color: var(--green);  text-shadow: 0 0 6px rgba(90,128,96,0.35); }
.c-amber  { color: var(--amber);  text-shadow: 0 0 6px rgba(232,120,48,0.35); }
.c-blue   { color: var(--blue);   text-shadow: 0 0 6px rgba(136,170,204,0.3); }
.c-brown  { color: var(--brown);  text-shadow: 0 0 6px rgba(154,120,80,0.35); }
.c-gold   { color: var(--gold);   text-shadow: 0 0 6px rgba(200,152,32,0.35); }
.c-white  { color: var(--white); }
.c-gray   { color: var(--gray); }

/* legacy alias so existing markup still works */
.c-pink   { color: var(--amber);  text-shadow: 0 0 6px rgba(232,120,48,0.35); }
.c-purple { color: var(--brown);  text-shadow: 0 0 6px rgba(154,120,80,0.35); }

.blink { animation: blink-kf 1s step-start infinite; }
@keyframes blink-kf { 50% { opacity: 0; } }

a         { color: var(--blue); text-decoration: none; }
a:hover   { color: var(--amber); }
a:visited { color: #887060; }

/* ─── RESPONSIVE ──────────────────────────────── */

@media (max-width: 500px) {
  body { font-size: 15px; }
  .bbs { padding-left: 10px; padding-right: 10px; }
  .header-left { font-size: 14px; }
  .site-header {
    height: auto;
    min-height: var(--header-h);
    padding: 5px 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  :root { --header-h: 72px; }
  .header-right { align-items: flex-start; font-size: 13px; }
  .conn-seq { font-size: 12px; }
  .tracklist { font-size: 15px; }
  .release-block { padding: 8px; }
}
