/* public/style.css */
:root {
  --bg-color-day: #fafafa;
  --bg-color-night: #1d1f27;
  --text-color-day: #333;
  --text-color-night: #fff;
  --btn-bg-day: #f2f2f2;
  --btn-bg-night: #2c2f39;
  --btn-text-color: #333;
  --btn-hover-bg-day: #ddd;
  --btn-hover-bg-night: #444;
  --seek-slider-color: #007bff;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: var(--bg-color-day);
  color: var(--text-color-day);
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

header {
  text-align: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5rem;
  margin: 0;
  padding: 10px;
}

#modeToggle {
  opacity: 0;
  width: 0;
  height: 0;
}

.mode-label {
  display: inline-block;
  position: relative;
  width: 60px;
  height: 30px;
  cursor: pointer;
}

.mode-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 30px;
}

.mode-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.mode-slider .mode-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

.mode-slider .sun {
  left: 8px;
  color: #f1c40f;
}

.mode-slider .moon {
  right: 8px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.4s;
}

#modeToggle:checked + .mode-slider {
  background-color: #4caf50;
}

#modeToggle:checked + .mode-slider:before {
  transform: translateX(30px);
}

#modeToggle:checked + .mode-slider .sun {
  opacity: 0;
}

#modeToggle:checked + .mode-slider .moon {
  opacity: 1;
}

.mode-text {
  font-size: 1rem;
}

#song-selector {
  text-align: center;
  margin: 20px;
}

select {
  padding: 10px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

#controls {
  text-align: center;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  font-size: 1.2rem;
  background-color: var(--btn-bg-day);
  color: var(--btn-text-color);
  border: none;
  border-radius: 8px;
  margin: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: var(--btn-hover-bg-day);
}

#seek-container {
  text-align: center;
  margin-top: 20px;
}

#seekSlider {
  width: 80%;
  margin: 10px 0;
  cursor: pointer;
  border-radius: 10px;
  height: 6px;
  background-color: #eee;
  transition: background-color 0.3s;
}

#seekSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background-color: var(--seek-slider-color);
  border-radius: 50%;
  cursor: pointer;
}

#time-display {
  font-size: 1.2rem;
  color: #777;
}

.track {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px;
  padding: 10px;
  background-color: var(--bg-color-day);
  border-radius: 8px;
  border: 1px solid #ccc;
}

.mute-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.5em;
}

.unmuted {
  color: green;
}

.muted {
  color: red;
}

/* Modo Noche */
body.dark-mode {
  background-color: var(--bg-color-night);
  color: var(--text-color-night);
}

body.dark-mode .btn {
  background-color: var(--btn-bg-night);
  color: var(--btn-text-color);
}

body.dark-mode .btn:hover {
  background-color: var(--btn-hover-bg-night);
}

body.dark-mode #seekSlider {
  background-color: #333;
}

body.dark-mode .track {
  background-color: #2c2f39;
  border-color: #444;
}

body.dark-mode .mode-slider {
  background-color: #333;
}

body.dark-mode .btn i {
  color: #fff;
}

footer {
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
  color: var(--text-color-day);
  background-color: var(--bg-color-day);
  margin-top: 40px;
  border-top: 1px solid #ccc;
}

body.dark-mode footer {
  color: var(--text-color-night);
  background-color: var(--bg-color-night);
  border-top: 1px solid #444;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Loader moderno y estético */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.dark-mode #loader {
  background-color: rgba(0, 0, 0, 0.8);
}

#loader.active {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #007bff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.track input[type="range"] {
  width: 100px;
  margin-left: 10px;
  vertical-align: middle;
}

/* Contenedor de controles (volumen y mute) a la derecha de cada pista */
.track-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}


