/* HoefVinyl Retro Mediaspeler 1.4.4 */
.hvrp-wrap,
.hvrp-wrap * { box-sizing: border-box; }

.hvrp-wrap {
  /*
   * De bronafbeelding is 597 px breed, maar de houten kast eindigt op x=580.
   * De laatste 17 px zijn de ongewenste donkere strook. Door de zichtbare
   * component 580/597 breed te maken blijft de hoogte exact gelijk en
   * verdwijnt alleen die rechter rand.
   */
  width: min(97.15243%, calc(var(--hvrp-max-width, 720px) * 0.9715243));
  max-width: calc(var(--hvrp-max-width, 720px) * 0.9715243);
  margin: 0 auto;
  padding: 0;
  line-height: 0;
}

.hvrp-player {
  position: relative;
  width: 100%;
  aspect-ratio: 580 / 278;
  overflow: hidden;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.42));
  user-select: none;
  -webkit-user-select: none;
}

/*
 * Intern blijft alles in de oorspronkelijke 597x278-coordinaten staan.
 * Daardoor blijven teller, VU-meters, spoelen en knoppen exact uitgelijnd.
 * De speler knipt alleen de laatste 17 bronpixels rechts af.
 */
.hvrp-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 102.93104%; /* 597 / 580 */
  height: 100%;
}

.hvrp-deck {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  max-width: none;
}

/* PEAK LEVEL-lampje: het lampje in de basisafbeelding wordt afgedekt.
 * Standaard donkerrood; alleen boven 0 dB schakelt JavaScript de felle stand in. */
.hvrp-peak-lamp {
  position: absolute;
  z-index: 8;
  left: 56.0302%;   /* x = 334.5 px van 597 */
  top: 69.4245%;    /* y = 193 px van 278 */
  width: 1.6750%;   /* 10 px; dekt het ingebakken felle lampje volledig af */
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 38% 34%, #7a201b 0 19%, #57100d 38%, #350705 67%, #1d0302 100%);
  border: 1px solid rgba(45, 9, 5, .72);
  box-shadow:
    0 0 0 1px rgba(122, 55, 37, .28),
    inset 0 1px 1px rgba(255, 118, 92, .20),
    inset 0 -1px 1px rgba(0, 0, 0, .70);
}
.hvrp-peak-lamp.is-on {
  background: radial-gradient(circle at 38% 34%, #fff0dc 0 9%, #ff6a43 22%, #f32616 48%, #b40907 72%, #5d0503 100%);
  border-color: rgba(121, 12, 5, .75);
  box-shadow:
    0 0 2px 1px rgba(255, 42, 20, .95),
    0 0 5px 2px rgba(255, 66, 22, .62),
    inset 0 1px 1px rgba(255, 238, 217, .88);
}

.hvrp-tape-counter {
  position: absolute;
  z-index: 7;
  /* Exact binnenwerk van het originele tellervenster in deck-base.png. */
  left: 43.0486%;
  top: 67.6259%;
  width: 6.5327%;
  height: 4.6763%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #17120d 0%, #050403 38%, #090604 100%);
  border: 0;
  perspective: 82px;
  transform: translateZ(0);
  contain: layout paint style;
}

.hvrp-counter-cell {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  perspective: 70px;
  transform-style: preserve-3d;
  border-left: 1px solid rgba(0,0,0,.72);
}
.hvrp-counter-cell:first-child { border-left: 0; }

.hvrp-counter-drum {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
}

.hvrp-counter-digit {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d8c9aa;
  font: 700 clamp(7px, .82vw, 13px)/1 Arial, sans-serif;
  text-shadow: 0 0 .5px rgba(255,241,213,.38);
  backface-visibility: hidden;
  transform-origin: 50% 50%;
}

/* Schaduw boven en onder versterkt het effect van een ronde cijferrol. */
.hvrp-tape-counter::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,.72) 0%,
      rgba(0,0,0,.20) 22%,
      rgba(0,0,0,0) 43%,
      rgba(0,0,0,0) 58%,
      rgba(0,0,0,.22) 78%,
      rgba(0,0,0,.74) 100%),
    linear-gradient(90deg, rgba(255,237,204,.05), transparent 18%, transparent 82%, rgba(0,0,0,.18));
  box-shadow: inset 0 0 1px rgba(144,119,82,.42);
}

.hvrp-vu-canvas {
  position: absolute;
  z-index: 6;
  display: block;
  pointer-events: none;
  width: 18.43%;
  height: 23.38%;
  box-shadow: inset 0 0 5px rgba(0,0,0,.6);
}
.hvrp-vu-left { left: 46.73%; top: 13.31%; }
.hvrp-vu-right { left: 69.18%; top: 13.31%; }

.hvrp-tape-pack {
  position: absolute;
  z-index: 4;
  width: 4.95%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 0 23%, rgba(45,33,23,0) 23.5%, rgba(74,49,29,.34) 31%, rgba(109,74,43,.74) 47%, rgba(90,59,34,.70) 57%, rgba(54,36,21,.42) 65%, rgba(0,0,0,0) 73%);
  opacity: .85;
  mix-blend-mode: multiply;
  transform-origin: 50% 50%;
  filter: blur(.18px) saturate(.92) brightness(.98);
}
.hvrp-tape-pack.hvrp-left { left: 16.98%; top: 23.08%; }
.hvrp-tape-pack.hvrp-right { left: 28.86%; top: 23.08%; }

.hvrp-reel {
  position: absolute;
  z-index: 5;
  width: 5.35%;
  aspect-ratio: 1;
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  transform-origin: 50% 50%;
  pointer-events: none;
  opacity: .95;
  filter: drop-shadow(0 .15px .45px rgba(0,0,0,.24)) saturate(.88) brightness(.93);
}
.hvrp-reel.hvrp-left {
  left: 16.78%; top: 22.88%;
  background-image: url('../images/reel-wheel-left.svg');
}
.hvrp-reel.hvrp-right {
  left: 28.66%; top: 22.88%;
  background-image: url('../images/reel-wheel-right.svg');
}
/*
 * De spoelen worden bewust vanuit JavaScript gedraaid.
 * Zo kan het wieltje met de meeste band fysiek langzamer draaien
 * dan het wieltje met minder band.
 */
.hvrp-reel { will-change: transform; }


/* === Now Playing: luxe jaren 70/80 receiver-display === */
.hvrp-wrap .hvrp-nowplaying-bar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 14px;
  padding: 17px 26px 19px;
  border: 2px solid #b87822;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 22%, rgba(255,186,71,.15) 0%, rgba(255,186,71,.055) 24%, transparent 56%),
    linear-gradient(180deg, #301408 0%, #210d05 47%, #120704 100%);
  box-shadow:
    0 10px 22px rgba(0,0,0,.34),
    inset 0 0 0 2px #120704,
    inset 0 0 0 4px rgba(196,124,30,.50),
    inset 0 1px 0 rgba(255,223,164,.24),
    inset 0 -16px 26px rgba(0,0,0,.48);
  text-align: center;
  line-height: 1.15;
}

/* Binnenrand van messing / zwart, alsof het een echte receiverplaat is. */
.hvrp-wrap .hvrp-nowplaying-bar::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 6px;
  border: 1px solid rgba(229,157,61,.43);
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(22,8,2,.92),
    inset 0 0 18px rgba(255,150,38,.055);
  pointer-events: none;
}

/* Zachte amberkleurige scanlijnen onder het glas. */
.hvrp-wrap .hvrp-nowplaying-bar::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 8px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, rgba(255,165,45,.030) 0 1px, transparent 1px 6px),
    radial-gradient(circle at 50% 115%, rgba(255,142,34,.10) 0%, transparent 48%);
  pointer-events: none;
}

.hvrp-wrap .hvrp-npbar-glass {
  position: absolute;
  z-index: 1;
  inset: 8px;
  border-radius: 10px;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255,247,223,.17) 0%, rgba(255,247,223,.045) 18%, transparent 34%);
  opacity: .62;
}

.hvrp-wrap .hvrp-npbar-head,
.hvrp-wrap .hvrp-npbar-main,
.hvrp-wrap .hvrp-npbar-title-row {
  position: relative;
  z-index: 2;
}

.hvrp-wrap .hvrp-npbar-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 7px;
  color: #e39a31;
  font: 700 12px/1.05 "Courier New", Courier, monospace;
  letter-spacing: .36em;
  text-transform: uppercase;
  text-shadow:
    0 0 7px rgba(255,151,35,.38),
    0 1px 0 rgba(0,0,0,.96);
}

.hvrp-wrap .hvrp-npbar-head::before,
.hvrp-wrap .hvrp-npbar-head::after {
  content: "";
  width: clamp(32px, 11vw, 92px);
  height: 5px;
  flex: 0 1 92px;
  background:
    radial-gradient(circle at right center, #cf7d1d 0 2px, transparent 2.7px),
    linear-gradient(90deg, transparent 0%, rgba(195,111,21,.18) 10%, #a65b13 80%, #d48320 100%) left center / calc(100% - 8px) 1px no-repeat;
}
.hvrp-wrap .hvrp-npbar-head::after {
  transform: scaleX(-1);
}

.hvrp-wrap .hvrp-npbar-main {
  display: grid;
  grid-template-columns: minmax(42px, 1fr) minmax(0, auto) minmax(42px, 1fr);
  align-items: center;
  gap: 17px;
  width: 100%;
}

/* De verlichte horizontale strepen links en rechts, zoals op een vintage tuner. */
.hvrp-wrap .hvrp-npbar-grille {
  display: block;
  min-width: 0;
  height: 58px;
  opacity: .92;
  background: repeating-linear-gradient(
    to bottom,
    #a45a13 0 2px,
    #e28c20 2px 3px,
    rgba(255,146,29,.18) 3px 5px,
    transparent 5px 8px
  );
  filter: drop-shadow(0 0 4px rgba(255,135,28,.17));
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 100%);
}
.hvrp-wrap .hvrp-npbar-grille:last-child {
  transform: scaleX(-1);
}

.hvrp-wrap .hvrp-npbar-artist {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0 2px 2px;
  color: #f5aa35;
  font: 700 clamp(25px, 5vw, 46px)/.98 Georgia, "Times New Roman", serif;
  letter-spacing: -.015em;
  white-space: nowrap;
  overflow: hidden;
  text-shadow:
    0 1px 0 #6a3208,
    0 2px 0 #2c1002,
    0 0 8px rgba(255,161,42,.46),
    0 0 20px rgba(255,118,18,.13);
}

/* Alleen de artiestregel loopt wanneer de naam niet volledig in het venster past. */
.hvrp-wrap .hvrp-npbar-artist-track {
  display: inline-block;
  min-width: max-content;
  will-change: transform;
}

/* Bij een lange artiestnaam wordt de track links uitgelijnd. Twee identieke
 * kopieën lopen achter elkaar door, zodat de tekst niet terugveert naar het midden. */
.hvrp-wrap .hvrp-npbar-artist.is-marquee {
  text-align: left;
}

.hvrp-wrap .hvrp-npbar-artist.is-marquee .hvrp-npbar-artist-track {
  display: inline-flex;
  align-items: baseline;
  gap: var(--hvrp-marquee-gap, 72px);
  animation: hvrp-artist-marquee var(--hvrp-marquee-duration, 12s) linear infinite;
}

.hvrp-wrap .hvrp-npbar-artist-copy {
  display: inline-block;
  flex: 0 0 auto;
  white-space: nowrap;
}

@keyframes hvrp-artist-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--hvrp-marquee-shift, 0px)); }
}

.hvrp-wrap .hvrp-npbar-title-row {
  display: grid;
  grid-template-columns: minmax(22px, 1fr) 7px minmax(0, auto) 7px minmax(22px, 1fr);
  align-items: center;
  gap: 9px;
  width: min(82%, 640px);
  margin: 8px auto 0;
}

.hvrp-wrap .hvrp-npbar-title-line {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, #aa611a 22%, #d38728 100%);
}
.hvrp-wrap .hvrp-npbar-title-line:last-child {
  transform: scaleX(-1);
}

.hvrp-wrap .hvrp-npbar-title-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c3751f;
  box-shadow:
    0 0 0 1px rgba(60,25,4,.9),
    0 0 5px rgba(255,145,31,.25);
}

.hvrp-wrap .hvrp-npbar-title {
  min-width: 0;
  color: #f4d8a7;
  font: 400 clamp(16px, 2.75vw, 23px)/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: .015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow:
    0 1px 0 rgba(0,0,0,.96),
    0 0 6px rgba(255,179,76,.15);
}

@media (max-width: 620px) {
  .hvrp-wrap .hvrp-nowplaying-bar {
    margin-top: 10px;
    padding: 13px 14px 15px;
    border-radius: 14px;
  }
  .hvrp-wrap .hvrp-nowplaying-bar::before {
    inset: 5px;
    border-radius: 9px;
  }
  .hvrp-wrap .hvrp-npbar-glass,
  .hvrp-wrap .hvrp-nowplaying-bar::after {
    inset: 6px;
    border-radius: 8px;
  }
  .hvrp-wrap .hvrp-npbar-head {
    gap: 7px;
    margin-bottom: 6px;
    font-size: 9px;
    letter-spacing: .25em;
  }
  .hvrp-wrap .hvrp-npbar-main {
    grid-template-columns: minmax(24px, .65fr) minmax(0, auto) minmax(24px, .65fr);
    gap: 9px;
  }
  .hvrp-wrap .hvrp-npbar-grille {
    height: 38px;
  }
  .hvrp-wrap .hvrp-npbar-artist {
    font-size: clamp(20px, 7vw, 31px);
  }
  .hvrp-wrap .hvrp-npbar-title-row {
    width: 93%;
    gap: 6px;
    margin-top: 6px;
  }
  .hvrp-wrap .hvrp-npbar-title {
    font-size: clamp(14px, 4.5vw, 18px);
  }
}


.hvrp-transport-button {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  z-index: 10;
  border: 0;
  padding: 0;
  margin: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  cursor: pointer;
  transform: translateY(0);
  transition: transform .07s ease, filter .07s ease;
  outline: none;
  box-shadow: none;
  border-radius: 0;
  min-width: 0;
  min-height: 0;
}
.hvrp-transport-button:hover,
.hvrp-transport-button:focus { background-color: transparent; }
.hvrp-transport-button:active,
.hvrp-transport-button.down { transform: translateY(2.8%); filter: brightness(.9); }
.hvrp-rew { left: 11.73%; top: 58.99%; width: 5.36%; height: 19.78%; background-image: url('../images/btn-rew.png'); }
.hvrp-ff { left: 17.09%; top: 58.99%; width: 5.53%; height: 19.78%; background-image: url('../images/btn-ff.png'); }
.hvrp-play { left: 22.61%; top: 58.99%; width: 5.70%; height: 19.78%; background-image: url('../images/btn-play.png'); }
.hvrp-stop { left: 28.31%; top: 58.99%; width: 5.53%; height: 19.78%; background-image: url('../images/btn-stop.png'); }
.hvrp-pause { left: 33.84%; top: 58.99%; width: 5.70%; height: 19.78%; background-image: url('../images/btn-pause.png'); }
.hvrp-status { position: absolute; width: 0; height: 0; overflow: hidden; opacity: 0; pointer-events: none; }
