@font-face {
  font-family: "Dktrashtype";
  src: url("/font/DktrashtypeRXqo.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #0c0c0c;
  --bg-alt: #141414;
  --fg: #e8e8e8;
  --fg-dim: #888;
  --accent: #ff1f3d;
  --border: #2a2a2a;
  --max: 1100px;
  --mono: "Courier New", "Courier Prime", "Courier", monospace;
}

* { box-sizing: border-box; }

/* ---------------- Scrollbars (dark) ---------------- */
/* Firefox */
* {
  scrollbar-color: var(--border) var(--bg);
  scrollbar-width: thin;
}
/* Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
::-webkit-scrollbar-corner {
  background: var(--bg);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color 0.08s linear;
}
a:visited { color: var(--fg); }
a:hover, a:focus {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header ---------------- */
.site-header {
  text-align: center;
  padding: 32px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.site-header .home-link {
  display: inline-block;
  font-family: "Dktrashtype", "Courier New", monospace;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--fg);
  text-decoration: none;
  border: none;
  font-size: min(8vw, var(--header-fs, 96px));
  max-width: 100%;
  word-break: break-word;
}
.site-header .home-link:hover {
  color: var(--accent);
  border: none;
}

.site-header .corner-home {
  position: absolute;
  top: 18px;
  left: 24px;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: lowercase;
  letter-spacing: 0.08em;
}

.site-header-wrap {
  position: relative;
}

/* News box under header */
.news-box {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 14px 18px;
  margin: 18px auto;
  font-size: 14px;
  max-width: 720px;
  max-height: 40vh;
  overflow-y: auto;
}
.news-box h2 {
  margin: 0 0 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
  font-weight: normal;
}
.news-box p { margin: 4px 0; }
.news-box a { border-bottom: 1px dotted var(--fg-dim); }

/* ---------------- Top nav (two lines) ---------------- */
.top-nav {
  text-align: center;
  padding: 6px 12px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.top-nav .row {
  margin: 4px 0;
}
.top-nav a {
  margin: 0 10px;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  font-size: min(3.2vw, var(--menu-fs, 18px));
  display: inline-block;
}

/* Sticky on subpages */
.subpage .top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

/* ---------------- Main content ---------------- */
main {
  flex: 1;
  padding: 28px 0 80px;
}

h1, h2, h3, h4 { font-weight: normal; letter-spacing: 0.02em; }
h1 { font-size: 24px; margin: 0 0 18px; text-transform: lowercase; }
h2 { font-size: 19px; margin: 28px 0 12px; text-transform: lowercase; color: var(--fg-dim); }
h3 { font-size: 16px; margin: 16px 0 8px; }

.page-title {
  border-bottom: 1px dotted var(--border);
  padding-bottom: 6px;
  margin-bottom: 22px;
}

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--fg-dim);
  padding: 18px 12px;
  letter-spacing: 0.05em;
}

/* ---------------- Discography ---------------- */
.artist-block { margin-bottom: 36px; }
.artist-block h2 {
  color: var(--fg);
  font-size: 22px;
  text-transform: none;
  border-bottom: 1px dotted var(--border);
  padding-bottom: 6px;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.album-card {
  display: block;
  text-align: center;
  padding: 8px;
  border: 1px solid transparent;
  transition: border-color 0.1s;
}
.album-card:hover {
  border-color: var(--accent);
  border-bottom: 1px solid var(--accent);
}
.album-card .cover {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #222;
  object-fit: cover;
}
.album-card .title {
  margin-top: 6px;
  font-size: 14px;
  color: var(--fg);
  display: block;
}
.album-card .year {
  display: block;
  font-size: 12px;
  color: var(--fg-dim);
}

/* ---------------- Album detail ---------------- */
.album-detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
}
.album-detail .cover img {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
}
.album-detail .meta { font-size: 13px; color: var(--fg-dim); margin-bottom: 12px; }
.album-detail .description { white-space: pre-wrap; }
@media (max-width: 720px) {
  .album-detail { grid-template-columns: 1fr; }
}

/* Tracks */
.tracklist { border-top: 1px solid var(--border); margin-top: 18px; }
.track {
  border-bottom: 1px solid var(--border);
}
.track-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  cursor: pointer;
  user-select: none;
}
.track-head:hover { background: var(--bg-alt); }
.track-num { color: var(--fg-dim); width: 22px; font-size: 13px; }
.track-title { flex: 1; }
.track-runtime { color: var(--fg-dim); font-size: 13px; }
.track-icons { display: flex; gap: 8px; }
.track-icons a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border: 1px solid var(--border);
}
.track-icons a:hover { border-color: var(--accent); }
.track-body {
  padding: 8px 28px 14px;
  font-size: 14px;
  color: var(--fg);
  background: #0a0a0a;
  display: none;
}
.track.expanded .track-body { display: block; }
.track .meta-line { color: var(--fg-dim); font-size: 12px; margin-top: 6px; }

/* ---------------- Live / tours ---------------- */
.tour-list { display: flex; flex-direction: column; gap: 6px; }
.tour-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.tour-row .date { color: var(--fg-dim); font-size: 13px; }
.tour-row .venue { color: var(--fg-dim); font-size: 12px; }
.tour-row a { display: block; }

.tour-detail .hero img { max-width: 100%; border: 1px solid var(--border); }
.tour-detail .info-html { white-space: pre-wrap; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.media-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--border);
  cursor: pointer;
}

/* ---------------- Gallery ---------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.gallery-grid figure { margin: 0; cursor: pointer; }
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}
.gallery-grid img:hover { border-color: var(--accent); }
.gallery-grid figcaption {
  font-size: 11px;
  color: var(--fg-dim);
  margin-top: 4px;
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 80vh;
  border: 1px solid var(--border);
}
.lightbox .lb-info {
  margin-top: 12px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 13px;
}
.lightbox .lb-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 14px;
}
.lightbox .lb-controls a, .lightbox .lb-controls button {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: lowercase;
}
.lightbox .lb-controls a:hover, .lightbox .lb-controls button:hover { color: var(--accent); border-color: var(--accent); }
.lightbox .lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  width: 44px;
  height: 80px;
  font-size: 24px;
  cursor: pointer;
  font-family: var(--mono);
}
.lightbox .lb-nav.prev { left: 16px; }
.lightbox .lb-nav.next { right: 16px; }
.lightbox .lb-nav:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------- Archive ---------------- */
.archive-list { display: flex; flex-direction: column; gap: 14px; }
.archive-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.archive-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.archive-item .blurb { font-size: 13px; color: var(--fg); }
.archive-item .tags { font-size: 12px; color: var(--fg-dim); margin-top: 4px; }
.archive-item .tags a { color: var(--fg-dim); margin-right: 6px; }
.archive-item .tags a:hover { color: var(--accent); }
.archive-item .actions { margin-top: 8px; font-size: 12px; }
.archive-item .actions a {
  margin-right: 12px;
  border: 1px solid var(--border);
  padding: 3px 8px;
  text-transform: lowercase;
  letter-spacing: 0.06em;
}
.archive-item .actions a:hover { border-color: var(--accent); }

@media (max-width: 540px) {
  .archive-item { grid-template-columns: 1fr; }
  .archive-item img { aspect-ratio: 16/9; }
}

/* ---------------- Forms ---------------- */
form.std { max-width: 580px; }
form.std label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  margin: 14px 0 4px;
}
form.std input[type=text], form.std input[type=email], form.std input[type=number], form.std input[type=password], form.std textarea, form.std select {
  width: 100%;
  background: var(--bg-alt);
  color: var(--fg);
  border: 1px solid var(--border);
  font-family: var(--mono);
  padding: 8px 10px;
  font-size: 14px;
}
form.std textarea { min-height: 120px; resize: vertical; }
form.std input:focus, form.std textarea:focus, form.std select:focus { border-color: var(--accent); outline: none; }

form.std button, .btn {
  background: var(--bg-alt);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 8px 18px;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  margin-top: 16px;
}
form.std button:hover, .btn:hover { color: var(--accent); border-color: var(--accent); }
form.std .help { font-size: 12px; color: var(--fg-dim); margin-top: 4px; }
.form-msg { padding: 10px 12px; margin-top: 14px; border: 1px solid var(--border); font-size: 13px; }
.form-msg.ok { border-color: #2a6; color: #aea; }
.form-msg.err { border-color: var(--accent); color: var(--accent); }

/* ---------------- Chat ---------------- */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: 70vh;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.chat-log .msg { margin: 2px 0; }
.chat-log .msg .u { color: var(--accent); margin-right: 8px; }
.chat-log .msg .ts { color: var(--fg-dim); font-size: 11px; margin-right: 8px; }
.chat-log .sys { color: var(--fg-dim); font-style: italic; margin: 4px 0; }
.chat-input {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 8px;
}
.chat-input input {
  flex: 1;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 13px;
}
.chat-input input:focus { border-color: var(--accent); outline: none; }
.chat-input button {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 6px 14px;
  font-family: var(--mono);
  cursor: pointer;
}
.chat-input button:hover { color: var(--accent); border-color: var(--accent); }

.username-form {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

/* ---------------- 404 ---------------- */
.notfound { text-align: center; padding: 60px 20px; color: var(--fg-dim); }
.notfound h1 { font-size: 64px; color: var(--accent); margin: 0; }

/* ---------------- Audio player (HTML5 native, themed dark) ---------------- */
audio {
  color-scheme: dark;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg-alt);
}
/* Webkit-only nudges so the controls don't look out of place */
audio::-webkit-media-controls-panel {
  background: var(--bg-alt);
}
audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  color: var(--fg);
  font-family: var(--mono);
}

/* ---------------- Album-level external links ---------------- */
.album-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}
.album-links a {
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-size: 12px;
  text-transform: lowercase;
  letter-spacing: 0.08em;
}
.album-links a:hover { border-color: var(--accent); }

/* ---------------- Mobile (≤ 700px) ---------------- */
@media (max-width: 700px) {
  :root { --max: 100%; }

  body { font-size: 14px; }

  .wrap { padding: 0 14px; }

  .site-header { padding: 14px 10px 4px; }
  .site-header .corner-home {
    position: static;
    display: inline-block;
    margin: 0 0 6px;
    font-size: 11px;
  }
  .site-header-wrap { display: flex; flex-direction: column; align-items: center; }

  .top-nav { padding: 4px 6px 8px; }
  .top-nav .row { line-height: 2; }
  .top-nav a { margin: 0 5px; }

  .news-box {
    margin: 10px 14px;
    padding: 10px 12px;
    font-size: 13px;
    max-width: none;
  }

  main { padding: 14px 0 32px; }

  h1 { font-size: 19px; }
  h2 { font-size: 16px; }
  h3 { font-size: 14px; }

  .page-title { padding-bottom: 4px; margin-bottom: 14px; }

  /* Discography grid: 2 columns on phones */
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .album-card .title { font-size: 13px; }
  .album-card .year { font-size: 11px; }

  .artist-block { margin-bottom: 24px; }
  .artist-block h2 { font-size: 17px; }

  /* Album detail: stack art over info */
  .album-detail {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Tracks: tighter, allow icons to wrap */
  .track-head {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 4px;
  }
  .track-num { width: 18px; font-size: 12px; }
  .track-runtime { font-size: 12px; }
  .track-icons { width: 100%; margin-top: 4px; }
  .track-icons a { font-size: 10px; padding: 2px 5px; }
  .track-body { padding: 8px 12px 12px; font-size: 13px; }

  /* Tour rows: stack the date/title/arrow */
  .tour-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 4px;
  }
  .tour-row .date { font-size: 12px; }
  .tour-row .venue { display: block; }

  /* Album external links */
  .album-links a { font-size: 11px; padding: 5px 10px; }

  /* Gallery + media grids: smaller cells */
  .gallery-grid, .media-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  /* Archive items: stack */
  .archive-item { grid-template-columns: 1fr; padding: 10px; }
  .archive-item img { aspect-ratio: 16/9; }

  /* Forms */
  form.std { width: 100%; }
  form.std input, form.std textarea, form.std select { font-size: 16px; } /* prevents iOS zoom on focus */
  form.std button, .btn { width: 100%; padding: 12px; }

  /* Lightbox: bigger touch targets */
  .lightbox .lb-nav { width: 36px; height: 60px; font-size: 20px; }
  .lightbox .lb-controls a, .lightbox .lb-controls button { padding: 8px 12px; font-size: 13px; }

  /* Chat */
  .chat-shell { height: 70vh; }
  .chat-input input { font-size: 16px; }

  .site-footer { font-size: 11px; padding: 14px 8px; }
}

/* ---------------- Very small phones (≤ 380px) ---------------- */
@media (max-width: 380px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .gallery-grid, .media-grid { grid-template-columns: repeat(2, 1fr); }
  .top-nav a { margin: 0 3px; }
}
