:root {
  --green: #26a269;
  --green-light: #2ecc71;
  --green-glow: rgba(38,162,105,.4);
  --white: #ffffff;
  --gray-600: #777777;
  --bg: #000;
  --ctrl-gap: clamp(8px, 2.5vw, 18px);
  --play-btn-size: clamp(48px, 9vw, 60px);
  --waveform-h: 64px;
  --content-px: clamp(20px, 4vw, 40px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
#audioEl { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
html, body { height: 100%; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ─── PLAYER CONTAINER ─── */
.player {
  display: flex;
  flex-direction: column;
  background: #000;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: 100%;
  overflow: hidden;
}

/* ─── BANNER ─── */
.banner {
  background: #000;
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 28px) clamp(14px, 2.5vw, 20px);
}
.banner-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(38,162,105,.07) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
  opacity: .5;
}
.banner-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(38,162,105,.1) 0%, transparent 35%, transparent 65%, rgba(38,162,105,.1) 100%);
  pointer-events: none;
}
.banner-logo {
  position: absolute;
  top: clamp(12px, 2vw, 18px);
  right: clamp(16px, 2.5vw, 24px);
  width: clamp(70px, 9vw, 100px);
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 0 8px rgba(0,0,0,.5));
}
.banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 22px);
  padding-right: clamp(80px, 10vw, 110px);
  margin-bottom: clamp(12px, 2vw, 18px);
}
.banner-mic {
  flex-shrink: 0;
  width: clamp(60px, 8vw, 85px);
  height: clamp(80px, 10vw, 110px);
  display: grid;
  place-items: center;
}
.mic-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px rgba(38,162,105,.4));
}
.banner-meta { flex: 1; min-width: 0; }
.banner-tag {
  display: inline-block;
  font: 800 clamp(.8rem, 1.6vw, 1rem)/1 'Inter', sans-serif;
  letter-spacing: .35em;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.banner-title {
  font: 800 clamp(1.05rem, 2.2vw, 1.4rem)/1.15 'Inter', sans-serif;
  letter-spacing: -.02em;
  color: #fff;
  margin: 0;
}

/* ─── WAVEFORM ─── */
.banner-waveform { position: relative; z-index: 0; flex: 1; min-width: 0; }
.waveform-container {
  position: relative;
  height: var(--waveform-h);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.waveform-container.scrubbing { cursor: grabbing; }
.waveform-container.scrubbing .waveform-scrub {
  opacity: 1;
  width: 4px;
  box-shadow: 0 0 10px rgba(38,162,105,.9);
}
.waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.waveform-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--green);
  opacity: .25;
  width: 0%;
  pointer-events: none;
  border-radius: 3px;
}
.waveform-scrub {
  position: absolute;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 3px;
  height: 110%;
  background: var(--green);
  border-radius: 2px;
  pointer-events: none;
  left: 0%;
  opacity: 0;
  transition: opacity .15s;
  box-shadow: 0 0 6px rgba(38,162,105,.7);
}
.waveform-container:hover .waveform-scrub,
.waveform-container.playing .waveform-scrub { opacity: 1; }

/* ─── PLAYBACK AREA ─── */
.playback-area {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(14px, 2.5vw, 22px) 0 0;
}
.playback-times {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(.58rem, 1.3vw, .68rem);
  color: rgba(255,255,255,.55);
}
.playback-row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 20px);
}
.play-btn-main {
  width: var(--play-btn-size);
  height: var(--play-btn-size);
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--green);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(38,162,105,.5);
  flex-shrink: 0;
}
.play-btn-main:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(38,162,105,.7); }
.play-btn-main:active { transform: scale(.94); }
.play-btn-main:focus-visible { outline: 3px solid var(--green-light); outline-offset: 3px; }
.play-btn-main svg { width: clamp(20px, 4vw, 24px); height: clamp(20px, 4vw, 24px); }
.play-btn-main .pause-icon { display: none; }
.play-btn-main.playing .play-icon { display: none; }
.play-btn-main.playing .pause-icon { display: block; }

/* ─── DESKTOP ─── */
@media (min-width: 768px) {
  :root {
    --play-btn-size: clamp(52px, 4vw, 64px);
    --content-px: clamp(24px, 3vw, 40px);
  }
  .banner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .banner-logo { width: clamp(80px, 6vw, 110px); }
  .banner-mic { width: clamp(80px, 5vw, 100px); height: clamp(105px, 6.5vw, 130px); }
  .banner-content { padding-right: clamp(100px, 8vw, 120px); margin-bottom: 0; }
  .playback-area { padding-top: clamp(20px, 3vh, 40px); }
}

/* ─── VERY SMALL ─── */
@media (max-width: 340px) {
  :root {
    --play-btn-size: 40px;
    --content-px: 12px;
  }
  .banner-mic { width: 50px; height: 65px; }
  .banner-title { font-size: .92rem; }
  .banner-tag { font-size: .7rem; }
}

/* ─── LANDSCAPE ─── */
@media (max-width: 900px) and (orientation: landscape) {
  :root { --play-btn-size: 38px; }
  .banner-content { gap: 12px; margin-bottom: 8px; }
  .banner-mic { width: 50px; height: 65px; }
  .banner-tag { font-size: .7rem; letter-spacing: .25em; }
  .banner-title { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .play-btn-main { transition: none; }
}
