:root {
  color-scheme: dark;
  --bg: #10101c;
  --surface: #19192a;
  --surface-2: #202039;
  --ink: #f4f2ff;
  --muted: #b4b1ca;
  --line: rgba(211, 204, 255, .14);
  --violet: #7652e8;
  --violet-light: #9878ff;
  --cyan: #55c6d9;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background: radial-gradient(ellipse at 50% 0%, #29204e 0, var(--bg) 48rem);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--cyan); outline-offset: 3px;
}
.page { width: min(900px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  min-height: 76px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-icon {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(145deg, var(--violet-light), #5735c9);
  color: white; font-size: 21px; font-weight: 800;
}
.brand-copy strong { display: block; font-size: 13px; letter-spacing: .7px; }
.brand-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: 2px; }
.server-status {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  border-radius: 30px; padding: 8px 11px; color: var(--muted); font-size: 11px;
}
.server-status i { width: 7px; height: 7px; border-radius: 50%; background: #e4b85c; }
.server-status.online { color: #a8e7c0; border-color: rgba(94, 203, 139, .3); }
.server-status.online i { background: #5ecb8b; }
.server-status.offline { color: #ffaaa5; border-color: rgba(255, 120, 112, .3); }
.server-status.offline i { background: #ff7870; }
.hero {
  margin-top: 26px; overflow: hidden; border: 1px solid rgba(211,204,255,.2);
  border-radius: 20px; background: linear-gradient(125deg, #5140c9 0%, #7134d5 55%, #a52bd1 100%);
  box-shadow: 0 18px 45px rgba(0,0,0,.2);
}
.hero-content { width: min(650px, 100%); margin: 0 auto; padding: 48px 28px 30px; text-align: center; }
.eyebrow { margin: 0 0 10px; color: #e4dcff; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
h1 { margin: 0; color: white; font-size: clamp(27px, 5vw, 37px); letter-spacing: -.9px; }
.subtitle { margin: 12px 0 25px; color: #f0eaff; font-size: 14px; line-height: 1.55; }
.url-field {
  display: flex; align-items: stretch; gap: 6px; padding: 6px; border-radius: 11px;
  background: #fff; box-shadow: 0 5px 18px rgba(31,15,81,.16);
}
.url-field input {
  min-width: 0; flex: 1; height: 43px; border: 0; outline: 0; padding: 0 10px;
  background: transparent; color: #26233a; font-size: 13px;
}
.url-field input::placeholder { color: #9995aa; }
.paste-button {
  flex: 0 0 auto; border: 0; border-radius: 7px; padding: 0 12px;
  background: #eeeaff; color: #593bb8; font-size: 12px; font-weight: 700;
}
.form-actions { display: flex; justify-content: center; gap: 9px; margin-top: 12px; }
.button { min-height: 43px; padding: 0 19px; border: 1px solid rgba(255,255,255,.45); border-radius: 9px; font-size: 12px; font-weight: 750; }
.button-light { background: rgba(255,255,255,.14); color: white; }
.button-primary { background: #241a55; border-color: #241a55; color: white; }
button:disabled { opacity: .55; cursor: wait; }
.result {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 17px; padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 9px; background: rgba(29,17,75,.24);
  color: #f5efff; text-align: left; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere;
}
.result-mark {
  flex: 0 0 18px; width: 18px; height: 18px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.2); font-size: 11px; font-weight: 800;
}
.result.error { background: rgba(91,24,41,.4); border-color: rgba(255,180,180,.35); }
.result.success { background: rgba(19,75,56,.35); border-color: rgba(160,255,202,.3); }
.download-section, .platform-section, .how-section { padding: 30px 2px 0; }
.section-heading { margin-bottom: 15px; }
.section-heading h2, .how-section h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.25px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.download-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.option-card {
  display: flex; flex-direction: column; align-items: flex-start; min-height: 190px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.option-icon {
  width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px;
  background: rgba(130,99,235,.18); color: #c5b6ff; font-size: 18px; font-weight: 800;
}
.option-copy { flex: 1; }
.option-copy h3 { margin: 12px 0 5px; font-size: 14px; }
.option-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.option-button {
  width: 100%; min-height: 35px; margin-top: 13px; border: 1px solid rgba(151,122,255,.45);
  border-radius: 8px; background: rgba(118,82,232,.15); color: #d9ceff; font-size: 11px; font-weight: 750;
}
.download-note { margin: 11px 2px 0; color: #a7a3ba; font-size: 10px; line-height: 1.55; }
.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.platform-item {
  display: flex; align-items: center; gap: 10px; padding: 13px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 12px; font-weight: 650;
}
.platform-symbol { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); font-size: 18px; }
.tiktok { color: #77e7e0; }.instagram { color: #e8a4ca; }.facebook { color: #83b8ff; }.youtube { color: #ff8c88; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 15px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.steps li > span {
  flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(118,82,232,.25); color: #d6caff; font-size: 11px; font-weight: 800;
}
.steps strong { font-size: 11px; }.steps p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
footer { margin: 32px 0 0; padding: 21px 0 28px; border-top: 1px solid var(--line); text-align: center; }
footer strong { font-size: 11px; letter-spacing: 1px; }
footer p { margin: 8px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
footer small { color: #77738e; font-size: 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 650px) {
  .page { width: min(100% - 24px, 560px); }
  .topbar { min-height: 66px; }
  .hero { margin-top: 17px; border-radius: 16px; }
  .hero-content { padding: 35px 15px 20px; }
  .download-options { grid-template-columns: 1fr; }
  .option-card { min-height: auto; display: grid; grid-template-columns: 36px 1fr; gap: 0 11px; align-items: center; }
  .option-icon { grid-row: span 2; }
  .option-copy h3 { margin-top: 0; }
  .option-button { grid-column: 2; margin-top: 10px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .brand-copy strong { font-size: 11px; }
  .server-status { padding: 7px 8px; font-size: 10px; }
  .url-field { flex-wrap: wrap; }
  .url-field input { flex-basis: 100%; }
  .paste-button { min-height: 35px; margin-left: auto; }
  .form-actions .button { flex: 1; padding: 0 10px; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Navigasi dan halaman informasi v0.5 */
.site-nav { display:flex; flex-wrap:wrap; justify-content:center; gap:7px; padding:12px 0; border-bottom:1px solid var(--line); }
.site-nav a, .footer-links a, .info-links a, .back-home {
  color:#d8ceff; text-decoration:none; font-size:11px; font-weight:650;
}
.site-nav a { padding:8px 10px; border:1px solid var(--line); border-radius:20px; background:rgba(255,255,255,.035); }
.site-nav a:hover, .footer-links a:hover, .info-links a:hover, .back-home:hover { color:white; text-decoration:underline; }
.document-page { max-width:760px; margin:28px auto 0; padding:28px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.document-page h1 { color:var(--ink); font-size:clamp(26px,4vw,34px); margin:0 0 18px; }
.document-page h2 { margin:25px 0 9px; font-size:17px; }
.document-page p, .document-page li { color:#d0cde0; font-size:13px; line-height:1.8; }
.document-page li { margin:5px 0; }
.document-page a { color:#c5b6ff; }
.document-page .eyebrow { color:var(--violet-light); }
.back-home { padding:9px 12px; border:1px solid var(--line); border-radius:20px; }
.footer-links { display:flex; flex-wrap:wrap; justify-content:center; gap:14px; margin:12px 0; }
.info-links { display:flex; flex-wrap:wrap; gap:9px; }
.info-links a { padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:var(--surface); }
.notice { padding:14px; border:1px solid rgba(228,184,92,.35); border-radius:12px; background:rgba(228,184,92,.08); }
.notice p { margin-bottom:0; }
@media (max-width:650px) {
  .site-nav { justify-content:flex-start; gap:6px; }
  .site-nav a { font-size:10px; padding:7px 9px; }
  .document-page { margin-top:18px; padding:20px 16px; }
}


/* NIWAN TUTORIAL V1 */
.tutorial-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(5, 4, 15, .82);
  backdrop-filter: blur(7px);
}
.tutorial-overlay[hidden] { display: none; }
.tutorial-panel {
  width: min(620px, 100%); max-height: min(90vh, 760px);
  overflow-y: auto; padding: 25px;
  border: 1px solid rgba(185, 163, 255, .3);
  border-radius: 19px; background: #19192a;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.tutorial-header { display:flex; justify-content:space-between; gap:15px; align-items:flex-start; }
.tutorial-eyebrow { margin:0 0 7px; color:#a991ff; font-size:10px; font-weight:800; letter-spacing:2px; }
.tutorial-header h2 { margin:0; color:#fff; font-size:clamp(21px,4vw,27px); }
.tutorial-close {
  flex:0 0 34px; width:34px; height:34px; border:1px solid var(--line);
  border-radius:9px; background:var(--surface-2); color:white; font-size:23px;
}
.tutorial-description { margin:12px 0 19px; color:var(--muted); font-size:12px; line-height:1.6; }
.tutorial-steps { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tutorial-step {
  display:flex; gap:11px; padding:13px;
  border:1px solid var(--line); border-radius:12px; background:var(--surface-2);
}
.tutorial-step > span {
  flex:0 0 25px; width:25px; height:25px; display:grid; place-items:center;
  border-radius:50%; background:rgba(118,82,232,.28); color:#d9ceff;
  font-size:11px; font-weight:800;
}
.tutorial-step h3 { margin:2px 0 5px; font-size:12px; }
.tutorial-step p { margin:0; color:var(--muted); font-size:11px; line-height:1.55; }
.tutorial-notice {
  margin-top:13px; padding:13px; border:1px solid rgba(228,184,92,.3);
  border-radius:11px; background:rgba(228,184,92,.07);
}
.tutorial-notice strong { font-size:11px; }
.tutorial-notice p { margin:7px 0 0; color:#d0cde0; font-size:10px; line-height:1.6; }
.tutorial-notice a { color:#c5b6ff; }
.tutorial-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:9px; margin-top:17px; }
.tutorial-actions button { min-height:40px; padding:0 15px; border-radius:9px; font-size:11px; font-weight:750; }
.tutorial-skip { border:1px solid var(--line); background:transparent; color:var(--muted); }
.tutorial-start { border:1px solid #6849d5; background:#6849d5; color:white; }
.tutorial-footnote { margin:12px 0 0; color:#85819b; font-size:9px; text-align:right; }
@media (max-width:520px) {
  .tutorial-overlay { padding:10px; }
  .tutorial-panel { padding:18px 15px; max-height:94vh; }
  .tutorial-steps { grid-template-columns:1fr; }
  .tutorial-actions { flex-direction:column-reverse; }
  .tutorial-actions button { width:100%; }
  .tutorial-footnote { text-align:center; }
}


/* NIWAN SLIDE MENU */
.menu-toggle {
  width: 44px; height: 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.055); color: white;
}
.menu-toggle span {
  display: block; width: 19px; height: 2px;
  border-radius: 3px; background: #eee9ff;
}
.menu-toggle:hover, .menu-close:hover {
  background: rgba(152,120,255,.2);
}
.menu-backdrop {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(4,3,14,.68); opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.menu-backdrop.is-open { opacity: 1; visibility: visible; }
.side-menu {
  position: fixed; z-index: 10001; top: 0; bottom: 0; right: 0;
  width: min(320px, 86vw); padding: 22px 18px;
  overflow-y: auto; background: #19192a;
  border-left: 1px solid rgba(185,163,255,.25);
  box-shadow: -18px 0 50px rgba(0,0,0,.35);
  transform: translateX(105%);
  transition: transform .28s ease;
  pointer-events: none;
}
.side-menu.is-open { transform: translateX(0); pointer-events: auto; }
.side-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 18px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: white; letter-spacing: 1px; font-size: 13px;
}
.menu-close {
  width: 38px; height: 38px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface-2);
  color: white; font-size: 25px; line-height: 1;
}
.side-menu-links { display: flex; flex-direction: column; gap: 7px; }
.side-menu-links a:hover {
  border-color: rgba(152,120,255,.35);
  background: rgba(118,82,232,.18); color: white;
}
@media (prefers-reduced-motion: reduce) {
  .side-menu, .menu-backdrop { transition: none; }
}

.menu-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(185,163,255,.25);
  border-radius: 9px;
  background: rgba(118,82,232,.16);
  color: #c9b8ff;
}
.menu-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-menu-links a {
  display: flex;
  align-items: center;
  gap: 13px;
}

/* Logo platform SVG - revisi tampilan */
.platform-symbol {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-2);
  overflow: hidden;
}
.platform-symbol svg {
  display: block;
  width: 30px;
  height: 30px;
}
.platform-symbol.tiktok { background: #17171d; }
.platform-symbol.instagram { background: #211522; }
.platform-symbol.facebook { background: #10203a; }
.platform-symbol.youtube { background: #32151d; }

@media (max-width: 650px) {
  .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* NIWAN RESPONSIVE FINAL REVISION */

/* Tombol tutup menu menggunakan SVG */
.menu-close {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.menu-close svg {
  display: block;
  width: 22px;
  height: 22px;
}

/* Mencegah konten halaman melebar keluar layar */
.page,
.document-page {
  box-sizing: border-box;
  min-width: 0;
}

.document-page {
  width: min(760px, calc(100% - 32px));
}

/* Menu samping tetap bisa digulir pada layar pendek */
.side-menu {
  box-sizing: border-box;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Tablet dan ponsel */
@media (max-width: 768px) {
  .document-page {
    width: calc(100% - 28px);
  }

  .site-nav {
    flex-wrap: wrap;
  }
}

/* Android dan layar kecil */
@media (max-width: 430px) {
  .page {
    width: calc(100% - 24px);
  }

  .document-page {
    width: calc(100% - 24px);
    padding: 18px 14px;
  }

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

  .platform-item {
    min-width: 0;
    gap: 8px;
    padding: 11px 9px;
  }

  .menu-toggle,
  .menu-close,
  .tutorial-close {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Ponsel sangat kecil */
@media (max-width: 360px) {
  .document-page {
    padding: 16px 12px;
  }

  .platform-item {
    font-size: 11px;
    gap: 6px;
    padding: 10px 7px;
  }
}
