/* ================= MAKARIOS GAMING — STYLE ================= */
:root {
  --bg: #0b0d17;
  --bg2: #11142a;
  --card: #161a33;
  --line: #262b4d;
  --text: #eef0ff;
  --muted: #a3a8cc;
  --accent: #7c5cff;
  --accent2: #22d3ee;
  --gold: #fbbf24;
  --danger: #f87171;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { line-height: 1.8; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.h3 { font-size: 1.2rem; }
.h4 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { width: min(1160px, 92%); margin-inline: auto; }
.narrow { width: min(820px, 92%); }
.mt { margin-top: 20px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 23, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 66px; flex-wrap: wrap; padding-block: 8px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); font-weight: 900; font-size: 1.2rem; color: #fff;
}
.logo-text { font-weight: 900; letter-spacing: .06em; font-size: .95rem; }
.logo-text span { color: var(--accent2); margin-inline-start: 4px; }
.nav { display: flex; gap: 18px; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: .93rem; font-weight: 500; }
.nav a:hover { color: var(--text); }
.switchers { display: flex; gap: 8px; }

/* segmented buttons */
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button {
  font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); background: transparent;
  border: 0; padding: 6px 10px; border-radius: 7px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent; transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn-primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent2))); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 9px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 80px 0 60px;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(124, 92, 255, .35), transparent 70%),
    radial-gradient(500px 300px at 90% 20%, rgba(34, 211, 238, .2), transparent 70%);
}
.hero-inner { max-width: 860px; position: relative; z-index: 1; }
/* banner paling atas (config.js -> theme.topBanner) */
.top-banner { padding-top: 22px; }
.top-banner-img {
  display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: center 45%;
  border-radius: 22px; border: 1px solid var(--line);
  box-shadow: 0 20px 60px color-mix(in srgb, var(--accent) 30%, transparent);
}
.has-top-banner .hero {
  padding-top: 48px;
  background:
    radial-gradient(520px 220px at 15% 45%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%),
    radial-gradient(460px 220px at 90% 55%, color-mix(in srgb, var(--accent2) 15%, transparent), transparent 70%);
}
@media (max-width: 700px) { .top-banner { padding-top: 14px; } .top-banner-img { aspect-ratio: 2 / 1; border-radius: 14px; } }

/* gambar banner (diatur di config.js -> theme.heroImage) */
.has-hero-img .hero { background: var(--bg) var(--hero-img) center / cover no-repeat; }
.has-hero-img .hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .45) 60%, rgba(0, 0, 0, .25) 100%);
}
[dir="rtl"].has-hero-img .hero::before, [dir="rtl"] .has-hero-img .hero::before { background: linear-gradient(270deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .45) 60%, rgba(0, 0, 0, .25) 100%); }
/* gambar latar seluruh halaman (config.js -> theme.pageBackground) */
.has-page-img { background: var(--bg) var(--page-img) center top / cover fixed no-repeat; }
.has-page-img .section.alt { background: color-mix(in srgb, var(--bg2) 85%, transparent); }
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: rgba(124, 92, 255, .15); border: 1px solid rgba(124, 92, 255, .4); color: #c9bcff; margin: 0 0 18px;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 680px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 40px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stats dt { color: var(--muted); font-size: .82rem; }
.stats dd { margin: 4px 0 0; font-size: 1.6rem; font-weight: 800; direction: ltr; unicode-bidi: isolate; text-align: start; }
[dir="rtl"] .stats dd { text-align: right; }
.star { color: var(--gold); margin-inline-start: 4px; }

/* ---------- proof ---------- */
.proof { border-block: 1px solid var(--line); background: var(--bg2); padding: 22px 0; }
.proof-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.proof h2, .proof p { margin: 0; }
.proof-links { display: flex; gap: 10px; flex-wrap: wrap; }
.mk { text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 10px; color: #fff; }
.mk-shopee { background: #ee4d2d; }
.mk-tokped { background: #03ac0e; }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg2); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; }
.input {
  font: inherit; background: var(--bg2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 14px; min-width: 220px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.price-note { color: var(--muted); font-size: .9rem; margin: 6px 0 20px; }

/* ---------- catalog grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.game { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.cover {
  --c: #6d28d9;
  position: relative; aspect-ratio: 16 / 9; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, .22), transparent 45%),
    linear-gradient(140deg, var(--c), #0b0d17 120%);
}
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent 60%); }
.cover > *:not(.cover-img) { position: relative; z-index: 1; }
.cover > .hot { position: absolute; z-index: 2; }
.logo-img { height: 44px; width: auto; display: block; border-radius: 10px; }
.cover-title { font-weight: 800; font-size: 1.15rem; line-height: 1.2; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.plats { display: flex; gap: 6px; margin-top: 8px; }
.plat { font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .45); letter-spacing: .04em; }
.hot {
  position: absolute; top: 12px; inset-inline-end: 12px; font-size: .72rem; font-weight: 800;
  background: var(--gold); color: #1a1200; padding: 4px 9px; border-radius: 999px;
}
.game-body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.slot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.slot-info { display: flex; flex-direction: column; }
.slot-name { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.slot-price { font-weight: 800; font-size: 1.05rem; direction: ltr; unicode-bidi: isolate; }
.slot-price.na { color: var(--muted); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
/* kategori */
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 4px; }
.tab {
  font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; color: var(--muted);
  background: var(--bg2); border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px;
}
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { color: #fff; background: var(--accent); border-color: var(--accent); }
.tab-baru[aria-pressed="true"] { background: #16a34a; border-color: #16a34a; }
.tab-terlaris[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a1200; }
.tab-promo[aria-pressed="true"] { background: #e11d48; border-color: #e11d48; }

/* label di kartu */
.badges { position: absolute; top: 12px; inset-inline-end: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; z-index: 2; }
.cover > .badges { position: absolute; }
.badge-cat { font-size: .72rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.badge-baru { background: #16a34a; }
.badge-terlaris { background: var(--gold); color: #1a1200; }
.badge-promo { background: #e11d48; }

/* nomor halaman */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 30px; }
.pg {
  font: inherit; font-weight: 700; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  background: var(--card); color: var(--text); border: 1px solid var(--line);
}
.pg:hover:not(:disabled) { border-color: var(--accent); }
.pg[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg:disabled { opacity: .4; cursor: default; }
.pg-gap { color: var(--muted); padding: 0 4px; }

/* ---------- cards & lists ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check li { position: relative; padding-inline-start: 30px; }
.check li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 900; background: rgba(34, 211, 238, .15); color: var(--accent2);
}
.check.big li { font-size: 1.05rem; }
.list { margin: 10px 0 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.notice {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px; font-size: .93rem;
  background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .35); color: #fecaca;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips span { font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); }
.flag { font-size: 1.1rem; }

/* steps */
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.num {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); font-weight: 900; color: #fff;
}
.steps p { margin: 0; font-size: .93rem; }

/* wallet */
.wallet { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 12px; display: grid; gap: 10px; }
.wallet-net { font-weight: 700; font-size: .9rem; color: var(--accent2); }
.wallet-addr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; word-break: break-all; direction: ltr; text-align: left; background: var(--bg); padding: 10px; border-radius: 8px; }
.wallet .btn { justify-self: start; }

/* channels */
.channels { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.channels li { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.ch-name { font-weight: 700; }
.ch-link { color: var(--accent2); text-decoration: none; font-size: .92rem; word-break: break-all; }

/* faq */
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-top: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
details p { margin: 0 0 14px; color: var(--muted); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 30px 0 90px; }
.footer p { margin: 4px 0; }

/* ---------- kartu: link ke detail ---------- */
.cover-link { display: block; text-decoration: none; color: inherit; }
.cover-link:hover .cover { filter: brightness(1.12); }
.cover-link:focus-visible { outline: 2px solid var(--accent2); outline-offset: -2px; }
.slots { display: grid; gap: 10px; }
.detail-link { font-size: .85rem; font-weight: 700; color: var(--accent2); text-decoration: none; justify-self: start; }
.detail-link:hover { text-decoration: underline; }
[dir="rtl"] .detail-link { direction: rtl; }

/* ---------- halaman detail produk ---------- */
.detail { position: fixed; inset: 0; z-index: 80; overflow-y: auto; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); }
.detail-open { overflow: hidden; }
.detail-open .fab { z-index: 90; }
.detail-panel { width: min(1100px, 94%); margin: 24px auto 60px; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 22px 26px 30px; }
.detail-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.detail-back { color: var(--muted); text-decoration: none; font-weight: 700; }
.detail-back:hover { color: var(--text); }
.detail-head { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
.detail-head .cover { border-radius: 16px; overflow: hidden; }
.detail-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 10px; }
.detail-side .chips { margin: 0 0 16px; }
.detail-side .slots { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; gap: 14px; }
.detail-side .slot-price { font-size: 1.3rem; }
.normal-price { margin: 0 0 12px; color: var(--muted); font-size: .92rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.normal-price .save { background: #16a34a; color: #fff; font-weight: 800; font-size: .75rem; padding: 3px 8px; border-radius: 999px; }
.mini-list { margin: 14px 0 8px; padding-inline-start: 18px; color: var(--muted); font-size: .9rem; display: grid; gap: 4px; }
.detail-block { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 0 0 16px; }
.spec div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.spec dt { color: var(--muted); font-size: .78rem; }
.spec dd { margin: 2px 0 0; font-weight: 700; }
.desc { color: var(--muted); margin: 0 0 12px; white-space: pre-line; }
.related { grid-template-columns: repeat(4, 1fr); }
.related .game-body { padding: 10px 14px; }
@media (max-width: 800px) {
  .detail-head { grid-template-columns: 1fr; }
  .related { grid-template-columns: repeat(2, 1fr); }
  .detail-panel { width: 100%; margin: 0; border-radius: 0; border: 0; padding: 16px 16px 90px; min-height: 100%; }
}

/* floating WhatsApp */
.fab {
  position: fixed; bottom: 20px; inset-inline-end: 20px; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); z-index: 60;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .switchers { margin-inline-start: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero { padding-top: 50px; }
  .grid { gap: 12px; }
  .cover { aspect-ratio: 3 / 1; padding: 12px 14px; }
  .cover-title { font-size: 1.02rem; }
  .plats { margin-top: 6px; }
  .hot { top: 10px; }
  .game-body { padding: 10px 14px 12px; gap: 8px; }
  .slot-price { font-size: .98rem; }
  .section { padding: 52px 0; }
  .steps { grid-template-columns: 1fr; }
  .input { min-width: 0; width: 100%; }
  .tools { width: 100%; }
  .switchers { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
