:root {
  color-scheme: dark;
  --bg: #06030d;
  --bg-card: rgba(22, 14, 36, 0.9);
  --bg-glass: rgba(42, 25, 66, 0.65);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #b259ff;
  --accent-strong: #d66bff;
  --muted: #cbc4d5;
  --muted-dark: #8c7ea7;
  --danger: #ff4d6d;
  --success: #59ffa7;
  --gradient: radial-gradient(circle at 20% 20%, #2d1a49, transparent 45%),
    radial-gradient(circle at 80% 0%, #551e8c, transparent 40%),
    radial-gradient(circle at 50% 80%, #150b28, transparent 30%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gradient), #050109;
  color: #f7f1ff;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

p {
  margin-top: 0;
}

.muted {
  color: var(--muted);
  text-align: center;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  min-width: 280px;
}

.hero-content h1 {
  font-size: 2.2rem;
  line-height: 1.1;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.hero-content p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-visual {
  min-width: 200px;
  display: flex;
  justify-content: center;
}

.hero-visual img {
  max-width: 200px;
  width: 100%;
  filter: drop-shadow(0 25px 45px rgba(0, 0, 0, 0.45));
}

.hero-auth {
  max-width: 300px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.panel {
  border-radius: 18px;
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
}

.glass {
  background: var(--bg-glass);
  box-shadow: 0 20px 38px rgba(2, 0, 8, 0.45);
  backdrop-filter: blur(18px);
}

.panel-subtitle {
  color: var(--muted);
  margin-top: 0.35rem;
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.badge {
  padding: 0.35rem 0.9rem;
  background: rgba(178, 89, 255, 0.2);
  color: var(--accent);
  border-radius: 12px;
  font-size: 0.85rem;
}

label {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1rem;
}

input[type="file"] {
  padding: 0.5rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(178, 89, 255, 0.5);
  border-color: rgba(178, 89, 255, 0.6);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--muted);
}

.checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.55rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #08010f;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(178, 89, 255, 0.35);
}

button.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

button.danger {
  background: linear-gradient(120deg, #ff4d6d, #ff89a5);
  color: #fff;
}

button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

button.ghost.small {
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mt-1 {
  margin-top: 1rem;
}

.form-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

.status-message {
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-size: 0.95rem;
  margin: 1rem 0 2rem;
  max-width: 600px;
}

.status-message.info {
  background: rgba(178, 89, 255, 0.2);
  color: var(--accent);
}

.status-message.error {
  background: rgba(255, 77, 109, 0.15);
  color: var(--danger);
}

.status-message.success {
  background: rgba(89, 255, 167, 0.15);
  color: var(--success);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stack > li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.track-item,
.library-item {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
}

.track-info,
.library-info {
  flex: 1;
}

.track-title,
.library-title {
  font-weight: 600;
  font-size: 1rem;
}

.track-meta,
.library-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.track-actions,
.library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.current-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.current-track.empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-content p {
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  button,
  input[type="text"],
  input[type="file"],
  select,
  textarea {
    width: 100%;
  }

  .controls {
    flex-direction: column;
  }
}
