/* =====================================================================
   love-cd — WINDOWS VISTA AERO (Y2K envejecido, sin neón)
   ===================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: "Sora", "Segoe UI", Tahoma, sans-serif;
  overflow: hidden;
}

:root {
  /* ---- paleta núcleo: Aurora de Vista (morado/magenta + verde azulado),
     envejecida — saturación de foto de 2008, no de neón ---- */
  --void: #180a29;
  --deep: #2c1049;
  --deep-2: #401463;
  --purple: #6a2a8f;
  --magenta-deep: #7e2e82;
  --teal: #2fae94;
  --teal-light: #7fe0c6;
  --aero-blue: #6a7fb5;
  --aero-blue-deep: #46527d;
  --aero-blue-light: #b9c3e6;
  --silver: #d9dbe6;
  --glass-fill: rgba(160, 155, 205, 0.16);
  --glass-fill-2: rgba(16, 9, 28, 0.68);
  --glass-border: #ffffff2e;
  --glass-border-soft: #ffffff16;
  --ink: #ece9f5;
  --ink-dim: #a89cc0;

  /* ---- color dinámico de la canción activa (se mantiene apagado) ---- */
  --track-color: #8a7fac;
  --accent: #6a7fb5;
}

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

svg.icon, svg.win-icon, svg.btn-icon, svg.start-orb-icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* ================= ESCRITORIO / FONDO "AURORA" DE VISTA, ENVEJECIDO =================
   Basado en el wallpaper por defecto de Windows Vista: morado/magenta arriba,
   verde azulado abajo a la izquierda, un haz de luz diagonal cruzando el
   centro. Colores de época (2007-2009), no paleta neón. */
.desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 60% at 6% 96%, rgba(60, 190, 165, 0.65), transparent 62%),
    radial-gradient(ellipse 46% 38% at 96% 6%, rgba(210, 190, 235, 0.14), transparent 60%),
    linear-gradient(152deg, var(--void) 0%, var(--deep) 26%, var(--purple) 52%, var(--magenta-deep) 72%, #5a1f74 88%, #421863 100%);
}

/* Haz de luz diagonal (el "swoosh" característico de la Aurora), difuminado
   y con opacidad envejecida en vez de brillo saturado */
.desktop::before {
  content: "";
  position: absolute;
  left: -15%;
  bottom: 4%;
  width: 145%;
  height: 260px;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(200, 235, 225, 0.16) 38%,
    rgba(235, 245, 240, 0.4) 50%,
    rgba(150, 225, 205, 0.28) 58%,
    transparent 82%);
  filter: blur(26px);
  transform: rotate(-8deg);
  opacity: 0.75;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Líneas finas de luz que acompañan el haz, como en el wallpaper original */
.desktop::after {
  content: "";
  position: absolute;
  left: -10%;
  bottom: 2%;
  width: 130%;
  height: 340px;
  background: repeating-linear-gradient(
    -8deg,
    transparent 0px,
    transparent 5px,
    rgba(220, 240, 235, 0.05) 6px,
    transparent 8px
  );
  filter: blur(0.5px);
  opacity: 0.5;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Textura de grano fotográfico, más marcada para efecto "monitor viejo" */
.grain-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Destellos discretos, plateados — sin colores neón */
.sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #fff, var(--silver));
  clip-path: polygon(50% 0%, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0% 50%, 39% 35%);
  filter: drop-shadow(0 0 4px rgba(220, 232, 240, 0.5));
  opacity: 0.35;
  z-index: 1;
  animation: twinkle 3.4s ease-in-out infinite;
  pointer-events: none;
}
.sparkle.s1 { top: 14%; left: 55%; width: 6px; height: 6px; animation-delay: 0s; }
.sparkle.s2 { top: 26%; left: 68%; width: 9px; height: 9px; animation-delay: 0.8s; }
.sparkle.s3 { top: 60%; left: 12%; width: 7px; height: 7px; animation-delay: 1.4s; }
.sparkle.s4 { top: 75%; left: 82%; width: 6px; height: 6px; animation-delay: 2s; }
.sparkle.s5 { top: 40%; left: 90%; width: 8px; height: 8px; animation-delay: 2.6s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 0.55; transform: scale(1.05) rotate(15deg); }
}

/* ================= ICONOS DEL ESCRITORIO ================= */
.desktop-icons {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  z-index: 5;
}

.desktop-icon {
  width: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  user-select: none;
}

.desktop-icon:hover .icon-img,
.desktop-icon.selected .icon-img {
  filter: brightness(1.12) drop-shadow(0 0 6px rgba(150, 185, 210, 0.5));
}

.desktop-icon.selected {
  background: rgba(120, 160, 195, 0.14);
  outline: 1px dashed rgba(255, 255, 255, 0.35);
}

.icon-label {
  color: #fff;
  font-size: 12px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  line-height: 1.2;
}

.icon-img {
  width: 48px;
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.icon-txt {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(90, 80, 140, 0.32));
  border: 1px solid var(--glass-border);
  border-radius: 4px 12px 4px 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(6px);
}

.icon-txt .icon { width: 24px; height: 24px; color: var(--aero-blue-light); }

.icon-player {
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #2a3a48 0deg 6deg, #16232e 6deg 12deg);
  box-shadow: 0 0 0 2px var(--aero-blue), 0 0 10px rgba(74, 127, 171, 0.5), 0 3px 8px rgba(0, 0, 0, 0.5);
}

.icon-player .icon { width: 26px; height: 26px; color: var(--aero-blue-light); }

/* ================= VENTANAS (cristal Aero azul, envejecido) ================= */
.window {
  position: absolute;
  top: 70px;
  left: 140px;
  width: 920px;
  max-width: 92vw;
  border-radius: 10px;
  overflow: hidden;
  background: var(--glass-fill);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 24px 60px rgba(10, 3, 20, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.28),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  z-index: 10;
  isolation: isolate;
}

/* Brillo superior del cristal, el reflejo característico del Aero real */
.window::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
  z-index: 0;
}

.window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 36px rgba(90, 130, 165, 0.06);
  pointer-events: none;
  z-index: 0;
}

.window[hidden] { display: none !important; }

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 42px) !important;
  max-width: 100vw;
  border-radius: 0;
}

.window-titlebar {
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 14px;
  background: linear-gradient(180deg, rgba(190, 185, 225, 0.55) 0%, rgba(110, 120, 175, 0.55) 45%, rgba(45, 35, 75, 0.72) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  color: #fff;
  cursor: move;
  z-index: 1;
}

.window-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.win-icon { width: 15px; height: 15px; color: var(--aero-blue-light); }

.window-buttons { display: flex; gap: 6px; }

.win-btn {
  position: relative;
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(70, 105, 140, 0.5));
  color: #fff;
  cursor: pointer;
  overflow: hidden;
}

.btn-icon { width: 12px; height: 12px; }

.win-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.45s ease;
}

.win-btn:hover::after { left: 130%; }
.win-btn:hover { filter: brightness(1.14); border-color: var(--aero-blue-light); }

.win-close { background: linear-gradient(180deg, rgba(220, 140, 140, 0.5), rgba(150, 45, 45, 0.6)); }
.win-close:hover { border-color: #e0a0a0; }

/* ---- Bloc de notas ---- */
.notepad-window {
  width: 460px;
  top: 90px;
  left: 640px;
}

.notepad-menubar {
  height: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  background: rgba(8, 14, 22, 0.5);
  border-bottom: 1px solid var(--glass-border-soft);
  font-size: 11.5px;
  color: var(--ink-dim);
  letter-spacing: 0.3px;
  z-index: 1;
  position: relative;
}

.notepad-menubar span:hover { color: var(--aero-blue-light); cursor: default; }

.notepad-textarea {
  flex: 1;
  min-height: 340px;
  border: none;
  outline: none;
  resize: none;
  padding: 16px;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(6, 11, 18, 0.5), rgba(16, 26, 36, 0.35));
  caret-color: var(--aero-blue-light);
  z-index: 1;
  position: relative;
}

.notepad-textarea::selection { background: rgba(74, 127, 171, 0.4); }

/* ---- Menu bar reproductor ---- */
.menubar {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  background: rgba(8, 14, 22, 0.5);
  border-bottom: 1px solid var(--glass-border-soft);
  font-size: 12.5px;
  color: var(--ink-dim);
  z-index: 1;
  position: relative;
}

.menubar span:hover { color: var(--aero-blue-light); text-decoration: none; cursor: default; }

/* ================= REPRODUCTOR ================= */
.main-area {
  position: relative;
  display: flex;
  min-height: 520px;
  z-index: 1;
}

.now-playing-panel {
  flex: 1.35;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 28px 30px;
  background: radial-gradient(circle at 50% 12%, rgba(90, 130, 165, 0.1), transparent 60%);
  border-right: 1px solid var(--glass-border-soft);
}

.now-playing-header {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--aero-blue-light);
  text-transform: uppercase;
  letter-spacing: 2.4px;
  margin-bottom: 16px;
}

.disc-stage {
  width: 264px;
  height: 264px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 22px;
}

.disc-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--track-color) 0%, transparent 70%);
  opacity: 0.22;
  filter: blur(22px);
  transition: background 0.4s ease;
}

.disc {
  width: 248px;
  height: 248px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 40% 36%,
      #f6f8fa 0%,
      #e2e6ec 14%,
      #c7ced9 32%,
      #aab3c2 52%,
      #929cae 72%,
      #7c8698 100%);
  box-shadow:
    0 0 0 3px #7c8698,
    0 14px 40px rgba(0, 0, 0, 0.6),
    inset 0 0 40px rgba(255, 255, 255, 0.1);
  animation: spin 3.4s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

.disc.spinning { animation-play-state: running; }

/* Microsurcos concéntricos */
.disc-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle at 50% 50%,
      rgba(255, 255, 255, 0.1) 0px,
      rgba(255, 255, 255, 0.1) 0.6px,
      transparent 1.4px,
      transparent 2.1px
    ),
    repeating-radial-gradient(
      circle at 50% 50%,
      rgba(20, 25, 35, 0.06) 0px,
      rgba(20, 25, 35, 0.06) 0.5px,
      transparent 1.1px,
      transparent 2.6px
    );
  /* la zona cercana a la etiqueta queda lisa, como en un CD real */
  mask-image: radial-gradient(circle at 50% 50%, transparent 0%, transparent 21%, #000 27%, #000 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 0%, transparent 21%, #000 27%, #000 100%);
}

/* Reflejo de luz sobre el disco: plateado y apagado, ligado al color de la canción */
.disc-rainbow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 140deg,
    transparent 0deg,
    color-mix(in srgb, var(--track-color) 45%, #f2f5f8) 20deg,
    transparent 50deg,
    transparent 190deg,
    color-mix(in srgb, var(--track-color) 35%, #d7dde3) 235deg,
    transparent 275deg
  );
  mix-blend-mode: soft-light;
  opacity: 0.5;
  transition: background 0.4s ease;
}

.disc-shine {
  position: absolute;
  top: 6%;
  left: 9%;
  width: 30%;
  height: 16%;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  filter: blur(9px);
  transform: rotate(-25deg);
}

.disc-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--track-color) 55%, #eef2f5), var(--track-color) 60%, color-mix(in srgb, var(--track-color) 55%, black) 100%);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: background 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}

.disc-label-shine {
  position: absolute;
  top: 6%;
  left: 14%;
  width: 46%;
  height: 22%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  filter: blur(6px);
  transform: rotate(-20deg);
}

.disc-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #0b0f14;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 3;
}

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

.track-info {
  text-align: center;
  margin-bottom: 16px;
  min-height: 48px;
}

.track-title {
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.track-artist {
  color: var(--ink-dim);
  font-size: 12.5px;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.progress-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.time {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-dim);
  width: 36px;
  text-align: center;
}

.seek-bar, .vol-bar {
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  background: transparent;
}

.seek-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--track-color) var(--progress, 0%), rgba(255, 255, 255, 0.12) var(--progress, 0%));
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3);
}

.seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--track-color);
  cursor: pointer;
  margin-top: -0.5px;
}

.seek-bar::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--track-color);
  cursor: pointer;
}

.controls-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.ctrl-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  background: radial-gradient(circle at 35% 30%, rgba(70, 100, 130, 0.6), rgba(12, 18, 26, 0.85));
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.ctrl-btn .icon { width: 17px; height: 17px; }

.ctrl-btn:hover { filter: brightness(1.18); border-color: var(--aero-blue-light); }

.ctrl-btn-play {
  width: 56px;
  height: 56px;
  border-color: var(--track-color);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--track-color) 45%, #2e4356), #131e29);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--track-color) 45%, transparent);
}

.ctrl-btn-play .icon { width: 20px; height: 20px; }

.icon-pause-state { display: none; }
.ctrl-btn-play.is-playing .icon-play-state { display: none; }
.ctrl-btn-play.is-playing .icon-pause-state { display: block; }

.volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  color: var(--ink-dim);
}

.vol-icon { width: 15px; height: 15px; }

.vol-bar {
  width: 84px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--aero-blue) var(--vol, 80%), rgba(255, 255, 255, 0.12) var(--vol, 80%));
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3);
}

.vol-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--aero-blue);
  cursor: pointer;
}

/* ---- Panel lateral: lista / letra ---- */
.side-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.side-tabs {
  display: flex;
  background: rgba(8, 14, 22, 0.45);
  border-bottom: 1px solid var(--glass-border-soft);
  padding: 6px 6px 0;
  gap: 4px;
}

.side-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  font-family: inherit;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.tab-icon { width: 13px; height: 13px; }

.side-tab:hover { color: var(--ink); }

.side-tab.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(74, 127, 171, 0.26), rgba(74, 127, 171, 0.06));
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Contenedor relativo: los dos paneles se apilan y se reemplazan con un
   cross-fade, sin depender del atributo [hidden] (que perdía contra las
   reglas de autor) y sin provocar saltos de layout. */
.side-content-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 16, 26, 0.45), rgba(16, 26, 38, 0.3));
}

.side-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  pointer-events: none;
}

.side-content.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.playlist { list-style: none; flex: 1; overflow-y: auto; }

.playlist li {
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--glass-border-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  transition: background 0.15s ease;
}

.playlist li:hover { background: rgba(255, 255, 255, 0.04); }

.playlist li.active {
  background: linear-gradient(90deg, rgba(74, 127, 171, 0.22), rgba(74, 127, 171, 0.08));
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}

.playlist li .track-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 4px currentColor;
}

.playlist li .track-num {
  font-family: "JetBrains Mono", monospace;
  color: var(--ink-dim);
  width: 20px;
  flex-shrink: 0;
  font-size: 11.5px;
}

.playlist li .track-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-footer {
  padding: 9px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-dim);
  border-top: 1px solid var(--glass-border-soft);
  background: rgba(8, 14, 22, 0.4);
}

.lyrics-track-name {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--glass-border-soft);
  background: rgba(8, 14, 22, 0.4);
  letter-spacing: 0.2px;
}

.lyrics-view {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
  scroll-behavior: smooth;
  font-family: "Fraunces", Georgia, serif;
  font-size: 15.5px;
  font-style: italic;
  line-height: 1.85;
  color: var(--ink);
  white-space: pre-wrap;
}

.lyrics-view.empty {
  color: var(--ink-dim);
  font-family: "Sora", sans-serif;
  font-style: normal;
  font-size: 13px;
}

.lyrics-view::-webkit-scrollbar,
.playlist::-webkit-scrollbar,
.notepad-textarea::-webkit-scrollbar {
  width: 8px;
}
.lyrics-view::-webkit-scrollbar-track,
.playlist::-webkit-scrollbar-track,
.notepad-textarea::-webkit-scrollbar-track {
  background: transparent;
}
.lyrics-view::-webkit-scrollbar-thumb,
.playlist::-webkit-scrollbar-thumb,
.notepad-textarea::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--aero-blue), var(--aero-blue-light));
  border-radius: 4px;
}

.statusbar {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(6, 11, 18, 0.6);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-dim);
  border-top: 1px solid var(--glass-border-soft);
  z-index: 1;
}

/* ================= BARRA DE TAREAS ================= */
.taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(90, 75, 130, 0.55), rgba(18, 10, 28, 0.92));
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  z-index: 50;
  padding: 0 8px;
  gap: 8px;
}

.start-btn {
  position: relative;
  height: 32px;
  padding: 0 18px 0 12px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(160deg, #8b7fc9 0%, var(--purple) 55%, #3a1a56 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(20, 8, 35, 0.5);
  overflow: hidden;
}

.start-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
  pointer-events: none;
}

.start-orb-icon { width: 12px; height: 12px; fill: #fff; filter: drop-shadow(0 0 3px rgba(255,255,255,0.6)); }

.taskbar-apps { flex: 1; display: flex; gap: 6px; overflow-x: auto; height: 100%; align-items: center; }

.taskbar-app-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid var(--glass-border-soft);
  background: linear-gradient(180deg, rgba(74, 127, 171, 0.2), rgba(20, 32, 44, 0.4));
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.taskbar-app-btn svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--aero-blue-light); }

.taskbar-app-btn.active {
  background: linear-gradient(180deg, rgba(74, 127, 171, 0.32), rgba(74, 127, 171, 0.14));
  box-shadow: inset 0 0 0 1px var(--aero-blue-light);
  color: #fff;
}

.taskbar-clock {
  font-family: "JetBrains Mono", monospace;
  color: var(--ink);
  font-size: 12px;
  padding: 0 12px;
}

/* =========================
   MODO CELULAR
   ========================= */
@media (max-width: 900px) {

  /* Ventana ocupa prácticamente toda la pantalla */
  .window {
    width: 96vw;
    height: calc(100vh - 58px);
    max-height: calc(100vh - 58px);
    left: 2vw !important;
    top: 8px !important;
  }

  .notepad-window {
    left: 2vw !important;
  }

  /* El reproductor se divide verticalmente */
  .main-area {
    flex: 1;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  /* ===== PARTE DEL CD ===== */
  .now-playing-panel {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    padding: 12px 18px 14px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border-soft);
  }

  .now-playing-header {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .disc-stage {
    width: 135px;
    height: 135px;
    margin: 2px 0 10px;
  }

  .disc {
    width: 125px;
    height: 125px;
  }

  .disc-label {
    width: 52px;
    height: 52px;
  }

  .disc-hole {
    width: 14px;
    height: 14px;
  }

  .track-info {
    min-height: 38px;
    margin-bottom: 8px;
  }

  .track-title {
    font-size: 15px;
  }

  .track-artist {
    font-size: 11px;
    margin-top: 2px;
  }

  .progress-row {
    margin-bottom: 8px;
    gap: 6px;
  }

  .controls-row {
    gap: 10px;
  }

  .ctrl-btn {
    width: 34px;
    height: 34px;
  }

  .ctrl-btn .icon {
    width: 14px;
    height: 14px;
  }

  .ctrl-btn-play {
    width: 44px;
    height: 44px;
  }

  .ctrl-btn-play .icon {
    width: 17px;
    height: 17px;
  }

  .volume-row {
    margin-left: 4px;
  }

  .vol-bar {
    width: 55px;
  }


  /* ===== PANEL DE LISTA / LETRA ===== */
  .side-panel {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
  }

  .side-tabs {
    flex: 0 0 auto;
    padding: 4px 4px 0;
  }

  .side-tab {
    min-height: 38px;
    padding: 8px 4px;
    font-size: 11px;
  }

  .tab-icon {
    width: 14px;
    height: 14px;
  }

  /* Aquí está la parte importante:
     el contenido de la lista/letra tiene espacio propio
     y puede hacer scroll */
  .side-content-wrap {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
  }

  .side-content {
    min-height: 0;
  }

  .playlist {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .playlist li {
    padding: 11px 12px;
    min-height: 43px;
    font-size: 12px;
  }

  .playlist li .track-name {
    min-width: 0;
  }

  .playlist-footer {
    flex: 0 0 auto;
    padding: 7px 12px;
    font-size: 10px;
  }

  .lyrics-track-name {
    flex: 0 0 auto;
    padding: 9px 12px;
    font-size: 12px;
  }

  .lyrics-view {
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    -webkit-overflow-scrolling: touch;
  }

  /* Barra de estado */
  .statusbar {
    flex: 0 0 24px;
  }

  /* Barra de tareas un poco más pequeña */
  .taskbar {
    height: 44px;
  }

  .start-btn {
    padding: 0 12px;
    font-size: 12px;
  }
}


/* =========================
   CELULARES MUY PEQUEÑOS
   ========================= */
@media (max-width: 500px) {

  .window {
    width: 100vw;
    left: 0 !important;
    top: 0 !important;
    height: calc(100vh - 44px);
    max-height: calc(100vh - 44px);
    border-radius: 0;
  }

  .window-titlebar {
    height: 34px;
    padding-left: 10px;
  }

  .window-title {
    font-size: 11px;
  }

  .menubar {
    height: 24px;
    gap: 12px;
    padding: 0 10px;
    font-size: 10px;
  }

  .now-playing-panel {
    padding: 7px 12px 9px;
  }

  .disc-stage {
    width: 105px;
    height: 105px;
    margin: 0 0 5px;
  }

  .disc {
    width: 98px;
    height: 98px;
  }

  .disc-label {
    width: 42px;
    height: 42px;
  }

  .track-info {
    min-height: 34px;
    margin-bottom: 5px;
  }

  .track-title {
    font-size: 13px;
  }

  .track-artist {
    font-size: 10px;
  }

  .progress-row {
    margin-bottom: 5px;
  }

  .ctrl-btn {
    width: 30px;
    height: 30px;
  }

  .ctrl-btn-play {
    width: 38px;
    height: 38px;
  }

  .volume-row {
    display: none;
  }

  .side-tab {
    min-height: 35px;
    font-size: 10px;
  }

  .playlist li {
    min-height: 40px;
    padding: 9px 10px;
  }

  .lyrics-view {
    font-size: 13px;
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .disc, .sparkle, .win-btn::after { animation: none !important; transition: none !important; }
}