* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #ff6600, #6a0dad); /* Naranja a violeta */
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.app-container {
  display: flex;
  width: 90%;
  max-width: 1200px;
  background-color: #2c2c3e;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  border: 2px solid orange;
}

.playlist-sidebar {
  width: 30%;
  padding: 2rem;
  background-color: #242435;
  border-right: 1px solid #444;
  text-align: left;
}

.playlist-sidebar h2 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.episode-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  max-height: 80vh;
}

.episode-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.episode-item:hover {
  background-color: #3d3d5c;
}

.episode-item.active {
  background-color: #5b5bff;
  font-weight: bold;
}

.episode-thumbnail {
  width: 80px;
  height: auto;
  border-radius: 6px;
}

.episode-title {
  font-size: 0.9rem;
  line-height: 1.2;
}

.player-main {
  flex: 1;
  padding: 2rem;
  text-align: center;
}

.player-main h1 {
  margin-top: 0;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

#current-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #ccc;
}

#player-wrapper {
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

#player {
  width: 100%;
  height: 360px;
  border-radius: 12px;
  border: 2px solid orange;
}

.custom-controls {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.custom-controls button {
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

/* Colores de botones */
button:nth-child(1),
button:nth-child(3) {
  background-color: #5b5bff;
  color: white;
}
button:nth-child(2) {
  background-color: #4caf50;
  color: white;
}
#radio-mode-btn {
  background-color: orange;
  color: black;
  font-weight: bold;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#volume-indicator {
  font-size: 0.9rem;
  min-width: 35px;
  text-align: center;
}

.progress-container {
  width: 100%;
  max-width: 300px;
  margin-top: 0.5rem;
}

#progress-bar {
  width: 100%;
}

.title-box {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid #ff6600;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.vu-meter {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 40px;
  margin: 1rem auto;
}

.vu-meter.hidden {
  display: none;
}

.bar {
  width: 6px;
  background-color: orange;
  animation: pulse 0.6s infinite alternate;
}

.bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.bar:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.bar:nth-child(3) { height: 30px; animation-delay: 0.2s; }
.bar:nth-child(4) { height: 20px; animation-delay: 0.3s; }
.bar:nth-child(5) { height: 10px; animation-delay: 0.4s; }

@keyframes pulse {
  from {
    opacity: 0.4;
    transform: scaleY(1);
  }
  to {
    opacity: 1;
    transform: scaleY(1.5);
  }
}