/* From Uiverse.io by ParasSalunke */ 
:root {
  --bg: #070912;
  --panel: rgba(17, 21, 34, 0.82);
  --panel-border: rgba(255, 255, 255, 0.10);
  --text: #ffffff;
  --muted: #aab0c0;
  --accent-1: #21d4fd;
  --accent-2: #b721ff;
  --accent-3: #ff7a18;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  height: 100vh;
  overflow: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 22%, rgba(33, 212, 253, 0.16), transparent 30%),
    radial-gradient(circle at 82% 28%, rgba(183, 33, 255, 0.14), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(255, 122, 24, 0.10), transparent 35%),
    var(--bg);
  display: flex;
  flex-direction: column;
}

.page {
  width: min(100%, 1100px);
  height: 100vh;
  margin: 0 auto;
  padding: 28px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.logo-area {
  display: flex;
  justify-content: center;
  width: 100%;
}

.brand-image {
  width: min(100%, 720px);
  max-height: calc(100vh - 300px);
  object-fit: contain;
  display: block;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.player-dock {
  position: fixed;
  left: 50%;
  bottom: 58px;
  z-index: 10;
  width: min(100% - 32px, 620px);
  transform: translateX(-50%);
}

.player-card {
  width: min(100%, 620px);
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  transform: translateX(-50%);
  margin-top: 0;
  padding: 24px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #eef1ff;
}

.live-status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff385c;
  box-shadow: 0 0 0 6px rgba(255, 56, 92, 0.14);
  animation: pulse 1.7s infinite;
}

.live-status.is-playing::before {
  background: #35e07f;
  box-shadow: 0 0 0 6px rgba(53, 224, 127, 0.14);
}

.player-card h1 {
  font-size: clamp(1.35rem, 4vw, 2rem);
  margin-bottom: 7px;
}

.player-card p {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 20px;
}

audio {
  display: block;
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
}

.stream-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: #7f8799;
}

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  padding: 18px 16px 22px;
  text-align: center;
  font-size: 0.82rem;
  color: #777f91;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0.78);
    opacity: 0.65;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 18px 14px 0;
  }

  .brand-image {
    width: min(100%, 520px);
    max-height: calc(100vh - 260px);
  }

  .player-dock {
    bottom: 54px;
    width: calc(100% - 28px);
  }
}

/* Estilos para el reproductor */ 
.main-music-card {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 18px;
  border-radius: 35px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(9, 13, 24, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: -apple-system, system-ui, sans-serif;
  color: white;
  transition: all 0.3s ease;
}

.track-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.album-art {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.album-art.has-cover {
  background-color: rgba(255, 255, 255, 0.08);
}

.album-art:hover {
  transform: scale(1.05);
}

.track-details {
  flex-grow: 1;
  overflow: hidden;
}

.track-title {
  font-size: 1.3em;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.artist-name {
  font-size: 0.9em;
  color: #d1d1d6;
  margin-top: 2px;
}

.volume-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 38px;
  height: 32px;
}

.volume-bars .bar {
  width: 3px;
  background: linear-gradient(180deg, #00c6ff, #0072ff);
  border-radius: 2px;
  animation: bounce 0.8s infinite ease-in-out;
  animation-delay: var(--delay);
  animation-play-state: running;
}

@keyframes bounce {
  0%,
  100% {
    height: 6px;
  }
  50% {
    height: 26px;
  }
}

.playback-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.time-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8em;
  color: #8e8e93;
}

.current-time::before {
  content: "0:00";
  animation: timer 45s steps(45) infinite;
  display: inline-block;
  animation-play-state: running;
}
@keyframes timer {
  0% {
    content: "0:00";
  }
  2.22% {
    content: "0:01";
  }
  4.44% {
    content: "0:02";
  }
  6.67% {
    content: "0:03";
  }
  8.89% {
    content: "0:04";
  }
  11.11% {
    content: "0:05";
  }
  13.33% {
    content: "0:06";
  }
  15.56% {
    content: "0:07";
  }
  17.78% {
    content: "0:08";
  }
  20.00% {
    content: "0:09";
  }
  22.22% {
    content: "0:10";
  }
  24.44% {
    content: "0:11";
  }
  26.67% {
    content: "0:12";
  }
  28.89% {
    content: "0:13";
  }
  31.11% {
    content: "0:14";
  }
  33.33% {
    content: "0:15";
  }
  35.56% {
    content: "0:16";
  }
  37.78% {
    content: "0:17";
  }
  40.00% {
    content: "0:18";
  }
  42.22% {
    content: "0:19";
  }
  44.44% {
    content: "0:20";
  }
  46.67% {
    content: "0:21";
  }
  48.89% {
    content: "0:22";
  }
  51.11% {
    content: "0:23";
  }
  53.33% {
    content: "0:24";
  }
  55.56% {
    content: "0:25";
  }
  57.78% {
    content: "0:26";
  }
  60.00% {
    content: "0:27";
  }
  62.22% {
    content: "0:28";
  }
  64.44% {
    content: "0:29";
  }
  66.67% {
    content: "0:30";
  }
  68.89% {
    content: "0:31";
  }
  71.11% {
    content: "0:32";
  }
  73.33% {
    content: "0:33";
  }
  75.56% {
    content: "0:34";
  }
  77.78% {
    content: "0:35";
  }
  80.00% {
    content: "0:36";
  }
  82.22% {
    content: "0:37";
  }
  84.44% {
    content: "0:38";
  }
  86.67% {
    content: "0:39";
  }
  88.89% {
    content: "0:40";
  }
  91.11% {
    content: "0:41";
  }
  93.33% {
    content: "0:42";
  }
  95.56% {
    content: "0:43";
  }
  97.78% {
    content: "0:44";
  }
  100% {
    content: "0:45";
  }
}

.remaining-time::before {
  content: "0:45";
  animation: timerDown 45s steps(45) infinite;
  display: inline-block;
  animation-play-state: running;
}
@keyframes timerDown {
  0% {
    content: "0:45";
  }
  2.22% {
    content: "0:44";
  }
  4.44% {
    content: "0:43";
  }
  6.67% {
    content: "0:42";
  }
  8.89% {
    content: "0:41";
  }
  11.11% {
    content: "0:40";
  }
  13.33% {
    content: "0:39";
  }
  15.56% {
    content: "0:38";
  }
  17.78% {
    content: "0:37";
  }
  20.00% {
    content: "0:36";
  }
  22.22% {
    content: "0:35";
  }
  24.44% {
    content: "0:34";
  }
  26.67% {
    content: "0:33";
  }
  28.89% {
    content: "0:32";
  }
  31.11% {
    content: "0:31";
  }
  33.33% {
    content: "0:30";
  }
  35.56% {
    content: "0:29";
  }
  37.78% {
    content: "0:28";
  }
  40.00% {
    content: "0:27";
  }
  42.22% {
    content: "0:26";
  }
  44.44% {
    content: "0:25";
  }
  46.67% {
    content: "0:24";
  }
  48.89% {
    content: "0:23";
  }
  51.11% {
    content: "0:22";
  }
  53.33% {
    content: "0:21";
  }
  55.56% {
    content: "0:20";
  }
  57.78% {
    content: "0:19";
  }
  60.00% {
    content: "0:18";
  }
  62.22% {
    content: "0:17";
  }
  64.44% {
    content: "0:16";
  }
  66.67% {
    content: "0:15";
  }
  68.89% {
    content: "0:14";
  }
  71.11% {
    content: "0:13";
  }
  73.33% {
    content: "0:12";
  }
  75.56% {
    content: "0:11";
  }
  77.78% {
    content: "0:10";
  }
  80.00% {
    content: "0:09";
  }
  82.22% {
    content: "0:08";
  }
  84.44% {
    content: "0:07";
  }
  86.67% {
    content: "0:06";
  }
  88.89% {
    content: "0:05";
  }
  91.11% {
    content: "0:04";
  }
  93.33% {
    content: "0:03";
  }
  95.56% {
    content: "0:02";
  }
  97.78% {
    content: "0:01";
  }
  100% {
    content: "0:00";
  }
}

.progress-bar {
  width: 100%;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(33, 212, 253, 0.2),
    #21d4fd,
    #b721ff,
    #ff7a18,
    rgba(33, 212, 253, 0.2)
  );
  background-size: 220% 100%;
  border-radius: inherit;
  box-shadow: 0 0 14px rgba(33, 212, 253, 0.45);
  animation: liveLine 2.8s linear infinite;
  animation-play-state: running;
}

.progress-handle {
  display: none;
}

.button-row {
  position: relative;
  min-height: 56px;
}

.control-button {
  margin-top: 2%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
  color: #fff;
}

.control-button.play-pause-button:hover,
.control-button.d:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.main-control-btns {
  align-items: center;
  display: grid;
  grid-template-columns: 52px 52px 52px;
  justify-content: center;
  gap: 20px;
}

.control-button.d {
  position: absolute;
  right: 0;
}

.play-pause-btns {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.play-pause-button .icon-pause {
  display: none;
}

#play-toggle:checked ~ .track-info .volume-bars .bar {
  animation-play-state: paused;
}
#play-toggle:checked ~ .playback-controls .progress-fill {
  animation-play-state: paused;
}
.main-music-card:has(#play-toggle:checked) .time-info .current-time::before,
.main-music-card:has(#play-toggle:checked) .time-info .remaining-time::before {
  animation-play-state: paused;
}
#play-toggle:checked ~ .playback-controls .play-pause-button .icon-play {
  display: block;
}
#play-toggle:checked ~ .playback-controls .play-pause-button .icon-pause {
  display: none;
}

#play-toggle:not(:checked) ~ .playback-controls .play-pause-button .icon-play {
  display: none;
}
#play-toggle:not(:checked) ~ .playback-controls .play-pause-button .icon-pause {
  display: block;
}

@keyframes progressAnim {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes liveLine {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 220% 50%;
  }
}

@keyframes handleAnim {
  from {
    left: 0%;
  }
  to {
    left: 100%;
  }
}
