:root {
  --bg: #f7f2ff;
  --panel: #ffffff;
  --panel-soft: #eee5ff;
  --purple: #5b2db3;
  --purple-dark: #24103f;
  --purple-mid: #7b55d8;
  --text: #1f1728;
  --muted: #675a76;
  --line: #d8c9ee;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.header,
main {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.logo {
  color: var(--purple-dark);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.nav {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.nav a:hover {
  color: var(--purple-dark);
  background: var(--panel-soft);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 22px;
  min-height: 610px;
}

.hero-content,
.listen-card,
.split-section,
.feature-list article,
.start-panel {
  border: 1px solid var(--line);
  border-radius: 32px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 7vw, 72px);
  background: var(--panel);
}

.label {
  margin: 0 0 18px;
  color: var(--purple);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 700px;
  margin-bottom: 22px;
  font-size: clamp(3.25rem, 8vw, 6.7rem);
  line-height: 0.9;
  letter-spacing: -0.09em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.intro {
  max-width: 560px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
}

.button.primary {
  color: #ffffff;
  background: var(--purple);
}

.button.secondary {
  border: 1px solid var(--line);
  color: var(--purple-dark);
  background: var(--panel-soft);
}

.button.light {
  color: var(--purple-dark);
  background: #ffffff;
}

.listen-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: var(--purple-dark);
}

.cover {
  flex: 1;
  min-height: 230px;
  margin-bottom: 16px;
  border-radius: 24px;
  background: var(--purple-mid);
}

.song-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding: 12px;
  border-radius: 18px;
  color: #ffffff;
  background: #321a56;
}

.song-row.active {
  background: #ffffff;
  color: var(--purple-dark);
}

.song-row span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--purple-mid);
}

.song-row strong {
  display: block;
  margin-bottom: 3px;
}

.song-row p {
  margin: 0;
  color: inherit;
  font-size: 0.85rem;
  opacity: 0.72;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.controls button {
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: var(--purple-dark);
  background: #ffffff;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 28px;
  margin-top: 22px;
  padding: clamp(28px, 5vw, 48px);
  background: var(--panel-soft);
}

.split-section p:last-child {
  align-self: end;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.feature-list article {
  padding: 26px;
  background: var(--panel);
}

.feature-list span {
  display: block;
  margin-bottom: 48px;
  color: var(--purple);
  font-weight: 800;
}

.feature-list p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.start-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 22px 0 48px;
  padding: clamp(28px, 5vw, 48px);
  color: #ffffff;
  background: var(--purple);
}

.start-panel .label {
  color: #e6dcff;
}

.app-body {
  background: #fbf8ff;
}

.app-shell {
  display: grid;
  gap: 18px;
  padding-bottom: 48px;
}

.library-head,
.music-panel,
.upload-panel {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--panel);
}

.library-head {
  padding: clamp(32px, 7vw, 68px);
}

.library-head h1 {
  max-width: 760px;
  margin-bottom: 18px;
}

.library-head .intro {
  margin-bottom: 0;
}

.music-panel,
.upload-panel {
  padding: clamp(24px, 4vw, 36px);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-title h2,
.upload-panel h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.status,
.form-message {
  color: var(--muted);
  font-weight: 700;
}

.status {
  margin-bottom: 14px;
}

.music-list {
  display: grid;
  gap: 12px;
}

.music-item {
  display: grid;
  grid-template-columns: 84px minmax(160px, 0.35fr) 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-soft);
}

.music-cover {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--purple-mid);
}

.empty-cover {
  background: var(--purple-mid);
}

.music-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--purple-dark);
  font-size: 1.05rem;
}

.music-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.music-item audio {
  width: 100%;
  margin-top: 12px;
}

.missing-audio {
  margin-top: 12px;
  font-size: 0.92rem;
  font-weight: 700;
}

.upload-panel {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 28px;
}

.single-panel {
  min-height: 540px;
  align-items: start;
}

.upload-form {
  display: grid;
  gap: 16px;
}

.upload-form label {
  display: grid;
  gap: 8px;
  color: var(--purple-dark);
  font-weight: 800;
}

.upload-form input,
.upload-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 15px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
}

.upload-form textarea {
  resize: vertical;
}

.upload-form input:focus,
.upload-form textarea:focus {
  outline: 3px solid #e5dcff;
  border-color: var(--purple);
}

@media (max-width: 900px) {
  .hero,
  .split-section,
  .feature-list,
  .upload-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .listen-card {
    min-height: 560px;
  }
}

@media (max-width: 620px) {
  .header,
  main {
    width: min(100% - 24px, 1080px);
  }

  .header {
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav a {
    flex: 1;
    text-align: center;
  }

  .hero-content,
  .listen-card,
  .split-section,
  .feature-list article,
  .start-panel,
  .library-head,
  .music-panel,
  .upload-panel {
    border-radius: 24px;
  }

  .panel-title,
  .music-item {
    grid-template-columns: 1fr;
  }

  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.3rem);
  }

  .actions,
  .start-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
