:root {
  --bg: #090909;
  --bg-elev: #111111;
  --bg-card: #121212;
  --bg-card-strong: #151515;
  --text: #f7f8f6;
  --muted: #aab3ae;
  --muted-strong: #cbd2ce;
  --primary: #9fba6d;
  --primary-strong: #bfd889;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --shadow: 0 28px 80px -34px rgba(0, 0, 0, 0.78);
  --error: #ff7d7d;
  --radius: 18px;
  --radius-sm: 12px;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  z-index: 20;
}

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

a:hover {
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

code,
pre {
  font-family: var(--font-mono);
}

nav {
  position: sticky;
  top: 0;
  z-index: 30;
  width: min(1240px, calc(100% - 24px));
  margin: 16px auto 0;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  background: rgba(7, 9, 9, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

body.is-scrolled nav {
  background: rgba(7, 9, 9, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.logo img {
  width: 30px;
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links > a:not(.btn) {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.18s ease;
}

.nav-links > a.nav-strong {
  color: var(--text);
}

.nav-links > a:not(.btn):hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  background: #f4f4f0;
  color: #111111 !important;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
    background 0.18s ease, color 0.18s ease;
  box-shadow: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text) !important;
  border-color: var(--line);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

.github-btn {
  padding-right: 14px;
}

.github-stars-badge {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted-strong);
}

.github-stars-badge svg {
  color: #e5bf63;
}

main,
.content-container,
.container {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.container {
  padding: 0;
}

.hero-home {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M47.5 0V48M0 47.5H48' stroke='rgba(255,255,255,0.08)'/%3E%3C/svg%3E");
  background-size: 48px 48px;
}

.hero-float {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-float-mark {
  position: absolute;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  animation: floatDrift 10s ease-in-out infinite;
  opacity: 0.94;
}

.hero-float-mark:hover {
  opacity: 1;
}

.hero-float-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hf-lidarr {
  top: 70px;
  left: 6%;
  animation-delay: 0s;
}

.hf-soulseek {
  top: 60px;
  right: 7%;
  animation-delay: -2s;
}

.hf-navidrome {
  top: 315px;
  left: 5%;
  animation-delay: -4s;
}

.hf-lastfm {
  top: 305px;
  right: 5%;
  animation-delay: -6s;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  max-width: 13ch;
  margin: 0 auto 22px;
  font-size: clamp(3rem, 6.6vw, 5.55rem);
  line-height: 0.89;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}

.hero p {
  max-width: 720px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.58;
  letter-spacing: -0.015em;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-preview {
  width: min(1140px, 100%);
  margin: 0 auto;
}

.hero-screenshot-frame,
.workflow-card,
.terminal-card,
.card,
.comparison-card,
.dropzone {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.hero-screenshot-frame {
  overflow: hidden;
  background: #0f0f0f;
}

.screenshot {
  width: 100%;
  height: auto;
  display: block;
}

.section-block {
  padding: 96px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 46px;
}

.section-head h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

.feature-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-columns article {
  padding: 28px 28px 32px;
  border-right: 1px solid var(--line);
}

.feature-columns article:last-child {
  border-right: 0;
}

.feature-columns h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.feature-columns p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
}

.integration-card {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
  display: block;
  transition: background 0.18s ease;
}

.integration-card:last-child {
  border-right: 0;
}

.integration-card:hover {
  background: rgba(255, 255, 255, 0.025);
}

.integration-mark {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
}

.integration-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.integration-copy h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.integration-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.6;
}

.integration-copy code {
  color: var(--muted-strong);
  font-size: 0.76rem;
}

.workflow-section {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.workflow-card {
  padding: 22px;
}

.workflow-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.workflow-status,
.workflow-branch {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workflow-status {
  color: var(--primary-strong);
}

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

.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.workflow-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.workflow-step-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-strong);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
}

.workflow-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.workflow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-list li {
  position: relative;
  padding-left: 28px;
  color: var(--muted-strong);
  font-size: 0.98rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fba6d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.setup-section .open-head {
  text-align: center;
  margin-inline: auto;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  margin-bottom: 28px;
}

.setup-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 28px;
}

.terminal-card {
  overflow: hidden;
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.terminal-head > span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.terminal-title {
  margin-left: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.terminal-body {
  padding: 22px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.8;
}

.terminal-body .prompt {
  margin-right: 10px;
  color: var(--primary-strong);
}

.terminal-body .dim {
  color: var(--muted);
}

.cursor-line {
  display: inline-flex;
  align-items: center;
}

.caret {
  width: 7px;
  height: 14px;
  margin-left: 6px;
  background: var(--text);
  animation: blink 1s steps(2) infinite;
}

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

.stat-card {
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-value {
  margin-bottom: 8px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.stat-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 10, 10, 0.86);
  box-shadow: var(--shadow);
  color: #e5ece8;
  font-size: 0.9rem;
  line-height: 1.7;
}

pre::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

pre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.code-block {
  position: relative;
  margin-bottom: 24px;
}

.code-block pre {
  padding-top: 52px;
}

.copy-button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.18s ease;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.final-cta {
  position: relative;
  padding: 116px 20px 70px;
  text-align: center;
}

.final-cta::before {
  display: none;
}

.final-cta-inner {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
}

.final-cta h2 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.final-cta p {
  margin: 20px auto 32px;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 560px;
}

footer {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 46px;
  color: var(--muted);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.footer-links a {
  color: var(--muted-strong);
}

/* Secondary page styles */
.wrap {
  width: min(720px, calc(100% - 40px));
  margin: 58px auto 90px;
}

.content-container {
  padding: 56px 0 90px;
}

.page-docs .wrap,
.page-docs .content-container {
  margin-top: 36px;
}

.page-docs .header {
  max-width: 720px;
  margin: 0 auto 40px;
}

.page-docs .header p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.04rem;
  line-height: 1.6;
}

.doc-intro {
  margin: 0 auto 24px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.doc-steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.doc-steps li + li {
  margin-top: 10px;
}

.content-section {
  margin-bottom: 88px;
  padding-top: 8px;
}

.page-guide .content-section {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.page-guide .comparison-grid {
  margin-bottom: 72px;
}

.page-guide .comparison-card {
  padding: 32px;
}

.content-section h2,
.header h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.content-section h3,
section h3 {
  margin: 28px 0 14px;
  font-size: 1.16rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.content-section p,
.header p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.content-section > p {
  margin-bottom: 20px;
}

.content-section code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-size: 0.88em;
}

.content-section ul,
.content-section ol,
.comparison-card ul,
.card ul {
  color: var(--muted);
  line-height: 1.75;
}

.comparison-grid,
.grid {
  display: grid;
  gap: 24px;
}

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

.grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card,
.comparison-card,
.convert-card {
  padding: 28px;
}

.comparison-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comparison-card h3 svg {
  color: var(--primary-strong);
}

.comparison-copy {
  margin-top: 16px;
  margin-bottom: 18px;
}

.comparison-list {
  margin-bottom: 0 !important;
}

.comparison-list li + li,
.content-section ul li + li,
.content-section ol li + li {
  margin-top: 10px;
}

.header {
  margin-bottom: 34px;
  text-align: center;
}

.page-convert .convert-card {
  max-width: 720px;
  margin: 0 auto;
}

.page-convert .dropzone {
  background: rgba(255, 255, 255, 0.015);
}

.doc-callout {
  margin: 44px 0 0;
  text-align: left;
  padding: 28px;
}

.doc-callout-title {
  margin-top: 0 !important;
  color: var(--primary-strong) !important;
}

.doc-callout-copy {
  margin-bottom: 12px !important;
}

.json-example {
  margin-top: 34px;
}

.json-example + .json-example {
  margin-top: 42px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.json-example p {
  margin-bottom: 16px;
}

.json-tabs {
  margin-top: 34px;
}

.json-tab-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.json-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.json-tab:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.json-tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
}

.json-panel {
  padding-top: 6px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dropzone {
  position: relative;
  padding: 34px 22px;
  border-style: dashed;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.dragover {
  border-color: rgba(159, 186, 109, 0.45);
  background: rgba(159, 186, 109, 0.05);
}

.dropzone label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.dropzone .hint {
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-name-display {
  min-height: 1.2em;
  margin-top: 12px;
  color: var(--primary-strong);
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 16px;
}

.actions button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

#convertBtn {
  background: #f4f4f0;
  color: #111111;
}

#downloadBtn {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-color: var(--line);
}

.actions button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status {
  min-height: 1.5em;
  color: var(--muted);
  text-align: center;
}

.status.ok {
  color: var(--primary-strong);
}

.status.error {
  color: var(--error);
}

.preview-container {
  position: relative;
  display: none;
}

.preview-container.visible {
  display: block;
}

.preview-label {
  position: absolute;
  top: -11px;
  left: 14px;
  padding: 0 8px;
  background: var(--bg-card-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#preview {
  margin: 0;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes floatDrift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .integration-grid,
  .setup-grid,
  .workflow-section {
    grid-template-columns: 1fr;
  }

  .integration-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .integration-card:last-child {
    border-bottom: 0;
  }

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

  .feature-columns article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-columns article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 820px) {
  nav {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-home {
    padding-top: 52px;
  }

  .hero h1 {
    max-width: 10ch;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-float {
    display: none;
  }

  .section-block,
  .final-cta {
    padding-top: 72px;
    padding-bottom: 56px;
  }

  .comparison-grid,
  .stats-grid,
  .actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

}

@media (max-width: 640px) {
  main,
  .content-container,
  .container,
  footer {
    width: calc(100% - 24px);
  }

  .wrap {
    width: calc(100% - 24px);
  }

  .hero p,
  .section-head p,
  .final-cta p {
    font-size: 1rem;
  }

}
