/* ============================================================
   Werkudara Network - Video Downloader
   Design language: dark navy (#05070d) + blue accent family
   ============================================================ */

:root {
  --bg: #05070d;
  --bg-elevated: #0a101d;
  --bg-card: #0b1220;
  --glow-top: #162c6d;
  --fg: #f4f6fb;
  --muted: #9aa4b8;
  --blue: #3080ff;
  --blue-light: #54a2ff;
  --blue-deep: #2563eb;
  --green: #00d294;
  --red: #fb2c36;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(84, 162, 255, 0.2);
  --radius: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* ---------- Focus ---------- */

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- Background atmosphere (wrkdr.net glow + grid) ---------- */


.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(
    ellipse at top,
    var(--glow-top) 0%,
    transparent 65%
  );
  opacity: 0.5;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(244, 246, 251, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 246, 251, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at top, #000 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(5, 7, 13, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(145deg, #162c6d 0%, #0a101d 100%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 18px rgba(48, 128, 255, 0.25);
}

.brand-text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text em {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
}

.nav-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-light);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(48, 128, 255, 0.08);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--fg);
}

@media (max-width: 600px) {
  .nav-badge {
    display: none;
  }
  .nav-links {
    gap: 12px;
  }
  .nav-link {
    font-size: 13px;
  }
}

/* ---------- Layout ---------- */

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 64px 0 40px;
}

.eyebrow {
  display: inline-flex;
  white-space: nowrap;
  margin: 0 0 16px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-light);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(48, 128, 255, 0.07);
}

.hero-title {
  margin: 0;
  font-size: clamp(32px, 5.2vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.hero-title .accent {
  background: linear-gradient(90deg, var(--blue-light), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 16px auto 32px;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Download form card ---------- */

.download-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.download-card:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(48, 128, 255, 0.35),
    0 20px 60px rgba(37, 99, 235, 0.18);
}

.input-row {
  display: flex;
  gap: 10px;
}

#url-input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  color: var(--fg);
  background: var(--bg-elevated);
  border: 1px solid transparent;
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

#url-input::placeholder { color: #7b8599; }
#url-input:focus { border-color: var(--border-strong); }

.btn-primary {
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  /* Stop paling terang harus >=4.5:1 terhadap putih (WCAG AA, teks 15px bold). */
  background: linear-gradient(135deg, var(--blue-deep) 0%, #1d4ed8 100%);
  border: none;

  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: var(--blue-light);
  background: rgba(48, 128, 255, 0.08);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(48, 128, 255, 0.16);
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.btn-secondary:active { transform: translateY(0); }

.submit-row {
  margin-top: 10px;
}

.submit-row .btn-primary {
  width: 100%;
}

.mode-toggle {
  display: flex;
  gap: 6px;
  margin: 2px 4px 10px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.mode-option {
  position: relative;
  flex: 1;
  padding: 10px 14px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mode-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mode-option:has(input:checked) {
  background: rgba(48, 128, 255, 0.16);
  border-color: var(--border-strong);
  color: var(--fg);
}

.mode-option:has(input:focus-visible) {
  outline: 2px solid var(--blue-light);
  outline-offset: 2px;
}

.error {
  margin: 10px 4px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: #ff6b75;
}

/* ---------- Platform badges ---------- */

.platform-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.platform-badges .platform-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 19px;
  color: #c7cddb;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  text-decoration: none;
  padding: 0;
  transition: transform 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.25s ease;
}

.platform-badges .platform-badge:hover {
  transform: translateY(-3px);
  color: #fff;
  border-color: var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.platform-badges .platform-badge:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 2px;
}

.platform-badges .platform-badge:nth-child(1):hover { color: #ff0033; box-shadow: 0 8px 24px rgba(255, 0, 51, 0.35); }
.platform-badges .platform-badge:nth-child(2):hover { color: #69c9d0; }
.platform-badges .platform-badge:nth-child(3):hover { color: #e4405f; box-shadow: 0 8px 24px rgba(228, 64, 95, 0.35); }
.platform-badges .platform-badge:nth-child(4):hover { color: #e6e6e6; }
.platform-badges .platform-badge:nth-child(5):hover { color: #1877f2; box-shadow: 0 8px 24px rgba(24, 119, 242, 0.35); }
.platform-badges .platform-badge:nth-child(6):hover { color: #e6e6e6; }
.platform-badges .platform-badge:nth-child(7):hover { color: #e60023; box-shadow: 0 8px 24px rgba(230, 0, 35, 0.35); }
.platform-badges .platform-badge:nth-child(8):hover { color: #ff4500; box-shadow: 0 8px 24px rgba(255, 69, 0, 0.35); }

/* ---------- Downloads section ---------- */

.downloads { padding-top: 20px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.downloads-list {
  display: grid;
  gap: 12px;
}

.dl-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.008) 100%);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.dl-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 26px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.dl-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--blue-light);
  background: linear-gradient(145deg, rgba(48, 128, 255, 0.18) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 1px solid var(--border-strong);
}

.dl-thumb {
  position: relative;
  width: 88px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d1117;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.dl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.dl-main { min-width: 0; }

.dl-title {
  margin: 0 0 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.progress-track {
  flex: 1;
  min-width: 120px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-light), var(--blue));
  transition: width 0.3s ease;
}

.progress-fill.ok { background: linear-gradient(90deg, #2fe6b8, var(--green)); }
.progress-fill.bad { background: linear-gradient(90deg, #ff7a83, var(--red)); }

.pct { font-variant-numeric: tabular-nums; }

.dl-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.dl-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-queued, .status-running { color: var(--blue-light); background: rgba(48, 128, 255, 0.1); border: 1px solid rgba(84, 162, 255, 0.25); }
.status-merging { color: #c4a8ff; background: rgba(124, 93, 250, 0.12); border: 1px solid rgba(124, 93, 250, 0.3); }
.status-completed { color: var(--green); background: rgba(0, 210, 148, 0.1); border: 1px solid rgba(0, 210, 148, 0.28); }
.status-failed { color: #ff6b75; background: rgba(251, 44, 54, 0.1); border: 1px solid rgba(251, 44, 54, 0.3); }
.status-expired { color: var(--muted); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); }
.dl-media {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.01em;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.btn-download {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: var(--bg);
  background: linear-gradient(135deg, var(--green) 0%, #00b578 100%);

  border: none;
  border-radius: 11px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-download:hover {
  box-shadow: 0 0 24px rgba(0, 210, 148, 0.35);
  transform: translateY(-1px);
}

.dl-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-delete {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease,
              background 0.2s ease, transform 0.15s ease;
}

.btn-delete:hover {
  color: #ff6b75;
  background: rgba(251, 44, 54, 0.12);
  border-color: rgba(251, 44, 54, 0.35);
  transform: translateY(-1px);
}

.btn-share {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease,
              background 0.2s ease, transform 0.15s ease;
}

.btn-share:hover {
  color: var(--blue-light);
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.dl-card--done { border-color: rgba(0, 210, 148, 0.22); }
.dl-card--failed { border-color: rgba(251, 44, 54, 0.22); }

.dl-error {
  grid-column: 2 / -1;
  font-size: 12.5px;
  color: #ff6b75;
  margin: 0;
  overflow-wrap: anywhere;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 36px 0;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.footer-copy {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 6px;
}

.footer-brand,
.footer-sub {
  display: inline-block;
  white-space: nowrap;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 12px;
  margin-top: 8px;
}

.footer-nav .footer-link {
  display: inline-flex;
  align-items: center;
}

.footer-nav .footer-link:not(:last-child)::after {
  content: "·";
  margin-left: 12px;
  color: var(--muted);
  pointer-events: none;
}

@media (max-width: 480px) {
  .footer-nav {
    gap: 6px 8px;
  }
  .footer-nav .footer-link:not(:last-child)::after {
    margin-left: 8px;
  }
}

.footer-link {
  color: var(--blue-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--blue);
  text-decoration: underline;
}

.dl-thumb-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.dl-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 13, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  color: #fff;
  font-size: 20px;
  z-index: 2;
}

.dl-thumb-link:hover .dl-play-overlay {
  opacity: 1;
}

.dl-thumb-link:hover img {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.dl-thumb img {
  transition: transform 0.3s ease;
}

/* ---------- Share Page (Play Video) ---------- */

.share-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px 40px;
}

.video-wrapper {
  /* fit-content supaya kotak mengikuti rasio asli video - reel 9:16 tidak
     dipaksa masuk kotak lebar seperti sebelumnya. */
  width: fit-content;
  max-width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(48, 128, 255, 0.15);
  margin: 0 auto 24px;
}

.video-wrapper video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  outline: none;
}

.video-wrapper.audio-wrapper {
  flex-direction: column;
  padding: 24px;
  background: var(--bg-surface);
  max-width: 480px;
}

.video-wrapper .audio-thumbnail {
  display: block;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.video-wrapper audio {
  display: block;
  width: 100%;
  min-width: 280px;
  outline: none;
}

.video-title {
  margin: 12px 0 10px;
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--fg);
  word-break: break-word;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  margin: 0 0 1.5rem;
}

.sp-note {
  font-size: 14px;
  color: var(--muted);
}

.btn-download-large {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(135deg, var(--green) 0%, #00b578 100%);

  border: none;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 210, 148, 0.2);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-download-large:hover {
  box-shadow: 0 6px 20px rgba(0, 210, 148, 0.35);
  transform: translateY(-1px);
}

.btn-download-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-download-secondary:hover {
  background: var(--border);
  transform: translateY(-1px);
}

.nav-badge a {
  color: inherit;
  text-decoration: none;
}

.nav-badge a:hover {
  text-decoration: underline;
}

.ig-description {
  max-height: 280px;
  overflow-y: auto;
  padding: 18px 22px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.7;
  word-break: break-word;
}
.video-comments h3 {
  font-size: 16px;
  color: var(--fg);
  margin-bottom: 12px;
}
.video-comments {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment-card {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
  word-break: break-word;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.comment-card:hover {
  border-color: rgba(48, 128, 255, 0.35);
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-1px);
}
.comment-card strong {
  color: var(--blue-light);
  font-weight: 700;
}

.share-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
@media (max-width: 640px) {
  .share-actions-carousel {
    flex-wrap: wrap;
  }
  .share-actions-carousel .btn-dl-all {
    flex: 1;
    order: 1;
  }
  .share-actions-carousel .btn-share {
    order: 2;
  }
  .share-actions-carousel .btn-delete {
    order: 3;
  }
  .share-actions-carousel .btn-dl-active {
    width: 100%;
    order: 4;
    justify-content: center;
  }
}
.share-actions .btn-share,
.share-actions .btn-delete {
  width: 48px;
  height: 48px;
  font-size: 18px;
  border-radius: 14px;
}

/* ---------- Responsive ---------- */

@media (max-width: 620px) {
  .dl-card {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  .dl-icon { width: 44px; height: 44px; }
  .dl-thumb { width: 72px; height: 46px; }
  .dl-actions { grid-column: 2; flex-wrap: nowrap; }
  .btn-download { flex: 1; width: auto; text-align: center; }
  /* "Tempel" tetap sebaris dengan input: aksi sekunder tidak boleh
     selebar dan di atas aksi primer. */
  .btn-secondary { padding: 14px 14px; font-size: 14px; }
  .btn-primary { width: 100%; }
  .hero { padding-top: 44px; }

  /* Header satu baris: badge redundan dengan eyebrow hero. */
  .nav-badge { display: none; }
  .brand-text { font-size: 15px; white-space: nowrap; }

  /* 4+4, bukan 6+2 dengan baris yatim. */
  .platform-badges {
    display: grid;
    grid-template-columns: repeat(4, 42px);
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Prose ---------- */
.prose {
  color: var(--muted);
  line-height: 1.6;
  margin-top: 40px;
}

.prose h1, .prose h2, .prose h3 {
  color: var(--fg);
  margin-bottom: 24px;
}

.prose p {
  margin-bottom: 16px;
}

.prose strong {
  color: var(--fg);
  font-weight: 600;
}

.prose a {
  color: var(--blue-light);
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.prose ol, .prose ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.prose dl {
  margin-bottom: 16px;
}

.prose dt {
  color: var(--fg);
  font-weight: 600;
  margin-top: 16px;
}

.prose dd {
  margin-left: 0;
  margin-bottom: 16px;
}

.prose-back {
  margin-top: 32px;
}

.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

.noscript-note {
  background-color: rgba(251, 44, 54, 0.12);
  color: #fb2c36;
  border: 1px solid rgba(251, 44, 54, 0.35);
  padding: 16px;
  margin: 20px auto;
  border-radius: 12px;
  text-align: center;
  max-width: 600px;
  font-size: 14.5px;
}

/* ============================================================
   Single Page Design System (Blog, Guides, Legal, Supported Sites)
   Standard: Werkudara Network modern dark aesthetic (Anti-Slop)
   ============================================================ */

.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ---------- Breadcrumb ---------- */
.article-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 20px;
}

.article-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.article-breadcrumb a:hover {
  color: var(--blue-light);
}

.article-breadcrumb .sep {
  opacity: 0.5;
  user-select: none;
}

.article-breadcrumb .current {
  color: var(--fg);
  font-weight: 500;
}

/* ---------- Badges ---------- */
.article-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 210, 148, 0.12);
  color: var(--green);
  border: 1px solid rgba(0, 210, 148, 0.25);
  margin-bottom: 14px;
}

.article-badge.blue {
  background: rgba(84, 162, 255, 0.12);
  color: var(--blue-light);
  border-color: rgba(84, 162, 255, 0.25);
}

/* ---------- Article Header & Meta ---------- */
.article-header {
  margin-bottom: 24px;
}

.article-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0 0 14px;
  font-weight: 800;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Hero Banner ---------- */
.article-hero {
  position: relative;
  width: 100%;
  margin: 0 0 32px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- Prose & Typography Elements ---------- */
.prose-lead {
  font-size: 1.15rem !important;
  line-height: 1.7 !important;
  color: #f1f5f9 !important;
  margin-bottom: 28px !important;
}

.callout-tip {
  background: rgba(0, 210, 148, 0.08);
  border-left: 4px solid var(--green);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 28px 0;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.6;
}

.callout-tip strong {
  color: var(--green);
}

.callout-warning {
  background: rgba(251, 44, 54, 0.08);
  border-left: 4px solid var(--red);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 28px 0;
  color: #fecdd3;
  font-size: 15px;
  line-height: 1.6;
}

.callout-warning strong {
  color: #fb7185;
}

/* ---------- Share Bar ---------- */
.article-share {
  margin: 44px 0 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.article-share-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--fg);
  transition: all 0.15s ease;
  user-select: none;
}

.share-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: #fff;
}

.share-btn:active {
  transform: scale(0.97);
}

.share-tooltip {
  position: absolute;
  top: -36px;
  left: 0;
  background: var(--green);
  color: #05070d;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-tooltip.active {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Bottom CTA Card ---------- */
.article-cta {
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.95), rgba(14, 24, 42, 0.95));
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 28px 24px;
  margin: 36px 0 20px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.article-cta h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
}

.article-cta p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 20px;
}

.article-cta .btn-primary {
  display: inline-block;
  text-decoration: none;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}

/* ---------- Legal Document Components ---------- */
.legal-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0 32px;
}

.legal-summary-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-light);
  margin-bottom: 6px;
}

.legal-summary-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg);
  margin: 0;
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.legal-section-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  background: rgba(0, 210, 148, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}

.legal-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.legal-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.legal-faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
}

.legal-faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.legal-faq-card dt {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
}

.legal-faq-card dd {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ---------- Supported Platforms Grid ---------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
  margin: 32px 0 40px;
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.platform-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.platform-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.platform-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: auto;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(84, 162, 255, 0.1);
  color: var(--blue-light);
  border: 1px solid rgba(84, 162, 255, 0.22);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.3;
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* Platform badge theme tints */
.platform-badge-youtube {
  background: rgba(255, 68, 68, 0.1);
  color: #ff6b6b;
  border-color: rgba(255, 68, 68, 0.25);
}

.platform-badge-tiktok {
  background: rgba(105, 201, 208, 0.1);
  color: #69c9d0;
  border-color: rgba(105, 201, 208, 0.25);
}

.platform-badge-instagram {
  background: rgba(244, 114, 182, 0.1);
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.25);
}

.platform-badge-facebook {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.25);
}

.platform-badge-x,
.platform-badge-twitter {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.18);
}

.platform-badge-pinterest {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.25);
}

.platform-badge-reddit {
  background: rgba(251, 146, 60, 0.1);
  color: #fb923c;
  border-color: rgba(251, 146, 60, 0.25);
}

.platform-badge-threads {
  background: rgba(192, 132, 252, 0.1);
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.25);
}

.platform-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platform-features li {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.platform-features li::before {
  content: "✓";
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  flex-shrink: 0;
}

.platform-note {
  font-size: 12.5px;
  color: #718096;
  margin-top: auto;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  line-height: 1.55;
}

.platform-card-footer {
  margin-top: 14px;
  padding-top: 10px;
}

.platform-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-light);
  text-decoration: none;
  transition: gap 0.15s ease, color 0.15s ease;
}

.platform-card-link:hover {
  color: #fff;
  gap: 10px;
}

/* ---------- Blog Grid (Index) ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.blog-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-thumb img {
  transform: scale(1.03);
}

.blog-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.blog-card-h2 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin: 0 0 10px;
  transition: color 0.15s ease;
}

.blog-card:hover .blog-card-h2 {
  color: var(--green);
}

.blog-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

/* ---------- Guide Steps Specifics ---------- */
.guide-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.guide-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.guide-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 210, 148, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 210, 148, 0.3);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.guide-step h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.guide-step p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 12px;
}

.guide-step p:last-child {
  margin-bottom: 0;
}

/* --- Updates untuk Daftar Unduhan & Telegram CTA --- */

.section-head { display: flex; justify-content: space-between; align-items: center; }
.section-head-left { display: flex; align-items: center; gap: 12px; }
.section-head-right { display: flex; align-items: center; }
.btn-icon-only { background: transparent; border: none; color: var(--fg); cursor: pointer; padding: 6px; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: color 0.2s, background 0.2s; border-radius: 50%; }
.btn-icon-only:hover { color: var(--blue-light); background: rgba(255,255,255,0.05); }
.btn-icon-only.is-active { color: var(--blue-light); background: rgba(255,255,255,0.1); }

.search-bar-slide {
  width: 100%;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-top: 0;
}
.search-bar-slide.is-active {
  max-height: 60px; /* enough for input */
  opacity: 1;
  margin-top: 12px;
  margin-bottom: 12px;
}
.search-input-full {
  width: 100%;
  padding: 10px 16px;
  border-radius: 99px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search-input-full:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}

.expand-container { text-align: center; margin-top: 16px; }
.btn-expand { 
  width: 100%; border-radius: 12px; padding: 12px; font-size: 14px; 
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: var(--fg); cursor: pointer; transition: background 0.2s;
}
.btn-expand:hover { background: rgba(255,255,255,0.1); }
.is-hidden { display: none !important; }

.cta-telegram-card {
  display: flex; align-items: center; justify-content: center; text-align: center;
  margin-top: 24px; padding: 32px 24px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.8), rgba(4, 8, 16, 0.9));
  border: 1px solid rgba(48, 128, 255, 0.15);
  overflow: hidden; position: relative;
}
.cta-content { z-index: 2; width: 100%; max-width: 80%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cta-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: #fff; }
.cta-desc { font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }
.btn-telegram { background: #3080ff; color: #fff; padding: 10px 24px; border-radius: 99px; font-weight: 500; font-size: 14px; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; margin: 0 auto; transition: background 0.2s ease, transform 0.2s ease; }
.btn-telegram:hover { background: #266bda; transform: translateY(-1px); }
.cta-visual { position: absolute; right: -20px; bottom: -30px; z-index: 1; opacity: 0.12; color: #3080ff; pointer-events: none; }
.icon-telegram-large { width: 140px; height: 140px; }
@media (max-width: 600px) {
  .cta-content { max-width: 100%; }
}

/* Frontend Slides (Carousel) */
.slide-wrapper {
  position: relative;
}

.slide-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  max-height: 800px;
  background: var(--bg);
  border-radius: var(--radius);
  cursor: grab;
}

.slide-container.is-dragging {
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  cursor: grabbing !important;
}

.slide-container.is-dragging .slide {
  pointer-events: none;
}
.slide-container::-webkit-scrollbar {
  display: none;
}
.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.slide img, .slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.slide-nav {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 16px;
  border-radius: 99px;
  backdrop-filter: blur(8px);
  z-index: 10;
}
.slide-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}
.slide-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.slide-btn .icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.slide-indicator {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 48px;
  text-align: center;
}
