* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f3f5ff;
  --surface: #ffffff;
  --surface-soft: #eef2ff;
  --text: #1f2937;
  --text-muted: #475569;
  --primary: #7c3aed;
  --primary-strong: #4338ca;
  --accent: #fb7185;
  --shadow: rgba(15, 23, 42, 0.12);
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.14), transparent 20%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body.dark {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #111827;
  --surface-soft: #1f2937;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --primary: #8b5cf6;
  --primary-strong: #6366f1;
  --accent: #f472b6;
  --shadow: rgba(0, 0, 0, 0.45);
}

body.dark .site-header {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(59, 130, 246, 0.95));
}

body.dark .playlist-card,
body.dark .intro-card,
body.dark .site-footer {
  background: #111827;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 80px 0;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  color: #fff;
}

.header-content {
  display: grid;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 4.2rem);
  line-height: 1.05;
}

.site-header p {
  max-width: 720px;
  margin: 24px 0;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

.banner {
  background: var(--surface);
  color: var(--text);
  padding: 15px;
  text-align: center;
  font-weight: bold;
  font-size: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.banner-links {
  margin-top: 14px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.banner-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 204, 0, 0.15);
  color: #ffcc00;
  border: 1px solid rgba(255, 204, 0, 0.35);
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.banner-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 204, 0, 0.25);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 16px 32px rgba(251, 113, 133, 0.18);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.intro-card {
  margin-top: -36px;
  padding: 32px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 28px 70px var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 20px;
}

.quick-nav {
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(124, 58, 237, 0.18);
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nav-pill:hover {
  transform: translateY(-1px);
  background: rgba(124, 58, 237, 0.08);
}

.intro-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
}

.intro-card p {
  margin: 0;
  color: var(--text-muted);
}

.search-box {
  display: grid;
  gap: 12px;
}

#searchInput {
  width: 100%;
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 1rem;
}

#searchInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

#searchCount {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.playlist-grid {
  margin-top: 32px;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.playlist-card {
  background: var(--surface);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 20px 50px var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.playlist-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.card-header span {
  color: var(--primary-strong);
  font-weight: 700;
}

.playlist-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.playlist-card li {
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(124, 58, 237, 0.06);
  color: var(--text);
}

.playlist-card li:nth-child(odd) {
  background: rgba(99, 102, 241, 0.08);
}

.no-result {
  margin-top: 26px;
  font-size: 1rem;
  color: var(--text-muted);
  display: none;
  text-align: center;
}

.site-footer {
  padding: 24px 0 40px;
  text-align: center;
  color: var(--text-muted);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(124, 58, 237, 0.24);
  display: grid;
  place-items: center;
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 20;
}

.back-to-top:hover {
  filter: brightness(1.05);
}

@media (max-width: 640px) {
  .header-content,
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 56px 0;
  }

  .intro-card {
    padding: 24px;
  }

  .playlist-card {
    padding: 22px;
  }
}
