@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=ZCOOL+XiaoWei&display=swap");

:root {
  --bg: #09212a;
  --panel: rgba(8, 25, 34, 0.82);
  --panel-strong: rgba(5, 18, 25, 0.92);
  --line: rgba(171, 218, 214, 0.16);
  --text: #f7f1e8;
  --muted: rgba(247, 241, 232, 0.72);
  --teal: #76d6c3;
  --foam: #d8fff4;
  --amber: #ffb36c;
  --clay: #ff7f5c;
  --rose: #f6d8c9;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(118, 214, 195, 0.2), transparent 34%),
    radial-gradient(circle at 85% 14%, rgba(255, 179, 108, 0.22), transparent 22%),
    linear-gradient(160deg, #06171f 0%, #0a2630 42%, #112f3a 100%);
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: var(--foam);
}

.ambient {
  position: fixed;
  inset: auto;
  z-index: 0;
  filter: blur(28px);
  opacity: 0.55;
  pointer-events: none;
}

.ambient-one {
  top: 4rem;
  right: 4rem;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: rgba(255, 179, 108, 0.25);
}

.ambient-two {
  left: -3rem;
  bottom: 6rem;
  width: 20rem;
  height: 20rem;
  border-radius: 35% 65% 60% 40%;
  background: rgba(118, 214, 195, 0.22);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.panel {
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(13, 34, 44, 0.84), rgba(7, 21, 29, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
  gap: 24px;
  padding: 32px;
  margin-bottom: 20px;
}

.eyebrow,
.section-kicker,
.done-kicker {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero h1,
.stage-head h2,
.summary-head h2,
.catalog-head h2,
.done-panel h3 {
  margin: 0;
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.05;
}

.lead {
  max-width: 56rem;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.stat {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.stage-panel,
.summary-panel,
.catalog-panel {
  padding: 26px;
}

.stage-head,
.summary-head,
.catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.muted {
  color: var(--muted);
}

.stage-actions,
.done-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-button,
.solid-button {
  border-radius: 999px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.solid-button {
  background: linear-gradient(135deg, var(--amber), #ff8a59);
  border-color: transparent;
  color: #231910;
  font-weight: 800;
}

.ghost-button:hover,
.solid-button:hover,
.choice-button:hover {
  transform: translateY(-1px);
}

.progress-wrap {
  margin: 24px 0 22px;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  transition: width 220ms ease;
}

.comparison-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.song-card {
  min-height: 480px;
  border-radius: calc(var(--radius-lg) + 4px);
  overflow: hidden;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: float-in 220ms ease;
}

.song-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cover-frame {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
}

.cover-frame img,
.generated-cover {
  width: 100%;
  height: 100%;
  display: block;
}

.cover-frame img {
  object-fit: cover;
  background: #101c21;
}

.generated-cover {
  position: relative;
  display: grid;
  place-items: end start;
  padding: 24px;
  background:
    linear-gradient(135deg, var(--cover-from, #163742), var(--cover-to, #6ea9b7)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent);
  overflow: hidden;
}

.generated-cover::before,
.generated-cover::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  opacity: 0.2;
}

.generated-cover::before {
  width: 13rem;
  height: 13rem;
  right: -3rem;
  top: -4rem;
  background: rgba(255, 255, 255, 0.4);
}

.generated-cover::after {
  width: 9rem;
  height: 9rem;
  left: -1rem;
  bottom: -2rem;
  background: rgba(255, 179, 108, 0.35);
}

.generated-title,
.generated-subtitle {
  position: relative;
  z-index: 1;
}

.generated-title {
  margin: 0;
  max-width: 12ch;
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.1;
}

.generated-subtitle {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.song-meta {
  display: grid;
  gap: 10px;
  padding: 18px 18px 20px;
}

.song-name {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.3;
}

.song-release {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.side-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--foam);
  font-size: 0.84rem;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.choice-button {
  min-height: 66px;
  border: 0;
  border-radius: 22px;
  color: #132028;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.choice-left {
  background: linear-gradient(135deg, #9af6b8, #54d5a4);
}

.choice-right {
  background: linear-gradient(135deg, #ffd37b, #ff9f5e);
}

.choice-love-tie {
  background: linear-gradient(135deg, #f8f3d2, #efd9b1);
}

.choice-dislike-tie {
  background: linear-gradient(135deg, #f7c1a6, #ef8c71);
}

.stage-note {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  line-height: 1.7;
}

.summary-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.chip,
.resume-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--foam);
  font-size: 0.88rem;
}

.ranking-preview {
  display: grid;
  gap: 12px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.rank-group {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.rank-number {
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  color: var(--amber);
  font-size: 1.2rem;
}

.rank-count {
  color: var(--muted);
  font-size: 0.84rem;
}

.rank-song-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-song {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.94rem;
  line-height: 1.45;
}

.done-panel {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(118, 214, 195, 0.13), rgba(255, 179, 108, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.done-panel h3 {
  margin-top: 4px;
  font-size: 1.6rem;
}

.catalog-panel {
  margin-top: 20px;
}

.catalog-note {
  max-width: 34rem;
  text-align: right;
}

.catalog-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.catalog-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.catalog-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.catalog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.footer {
  padding: 18px 4px 0;
  color: var(--muted);
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .song-card {
    min-height: 400px;
  }

  .catalog-note {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 18px, 1240px);
    padding-top: 14px;
  }

  .hero,
  .stage-panel,
  .summary-panel,
  .catalog-panel {
    padding: 16px;
  }

  .stage-head,
  .summary-head,
  .catalog-head,
  .rank-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .comparison-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .song-card {
    min-height: auto;
    border-radius: 20px;
  }

  .song-meta {
    gap: 6px;
    padding: 12px 12px 14px;
  }

  .song-name {
    font-size: 1.02rem;
    line-height: 1.35;
  }

  .song-release {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .generated-cover {
    padding: 16px;
  }

  .generated-title {
    font-size: 1.15rem;
  }

  .generated-subtitle {
    margin-top: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 420px) {
  .comparison-stage {
    gap: 8px;
  }

  .song-name {
    font-size: 0.96rem;
  }

  .song-release {
    font-size: 0.8rem;
  }

  .choice-button {
    min-height: 58px;
    font-size: 0.94rem;
  }
}
