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

:root {
  --bg:        #ffffff;
  --bg2:       #f2f2f2;
  --ink:       #111111;
  --ink2:      #555555;
  --ink3:      #aaaaaa;
  --border:    #111111;
  --violet:    oklch(40% 0.19 268);
  --violet-lt: oklch(93% 0.05 268);
  --shadow:    4px 4px 0 #111;
}
.theme-dark {
  --bg:        #0e0e14;
  --bg2:       #181820;
  --ink:       #f0f0f0;
  --ink2:      #9999aa;
  --ink3:      #44444e;
  --border:    #333344;
  --violet:    oklch(62% 0.18 268);
  --violet-lt: oklch(18% 0.07 268);
  --shadow:    4px 4px 0 #000;
}

html, body { height: 100%; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--ink); }

/* Hatch pattern — needs ::before pseudo-element */
.hatch-box {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
  background: var(--bg2);
}
.hatch-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg2), var(--bg2) 3px,
    var(--bg) 3px, var(--bg) 10px
  );
}

/* Player thumb hatch */
.player-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg2), var(--bg2) 2px,
    var(--bg) 2px, var(--bg) 8px
  );
}

/* Ticker animation */
.ticker-track {
  display: inline-flex;
  animation: ticker 28s linear infinite;
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Active states managed by JS or hard-coded per page */
.nav-link.active {
  background: var(--violet);
  color: white;
  border-color: var(--violet);
}
.filter-btn.active {
  background: var(--violet);
  color: white;
  border-color: var(--violet);
}
.sort-btn.active {
  border-color: var(--violet);
  color: var(--violet);
}

/* Bio quote — dual-sided border needs custom CSS */
.bio-quote {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--ink2);
  border-left: 3px solid var(--violet);
  border-bottom: 1.5px solid var(--border);
  padding-left: 10px;
  padding-bottom: 12px;
  line-height: 1.6;
}
.bio-quote footer {
  margin-top: 6px;
  font-style: normal;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  color: var(--ink3);
}

/* Progress bar — left position set by JS */
.prog-fill { transition: width 0.3s; }
.prog-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.3s;
}

/* Dynamically rendered discog rows */
.discog-row {
  display: grid;
  grid-template-columns: 48px 1fr 64px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1.5px solid var(--bg2);
}
.discog-title { font-family: 'Libre Baskerville', serif; font-size: 13px; font-weight: 700; display: block; }
.discog-artist { font-size: 11px; color: var(--ink2); margin-bottom: 4px; }
.discog-year { font-family: 'Silkscreen', monospace; font-size: 10px; color: var(--ink3); text-align: right; }
.discog-more { padding: 14px; text-align: center; font-size: 11px; color: var(--ink3); }

/* Tags — also used in dynamically rendered discog rows */
.tag-v {
  display: inline-block;
  background: var(--violet);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  padding: 2px 7px;
  letter-spacing: 0.5px;
}
.tag-o {
  display: inline-block;
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  padding: 2px 7px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s;
}
.tag-o:hover { background: var(--violet); color: white; border-color: var(--violet); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--ink3); }

/* Float player — position managed by JS */
#float-player {
  position: fixed;
  width: 260px;
  z-index: 200;
  transition: top 0.18s cubic-bezier(.25,.8,.25,1), left 0.18s cubic-bezier(.25,.8,.25,1);
}
#float-player.player-dragging {
  transition: none;
}
#player-drag-handle {
  cursor: grab;
}
#player-drag-handle:active {
  cursor: grabbing;
}
#player-minimize {
  all: unset;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: var(--ink3);
  cursor: pointer;
  border: 1.5px solid transparent;
  flex-shrink: 0;
  transition: color 0.1s, border-color 0.1s;
}
#player-minimize:hover {
  color: var(--ink);
  border-color: var(--border);
}

/* Player scrolling text */
.player-scroll-wrap {
  overflow: hidden;
  min-width: 0;
  flex: 1;
}
.player-scroll-inner {
  display: inline-block;
  white-space: nowrap;
}
.player-scroll-inner.scrolling {
  animation: player-scroll linear infinite;
}
@keyframes player-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Volume slider — matches seeker bar style */
#vol-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
#vol-label {
  font-family: 'Silkscreen', monospace;
  font-size: 8px;
  color: var(--ink3);
  flex-shrink: 0;
}
#vol-pct {
  font-family: 'Silkscreen', monospace;
  font-size: 8px;
  color: var(--ink3);
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}
#vol-track {
  flex: 1;
  height: 3px;
  background: var(--ink3);
  position: relative;
  cursor: pointer;
}
#vol-fill {
  height: 100%;
  background: var(--violet);
  width: 50%;
}
#vol-dot {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--violet);
  border: 2px solid var(--bg);
  outline: 1px solid var(--border);
  transform: translate(-50%, -50%);
  left: 50%;
  cursor: pointer;
}

/* Admin lock icon */
#admin-lock-btn {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 300;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink3);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.1s, border-color 0.1s, background 0.1s;
  line-height: 1;
  padding: 0;
}
#admin-lock-btn:hover {
  color: var(--violet);
  border-color: var(--violet);
}
#admin-lock-btn.logged-in {
  color: var(--violet);
  border-color: var(--violet);
}

/* Login modal */
#admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.65);
  align-items: center;
  justify-content: center;
}
#admin-modal-overlay.open {
  display: flex;
}
#admin-modal-box {
  background: var(--bg);
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
  width: 300px;
  max-width: 92vw;
}
#admin-modal-box h2 {
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border);
}
.modal-label {
  display: block;
  font-family: 'Silkscreen', monospace;
  font-size: 8px;
  color: var(--ink3);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.modal-input {
  display: block;
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 7px 10px;
  margin-bottom: 10px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.1s;
}
.modal-input:focus { border-color: var(--violet); }
#admin-modal-err {
  font-family: 'Silkscreen', monospace;
  font-size: 8px;
  color: #c0392b;
  min-height: 14px;
  margin-bottom: 10px;
}
.modal-btns { display: flex; gap: 8px; }
.modal-btn {
  font-family: 'Silkscreen', monospace;
  font-size: 9px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  flex: 1;
  transition: background 0.1s;
}
.modal-btn:hover { background: var(--bg2); }
.modal-btn-primary {
  background: var(--violet);
  color: white;
  border-color: var(--violet);
}
.modal-btn-primary:hover { opacity: 0.85; }

/* Bio body text */
#bio-body p { margin: 0 0 0.75em; }
#bio-body p:last-child { margin-bottom: 0; }

/* Blog expanded content */
.blog-content { margin-top: 10px; }
.blog-content img { max-width: 100%; border: 1.5px solid var(--border); display: block; margin: 8px 0; }
.blog-content h1, .blog-content h2 { font-family: 'Libre Baskerville', serif; margin: 12px 0 6px; font-size: 15px; }
.blog-content blockquote { border-left: 3px solid var(--violet); padding-left: 10px; color: var(--ink2); margin: 8px 0; }
.blog-content a { color: var(--violet); }
.blog-content ul { padding-left: 20px; margin: 6px 0; }
.blog-content p { margin: 0 0 8px; }

/* Minimized restore tab — fixed bottom-center */
#player-tab {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 2px solid var(--border);
  border-bottom: none;
  padding: 5px 16px;
  font-family: 'Silkscreen', monospace;
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--ink);
  cursor: pointer;
  z-index: 200;
  display: none;
  white-space: nowrap;
  box-shadow: var(--shadow);
  transition: background 0.1s;
}
#player-tab:hover {
  background: var(--violet);
  color: white;
  border-color: var(--violet);
}
#player-tab.visible {
  display: block;
}
