@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #0a0f14;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.18);
  --text: #f5f1ea;
  --muted: #a7b0bd;
  --accent: #ffb454;
  --accent-strong: #ff7b3a;
  --aqua: #53e3d1;
  --shadow: 0 30px 80px rgba(5, 8, 12, 0.7);
  --glow: 0 0 40px rgba(83, 227, 209, 0.15), 0 0 60px rgba(255, 180, 84, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(83, 227, 209, 0.15), transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(255, 123, 58, 0.18), transparent 55%),
    radial-gradient(circle at 50% 0%, rgba(255, 180, 84, 0.12), transparent 45%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  opacity: 0.7;
  z-index: 0;
}

.orb-a {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(83, 227, 209, 0.45), transparent 70%);
  top: -180px;
  left: -120px;
}

.orb-b {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 180, 84, 0.35), transparent 70%);
  bottom: -140px;
  right: -120px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.18;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  padding: 140px 8vw 60px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header {
  position: fixed;
  z-index: 5;
  top: 24px;
  left: 4vw;
  right: 4vw;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: rgba(8, 11, 16, 0.65);
  border: 1px solid var(--border);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow), var(--glow);
  width: fit-content;
  max-width: calc(100% - 8vw);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  text-align: center;
}

.brand-name {
  font-family: "Fraunces", "Georgia", serif;
  letter-spacing: 0.02em;
  display: block;
}

.brand-tag {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), var(--aqua));
  box-shadow: 0 0 12px rgba(110, 240, 210, 0.6);
}

.primary-btn,
.download-btn {
  border-radius: 999px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.35), rgba(255, 123, 58, 0.5));
  border-color: rgba(255, 180, 84, 0.45);
  box-shadow: 0 14px 30px rgba(255, 123, 58, 0.35);
}

.download-btn {
  background: linear-gradient(135deg, rgba(83, 227, 209, 0.3), rgba(83, 227, 209, 0.55));
  border-color: rgba(83, 227, 209, 0.55);
  text-decoration: none;
  text-align: center;
}

.primary-btn:hover,
.download-btn:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 520px);
  gap: 36px;
  align-items: center;
  text-align: left;
  max-width: 1100px;
  width: 100%;
}

.hero-copy h1 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(2.6rem, 3.8vw, 3.8rem);
  margin: 12px 0 18px;
  line-height: 1.12;
  letter-spacing: 0.01em;
  max-width: 520px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
  opacity: 0.75;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow), var(--glow);
  animation: floatIn 1s ease both;
  width: min(520px, 100%);
  position: relative;
  overflow: hidden;
  justify-self: end;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -120px;
  background:
    radial-gradient(circle at 30% 20%, rgba(83, 227, 209, 0.12), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(255, 180, 84, 0.14), transparent 65%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), transparent 70%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.field input {
  background: rgba(12, 15, 20, 0.7);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.98rem;
  color: var(--text);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  justify-content: center;
}

.status-pill {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--muted);
  background: rgba(10, 12, 16, 0.7);
}

.status-pill.loading {
  color: var(--aqua);
  border-color: rgba(83, 227, 209, 0.5);
  box-shadow: 0 0 18px rgba(83, 227, 209, 0.3);
}

.status-pill.done {
  color: var(--accent);
  border-color: rgba(255, 180, 84, 0.5);
  box-shadow: 0 0 18px rgba(255, 180, 84, 0.3);
}

.status-pill.error {
  color: #ffb3b3;
  border-color: rgba(255, 179, 179, 0.45);
  box-shadow: 0 0 18px rgba(255, 179, 179, 0.2);
}

.download-row {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  justify-content: center;
}

.download-row.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-bottom: 16px;
  width: 100%;
}

.progress-row.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: rgba(8, 10, 14, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--aqua), var(--accent));
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.progress-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 64px;
  justify-content: flex-end;
}

.playlist-status {
  font-size: 0.82rem;
  color: var(--muted);
  margin: -6px 0 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: center;
}

.playlist-status.show {
  opacity: 1;
  transform: translateY(0);
}

.mini-loader {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--aqua);
  animation: spin 0.9s linear infinite;
}

.download-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.helper-text {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 16px 0 0;
  text-align: center;
}

.support-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  justify-content: center;
}

.recommendations {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: center;
}

.recommendations.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.recommendations-title {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.recommendations-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 10px;
}

.recommendations-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.recommendation-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 12, 16, 0.6);
}

.recommendation-title {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
}

.rec-actions {
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.rec-btn {
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text);
  font-size: 0.75rem;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rec-btn:hover {
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.rec-btn.primary {
  background: linear-gradient(135deg, rgba(83, 227, 209, 0.25), rgba(83, 227, 209, 0.5));
  border-color: rgba(83, 227, 209, 0.5);
}

.rec-btn.preview {
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.25), rgba(255, 123, 58, 0.4));
  border-color: rgba(255, 180, 84, 0.5);
}

.rec-btn.preview.playing {
  background: linear-gradient(135deg, rgba(255, 180, 84, 0.4), rgba(255, 123, 58, 0.6));
  border-color: rgba(255, 180, 84, 0.7);
  box-shadow: 0 10px 18px rgba(255, 123, 58, 0.25);
}

.rec-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.preview-player {
  display: none;
}

.chip {
  border: 1px solid rgba(83, 227, 209, 0.5);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--aqua);
  background: rgba(12, 15, 20, 0.6);
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 20px 0 40px;
  color: var(--muted);
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.site-footer a:hover {
  color: var(--text);
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 rgba(255, 155, 106, 0.8);
  animation: pulse 2.2s infinite;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 155, 106, 0.65);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(255, 155, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 155, 106, 0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 800px) {
  .site-header {
    flex-direction: column;
    gap: 8px;
  }

  .shell {
    padding-top: 170px;
  }
}

@media (max-width: 560px) {
  .action-row,
  .download-row {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .download-btn {
    width: 100%;
  }

  .progress-row {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .shell {
    padding: 150px 6vw 50px;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 720px;
    justify-items: center;
  }

  .hero-card {
    justify-self: center;
  }
}

@media (max-width: 720px) {
  .site-header {
    top: 16px;
    padding: 10px 18px;
  }

  .brand-tag {
    font-size: 0.75rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.1rem, 6vw, 3rem);
    max-width: 100%;
  }

  .lede {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero-card {
    padding: 22px;
    border-radius: 22px;
  }

  .field input {
    padding: 12px 14px;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 140px 5vw 40px;
  }

  .hero {
    gap: 22px;
  }

  .hero-card {
    padding: 20px;
  }

  .progress-row {
    flex-direction: column;
    align-items: stretch;
  }

  .progress-meta {
    min-width: 0;
    justify-content: center;
  }

  .site-footer {
    padding: 16px 0 28px;
  }
}

@media (max-width: 420px) {
  .site-header {
    left: 3vw;
    right: 3vw;
    max-width: 94vw;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-tag {
    font-size: 0.7rem;
  }

  .hero-card {
    padding: 18px;
  }

  .field input {
    font-size: 0.9rem;
  }
}
