/* ============================================================
   NETPLIX (blog) - tampilan halaman utama, baca artikel, admin
   ============================================================ */
:root {
  --bg: #0b0d12;
  --panel: #141821;
  --panel-2: #1b2030;
  --ink: #ffffff;
  --ink-2: #e6e9f0;
  --muted: #a9b0bf;
  --dim: #7b8294;
  --gold: #f5b301;
  --gold-press: #d99c00;
  --field: #10141c;
  --line: #222838;
  --red: #ff8a8a;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-logo: "Montserrat", "Inter", system-ui, -apple-system, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.ic {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.app { max-width: 720px; margin: 0 auto; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--line);
}
.top-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 10px 20px;
}
.logo {
  font-family: var(--font-logo); font-weight: 800;
  font-size: 26px; letter-spacing: .5px; line-height: 1;
}
.logo-a { color: var(--ink); }
.logo-b { color: var(--gold); }
.top-icons { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:active { background: var(--panel); }
.icon-btn .ic { width: 26px; height: 26px; }

.search-form { padding: 0 20px 12px; }
.search-form input {
  width: 100%; height: 46px; padding: 0 16px;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 16px;
}
.search-form input::placeholder { color: var(--dim); }

/* ---------- Banner artikel ---------- */
.hero {
  position: relative; overflow: hidden;
  height: clamp(340px, 110vw, 460px);
  background: var(--panel);
}
.hero-track { display: flex; height: 100%; transition: transform .55s ease; }
.slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; }
.slide-link { display: block; position: relative; height: 100%; }
.slide-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
}
.slide-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(11,13,18,.82) 38%, rgba(11,13,18,.2) 100%),
    linear-gradient(90deg, rgba(11,13,18,.55) 0, rgba(11,13,18,0) 70%);
}
.slide-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 20px 56px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.slide-title {
  font-size: clamp(22px, 6.4vw, 30px);
  font-weight: 700; line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.slide-excerpt {
  font-size: 14px; color: #d6dae3; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cfd4de; flex-wrap: wrap; }
.meta .ic { width: 16px; height: 16px; color: var(--muted); }
.meta .sep { color: var(--dim); }

.btn-read {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px; margin-top: 4px;
  border: 1px solid var(--gold); border-radius: 999px;
  color: var(--gold); font-size: 14px; font-weight: 600;
  background: rgba(11,13,18,.35);
}
.btn-read .ic { width: 18px; height: 18px; }
.slide-link:active .btn-read { background: var(--gold); color: #0b0d12; }

.tag {
  display: inline-block; align-self: flex-start;
  font-size: 12px; font-weight: 600; line-height: 1;
  padding: 6px 10px; border-radius: 6px;
  background: var(--gold); color: #fff;
}

.hero-arrow {
  position: absolute; top: 42%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.25); color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.hero-arrow .ic { width: 26px; height: 26px; }
.hero-arrow.prev { left: 6px; }
.hero-arrow.next { right: 6px; }
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 3;
  display: flex; justify-content: center; gap: 8px;
}
.hero-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.4); position: relative;
}
.hero-dots button::before { content: ""; position: absolute; inset: -12px -6px; }
.hero-dots button.on { width: 22px; border-radius: 4px; background: var(--gold); }

/* ---------- Ikon kategori ---------- */
.block { padding: 0 20px; }
.cat-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr);
  gap: 10px; overflow-x: auto; scrollbar-width: none;
  margin-top: 18px; padding-bottom: 2px;
}
.cat-grid::-webkit-scrollbar { display: none; }
.cat-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 92px; padding: 14px 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink-2); font-size: 13px; font-weight: 500;
}
.cat-box .ic { width: 30px; height: 30px; color: var(--gold); }
.cat-box.on { border-color: var(--gold); background: var(--panel-2); }

/* ---------- Daftar artikel ---------- */
.section-title {
  font-size: 20px; font-weight: 700; line-height: 1.2;
  border-left: 4px solid var(--gold); padding-left: 12px;
  margin: 26px 0 14px;
  overflow-wrap: anywhere;
}
.post-list { display: grid; gap: 12px; }
.post {
  display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 14px;
  padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.post:active { background: var(--panel-2); }
.post-thumb { width: 120px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.post-body .tag { font-size: 11px; padding: 4px 8px; }
.post-title {
  font-size: 15px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.post-excerpt {
  font-size: 13px; color: var(--muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta { display: flex; gap: 6px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }
.post-meta .sep { color: var(--dim); }
.chev { color: var(--muted); display: flex; }
.chev .ic { width: 20px; height: 20px; }

.msg { padding: 40px 24px; text-align: center; color: var(--muted); }
.msg.err { color: var(--red); }

/* ---------- Menu burger (drawer) ---------- */
.drawer-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); }
.drawer {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 50;
  width: min(300px, 84vw);
  background: #10141c; border-left: 1px solid var(--line);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 24px;
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 18px; font-weight: 700; margin-bottom: 8px; padding-left: 4px;
}
.drawer-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.drawer-item {
  width: 100%; text-align: left; padding: 14px 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-2); font-size: 15px;
}
.drawer-item:active { background: var(--panel-2); }
.drawer-item.on { background: var(--panel-2); color: var(--gold); font-weight: 600; }

/* ---------- Halaman baca artikel ---------- */
.post-page { padding: 0 20px; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; padding: 8px 4px; color: var(--muted); font-size: 14px;
}
.back .ic { width: 20px; height: 20px; }
.post-cover {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 14px; margin: 14px 0 18px; border: 1px solid var(--line);
}
#post .tag { margin-bottom: 12px; }
h1.post-title { font-size: clamp(22px, 6vw, 28px); font-weight: 700; line-height: 1.25; margin-bottom: 10px; -webkit-line-clamp: unset; display: block; }
#meta.post-meta { font-size: 13px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.post-body p { font-size: 16px; line-height: 1.75; color: var(--ink-2); margin-bottom: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 8px 0 24px; height: 46px; padding: 0 20px;
  border-radius: 999px; background: var(--gold); color: #0b0d12;
  font-size: 15px; font-weight: 700;
}
.btn-link .ic { width: 18px; height: 18px; }

/* ============================================================
   ADMIN
   ============================================================ */
body.admin { background: var(--bg); }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 20px 48px; }
.a-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 0 14px;
  border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.a-head .logo { font-size: 26px; }
.a-head .right { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.a-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.a-sub { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.a-block { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }

.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="url"], .field select, .field textarea {
  width: 100%; height: 50px; padding: 0 14px;
  background: var(--field); color: var(--ink);
  border: 1px solid #2c3445; border-radius: 10px;
  font: inherit; font-size: 16px;
}
.field textarea { height: auto; min-height: 180px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.field select { appearance: auto; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(245,179,1,.2);
}

.kat-form { display: flex; gap: 10px; }
.kat-form input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  background: var(--field); color: var(--ink);
  border: 1px solid #2c3445; border-radius: 10px; font: inherit; font-size: 16px;
}
.kat-form input:focus { border-color: var(--gold); outline: none; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; border: 0; border-radius: 10px;
  background: var(--gold); color: #0b0d12; font-size: 16px; font-weight: 700;
}
.btn:active { background: var(--gold-press); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid #333c4f; color: var(--ink); font-weight: 600; }
.btn.small { width: auto; height: 46px; padding: 0 18px; flex: none; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; min-height: 40px; }

.picker { display: flex; gap: 14px; align-items: center; }
.picker .btn { flex: 1; }
.preview {
  flex: none; width: 76px; aspect-ratio: 4 / 3; border-radius: 8px;
  background: var(--field); border: 1px dashed #3a4256; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 11px; text-align: center;
}
.preview img { width: 100%; height: 100%; object-fit: cover; }

.status { min-height: 22px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.status.ok { color: #6be08a; }
.status.err { color: var(--red); }

.list { display: grid; gap: 10px; margin-top: 12px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; }
.item img { width: 60px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; flex: none; background: #222; }
.item .txt { flex: 1; min-width: 0; }
.item .t { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .u { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .del { flex: none; min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid #4a1a1a; background: transparent; color: var(--red); font-size: 14px; }

/* Gambar review dihapus: tidak dipakai di versi blog ini */
.review-preview { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-track, .drawer { transition: none; }
}
