:root {
  --berry-50: #fff4f5;
  --berry-100: #ffe7eb;
  --berry-200: #ffc8d1;
  --berry-300: #ff9bad;
  --berry-400: #ff6f8b;
  --berry-500: #f64770;
  --berry-600: #d73158;
  --ink-900: #2a0f18;
  --ink-700: #5a2e3d;
  --mint-100: #effcf8;
  --mint-400: #44c1a1;
  --panel: rgba(255, 248, 249, 0.8);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(146, 62, 86, 0.2);
  --shadow: 0 16px 48px rgba(143, 40, 74, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Lexend", sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 15% 10%, #fff0d8 0%, transparent 42%),
    radial-gradient(circle at 85% 20%, #ffd8df 0%, transparent 40%),
    linear-gradient(140deg, #fffaf5 0%, #ffeef2 45%, #fff7f8 100%);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 36vw;
  height: 36vw;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  opacity: 0.55;
  animation: drift 11s ease-in-out infinite;
}

.orb-a {
  background: #ff7a90;
  top: -12vw;
  right: -8vw;
}

.orb-b {
  background: #ffce7a;
  bottom: -10vw;
  left: -8vw;
  animation-delay: 1.6s;
}

.app-shell {
  width: min(1160px, 94vw);
  margin: 4.2rem auto;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.2rem;
}

.card {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  animation: enter 0.72s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.library-panel {
  padding: 1.4rem;
  animation-delay: 0.07s;
}

.player-panel {
  padding: 1.6rem;
  animation-delay: 0.16s;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  font-size: 1.42rem;
}

.subtitle {
  margin-top: 0.45rem;
  color: var(--ink-700);
  font-size: 0.93rem;
}

.auth-section {
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.auth-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  color: var(--berry-600);
  background: var(--berry-100);
  border: 1px solid rgba(188, 61, 96, 0.2);
}

.auth-badge.ok {
  color: #1c6e55;
  background: #e4faef;
  border-color: rgba(67, 155, 126, 0.28);
}

.auth-status {
  margin: 0.55rem 0 0;
  color: var(--ink-700);
  font-size: 0.86rem;
}

.auth-actions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.5rem;
}

.btn.discord {
  background: linear-gradient(120deg, #6a7bff, #4f62ff);
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.upload-zone {
  margin-top: 1rem;
  border: 2px dashed rgba(175, 54, 92, 0.35);
  border-radius: 18px;
  background: var(--panel-strong);
  min-height: 150px;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.upload-zone:hover,
.upload-zone.drag {
  transform: translateY(-2px);
  border-color: var(--berry-600);
  background: #fff;
}

.upload-zone.locked {
  cursor: not-allowed;
  opacity: 0.65;
}

.upload-zone.locked:hover {
  transform: none;
  border-color: rgba(175, 54, 92, 0.35);
  background: var(--panel-strong);
}

.upload-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.03rem;
}

.upload-copy {
  color: var(--ink-700);
  font-size: 0.89rem;
  margin-top: 0.25rem;
}

.library-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.62rem 0.9rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(110deg, var(--berry-500), var(--berry-300));
  color: #fff;
}

.btn.secondary {
  background: #fff;
  color: var(--ink-900);
  border: 1px solid var(--line);
}

.hint {
  margin-top: 0.9rem;
  color: var(--ink-700);
  line-height: 1.4;
  font-size: 0.86rem;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cover-art {
  width: 124px;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 18%, #ffe7ad 0%, transparent 30%),
    linear-gradient(135deg, #ff7f95, #f24d71);
  box-shadow: 0 14px 34px rgba(192, 52, 90, 0.34);
  display: grid;
  place-items: center;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.meta-label {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.87rem;
}

#trackTitle {
  margin-top: 0.2rem;
  font-size: 1.45rem;
}

#trackDetails {
  margin-top: 0.24rem;
  color: var(--ink-700);
}

.progress-wrap {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 0.65rem;
}

input[type="range"] {
  accent-color: var(--berry-600);
}

.controls {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.circle-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink-900);
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.circle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(102, 35, 56, 0.22);
}

.circle-btn.play {
  width: 60px;
  height: 60px;
  background: linear-gradient(130deg, var(--berry-500), var(--berry-300));
  color: #fff;
  border: 0;
}

.volume-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-700);
}

.queue-section {
  margin-top: 1.35rem;
}

.queue-list {
  margin: 0.6rem 0 0;
  list-style: none;
  padding: 0;
  max-height: 310px;
  overflow: auto;
}

.queue-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.66rem 0.78rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  margin-bottom: 0.45rem;
  cursor: pointer;
}

.queue-item.active {
  border-color: var(--berry-600);
  background: linear-gradient(95deg, var(--mint-100), #fff);
}

.queue-item small {
  color: var(--ink-700);
}

.queue-empty {
  color: var(--ink-700);
  padding: 0.7rem;
  text-align: center;
}

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(16px) translateX(-8px);
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    margin: 1.3rem auto 2rem;
  }

  .cover-art {
    width: 96px;
  }

  .controls {
    flex-wrap: wrap;
  }

  .volume-wrap {
    width: 100%;
    justify-content: flex-end;
  }
}
