/* ===== BASE ===== */

body {
  margin: 0;
  background: #020617;
  color: #e5e7eb;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===== LAYOUT ===== */

.layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  padding: 24px;
}

/* Desktop */
@media (min-width: 900px) {
  .layout {
    flex-direction: row;
  }
}

/* Mobile */
@media (max-width: 899px) {
  .layout {
    flex-direction: column;
    padding: 0;
  }
}

/* ===== PLAYER CARD ===== */

.player {
  width: 380px;
  flex-shrink: 0;
  background: linear-gradient(#020617, #020617 60%, #000);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 0 40px rgba(0,0,0,.7);
  text-align: center;
  border: 1px solid #111827;
  position: relative; /* necesario para el volumen */
}

/* ===== COVER DISC ===== */

.cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  box-shadow:
    inset 0 0 25px rgba(0,0,0,.9),
    0 0 20px rgba(0,0,0,.6);
}

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  animation: spin 8s linear infinite;
  animation-play-state: paused;
}

.cover-wrap::after {
  content: "";
  position: absolute;
  width: 18%;
  height: 18%;
  background: #111;
  border-radius: 50%;
  top: 41%;
  left: 41%;
  box-shadow: 0 0 10px #000 inset;
}

.cover.playing {
  animation-play-state: running;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== TEXT ===== */

.title {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
}

.artist {
  opacity: .65;
  font-size: 14px;
  margin-top: 4px;
}

/* ===== BUTTON ===== */

.ctrl {
  margin-top: 16px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(#22c55e, #16a34a);
  box-shadow: 0 0 18px rgba(34,197,94,.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctrl svg {
  width: 34px;
  height: 34px;
  fill: white;
}

/* ===== DISCORD ===== */

.discord-box {
  flex: 1;
  min-width: 420px;
  display: flex;
  flex-direction: column;
}

.discord-iframe {
  display: none;
  width: 100%;
  height: 520px;
  border: none;
  border-radius: 16px;
  background: #0b1020;
  box-shadow: 0 0 30px rgba(0,0,0,.6);
}

/* Desktop */
@media (min-width: 768px) {
  .discord-iframe {
    display: block;
  }
}

/* Mobile button */
.discord-btn {
  display: none;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5865F2, #4752C4);
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(88,101,242,.5);
}

@media (max-width: 767px) {
  .discord-btn {
    display: block;
  }
}

/* ===== VOLUME (ACTUALIZADO) ===== */

.volume {
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity .3s;
}

/* aparece al hover */
.player:hover .volume {
  opacity: 1;
}

/* ocultar completamente en mobile */
@media (max-width: 767px) {
  .volume {
    display: none;
  }
}

.volume input[type="range"] {
  writing-mode: bt-lr;
  -webkit-appearance: slider-vertical;
  width: 6px;
  height: 130px;
  background: transparent;
  cursor: pointer;
}

/* track */
.volume input[type="range"]::-webkit-slider-runnable-track {
  width: 6px;
  background: #1e293b;
  border-radius: 999px;
}

/* thumb dinámico */
.volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--vol-color, #22c55e);
  margin-left: -4px;
  box-shadow: 0 0 10px var(--vol-glow, rgba(34,197,94,.8));
}

/* Firefox */
.volume input[type="range"]::-moz-range-thumb {
  background: var(--vol-color, #22c55e);
  border: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
