/* ── Tokens ─────────────────────────────────────────── */
:root {
  --bg: #07070b;
  --bg-soft: #0c0c14;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --card: #101018;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5fa;
  --muted: #9ba1b6;
  --muted-dim: #6e7488;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, 0.75);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.8);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1240px;
}

[data-theme="light"] {
  --bg: #f5f6fb;
  --bg-soft: #eceefa;
  --surface: rgba(15, 23, 42, 0.04);
  --surface-2: rgba(15, 23, 42, 0.07);
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #101322;
  --muted: #5a6175;
  --muted-dim: #858ca1;
  --shadow-lg: 0 30px 70px -30px rgba(15, 23, 42, 0.35);
  --shadow: 0 16px 34px -24px rgba(15, 23, 42, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.aura {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 720px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 46% at 18% 12%, rgba(139, 92, 246, 0.28), transparent 70%),
    radial-gradient(38% 38% at 78% 6%, rgba(34, 211, 238, 0.18), transparent 70%),
    radial-gradient(30% 40% at 60% 40%, rgba(244, 114, 182, 0.12), transparent 70%);
  filter: blur(10px);
}

[data-theme="light"] .aura { opacity: 0.55; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 90%; } }

/* ── Topbar ─────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px max(18px, calc((100vw - var(--maxw)) / 2));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px -8px rgba(139, 92, 246, 0.9);
  flex: none;
}

.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 12px 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  max-width: 560px;
  width: 100%;
  justify-self: center;
}

.search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.search-icon { color: var(--muted-dim); flex: none; }

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.search input::placeholder { color: var(--muted-dim); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); cursor: pointer; }

.search-kbd {
  font: inherit;
  font-size: 11px;
  color: var(--muted-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  line-height: 1.6;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: default;
  white-space: nowrap;
}

.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-dim); flex: none; }
.pill.is-ok .pill-dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16); }
.pill.is-syncing .pill-dot { background: var(--accent-2); animation: blink 1s ease-in-out infinite; }
.pill.is-error { color: var(--danger); border-color: rgba(251, 113, 133, 0.35); }
.pill.is-error .pill-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18); }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6d3ff0 55%, var(--accent-2));
  box-shadow: 0 14px 30px -16px rgba(139, 92, 246, 0.95);
}

.btn-primary:hover { filter: brightness(1.06); }
.btn-outline { background: transparent; border-color: var(--border-strong); }
.btn-outline:hover { background: var(--surface); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }

/* ── Layout ─────────────────────────────────────────── */
main {
  width: min(100% - 36px, var(--maxw));
  margin: 0 auto;
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 52px;
  align-items: center;
  padding: 62px 0 46px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 999px;
}

[data-theme="light"] .eyebrow { color: #6d28d9; }

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulseRing 2.4s ease-out infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero h1 {
  margin: 18px 0 0;
  font-size: clamp(2.05rem, 4.3vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.grad {
  background: linear-gradient(100deg, #c4b5fd 0%, #8b5cf6 32%, #22d3ee 68%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 18px 0 0;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--border); }

.stat strong {
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat span { font-size: 11.5px; color: var(--muted-dim); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* Ornamen hero */
.hero-art { perspective: 1200px; }

.art-frame {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.16), rgba(34, 211, 238, 0.07) 55%, transparent);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  transform: rotateY(-9deg) rotateX(4deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-art:hover .art-frame { transform: rotateY(-2deg) rotateX(1deg); }

.art-top { display: flex; align-items: center; gap: 6px; padding: 2px 4px 10px; }

.art-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.art-dot:first-child { background: rgba(251, 113, 133, 0.75); }
.art-dot:nth-child(2) { background: rgba(251, 191, 36, 0.7); }
.art-dot:nth-child(3) { background: rgba(52, 211, 153, 0.7); }

.art-url {
  margin-left: 10px;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.art-body {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    radial-gradient(70% 90% at 20% 10%, rgba(139, 92, 246, 0.45), transparent 65%),
    radial-gradient(60% 70% at 85% 85%, rgba(34, 211, 238, 0.35), transparent 65%),
    linear-gradient(150deg, #14101f, #0a0a12);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.art-play {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(6px);
  padding-left: 3px;
}

.art-bars {
  position: absolute;
  bottom: 14px;
  left: 16px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
}

.art-bars i {
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(to top, var(--accent), var(--accent-2));
  height: 40%;
  animation: eq 1.6s ease-in-out infinite;
}

.art-bars i:nth-child(2) { animation-delay: 0.2s; }
.art-bars i:nth-child(3) { animation-delay: 0.45s; }

.art-foot { display: flex; align-items: center; gap: 10px; padding: 12px 4px 2px; }

.art-chip {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 7px;
}

.art-line { flex: 1; height: 4px; border-radius: 999px; background: linear-gradient(90deg, rgba(139, 92, 246, 0.9), rgba(34, 211, 238, 0.5), transparent); }

[hidden] { display: none !important; }

/* ── Toolbar ────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 0 22px;
}

.chips {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.chip {
  height: 32px;
  padding: 0 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.chip:hover { color: var(--text); }

.chip.is-active {
  color: #d8ccff;
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.38);
}

[data-theme="light"] .chip.is-active { color: #6d28d9; }

.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.chip-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border-color: var(--border);
}

.chip-bookmark svg { opacity: 0.65; transition: opacity 0.2s; }

.chip-bookmark:hover svg { opacity: 1; }

.chip-bookmark.is-active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.42);
}

.chip-bookmark.is-active svg { opacity: 1; fill: currentColor; }

.chip-count {
  min-width: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.chip-bookmark.is-active .chip-count { color: #fbbf24; background: rgba(251, 191, 36, 0.18); }

[data-theme="light"] .chip-bookmark.is-active { color: #b45309; }
[data-theme="light"] .chip-bookmark.is-active .chip-count { color: #b45309; }

.toolbar-right { display: flex; align-items: center; gap: 10px; }

.result-count {
  font-size: 12.5px;
  color: var(--muted-dim);
  font-variant-numeric: tabular-nums;
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 10px 10px 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(251, 113, 133, 0.32);
  background: rgba(251, 113, 133, 0.09);
  color: #fecdd3;
  font-size: 13px;
  line-height: 1.5;
}

[data-theme="light"] .banner { color: #9f1239; }

/* ── Grid & Card ────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s, box-shadow 0.3s;
  animation: fadeUp 0.4s ease both;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: var(--shadow);
}

.card:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.card-bookmark {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #fff;
  cursor: pointer;
  background: rgba(8, 8, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, color 0.2s, background 0.2s, border-color 0.2s;
}

.card-bookmark:hover { transform: scale(1.08); border-color: rgba(255, 255, 255, 0.38); }

.card-bookmark.is-on {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.55);
}

.card-bookmark.is-on svg { fill: currentColor; }

.card-bookmark:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1428, #0d1117);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover .thumb img { transform: scale(1.06); }

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 46%);
  pointer-events: none;
}

.badge {
  position: absolute;
  z-index: 2;
  padding: 3px 7px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(8, 8, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.badge-new {
  top: 9px;
  left: 9px;
  background: linear-gradient(135deg, var(--accent), #6d3ff0);
  border-color: rgba(255, 255, 255, 0.22);
}

.badge-time { bottom: 9px; right: 9px; font-variant-numeric: tabular-nums; }

.badge-status {
  bottom: 9px;
  left: 9px;
  color: #241a02;
  background: rgba(251, 191, 36, 0.92);
  border-color: transparent;
}

.play-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.card:hover .play-badge,
.card:focus-visible .play-badge { opacity: 1; }

.play-badge span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding-left: 3px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  transform: scale(0.9);
  transition: transform 0.25s;
}

.card:hover .play-badge span { transform: scale(1); }

.card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 12px 13px 14px; }

.card-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

.card-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-dim); }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; flex: none; }

/* Skeleton */
.card.skeleton { pointer-events: none; }
.card.skeleton .thumb { background: var(--surface); }
.card.skeleton .thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}
.sk-line { height: 10px; border-radius: 6px; background: var(--surface); }
.sk-line.short { width: 55%; }

/* ── Empty & Load more ──────────────────────────────── */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 64px 24px 48px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), transparent);
}

.empty-art {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  margin-bottom: 4px;
}

.empty h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.empty p { margin: 0; max-width: 46ch; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.empty .btn { margin-top: 10px; }

.load-more-wrap { display: flex; justify-content: center; padding: 34px 0 10px; }
.sentinel { width: 1px; height: 1px; }

/* ── Footer ─────────────────────────────────────────── */
.footer {
  margin-top: 40px;
  padding: 28px max(18px, calc((100vw - var(--maxw)) / 2)) 36px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-dim);
}

.footer p { margin: 0 0 4px; }
.footer-dim { opacity: 0.75; }

/* ── Modal & Player ─────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s;
}

.modal.is-open { opacity: 1; visibility: visible; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 7, 0.78);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
  overscroll-behavior: contain;
}

.modal.is-open .modal-panel { transform: none; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 2px 12px;
}

.modal-head-text { min-width: 0; }

.modal-head h2 {
  margin: 0;
  font-size: clamp(15px, 2.2vw, 18px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.modal-meta { margin: 5px 0 0; font-size: 12px; color: var(--muted-dim); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  background: radial-gradient(80% 80% at 50% 20%, rgba(139, 92, 246, 0.18), transparent 70%), #08080d;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent-2);
  animation: spin 0.9s linear infinite;
}

.player-note {
  margin-top: 10px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.player-note strong { color: var(--text); }

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.modal-actions .spacer { flex: 1; }
.modal-actions .btn { height: 36px; font-size: 12.5px; padding: 0 13px; }

.player-demo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  background:
    radial-gradient(70% 90% at 20% 10%, rgba(139, 92, 246, 0.4), transparent 65%),
    radial-gradient(60% 70% at 85% 85%, rgba(34, 211, 238, 0.3), transparent 65%),
    #0a0a12;
}

.player-demo strong { color: #fff; font-size: 15px; letter-spacing: -0.01em; }

/* ── Toasts ─────────────────────────────────────────── */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  background: #16161f;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.25s ease both;
}

[data-theme="light"] .toast { background: #fff; }
.toast.is-error { border-color: rgba(251, 113, 133, 0.45); }
.toast.is-ok { border-color: rgba(52, 211, 153, 0.45); }
.toast button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
}

.toast .toast-action {
  margin-left: auto;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.toast .toast-action + button { margin-left: 6px; }
.toast > button:last-child:not(.toast-action) { margin-left: auto; }

/* ── Halaman upload ─────────────────────────────────── */
.page { padding: 44px 0 24px; }

.page-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  width: fit-content;
}

.crumb:hover { color: var(--text); }

.page-head h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-head p { margin: 0; max-width: 62ch; font-size: 14px; line-height: 1.7; color: var(--muted); }

.panel {
  max-width: 720px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel h2 { margin: 0 0 4px; font-size: 15px; letter-spacing: -0.01em; }
.panel > p.sub { margin: 0; font-size: 12.5px; color: var(--muted-dim); line-height: 1.6; }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }

.input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 34px 20px;
  margin-top: 16px;
  text-align: center;
  border: 1.5px dashed var(--border-strong);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover,
.dropzone.is-drag { border-color: var(--accent); background: rgba(139, 92, 246, 0.08); }

.dropzone svg { color: #c4b5fd; }
.dropzone strong { font-size: 14px; }
.dropzone span { font-size: 11.5px; color: var(--muted-dim); }

.file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.file-chip .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .size { color: var(--muted-dim); font-variant-numeric: tabular-nums; }
.file-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; }

.progress { display: none; margin-top: 16px; }
.progress.is-on { display: block; }

.progress .track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }

.progress .track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.progress .label {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted-dim);
  font-variant-numeric: tabular-nums;
}

.result {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.07);
}

.result h3 { margin: 0 0 8px; font-size: 13px; color: var(--ok); }
.result code {
  display: block;
  padding: 8px 10px;
  margin-top: 6px;
  font-size: 11.5px;
  word-break: break-all;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 8px;
}

[data-theme="light"] .result code { background: rgba(15, 23, 42, 0.05); }

.hintline { margin: 14px 0 0; font-size: 12px; line-height: 1.65; color: var(--muted-dim); }
.hintline a { color: #c4b5fd; text-decoration: underline; text-underline-offset: 2px; }

/* ── Responsif ──────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 44px 0 32px; }
  .hero-art { max-width: 520px; }
  .art-frame { transform: none; }
}

@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr auto; gap: 10px; padding: 10px 16px; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  main { width: calc(100% - 28px); }
  .hero { padding: 30px 0 26px; }
  .hero-stats { gap: 10px; }
  .stat + .stat { padding-left: 10px; }
  .stat strong { font-size: 1.15rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
  .card-title { font-size: 12.5px; min-height: 2.9em; }
  .card-body { padding: 10px 11px 12px; }
  .hide-sm { display: none !important; }
  .modal { padding: 0; }
  .modal-panel { width: 100%; height: 100%; max-height: 100vh; border-radius: 0; border: 0; padding: 14px; }
  .modal-actions .spacer { display: none; }
  .modal-actions { position: sticky; bottom: 0; padding-top: 10px; background: linear-gradient(transparent, var(--card) 35%); }
  .toasts { left: 14px; right: 14px; max-width: none; }
  .page { padding: 28px 0 16px; }
  .panel { padding: 16px; }
}

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





