:root {
  --accent: #39d9ff;
  --title: #67c8ff;
  --green: #7cff9b;
  --star: #33d17a;
  --text: #eef8ff;
  --muted: #9cadbe;
  --line: #ffffff18;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

body {
  font-family: system-ui, "Segoe UI", Roboto, -apple-system, sans-serif;
  color: var(--text);
  background: #05070c;
  -webkit-font-smoothing: antialiased;
}

/* ===== Loading screen beranimasi (sebelum ke moneysite) ===== */
.launch-screen {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background:
    radial-gradient(circle at 50% 38%, #16305f 0%, #0a1430 32%, #050912 68%, #03060d 100%);
  animation: launch-fade .3s ease-out both;
}
html.launching .launch-screen { display: flex; }
html.launching body > *:not(.launch-screen) { display: none !important; }

.launch-stage { position: relative; width: 190px; height: 190px; display: grid; place-items: center; }
.launch-icon {
  width: 116px; height: 116px; border-radius: 27px; overflow: hidden;
  box-shadow: 0 12px 40px #000a, 0 0 50px color-mix(in srgb, var(--accent) 45%, transparent);
  animation: launch-bob 2.2s ease-in-out infinite;
  z-index: 2;
}
.launch-icon img { width: 100%; height: 100%; object-fit: cover; }
.launch-ring {
  position: absolute; inset: 6px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent); border-right-color: color-mix(in srgb, var(--accent) 40%, transparent);
  animation: spin 1.5s linear infinite; opacity: .85;
}
.launch-ring-2 { inset: 24px; border-top-color: color-mix(in srgb, var(--accent) 55%, transparent); border-right-color: transparent; border-left-color: color-mix(in srgb, var(--accent) 30%, transparent); animation: spin 2.4s linear infinite reverse; }

.launch-title { font-size: 30px; font-weight: 900; letter-spacing: .02em; color: #eaf3ff; }
.launch-title em { font-style: normal; background: linear-gradient(180deg, #ffe680, #ffb62b 60%, #f59e0b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.launch-status { color: #9fb4cf; font-size: 13px; min-height: 18px; letter-spacing: .02em; }
.launch-bar { width: 190px; height: 5px; border-radius: 99px; background: #16233c; overflow: hidden; }
.launch-bar i {
  display: block; height: 100%; width: 40%; border-radius: inherit;
  background: linear-gradient(90deg, #28aef2, #72e9ff, #b9f227);
  box-shadow: 0 0 12px var(--accent);
  animation: launch-slide 1.15s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes launch-fade { from { opacity: 0; } }
@keyframes launch-bob { 0%,100% { transform: translateY(-5px); } 50% { transform: translateY(6px); } }
@keyframes launch-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }

/* ===== Halaman + glow ===== */
.partner-install-page {
  min-height: 100svh;
  display: grid; place-items: start center;
  padding: 22px 16px 40px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 36%),
    linear-gradient(155deg, #070a10, #0b1119 52%, #05070c);
}
.partner-install-glow {
  position: absolute; top: -250px; left: 50%; transform: translateX(-50%);
  width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  box-shadow: 0 0 110px color-mix(in srgb, var(--accent) 22%, transparent);
  pointer-events: none;
}

/* ===== Kartu store ===== */
.store-card {
  position: relative; z-index: 1;
  width: min(100%, 460px);
  background: linear-gradient(155deg, #111a25f2, #090d14fa);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 28px 90px #0009, 0 0 38px color-mix(in srgb, var(--accent) 9%, transparent);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.store-fixed { padding: 22px 22px 4px; }

/* Header aplikasi */
.store-app-head { display: flex; gap: 15px; align-items: center; }
.store-logo {
  flex: 0 0 auto; width: 76px; height: 76px; border-radius: 20px; overflow: hidden;
  position: relative; background: #0a0f1e;
  border: 1px solid #ffffff1f;
  box-shadow:
    0 10px 22px #000000a6,
    0 2px 6px #00000080,
    0 0 0 1px #ffffff0d inset,
    0 1px 0 #ffffff26 inset;
}
.store-logo::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, #ffffff2e, transparent 42%);
}
.store-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-title-wrap { min-width: 0; }
.store-title { margin: 0 0 5px; }
.store-title img { height: 26px; width: auto; }
.brand-text {
  font-size: 25px; font-weight: 900; letter-spacing: .01em; color: #eaf3ff;
  font-style: normal; line-height: 1;
  text-shadow: 0 1px 0 #0004;
}
.brand-text em {
  font-style: normal;
  background: linear-gradient(180deg, #ffe680, #ffb62b 60%, #f59e0b);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.store-title-wrap strong { display: block; color: var(--title); font-size: 15px; font-weight: 800; line-height: 1.2; }
.verified { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.verified b { color: var(--green); font-size: 13px; }
.verified i { font-style: normal; }

/* Tombol pill */
.store-actions { display: flex; gap: 12px; margin: 18px 0 4px; justify-content: center; }
.store-actions button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: 99px; cursor: pointer;
  background: #ffffff0a; border: 1px solid color-mix(in srgb, var(--accent) 40%, #2a3a4a);
  color: #d3e6f5; font-size: 13px; font-weight: 700;
}
.store-actions button span { color: var(--accent); font-size: 11px; }
.store-actions button:active { background: #ffffff18; }

/* Statistik */
.store-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  text-align: center; margin: 18px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.store-stats > div { border-right: 1px solid var(--line); }
.store-stats > div:last-child { border-right: 0; }
.store-stats strong { display: block; font-size: 16px; font-weight: 800; }
.store-stats span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }

/* Tombol INSTALASI CEPAT */
.fast-install {
  position: relative; overflow: hidden; width: 100%; min-height: 62px;
  margin: 4px 0 6px; border: 0; cursor: pointer; border-radius: 16px;
  padding: 12px 16px; display: grid; place-items: center;
  background: linear-gradient(180deg, #2f7bf6, #1650d6 92%);
  border: 1px solid color-mix(in srgb, var(--accent) 65%, #1650d6);
  box-shadow: 0 12px 30px #1650d655, 0 0 0 1px #ffffff14 inset, 0 0 26px color-mix(in srgb, var(--accent) 30%, transparent);
}
.fast-install:active { transform: translateY(1px); }
.fast-install strong {
  display: block; font-size: 20px; font-weight: 900; letter-spacing: .02em; line-height: 1.1;
  background: linear-gradient(180deg, #fff2b0, #ffcf3f 60%, #f5a623);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 #0003;
}
.fast-install .fi-default > span { display: block; margin-top: 3px; color: #eaf4ff; font-size: 11px; font-weight: 600; -webkit-text-fill-color: initial; }
.fast-install span { text-align: center; }
.fast-install::before {
  content: ""; position: absolute; top: 0; left: -55%; width: 42%; height: 100%;
  background: linear-gradient(90deg, transparent, #ffffff66, transparent);
  transform: skewX(-20deg); animation: shine 2.6s ease-in-out infinite;
}
@keyframes shine { 0%,26% { left: -55%; } 66%,100% { left: 125%; } }
.fast-install > * { position: relative; z-index: 1; }
/* progress fill saat mengunduh */
.fi-progress {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%; z-index: 0;
  background: linear-gradient(90deg, #6fd0ff55, #b9f22733);
  box-shadow: 0 0 20px #39d9ff55 inset;
  border-right: 2px solid #ffffff66;
  transition: width .12s linear;
}
.fast-install.is-installing { cursor: progress; }
.fast-install.is-installing::before { animation-duration: .85s; }
.fast-install .fi-loading { display: flex; align-items: center; justify-content: center; gap: 11px; }
.fast-install .fi-dl { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.fast-install .fi-loading strong { font-size: 15px; }
.fast-install .fi-count { color: #eaf4ff; font-size: 12px; font-weight: 700; -webkit-text-fill-color: initial; }
.install-loader i {
  display: block; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid #ffffff55; border-top-color: #fff; animation: spin .7s linear infinite;
}

/* ===== Area scroll ===== */
.store-scroll { padding: 6px 22px 20px; }
.store-section { margin-top: 20px; }
.store-section h2 { font-size: 16px; margin: 0 0 12px; font-weight: 800; }

.preview-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.preview-row::-webkit-scrollbar { display: none; }
.preview-poster {
  flex: 0 0 auto; width: 210px; border-radius: 16px; border: 1px solid #ffffff14;
  scroll-snap-align: start; object-fit: cover; background: #05070c;
  box-shadow: 0 10px 26px #0008;
}

/* Peringkat & ulasan */
.device-toggle { display: flex; gap: 10px; margin-bottom: 16px; }
.device-toggle button {
  padding: 9px 18px; border-radius: 99px; cursor: pointer; font-size: 13px; font-weight: 700;
  background: transparent; border: 1px solid #2b3a49; color: var(--muted);
}
.device-toggle button.active { border-color: var(--star); color: var(--star); background: #17e07a12; }

.rating-summary { display: flex; gap: 22px; align-items: center; }
.rating-number { text-align: center; flex: 0 0 auto; }
.rating-number strong { display: block; font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.rating-number .stars { display: block; color: var(--star); font-size: 15px; letter-spacing: 2px; margin: 6px 0 4px; }
.rating-number small { color: var(--muted); font-size: 12px; }
.rating-bars { flex: 1; display: grid; gap: 6px; }
.rating-bars > div { display: flex; align-items: center; gap: 9px; }
.rating-bars span { color: var(--muted); font-size: 11px; width: 8px; }
.rating-bars i { flex: 1; height: 8px; border-radius: 99px; background: #263340; overflow: hidden; }
.rating-bars b { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2ea36a, #33d17a); }

/* Ulasan */
.reviews { margin-top: 22px; display: grid; gap: 18px; }
.reviews article { border-top: 1px solid var(--line); padding-top: 16px; }
.reviews article:first-child { border-top: 0; padding-top: 0; }
.reviews header { display: flex; justify-content: space-between; align-items: baseline; }
.reviews header strong { font-size: 14px; font-weight: 800; }
.reviews header span { color: var(--muted); font-size: 11px; }
.review-stars { color: #ffc93c; font-size: 13px; letter-spacing: 1px; margin: 5px 0 7px; }
.reviews p { margin: 0 0 8px; color: #c9d7e6; font-size: 13px; line-height: 1.55; }
.reviews small { color: var(--title); font-size: 11px; }

/* ===== Popup panduan ===== */
.install-help {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px;
  background: #04070cd9; backdrop-filter: blur(7px);
}
.install-help-card {
  position: relative; width: min(360px, 100%); padding: 26px 22px 22px; text-align: center;
  background: linear-gradient(180deg, #141d2b, #0c1218);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, #2c3a4d); border-radius: 22px;
  box-shadow: 0 30px 80px #000c, 0 0 34px #39d9ff26;
}
.install-help-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer; color: #aebdcf; background: #ffffff10; font-size: 18px; }
.install-help-badge { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 30%, #333742); box-shadow: 0 0 24px #39d9ff3a; }
.install-help-card h3 { margin: 0; font-size: 19px; font-weight: 800; }
.install-help-lead { margin: 7px 0 16px; font-size: 12px; color: var(--muted); }
.install-help-steps { margin: 0 0 18px; padding: 0; list-style: none; text-align: left; display: grid; gap: 10px; }
.install-help-steps li { display: flex; align-items: center; gap: 11px; padding: 11px 13px; font-size: 12.5px; line-height: 1.35; color: #d4e2f1; background: #0d1622; border: 1px solid #24303f; border-radius: 12px; }
.install-help-steps b { color: #fff; }
.install-help-steps .step-ic { flex: none; width: 30px; height: 30px; display: grid; place-items: center; font-size: 15px; color: #0a1119; background: var(--accent); border-radius: 9px; font-style: normal; }
.install-help-retry { width: 100%; padding: 13px; font-size: 13px; font-weight: 800; color: #0a1119; border: 0; border-radius: 13px; cursor: pointer; background: linear-gradient(180deg, #59e0ff, #2fb7e6); box-shadow: 0 10px 24px #39d9ff33; }
.install-help-open { width: 100%; margin-top: 9px; padding: 11px; font-size: 12px; font-weight: 700; color: #b9cadd; background: #ffffff0d; border: 1px solid #2a3848; border-radius: 12px; cursor: pointer; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  z-index: 600; background: #10233c; color: #eaf0ff; border: 1px solid var(--line);
  padding: 12px 16px; border-radius: 12px; font-size: 13px; max-width: 90%; text-align: center;
  opacity: 0; pointer-events: none; transition: .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 520px) {
  .store-fixed { padding: 20px 16px 4px; }
  .store-scroll { padding: 6px 16px 20px; }
  .preview-poster { width: 180px; }
}
