* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: transparent; overflow: hidden;
       font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif; }
#app { width: 100%; height: 100%; }

:root {
  --nw-bg:           rgba(10, 10, 10, 0.82);
  --nw-surface:      rgba(26, 26, 26, 0.9);
  --nw-glass:        rgba(255, 255, 255, 0.07);
  --nw-glass-border: rgba(255, 255, 255, 0.12);
  --nw-accent:       #ffffff;
  --nw-accent-soft:  rgba(255, 255, 255, 0.15);
  --nw-text:         #ffffff;
  --nw-text-muted:   rgba(255, 255, 255, 0.45);
  --nw-text-sub:     rgba(255, 255, 255, 0.28);
  --nw-radius-pill:  50px;
  --nw-radius-card:  16px;
  --nw-radius-art:   10px;
  --nw-blur:         blur(24px) saturate(180%);
  --nw-progress-bg:  rgba(255, 255, 255, 0.12);
}

[data-theme="obsidian"] {
  --nw-bg:           rgba(10, 10, 10, 0.85);
  --nw-accent:       #ffffff;
  --nw-accent-soft:  rgba(255, 255, 255, 0.12);
  --nw-glass:        rgba(255, 255, 255, 0.06);
  --nw-glass-border: rgba(255, 255, 255, 0.1);
}

[data-theme="midnight"] {
  --nw-bg:           rgba(13, 17, 23, 0.88);
  --nw-accent:       #58a6ff;
  --nw-accent-soft:  rgba(88, 166, 255, 0.15);
  --nw-glass:        rgba(88, 166, 255, 0.05);
  --nw-glass-border: rgba(88, 166, 255, 0.15);
  --nw-text-muted:   rgba(139, 148, 158, 0.9);
}

[data-theme="aurora"] {
  --nw-bg:           rgba(26, 10, 46, 0.88);
  --nw-accent:       #bf5af2;
  --nw-accent-soft:  rgba(191, 90, 242, 0.15);
  --nw-glass:        rgba(191, 90, 242, 0.06);
  --nw-glass-border: rgba(191, 90, 242, 0.2);
}

[data-theme="forest"] {
  --nw-bg:           rgba(10, 22, 40, 0.88);
  --nw-accent:       #30d158;
  --nw-accent-soft:  rgba(48, 209, 88, 0.15);
  --nw-glass:        rgba(48, 209, 88, 0.05);
  --nw-glass-border: rgba(48, 209, 88, 0.15);
}

[data-theme="amber"] {
  --nw-bg:           rgba(28, 16, 9, 0.88);
  --nw-accent:       #ff9f0a;
  --nw-accent-soft:  rgba(255, 159, 10, 0.15);
  --nw-glass:        rgba(255, 159, 10, 0.05);
  --nw-glass-border: rgba(255, 159, 10, 0.15);
}

[data-theme="glass"] {
  --nw-bg:           rgba(255, 255, 255, 0.08);
  --nw-glass:        rgba(255, 255, 255, 0.06);
  --nw-glass-border: rgba(255, 255, 255, 0.18);
  --nw-accent:       #ffffff;
  --nw-accent-soft:  rgba(255, 255, 255, 0.15);
}

.nw-overlay {
  -webkit-backdrop-filter: var(--nw-blur);
  backdrop-filter: var(--nw-blur);
  background: var(--nw-card-bg, var(--nw-bg));
  border: 0.5px solid var(--nw-glass-border);
  color: var(--nw-text);
  font-family: inherit;
  box-shadow: var(--nw-card-shadow, none), var(--nw-inner-glow, none);
  border-width: var(--nw-border-width, 0.5px);
  border-style: var(--nw-border-style, solid);
  border-color: var(--nw-border-color, var(--nw-glass-border));
  max-width: var(--nw-max-width, 100%);
  text-align: var(--nw-text-align, left);
  flex-direction: var(--nw-stack-dir, row);
  border-top-width: var(--nw-accent-line, var(--nw-border-width, 0.5px));
  border-top-color: var(--nw-accent-line-color, var(--nw-border-color, var(--nw-glass-border)));
  transition: background-color 2s ease;
}

.nw-overlay .nw-art,
.nw-overlay .nw-disc {
  order: var(--nw-art-order, 0);
  display: var(--nw-art-display, flex);
}

.nw-progress {
  width: 100%;
  height: 2px;
  background: var(--nw-progress-bg);
  border-radius: 1px;
  overflow: hidden;
}
.nw-progress[data-progress-style="thick"] {
  border-radius: 2px;
}
.nw-progress[data-progress-style="dots"] {
  background: transparent;
}
.nw-progress-fill {
  height: 100%;
  background: var(--nw-accent);
  width: 0%;
  transition: width 1s linear;
  border-radius: 1px;
}

.nw-progress[data-progress-style="dots"] .nw-progress-fill {
  border-radius: 999px;
  background: repeating-radial-gradient(
    circle at center,
    var(--nw-accent) 0 1px,
    transparent 1.5px 2px
  );
}

.nw-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
  min-height: 12px;
}

.nw-meta-album,
.nw-meta-time,
.nw-meta-next,
.nw-meta-playstate {
  font-size: 11px;
  color: var(--nw-text-muted);
  line-height: 1.3;
}

.nw-meta-next {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nw-playing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nw-accent);
  flex-shrink: 0;
  animation: nw-beat-pulse 1.8s ease-in-out infinite;
}

.nw-custom-sep {
  font-size: 11px;
  color: var(--nw-text-muted);
  opacity: 0.85;
  margin: 4px 0;
  white-space: nowrap;
}

@keyframes nw-fade-up {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.nw-animate-in {
  animation: nw-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-animate="slide"] .nw-overlay {
  animation: nw-fade-up var(--nw-animate-speed, 400ms) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
[data-animate="fade"] .nw-overlay {
  animation: nw-fade-up var(--nw-animate-speed, 400ms) ease forwards;
}

@keyframes nw-beat-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.025); }
}
.nw-beat-pulse {
  animation: nw-beat-pulse var(--nw-beat-ms, 600ms) ease-in-out infinite;
}

.nw-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--nw-accent);
  color: #000;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  animation: nw-fade-up 0.3s ease;
  z-index: 9999;
  white-space: nowrap;
}

.nw-idle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  color: var(--nw-text-muted);
  font-size: 13px;
}

.nw-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--nw-radius-pill);
  padding: 8px 16px 8px 8px;
  width: fit-content;
  max-width: 340px;
}
.nw-pill .nw-art {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
}
.nw-pill .nw-art img { width: 100%; height: 100%; object-fit: cover; }
.nw-pill .nw-art-placeholder { background: var(--nw-glass); }
.nw-pill .nw-info { flex: 1; min-width: 0; }
.nw-pill .nw-title {
  font-size: 13px; font-weight: 500; color: var(--nw-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nw-pill .nw-artist {
  font-size: 11px; color: var(--nw-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nw-pill .nw-playing-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nw-accent); flex-shrink: 0;
  animation: nw-beat-pulse 1.8s ease-in-out infinite;
}

.nw-glasscard {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: var(--nw-radius-card);
  padding: 14px 16px;
  width: 100%;
}
.nw-glasscard .nw-art {
  width: 52px; height: 52px;
  border-radius: var(--nw-radius-art);
  overflow: hidden; flex-shrink: 0;
}
.nw-glasscard .nw-art img { width: 100%; height: 100%; object-fit: cover; }
.nw-glasscard .nw-art-placeholder { background: var(--nw-glass); }
.nw-glasscard .nw-info { flex: 1; min-width: 0; }
.nw-glasscard .nw-title {
  font-size: 14px; font-weight: 600; color: var(--nw-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nw-glasscard .nw-artist {
  font-size: 12px; color: var(--nw-text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nw-glasscard .nw-progress { margin-top: 10px; }

.nw-island {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-radius: 24px;
  padding: 16px;
  width: fit-content;
  min-width: 160px;
}
.nw-island .nw-art {
  width: 88px; height: 88px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.nw-island .nw-art img { width: 100%; height: 100%; object-fit: cover; }
.nw-island .nw-art-placeholder { background: var(--nw-glass); }
.nw-island .nw-title {
  font-size: 13px; font-weight: 600; color: var(--nw-text);
  text-align: center; max-width: 140px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nw-island .nw-artist {
  font-size: 11px; color: var(--nw-text-muted);
  text-align: center;
}
.nw-island .nw-progress { width: 120px; }

.nw-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 14px;
  height: 40px;
  width: 100%;
}
.nw-strip .nw-accent-bar {
  width: 3px; height: 18px;
  background: var(--nw-accent);
  border-radius: 2px; flex-shrink: 0;
}
.nw-strip .nw-strip-text {
  font-size: 13px; color: var(--nw-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.nw-strip .nw-strip-time {
  font-size: 11px; color: var(--nw-text-muted);
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.nw-strip .nw-strip-art {
  width: 26px; height: 26px;
  border-radius: 4px; overflow: hidden; flex-shrink: 0;
}
.nw-strip .nw-strip-art img { width: 100%; height: 100%; object-fit: cover; }

.nw-albumfocus {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-radius: 20px;
  padding: 20px;
  width: fit-content;
}
.nw-albumfocus .nw-art {
  width: 120px; height: 120px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.nw-albumfocus .nw-art img { width: 100%; height: 100%; object-fit: cover; }
.nw-albumfocus .nw-art-placeholder { background: var(--nw-glass); }
.nw-albumfocus .nw-title {
  font-size: 13px; font-weight: 600; color: var(--nw-text);
  text-align: center; max-width: 160px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nw-albumfocus .nw-artist {
  font-size: 11px; color: var(--nw-text-muted); text-align: center;
}
.nw-albumfocus .nw-bpm {
  font-size: 11px; color: var(--nw-accent);
  letter-spacing: 0.04em;
}

.nw-sidebar {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  width: 72px;
}
.nw-sidebar .nw-art {
  width: 72px; height: 72px; flex-shrink: 0;
}
.nw-sidebar .nw-art img { width: 100%; height: 100%; object-fit: cover; }
.nw-sidebar .nw-art-placeholder { background: var(--nw-glass); height: 72px; }
.nw-sidebar .nw-sidebar-body {
  padding: 8px 6px 10px;
  display: flex; flex-direction: column; gap: 3px;
}
.nw-sidebar .nw-title {
  font-size: 9px; font-weight: 600; color: var(--nw-text);
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nw-sidebar .nw-artist {
  font-size: 8px; color: var(--nw-text-muted);
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nw-sidebar .nw-progress { margin-top: 4px; }

@keyframes nw-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.nw-marquee-wrap {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.nw-marquee-inner {
  display: inline-flex;
  gap: 3rem;
  white-space: nowrap;
  will-change: transform;
  animation: nw-marquee 14s linear infinite;
}
