/* code made by kasan | dibuat oleh: kasanvx
   Halaman /download (v2). Memakai token warna dari kx.css sehingga tema terang/gelap ikut otomatis.
   Semua class diawali dl- agar tidak bentrok dengan halaman lain. */

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 200; padding: 10px 16px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.dl { width: min(1040px, 100% - 32px); margin: 0 auto; padding: 40px 0 72px; }

/* ---------- hero ---------- */
.dl-hero { max-width: 760px; }
.dl-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px; background: var(--cyan-soft); color: var(--cyan); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dl-h1 { font-size: clamp(2.1rem, 6vw, 3.5rem); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 14px; }
.dl-h1 span { color: var(--cyan); }
.dl-lead { margin: 0 0 24px; color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.12rem); max-width: 36em; }

.dl-panel { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 24px; background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.dl-search { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 0 8px 0 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass-2); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.dl-search:hover { border-color: var(--line-2); }
.dl-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.dl-search-ico { display: grid; place-items: center; color: var(--faint); flex: none; }
.dl-search-ico svg { width: 20px; height: 20px; }
.dl-search input { flex: 1; min-width: 0; height: 56px; border: 0; background: none; outline: none; font-size: 16px; /* 16px mencegah zoom otomatis di iOS */ }
.dl-search input::placeholder { color: var(--faint); }
.dl-icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); flex: none; }
.dl-icon-btn:hover { background: var(--glass-3); color: var(--text); }
.dl-icon-btn svg { width: 18px; height: 18px; }
.dl-paste { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: .92rem; flex: none; }
.dl-paste:hover { background: var(--glass-3); color: var(--text); }
.dl-paste svg { width: 18px; height: 18px; }
.dl-submit { min-height: 56px; width: 100%; font-size: 1.02rem; }
@media (min-width: 640px) {
  .dl-panel { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .dl-submit { width: auto; padding-inline: 30px; }
}

.dl-hint { margin: 12px 4px 0; font-size: .92rem; color: var(--muted); min-height: 1.4em; }
.dl-hint .ok { color: var(--ok); font-weight: 650; }
.dl-cap { margin-top: 14px; max-width: 420px; }
.dl-cap .field { margin: 0; }
.dl-status { display: flex; align-items: center; gap: 10px; min-height: 1.6em; margin: 10px 4px 0; color: var(--muted); font-size: .95rem; }
.dl-status:empty { display: none; }

.dl-error { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--bad); border-radius: 16px; background: var(--bad-soft); font-size: .95rem; }
.dl-error:focus { outline: none; }
.dl-error p { margin: 0 0 10px; }
.dl-error-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-error a { color: var(--text); font-weight: 700; }

.dl-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.dl-tags li { padding: 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--muted); font-size: .86rem; font-weight: 600; }

/* ---------- sections ---------- */
.dl-section { margin-top: 56px; }
.dl-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.dl-sec-head h2 { font-size: clamp(1.4rem, 3.2vw, 1.8rem); margin: 0; }
.dl-eyebrow { margin: 0 0 6px; font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.dl-sub { margin: -4px 0 14px; color: var(--muted); font-size: .95rem; }
.dl-link { color: var(--cyan); font-weight: 650; text-decoration: none; white-space: nowrap; }
.dl-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* riwayat */
.dl-hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .dl-hist { grid-template-columns: 1fr 1fr; } }
.dl-hist li { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); min-width: 0; }
.dl-hist-txt { flex: 1; min-width: 0; }
.dl-hist-txt b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-hist-txt small { display: block; color: var(--faint); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-hist .btn { flex: none; }

/* platform */
.dl-marq { overflow: hidden; margin-top: 10px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.dl-track { display: flex; gap: 10px; width: max-content; padding: 4px 0; animation: dl-scroll 60s linear infinite; }
.dl-track.rev { animation-direction: reverse; }
.dl-marq:hover .dl-track { animation-play-state: paused; }
@keyframes dl-scroll { to { transform: translateX(-50%); } }
.dl-chip { display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); color: var(--text); font-size: .92rem; white-space: nowrap; }
.dl-chip:hover { border-color: var(--cyan); }
.dl-count { margin: 12px 0 0; color: var(--faint); font-size: .9rem; }
.dl-count b { color: var(--text); }

/* logo tile (dipakai logos.js) */
.dl-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 700; overflow: hidden; flex: none; }
.dl-logo svg { width: 66%; height: 66%; }

/* langkah */
.dl-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .dl-steps { grid-template-columns: repeat(3, 1fr); } }
.dl-step { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--glass); }
.dl-step h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.dl-step p { margin: 0; color: var(--muted); font-size: .94rem; }
.dl-step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-family: var(--f-display); font-weight: 800; }

.dl-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 48px; padding: 16px 18px; border-radius: 18px; background: var(--cyan-soft); color: var(--muted); font-size: .92rem; }
.dl-note svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--cyan); }
.dl-note p { margin: 0; }

.dl-legal { margin: 36px 0 0; text-align: center; color: var(--faint); font-size: .9rem; }
.dl-legal a { color: var(--muted); }
.dl-stats { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: .92rem; }
.dl-stats b { color: var(--text); }

/* ---------- hasil ---------- */
#viewResult { padding-top: 4px; }
.dl-res-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.dl-back { color: var(--muted); font-weight: 650; text-decoration: none; padding: 8px 0; }
.dl-back:hover { color: var(--text); }

.dl-result { display: grid; gap: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 26px; background: var(--glass); box-shadow: var(--shadow); }
@media (min-width: 820px) { .dl-result { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; padding: 22px; } }

.dl-media { border-radius: 18px; overflow: hidden; background: var(--glass-2); display: grid; place-items: center; min-height: 160px; }
.dl-media video, .dl-media img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; display: block; background: #000; }
.dl-media img.dl-cover { background: none; }
.dl-cover-wrap { width: 100%; display: grid; }
.dl-media audio { width: 100%; margin: 24px 0; }
.dl-media .dl-logo { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0; font-size: 3rem; }
.dl-media .dl-logo svg { width: 30%; height: 30%; }
.dl-media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; width: 100%; padding: 4px; }
.dl-media-grid img { aspect-ratio: 1; height: 100%; max-height: none; border-radius: 10px; background: var(--glass-3); }

.dl-info { min-width: 0; }
.dl-info h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.dl-info h2:focus { outline: none; }
.dl-author { margin: 6px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }

.dl-quick { display: grid; gap: 8px; }
.dl-quick-btn { width: 100%; min-height: 58px; font-size: 1.05rem; }
.dl-quick-sub { margin: 0; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-res-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.dl-alert { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); font-size: .94rem; }
.dl-alert p { margin: 0; }
.dl-expiry { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 16px 0 0; color: var(--faint); font-size: .88rem; }
.dl-link-btn { color: var(--cyan); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; padding: 0; }

.dl-formats { margin-top: 40px; }
.dl-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dl-tab { padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); color: var(--muted); font-weight: 650; font-size: .9rem; }
.dl-tab[aria-pressed="true"] { background: var(--cyan-soft); color: var(--cyan); border-color: var(--cyan); }
.dl-bulk { margin-bottom: 12px; }
.dl-bulk-note { margin: 8px 2px 0; color: var(--faint); font-size: .86rem; }
.dl-list { display: grid; gap: 10px; }
.dl-group { margin: 14px 0 2px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.dl-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); }
.dl-row-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--cyan-soft); color: var(--cyan); flex: none; }
.dl-row-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl-row-txt { min-width: 0; flex: 1 1 200px; }
.dl-row-txt b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.dl-row-txt small { display: block; color: var(--faint); font-size: .84rem; }
.dl-row-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-empty { margin: 14px 0; color: var(--muted); }
.dl-report { margin: 26px 0 0; color: var(--muted); font-size: .94rem; }
.dl-report a { color: var(--cyan); font-weight: 700; }

/* ---------- gerak & kontras ---------- */
@media (prefers-reduced-motion: reduce) {
  .dl-track { animation: none; }
  .dl-search, .dl-tab, .btn { transition: none; }
}
@media (max-width: 479px) {
  .dl { padding-top: 28px; }
  .dl-row-acts { width: 100%; }
  .dl-row-acts .btn { flex: 1 1 auto; }
  .dl-res-actions .btn { flex: 1 1 auto; }
}
