:root {
  --bg-a: #06202b;
  --bg-b: #0e7490;
  --panel: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --accent: #22d3ee;
  --danger: #fb7185;
}

html, body {
  background: radial-gradient(circle at top, #164e63, var(--bg-a) 50%, #020617 100%);
  color: var(--text);
  min-height: 100%;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.glass,
.player-modal,
#miniPlayer {
  color: #f8fafc;
}

.text-light-emphasis,
.text-muted,
small,
.form-label,
label {
  color: rgba(248, 250, 252, 0.94) !important;
}

.btn-outline-secondary {
  color: #f1f5f9;
  border-color: rgba(241, 245, 249, 0.55);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: #0b1220;
  background: #f8fafc;
  border-color: #f8fafc;
}

.glass {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.92);
}

.list-group-item {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

#songList {
  max-height: 58vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.mini-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(2, 6, 23, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1100;
}

.mini-meta {
  max-width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.player-modal {
  background: linear-gradient(170deg, #0f172a, #0b3d53);
  color: var(--text);
}

.cover-art {
  width: 72vw;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: 18px;
  background: linear-gradient(135deg, #06b6d4, #0369a1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.waveform-wrap {
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

#waveformCanvas {
  width: 100%;
  height: 96px;
  display: block;
}

.trim-waveform-wrap {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

#trimWaveformCanvas {
  width: 100%;
  height: 120px;
  display: block;
  cursor: crosshair;
}

.transition-indicator {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.5);
  color: #a5f3fc;
}

.transition-indicator.active {
  animation: pulse 1s ease-in-out infinite;
}

.toast-box {
  position: fixed;
  top: 14px;
  right: 14px;
  max-width: 280px;
  z-index: 1200;
}

.toast-item {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 4px solid var(--accent);
  color: white;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.toast-item.error {
  border-left-color: var(--danger);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); opacity: 0.7; }
}
