/* =========================================
   MUSIC: Cassette físico de plástico
   Tornillos, etiqueta pegada y carretes reales
   ========================================= */

.cassette {
  background: linear-gradient(165deg, #423a52 0%, #2a2438 55%, #1e1930 100%);
  border-radius: 8px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.16),
    inset 0 -3px 6px rgba(0, 0, 0, 0.5),
    0 8px 18px rgba(0, 0, 0, 0.5);
  margin-bottom: 14px;
  padding: 14px 16px 16px;
  position: relative;
  transform: rotate(-1.2deg);
}

/* Tornillos de las esquinas */
.cassette::before,
.cassette::after {
  background: radial-gradient(circle at 35% 35%, #6b6280, #2e2840 70%);
  border-radius: 50%;
  content: "";
  height: 8px;
  position: absolute;
  top: 8px;
  width: 8px;
}

.cassette::before { left: 8px; }
.cassette::after  { right: 8px; }

/* Portada de la canción al fondo (la pone js/musica.js) */
.cassette.has-art {
  background:
    linear-gradient(165deg, rgba(40, 32, 60, 0.82) 0%, rgba(20, 16, 36, 0.92) 100%),
    var(--art) center / cover no-repeat,
    linear-gradient(165deg, #423a52 0%, #1e1930 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 30px rgba(0, 0, 0, 0.6),
    0 8px 18px rgba(0, 0, 0, 0.5);
}

/* La etiqueta se vuelve semitransparente para dejar ver la portada */
.cassette.has-art .cassette-label {
  background: linear-gradient(175deg, rgba(242, 232, 245, 0.92) 0%, rgba(216, 204, 224, 0.9) 100%);
}

/* Etiqueta de papel pegada, levemente torcida */
.cassette-label {
  align-items: baseline;
  background: linear-gradient(175deg, #f2e8f5 0%, #d8cce0 100%);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 8px 12px;
  transform: rotate(0.6deg);
}

.cassette-title {
  color: #2b2438;
  font-family: var(--font-pixel);
  font-size: 1.3rem;
}

.cassette-side {
  color: #6b5d80;
  font-family: var(--font-hud);
  font-size: 0.5rem;
}

/* Ventana de carretes: hueco con cristal */
.cassette-window {
  align-items: center;
  background: linear-gradient(180deg, #120e20, #1c1630);
  border-radius: 4px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  display: flex;
  gap: 30px;
  justify-content: center;
  padding: 10px;
}

.cassette-spool {
  animation: spool-spin 3s linear infinite;
  background: radial-gradient(circle, #0d0a18 35%, #4a4060 36% 60%, #0d0a18 61%);
  border: 4px dotted #8a7fa5;
  border-radius: 50%;
  height: 26px;
  width: 26px;
}

@keyframes spool-spin {
  to { transform: rotate(360deg); }
}

/* La cinta magnética entre carretes */
.cassette-tape-line {
  border-top: 3px solid #141020;
  flex-grow: 1;
  max-width: 80px;
}

.custom-audio {
  border: 2px solid rgba(var(--rgb-pink), 0.6);
  border-radius: 0;
  display: block;
  height: 36px;
  width: 100%;
}
