/* ── Fix body/html so position:fixed works correctly ──
   Your existing CSS sets body { display: inline-block } which
   prevents fixed positioning from anchoring to the viewport.
   These overrides restore correct behaviour without breaking
   anything else on the page.                                  */

/* ── CRITICAL: force sticky player to viewport bottom ──
   These use !important to win against any conflicting rules
   from main_4.css or other stylesheets.                     */
*, *::before, *::after {
  box-sizing: border-box;
}

.cassette-player {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(7px);
  border-top: 0.5px solid rgba(255,255,255,0.15);
}

html, body {
  width: 100%;
  min-height: 100vh;
}

body {
  display: block !important;
  position: relative;
  width: 100vw;
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

/* Canvas z-index handled by inline style in visualizer.js */
#hm-viz {
  display: block !important;
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

/* Page content above canvas */
h1, #nav, .track-list, #footer {
  position: relative;
  z-index: 3;
}


/* ============================================================
   HARK MADLEY — CASSETTE PLAYER STYLES
   Add this file to your project and link it in your HTML:
   <link rel="stylesheet" href="player.css">
   Neue Haas Grotesk loads via your existing Adobe Fonts (Typekit) script — no new font link needed.
   
   
   
   ============================================================ */

:root {
  
  --warm-cream: white;
  --track-hover: rgba(255, 255, 255, 0.06);
  --track-active: rgba(255, 255, 255, 0.1);
}

/* ── Page ── */
body {
  font-family: neue-haas-grotesk-display, sans-serif;
  padding-bottom: 120px; /* room for sticky player */
}

/* ── Track list ── */
.track-list {
  padding: 1rem 0 2rem;
  -webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.9)), to(rgba(0,0,0,0.15)));
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.15));
}

.track-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  padding: 0.1rem 10px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
  font-size: 1em;
}

.track-row:hover {
  background: var(--track-hover);
}
.track-row:hover .track-title { color: #33f5ff; }

.track-row.active {
  background: var(--track-active);
  border-left: 3px solid #33f5ff;
}

.track-row.active .track-title {
  color: #33f5ff;
}

.track-row.active .track-date {
  color: rgba(51,245,255,0.6);
}

.track-date {
  font-size: 1em;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.9);
  font-family: neue-haas-grotesk-display, sans-serif;
}

.track-title {
  letter-spacing: 0.02em;
  font-size: 1em;
  color: white;
  font-family: neue-haas-grotesk-display, sans-serif;
  position: relative;
  padding-left: 15px;
}

.track-row.active .track-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #33f5ff;
}



.player-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
}

/* ── Transport buttons ── */
.ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: neue-haas-grotesk-display, sans-serif;
  font-size: 11px;
}
.ctrl-btn:hover { color: white; }

.ctrl-btn.play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0.5px solid rgba(255,255,255,0.5);
  color: white;
  font-size: 10px;
}
.ctrl-btn.play-btn:hover { border-color: rgba(255,255,255,0.6); }

.ctrl-btn.shuffle-btn.on { color: #33f5ff; }

/* ── Now playing info ── */
.tape-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex-shrink: 0;
  width: 200px;
}

.tape-track-title {
  font-size: 1em;
  color: white;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: neue-haas-grotesk-display, sans-serif;
  line-height: 1.3;
}

.tape-track-title.idle {
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.tape-track-date {
  font-size: .9em;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.01em;
  margin-top: 1px;
  font-family: neue-haas-grotesk-display, sans-serif;
}

/* ── Progress ── */
.progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.25);
  position: relative;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.9);
  border-radius: 2px;
  width: 0%;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: white;
  left: 0%;
  pointer-events: none;
  opacity: 1;
  transition: width 0.15s, height 0.15s;
}

.progress-track:hover .progress-fill { background: white; }
.progress-track:hover .progress-thumb { width: 12px; height: 12px; }

/* ── Time ── */
.time-display {
  font-size: .81em;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em;
  flex-shrink: 0;
  font-family: neue-haas-grotesk-display, sans-serif;
  min-width: 72px;
  text-align: right;
}

/* ── Volume ── */
.vol-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.vol-label {
  font-size: 0.75em;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: neue-haas-grotesk-display, sans-serif;
}

.vol-track {
  width: 52px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.vol-fill {
  height: 100%;
  background: rgba(255,255,255,0.65);
  border-radius: 2px;
  width: 80%;
  position: relative;
}

.vol-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: white;
  pointer-events: none;
}

.vol-track:hover .vol-fill::after { width: 12px; height: 12px; right: -6px; }

.vol-track:hover .vol-fill { background: rgba(255,255,255,0.85); }

/* ── Mobile ── */
@media (max-width: 600px) {
  body { 
    padding-bottom: 130px;
    overscroll-behavior-x: none;
    touch-action: pan-y;
  }

  .track-row {
    grid-template-columns: 80px 1fr;
    padding: 0.1rem 10px;
  }

  .player-inner {
    gap: 8px;
    height: 56px;
    padding: 0 10px;
  }

  .tape-info { width: auto; max-width: 160px; flex-shrink: 1; margin-right: 8px;}
  .tape-track-title { font-size: 1em; }
  .tape-track-date { font-size: .9em; }
  .time-display { display: none; }
  .vol-wrap { display: none; }

  .ctrl-btn { font-size: 10px; padding: 2px; }
  .ctrl-btn.play-btn { width: 24px; height: 24px; font-size: 9px; }
  
  .progress-thumb { width: 14px; height: 14px; }
}