:root {
  --bg: #ffffff;
  --fg: #000000;
  --ring: #4a90e2;
  --accent: #ff6b6b;
}

[data-theme="dark"] {
  --bg: #050509;
  --fg: #f5f5f5;
  --ring: #7ab8ff;
  --accent: #ff9f7a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #202533 0, var(--bg) 40%);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 20px;
}

.header-right {
  display: flex;
  gap: 8px;
}

header button {
  border: none;
  background: rgba(0,0,0,0.05);
  color: var(--fg);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

header button:hover {
  background: rgba(0,0,0,0.12);
}

main {
  padding: 16px;
  overflow: auto;
}

#dropZone {
  border: 2px dashed rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.04);
}

[data-theme="dark"] #dropZone {
  border-color: rgba(255,255,255,0.2);
}

#dropZone.dragover {
  border-color: var(--ring);
  background: rgba(74,144,226,0.08);
}

#dropZone p {
  margin: 0 0 8px;
}

#fileInput {
  display: none;
}

#tracks {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.track {
  width: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.track-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 6px solid var(--ring);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.track-circle.playing {
  box-shadow: 0 0 18px rgba(74,144,226,0.7);
}

.track-name {
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
  max-width: 100%;
  word-break: break-word;
}

.track-delete {
  position: absolute;
  top: -6px;
  right: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 12px;
  cursor: pointer;
}

.track-delete:hover {
  filter: brightness(1.1);
}

.waveform {
  margin-top: 8px;
  width: 150px;
  height: 40px;
  background: rgba(0,0,0,0.06);
  border-radius: 8px;
}

[data-theme="dark"] .waveform {
  background: rgba(255,255,255,0.06);
}
