/* ═══════════════════════════════════════════
   ROCKSHOW V5 — main.css
   ═══════════════════════════════════════════ */

@import url("./view-transitions.css");

:root {
  --bg: #040e1a;
  --bg2: #071428;
  --pink: #00d4ff;
  --gold: #e0f7ff;
  --mint: #00c9a7;
  --peach: #5bb8ff;
  --text: #dceef8;
  --dim: #5a7a90;
  --surface: rgba(0,212,255,0.06);
  --glow-pink: rgba(0,212,255,0.3);
  --glow-gold: rgba(224,247,255,0.25);
  --blur: 20px;
  --font-display: 'Righteous', 'Staatliches', cursive;
  --font-body: 'Spectral', Georgia, serif;
  --font-mono: 'Courier New', monospace;
}

/* ── responsive root — scales ALL rem-based sizes ── */
html { font-size: clamp(14px, 1.1vw + 6px, 20px); }

/* ── reset ── */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { height:100%; -webkit-tap-highlight-color:transparent; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

body.home {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

body.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

a { color: inherit; text-decoration: none; }

/* ── shared elements for cross-document transitions ── */
.header { view-transition-name: site-header; }
.logo { view-transition-name: site-logo; }
.tabbar { view-transition-name: site-tabbar; }

::view-transition-group(site-header),
::view-transition-group(site-logo),
::view-transition-group(site-tabbar) {
  animation-duration: 320ms;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}

/* ── loader ── */
#loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  z-index: 100000;
  transition: opacity .9s ease, visibility .9s;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-text {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 3vw, 1.6rem);
  color: var(--dim);
  letter-spacing: .2em;
}
.loader-cursor {
  display: inline-block; width: 2px; height: 1.4em;
  background: var(--gold);
  animation: blink 1s steps(1) infinite;
  vertical-align: middle;
}
@keyframes blink { 50% { opacity:0; } }

/* ── background layers ── */
.bg-gradient {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 15% 25%, rgba(0,212,255,.10), transparent 55%),
    radial-gradient(ellipse 600px 450px at 80% 20%, rgba(224,247,255,.08), transparent 50%),
    radial-gradient(ellipse 700px 400px at 50% 85%, rgba(0,201,167,.06), transparent 50%),
    radial-gradient(ellipse 500px 350px at 25% 75%, rgba(91,184,255,.05), transparent 45%),
    linear-gradient(180deg, #0a1e35 0%, #06152a 25%, #040e1a 55%, #030a12 100%);
  z-index: -3;
  contain: layout style paint;
}

.scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,.04) 2px, rgba(0,0,0,.04) 4px
  );
  pointer-events: none; z-index: -1;
  contain: layout style paint;
}

/* ── water surface: bright top + wave edge ── */
.water-surface {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 45vh;
  background: linear-gradient(
    180deg,
    rgba(0,180,240,.18) 0%,
    rgba(0,140,210,.12) 20%,
    rgba(0,100,180,.06) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: -1;
  contain: layout style paint;
}
.water-surface::before {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 30px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30'%3E%3Cpath d='M0,15 Q150,0 300,15 T600,15 T900,15 T1200,15 V30 H0Z' fill='rgba(0,140,210,0.06)'/%3E%3C/svg%3E") repeat-x;
  background-size: 600px 30px;
  animation: waveSlide 8s linear infinite;
}
.water-surface::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0; right: 0;
  height: 30px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30'%3E%3Cpath d='M0,20 Q150,5 300,20 T600,20 T900,20 T1200,20 V30 H0Z' fill='rgba(0,180,240,0.04)'/%3E%3C/svg%3E") repeat-x;
  background-size: 500px 30px;
  animation: waveSlide 6s linear infinite reverse;
  opacity: .7;
}
@keyframes waveSlide {
  from { background-position-x: 0; }
  to { background-position-x: 600px; }
}

/* ── underwater: light rays ── */
.underwater {
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  overflow: hidden;
  contain: layout style paint;
}
.light-ray {
  position: absolute;
  top: -20%;
  width: clamp(40px, 8vw, 120px);
  height: 140%;
  background: linear-gradient(
    180deg,
    rgba(0,212,255,.08) 0%,
    rgba(224,247,255,.04) 30%,
    transparent 70%
  );
  transform-origin: top center;
  animation: rayDrift 8s ease-in-out infinite;
  opacity: .6;
}
.light-ray:nth-child(1) { left: 8%; animation-delay: 0s; animation-duration: 9s; }
.light-ray:nth-child(2) { left: 25%; animation-delay: -2s; animation-duration: 7s; width: clamp(30px, 6vw, 90px); }
.light-ray:nth-child(3) { left: 45%; animation-delay: -4s; animation-duration: 10s; }
.light-ray:nth-child(4) { left: 65%; animation-delay: -1s; animation-duration: 8s; width: clamp(35px, 7vw, 100px); }
.light-ray:nth-child(5) { left: 85%; animation-delay: -3s; animation-duration: 11s; width: clamp(25px, 5vw, 80px); }

@keyframes rayDrift {
  0%,100% { transform: rotate(-3deg) scaleX(1); opacity: .5; }
  25% { transform: rotate(2deg) scaleX(1.1); opacity: .7; }
  50% { transform: rotate(-1deg) scaleX(.9); opacity: .4; }
  75% { transform: rotate(3deg) scaleX(1.05); opacity: .65; }
}

/* ── underwater: caustics ── */
.caustics {
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  contain: layout style paint;
  background:
    radial-gradient(ellipse 200px 200px at 30% 40%, rgba(0,212,255,.04), transparent),
    radial-gradient(ellipse 150px 250px at 70% 30%, rgba(224,247,255,.03), transparent),
    radial-gradient(ellipse 180px 180px at 50% 70%, rgba(0,201,167,.03), transparent),
    radial-gradient(ellipse 120px 200px at 20% 80%, rgba(91,184,255,.03), transparent),
    radial-gradient(ellipse 160px 160px at 80% 60%, rgba(0,212,255,.02), transparent);
  background-size: 150% 150%;
  animation: causticShift 18s ease-in-out infinite;
  opacity: .5;
}
@keyframes causticShift {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-4%, -3%) scale(1.02); }
  66% { transform: translate(3%, -4%) scale(.98); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ── underwater: bubbles ── */
#bubbles {
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  overflow: hidden;
  contain: layout style paint;
}
.bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    rgba(224,247,255,.25),
    rgba(0,212,255,.08) 60%,
    transparent
  );
  border: 1px solid rgba(224,247,255,.12);
  animation: bubbleRise linear forwards;
  will-change: transform, opacity;
}
@keyframes bubbleRise {
  0% { opacity: 0; transform: translateX(0) scale(.6); }
  10% { opacity: .7; }
  50% { transform: translateX(var(--drift)) scale(1); }
  85% { opacity: .5; }
  100% { opacity: 0; transform: translateX(var(--drift)) scale(1.1) translateY(-110vh); }
}

#glitchCanvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -2; pointer-events: none;
  opacity: .018;
  image-rendering: pixelated;
}

#particles {
  position: fixed; inset: 0;
  pointer-events: none; z-index: -1;
  overflow: hidden;
  contain: layout style paint;
}
.particle {
  position: absolute;
  color: var(--pink);
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 10px currentColor;
  animation: rise linear forwards;
  will-change: transform, opacity;
}
@keyframes rise {
  0% { opacity:0; transform:translateY(0) rotate(0); }
  8% { opacity:.5; }
  85% { opacity:.5; }
  100% { opacity:0; transform:translateY(-110vh) rotate(360deg); }
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.header {
  flex-shrink: 0;
  position: relative; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid rgba(0,212,255,.15);
  background: rgba(8,6,13,.85);
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 2rem);
  color: var(--gold);
  letter-spacing: .1em;
  text-shadow: 0 0 20px var(--glow-gold);
  animation: logoPulse 4s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { opacity: .85; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════
   HERO — CASSETTE
   ═══════════════════════════════════════════ */
.hero {
  display: flex; justify-content: center; align-items: center;
  padding: clamp(.8rem, 2vh, 1.5rem) 1.25rem clamp(.4rem, 1vh, .8rem);
}

.cassette {
  width: min(85vw, 60vmin);
  aspect-ratio: 1.58 / 1;
  background: linear-gradient(175deg, #0a1e30 0%, #081828 55%, #0c2035 100%);
  border-radius: 14px;
  border: 1.5px solid rgba(0,212,255,.18);
  position: relative;
  padding: 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow:
    0 30px 60px -25px rgba(0,0,0,.8),
    0 0 80px -20px rgba(0,212,255,.08),
    inset 0 1px 0 rgba(255,255,255,.03);
  transition: transform .4s ease, box-shadow .4s ease;
  opacity: 0; animation: cassetteIn 1s ease forwards, cassetteFloat 6s 1s ease-in-out infinite;
  will-change: transform;
}
@keyframes cassetteIn {
  from { opacity:0; transform:translateY(30px) scale(.92); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
@keyframes cassetteFloat {
  0%,100% { transform:translateY(0) rotate(0deg); }
  25% { transform:translateY(-5px) rotate(.3deg); }
  50% { transform:translateY(-8px) rotate(0deg); }
  75% { transform:translateY(-4px) rotate(-.3deg); }
}
.cassette:hover {
  animation-play-state: paused;
  transform: translateY(-8px) rotateX(2deg);
  box-shadow:
    0 40px 80px -25px rgba(0,0,0,.9),
    0 0 100px -15px rgba(0,212,255,.12),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.cassette__screw {
  position: absolute; width: 8px; height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3a50, #0c2035);
  border: 1px solid rgba(255,255,255,.06);
}
.cassette__screw::after {
  content: ''; position: absolute;
  top: 50%; left: 25%; width: 50%; height: 1px;
  background: rgba(255,255,255,.08);
  transform: rotate(40deg);
}
.cassette__screw--tl { top: 8px; left: 8px; }
.cassette__screw--tr { top: 8px; right: 8px; }
.cassette__screw--bl { bottom: 8px; left: 8px; }
.cassette__screw--br { bottom: 8px; right: 8px; }

.cassette__window {
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  background: rgba(0,0,0,.35);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 24px 8px 0;
  position: relative;
  border: 1px solid rgba(255,255,255,.03);
}

.reel {
  width: clamp(36px, 12vw, 8vmin);
  height: clamp(36px, 12vw, 8vmin);
  border-radius: 50%;
  background: radial-gradient(circle,
    #1a2a40 18%, #0e1a2e 22%,
    #1a2a40 26%, #0e1a2e 45%,
    #1a2a40 49%, #0a1422 100%
  );
  border: 2px solid rgba(255,255,255,.07);
  animation: spin 2.5s linear infinite;
  animation-play-state: paused;
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 0 12px rgba(0,0,0,.5);
}
.cassette.playing .reel {
  animation-play-state: running;
}
.reel::before {
  content: ''; position: absolute;
  inset: 33%; border-radius: 50%;
  background: radial-gradient(circle, #2a3850 35%, #0e1a2e 80%);
  border: 1px solid rgba(255,255,255,.05);
}
.reel::after {
  content: ''; position: absolute;
  inset: 43%; border-radius: 50%;
  background: #08101e;
  border: 1px solid rgba(255,255,255,.04);
}
.reel__spoke {
  position: absolute; top: 50%; left: 50%;
  width: 72%; height: 2px;
  background: rgba(255,255,255,.06);
  transform-origin: 0 50%;
}
.reel__spoke:nth-child(1) { transform: rotate(0deg) translateX(-36%); }
.reel__spoke:nth-child(2) { transform: rotate(120deg) translateX(-36%); }
.reel__spoke:nth-child(3) { transform: rotate(240deg) translateX(-36%); }

.cassette__tape {
  flex: 1; height: 3px;
  background: linear-gradient(90deg, #2a1520, #3a1828, #2a1520);
  margin: 0 -4px;
  align-self: center;
  border-radius: 1px;
}

.cassette__label {
  background: linear-gradient(175deg, rgba(224,247,255,.06) 0%, rgba(0,212,255,.04) 100%);
  border: 1px solid rgba(224,247,255,.12);
  border-radius: 5px;
  padding: 8px 10px;
  text-align: center;
  margin-top: 5px;
}
.cassette__label-top {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: .55rem;
  color: var(--dim);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.cassette__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.5vw, 1.8rem);
  letter-spacing: .12em;
  background: linear-gradient(135deg, var(--pink), var(--gold) 50%, var(--peach));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
  line-height: 1.2;
}
.cassette__subtitle {
  font-family: var(--font-mono);
  font-size: .55rem;
  color: var(--dim);
  letter-spacing: .15em;
  margin-top: 2px;
}
.cassette__label-lines {
  display: flex; gap: 4px; justify-content: center;
  margin: 5px 0;
}
.cassette__label-lines span {
  height: 1px; flex: 1; max-width: 50px;
  background: rgba(224,247,255,.15);
}
.cassette__tagline {
  font-family: var(--font-body);
  font-size: .7rem;
  color: var(--dim);
  font-style: italic;
  min-height: 1em;
}

.cassette__spokes {
  display: flex; justify-content: space-between;
  padding: 0 24%;
}
.cassette__spoke-hole {
  width: 10px; height: 6px;
  background: rgba(0,0,0,.5);
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,.03);
}

/* ── cassette: sticker / masking tape ── */
.cassette__sticker {
  position: absolute;
  top: -6px; right: 12px;
  transform: rotate(14deg);
  background: rgba(210,190,150,.12);
  border: 1px solid rgba(210,190,150,.15);
  border-radius: 2px;
  padding: 2px 10px;
  font-family: 'Caveat', cursive;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(210,190,150,.5);
  letter-spacing: .04em;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* ── cassette: tape counter ── */
.cassette__counter {
  position: absolute;
  top: 28px; left: 14px;
  display: flex; gap: 2px;
  background: #050508;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 3px;
  padding: 2px 4px;
  z-index: 3;
}
.cassette__counter-digit {
  display: block;
  width: 10px; height: 14px;
  background: #0a0a10;
  border: 1px solid rgba(255,255,255,.04);
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: .55rem;
  line-height: 14px;
  text-align: center;
  color: rgba(0,212,255,.6);
  overflow: hidden;
}

/* ── cassette: walkman buttons ── */
.cassette__controls {
  display: flex; gap: 4px; justify-content: center;
  margin-top: 5px;
}
.cassette__btn {
  width: 24px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,212,255,.06);
  border: 1px solid rgba(0,212,255,.15);
  border-radius: 3px;
  color: var(--gold);
  font-size: .5rem;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .1s;
  line-height: 1;
}
.cassette__btn:hover {
  background: rgba(0,212,255,.12);
  border-color: rgba(0,212,255,.3);
}
.cassette__btn:active {
  transform: scale(.92);
}
.cassette__btn.active {
  background: rgba(0,212,255,.15);
  border-color: var(--pink);
  color: var(--pink);
}

/* ── cassette: wear / scratches ── */
.cassette::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 14px;
  background:
    linear-gradient(137deg, transparent 42%, rgba(255,255,255,.015) 42.5%, transparent 43%),
    linear-gradient(215deg, transparent 58%, rgba(255,255,255,.01) 58.5%, transparent 59%),
    linear-gradient(82deg, transparent 71%, rgba(255,255,255,.008) 71.3%, transparent 72%),
    linear-gradient(310deg, transparent 35%, rgba(255,255,255,.012) 35.2%, transparent 36%);
  pointer-events: none;
  z-index: 1;
}
.cassette::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 60%; height: 40%;
  border-radius: 0 0 14px 0;
  background: radial-gradient(ellipse at 80% 90%, rgba(0,0,0,.15), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   TRACKLIST
   ═══════════════════════════════════════════ */
.tracklist {
  max-width: min(90vw, 70vmin);
  margin: 0 auto;
  padding: 0 1rem 1rem;
  opacity: 0;
  animation: listIn .8s .6s ease forwards;
}
@keyframes listIn {
  from { opacity:0; transform:translateY(20px); }
  to { opacity:1; transform:translateY(0); }
}

/* strip header — J-card style app bar */
.tracklist__strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 1rem;
  margin-bottom: .5rem;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(0,212,255,.12);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.tracklist__strip::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,.008) 3px, rgba(255,255,255,.008) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255,255,255,.005) 3px, rgba(255,255,255,.005) 4px);
  pointer-events: none;
}
.tracklist__strip-side {
  display: flex; align-items: center; gap: .5rem;
  flex-shrink: 0;
}
.tracklist__side-indicator {
  font-family: var(--font-display);
  font-size: .7rem;
  color: var(--bg);
  background: linear-gradient(135deg, var(--pink), var(--gold));
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
  letter-spacing: .05em;
}
.tracklist__side-label {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--dim);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.tracklist__strip-meta {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  position: relative; z-index: 1;
}
.tracklist__strip-type {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--dim);
  letter-spacing: .15em;
  font-weight: 700;
}
.tracklist__strip-total {
  font-family: var(--font-mono);
  font-size: .55rem;
  color: var(--dim);
  opacity: .7;
  letter-spacing: .2em;
  font-weight: 700;
}

.tracklist__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem 1.2rem;
}

.tracklist__col {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

/* individual track */
.track {
  display: flex; align-items: center; gap: .55rem;
  padding: .5rem .7rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: trackIn .5s calc(var(--i) * .06s) ease forwards;
}
@keyframes trackIn {
  from { opacity:0; transform:translateX(-10px); }
  to { opacity:1; transform:translateX(0); }
}
.track::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,212,255,.05), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.track:hover {
  border-color: rgba(0,212,255,.2);
  background: rgba(0,212,255,.04);
}
.track:hover::before { opacity: 1; }

.track__num {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--dim);
  width: 1.2rem;
  text-align: right;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: color .3s;
}
.track:hover .track__num { color: var(--pink); }

.track__icon {
  font-size: 1rem;
  width: 1.5rem; text-align: center;
  flex-shrink: 0;
  position: relative; z-index: 1;
  transition: transform .3s ease;
}
.track:hover .track__icon { transform: scale(1.15); }

.track__title {
  flex: 1; min-width: 0;
  font-family: var(--font-display);
  font-size: .82rem;
  color: var(--text);
  letter-spacing: .04em;
  transition: color .3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative; z-index: 1;
}
.track:hover .track__title { color: var(--gold); }

.track__dur {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--dim);
  opacity: .55;
  font-weight: 700;
  letter-spacing: .05em;
  flex-shrink: 0;
  position: relative; z-index: 1;
  transition: opacity .3s, color .3s;
}
.track:hover .track__dur { opacity: 1; color: var(--pink); }

.track__vinyl {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle,
    var(--gold) 14%, var(--pink) 26%,
    #0e1828 30%, #15253a 48%,
    #0e1828 52%, #081018 100%
  );
  border: 1.5px solid rgba(224,247,255,.2);
  flex-shrink: 0;
  position: relative; z-index: 1;
  transition: box-shadow .35s ease, border-color .35s ease;
  animation: spin 4s linear infinite;
  animation-play-state: paused;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}
.track__vinyl::after {
  content: ''; position: absolute;
  inset: 35%; border-radius: 50%;
  background: var(--gold);
  opacity: .6;
}
.track:hover .track__vinyl {
  animation-play-state: running;
  box-shadow: 0 0 12px var(--glow-gold);
  border-color: var(--gold);
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: .6rem 1rem;
}
.footer__divider {
  width: 60px; height: 2px; margin: 0 auto .5rem;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  border-radius: 1px;
  opacity: .5;
}
.footer__text {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--gold);
  letter-spacing: .1em;
  min-height: 1.2em;
  animation: footerBlink 2s steps(1) infinite;
}
@keyframes footerBlink {
  0%,49% { opacity:1; } 50% { opacity:.4; } 100% { opacity:1; }
}
.footer__credit {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: .15em;
  margin-top: .3rem;
  opacity: .8;
}

/* ═══════════════════════════════════════════
   MOBILE TABBAR
   ═══════════════════════════════════════════ */
.tabbar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  display: none;
  justify-content: space-around;
  background: rgba(4,14,26,.95);
  border-top: 1px solid rgba(0,212,255,.2);
  box-shadow: 0 -6px 24px -16px rgba(0,0,0,.8);
  z-index: 1000;
  padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
}
.tabbar__indicator {
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 10px var(--glow-pink);
  transition: transform .4s cubic-bezier(.22,.8,.25,1), width .3s;
  pointer-events: none;
}
.tabbar__item {
  flex: 1; text-align: center;
  padding: .5rem .3rem .4rem;
  border-radius: 10px;
  transition: background .3s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.tabbar__item:active { transform: translateY(1px); }
.tabbar__ico { font-size: 1.15rem; display: block; }
.tabbar__label {
  font-family: var(--font-display);
  font-size: .6rem; letter-spacing: .08em;
  color: var(--dim);
  display: block; margin-top: 2px;
  transition: color .3s;
}
.tabbar__item.active {
  background: rgba(0,212,255,.1);
}
.tabbar__item.active .tabbar__label { color: var(--gold); }

/* ═══════════════════════════════════════════
   KONAMI MODE
   ═══════════════════════════════════════════ */
.konami .bg-gradient {
  background: linear-gradient(135deg, #00d4ff, #e0f7ff, #00c9a7, #5bb8ff) !important;
  animation: konamiGrad 1.2s ease infinite !important;
}
.konami .track {
  animation: konamiTrack 1.5s linear infinite;
  border-color: var(--gold) !important;
}
.konami .cassette__title {
  animation: konamiGlow .8s ease-in-out infinite alternate;
}
@keyframes konamiGrad {
  0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}
}
@keyframes konamiTrack {
  0%{transform:rotate(0) scale(1)}50%{transform:rotate(1deg) scale(1.01)}100%{transform:rotate(0) scale(1)}
}
@keyframes konamiGlow {
  from{filter:drop-shadow(0 0 15px var(--pink)) hue-rotate(0deg)}
  to{filter:drop-shadow(0 0 25px var(--gold)) hue-rotate(30deg)}
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
  body.home { height: auto; overflow: visible; }
  .tabbar { display: flex; }
  .footer { padding-bottom: 3.5rem; }
  .header { padding: .6rem 1rem; }
  .hero { padding: .6rem 1rem .3rem; }
  .cassette { width: 90vw; padding: 10px; }
  .cassette__window { margin: 18px 6px 0; padding: 6px 8px; }
  .reel { width: 32px; height: 32px; }
  .tracklist { padding: 0 .75rem .5rem; }
  .tracklist__strip { padding: .45rem .7rem; gap: .5rem; }
  .tracklist__columns { grid-template-columns: 1fr; gap: .3rem; }
  .track { padding: .45rem .6rem; gap: .45rem; }
  .track__num { width: 1rem; font-size: .55rem; }
  .track__icon { font-size: .9rem; width: 1.3rem; }
  .track__title { font-size: .75rem; }
  .track__vinyl { width: 20px; height: 20px; }
  .track__dur { font-size: .5rem; }
  .cassette__sticker { font-size: .6rem; top: -4px; right: 6px; }
  .cassette__counter { top: 24px; left: 8px; }
}
@media (min-width: 1200px) {
  .cassette { width: min(70vw, 55vmin); }
  .tracklist { max-width: min(80vw, 65vmin); }
}
@media (min-width: 601px) {
  .tabbar { display: none; }
}

/* ═══════════════════════════════════════════
   SCROLL-DRIVEN ENHANCEMENTS
   ═══════════════════════════════════════════ */
@keyframes scrollProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes scrollReveal {
  from { opacity: .35; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@supports (animation-timeline: scroll()) {
  @media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
    body.home::before {
      content: '';
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 2px;
      background: linear-gradient(90deg, var(--pink), var(--gold));
      pointer-events: none;
      z-index: 1001;
      transform: scaleX(0);
      transform-origin: left center;
      animation-name: scrollProgress;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
    }
  }
}

@supports (animation-timeline: view()) and (overflow: clip) {
  @media (max-width: 600px) and (prefers-reduced-motion: no-preference) {
    body.home main {
      overflow: clip;
    }

    body.home .tracklist__strip,
    body.home .tracklist__col,
    body.home > .footer {
      animation-name: scrollReveal;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: view(block);
      animation-range: entry 0% entry 100%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
