:root {
  --bg: #080808;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f4f4f4;
  --muted: #9c9c9c;
  --muted-2: #6d6d6d;
  --accent: #ffe600;
  --accent-soft: rgba(255, 230, 0, 0.12);
  --accent-border: rgba(255, 230, 0, 0.45);
  --radius: 22px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #0a0a0a;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.glow-one {
  width: 560px;
  height: 560px;
  top: -260px;
  left: 50%;
  transform: translateX(-65%);
  background: radial-gradient(circle, rgba(255, 230, 0, 0.2), transparent 70%);
}

.glow-two {
  width: 480px;
  height: 480px;
  top: 140px;
  right: -240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.09), transparent 70%);
}

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

/* ---------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.03em;
}

/* ---------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 8px 0 36px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.hero h1 span {
  color: var(--accent);
}

.lead {
  width: min(540px, 100%);
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- */

.search {
  display: flex;
  gap: 12px;
  width: min(680px, 100%);
  margin: 32px auto 0;
}

.field {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  height: 60px;
  padding: 0 8px 0 48px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(16, 16, 16, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.field:focus-within {
  border-color: var(--accent-border);
  box-shadow:
    0 0 0 4px var(--accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.link-icon {
  position: absolute;
  left: 16px;
  width: 21px;
  height: 21px;
  color: var(--muted-2);
  pointer-events: none;
}

.field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.field input::placeholder {
  color: #5f5f5f;
}

.paste {
  flex: none;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel-strong);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s;
}

.paste:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.11);
}

.primary,
.secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 17px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition:
    transform 0.15s,
    filter 0.2s,
    opacity 0.2s;
}

.primary {
  background: var(--accent);
  color: #0a0a0a;
  box-shadow: 0 14px 34px rgba(255, 230, 0, 0.18);
}

.primary:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.primary:active:not(:disabled) {
  transform: translateY(0);
}

.search .primary {
  flex: none;
  height: 60px;
  padding: 0 28px;
  font-size: 15px;
}

.secondary {
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
}

.secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
}

button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none !important;
}

.hint {
  margin: 16px 0 0;
  color: var(--muted-2);
  font-size: 13px;
}

.hint code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

/* ---------------------------------------------------------------- */

.alert {
  margin: 8px 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--accent-border);
  border-radius: 14px;
  background: rgba(255, 230, 0, 0.07);
  color: #f4f4f4;
  font-size: 14px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- */

.card {
  display: grid;
  grid-template-columns: 188px 1fr;
  gap: 26px;
  margin-top: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(12, 12, 12, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: card-in 0.35s ease both;
}

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

.cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #1c1c1c, #121212);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.cover-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.25);
}

.cover-fallback svg {
  width: 54px;
  height: 54px;
}

.info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.title-row h2 {
  flex: 1;
  margin: 2px 0 0;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.mini {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s;
}

.mini svg {
  width: 15px;
  height: 15px;
}

.mini:hover {
  color: var(--text);
  background: var(--panel-strong);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.tags {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pill {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pill:empty {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
}

.dl {
  height: 54px;
  padding: 0 15px;
  border-radius: 14px;
}

.dl svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.dl-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
}

.dl-text small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.65;
}

/* ---------------------------------------------------------------- */

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.primary .spinner {
  border-color: rgba(0, 0, 0, 0.25);
  border-top-color: #0a0a0a;
}

.loading .spinner {
  display: block;
}

.loading .dl-text,
.loading .btn-label {
  opacity: 0.75;
}

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

.progress {
  margin-top: 18px;
}

.bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.45s ease;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.progress-row span:last-child {
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.done {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--text);
  font-size: 13px;
}

.done svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--accent);
}

.done-btn {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(255, 230, 0, 0.16);
  transition:
    filter 0.2s,
    transform 0.15s;
}

.done-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------- */

.lyrics {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.lyrics summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.lyrics summary::-webkit-details-marker {
  display: none;
}

.lyrics summary svg {
  width: 17px;
  height: 17px;
  transition: transform 0.2s;
}

.lyrics[open] summary svg {
  transform: rotate(180deg);
}

.lyrics pre {
  max-height: 420px;
  margin: 0;
  padding: 0 20px 20px;
  overflow: auto;
  color: #c7c7c7;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.footer {
  margin-top: 56px;
  text-align: center;
}

.made-with {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.made-with .heart {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--accent);
}

.made-with a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.2s;
}

.made-with a:hover {
  border-color: var(--accent);
}

.copyright {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------- */

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 880px);
    padding-top: 20px;
  }

  .topbar {
    padding-bottom: 36px;
  }

  .search {
    flex-direction: column;
  }

  .search .primary {
    width: 100%;
  }

  .card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .cover-wrap {
    width: min(220px, 60%);
    margin: 0 auto;
  }

  .title-row {
    align-items: center;
  }

  .actions {
    padding-top: 18px;
  }

  .dl {
    flex: 1;
    min-width: 160px;
  }

  .dl-text {
    align-items: center;
  }

  .footer {
    margin-top: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
