/* ============================================================
   MUSANGWIN — Portal RTP Live Pragmatic Play
   Static site stylesheet (dark dashboard theme)
   ============================================================ */
:root {
  --bg: #0b0d10;
  --bg-soft: #101318;
  --surface: #14181e;
  --surface-2: #1a1f27;
  --border: #262c36;
  --border-strong: #333b48;
  --text: #f3f5f7;
  --muted: #9aa3af;
  --faint: #6b7280;
  --gold: #d4af37;
  --gold-soft: #e6c35c;
  --emerald: #10b981;
  --emerald-soft: #34d399;
  --red: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.25);
  --container: 1180px;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { margin-bottom: 24px; }
.section-head .kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 26px; margin-bottom: 6px; }
.section-head p { color: var(--muted); max-width: 760px; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg, #d4af37, #b8912b); color: #17130a; }
.btn-gold:hover { background: linear-gradient(135deg, #e6c35c, #d4af37); }
.btn-emerald { background: linear-gradient(135deg, #10b981, #059669); color: #04120c; }
.btn-emerald:hover { background: linear-gradient(135deg, #34d399, #10b981); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 38px; width: auto; }
.brand:hover { text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a {
  color: var(--muted); font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-soft); }
.hamburger { display: none; }

.mobile-nav {
  display: none; flex-direction: column; gap: 2px;
  border-top: 1px solid var(--border); background: var(--bg);
  padding: 10px 20px 16px;
}
.mobile-nav a { color: var(--muted); font-weight: 600; padding: 10px 8px; border-radius: 8px; }
.mobile-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.mobile-nav.open { display: flex; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--faint); padding: 14px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--faint); }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current] { color: var(--gold-soft); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-banners { position: absolute; inset: 0; }
.hero-banners img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1s ease;
}
.hero-banners img.active { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,13,16,0.82) 0%, rgba(11,13,16,0.9) 55%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 72px 0 64px; max-width: 780px; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 14px; }
.hero h1 .gold { color: var(--gold-soft); }
.hero .lead { color: #cdd3da; font-size: 17px; max-width: 640px; }
.hero-highlights { list-style: none; padding: 0; margin: 18px 0 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-highlights li {
  background: rgba(20, 24, 30, 0.85); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--muted);
}
.hero-highlights li::before { content: "✦"; color: var(--gold); margin-right: 8px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-soft);
}
.stat-card .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-card .stat-value.gold { color: var(--gold-soft); }
.stat-card .stat-value.emerald { color: var(--emerald-soft); }
.stat-card .stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius); padding: 14px 16px; margin-top: 18px;
  font-size: 14px; color: #d8cba0;
}
.notice .notice-icon { flex: 0 0 auto; font-size: 18px; line-height: 1.4; }
.notice p { margin: 0; }
.notice a { color: var(--gold-soft); font-weight: 600; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  border-radius: 999px; padding: 3px 10px;
}
.status-simulasi { background: rgba(212, 175, 55, 0.12); color: var(--gold-soft); border: 1px solid rgba(212, 175, 55, 0.4); }
.status-valid { background: rgba(16, 185, 129, 0.12); color: var(--emerald-soft); border: 1px solid rgba(16, 185, 129, 0.4); }
.status-kosong { background: rgba(154, 163, 175, 0.1); color: var(--muted); border: 1px solid var(--border-strong); }

/* ---------- Table (riwayat sinkronisasi) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.data-table th, .data-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }
.data-table td .log-ok { color: var(--emerald-soft); font-weight: 600; }
.data-table td .log-fail { color: var(--red); font-weight: 600; }

/* ---------- Katalog / filter ---------- */
.catalog-toolbar { margin-bottom: 20px; }
.search-row { position: relative; margin-bottom: 14px; }
.search-row input {
  width: 100%; padding: 13px 16px 13px 44px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text); font-size: 15px;
}
.search-row input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15); }
.search-row .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }

.filter-toggle { display: none; }
.filter-panel { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--muted);
  border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--gold); color: var(--gold-soft); }
.chip.active { background: linear-gradient(135deg, rgba(212,175,55,0.22), rgba(212,175,55,0.1)); border-color: var(--gold); color: var(--gold-soft); }

.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-field { display: flex; flex-direction: column; gap: 5px; }
.filter-field label { font-size: 12px; color: var(--faint); font-weight: 600; }
.filter-field select, .filter-field input {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text); padding: 9px 12px; font-size: 14px;
  min-width: 150px;
}
.filter-field select:focus, .filter-field input:focus { outline: none; border-color: var(--gold); }
.filter-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.result-count { font-size: 13px; color: var(--muted); }

/* ---------- Game cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.game-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: var(--shadow); }
.game-card-media { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); }
.game-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.game-card:hover .game-card-media img { transform: scale(1.05); }
.game-card-media .badge { position: absolute; top: 8px; left: 8px; }
.game-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card-title { font-size: 15px; margin: 0; font-weight: 700; }
.game-card-title a { color: var(--text); }
.game-card-title a:hover { color: var(--gold-soft); text-decoration: none; }
.game-card-provider { font-size: 12px; color: var(--faint); margin: 0; }
.game-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.game-card-meta .updated { font-size: 11px; color: var(--faint); }
.rtp { font-weight: 800; font-size: 15px; }
.rtp-high { color: var(--emerald-soft); }
.rtp-mid { color: var(--gold-soft); }
.rtp-low { color: var(--red); }
.game-card .btn { margin-top: 8px; padding: 8px 12px; font-size: 13px; }

.empty-state {
  text-align: center; padding: 56px 20px; border: 1px dashed var(--border-strong);
  border-radius: var(--radius); color: var(--muted); background: var(--surface);
}
.empty-state .empty-icon { font-size: 34px; margin-bottom: 8px; }
.empty-state h3 { color: var(--text); }
.empty-state p { margin: 0 auto; max-width: 420px; font-size: 14px; }

/* ---------- Statistik ---------- */
.stat-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.chart-card h3 { font-size: 16px; margin-bottom: 4px; }
.chart-card .chart-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.bar-row .bar-label { color: var(--muted); text-align: right; }
.bar-track { background: var(--surface-2); border-radius: 999px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgba(212,175,55,0.85), rgba(16,185,129,0.85)); }
.bar-row .bar-value { color: var(--text); font-weight: 700; }

.range-list { display: flex; flex-direction: column; gap: 8px; }
.range-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 14px;
}
.range-item .range-name { color: var(--text); font-weight: 600; }
.range-item .range-count { color: var(--faint); font-size: 12px; }
.range-item a { color: var(--gold-soft); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ---------- Panduan ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.guide-card h3 { font-size: 16px; color: var(--gold-soft); }
.guide-card p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 15px 44px 15px 18px;
  font-weight: 600; font-size: 15px; position: relative; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 20px; font-weight: 400; transition: transform 0.15s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body { padding: 0 18px 16px; color: var(--muted); font-size: 14px; }
.faq-item .faq-body p { margin: 0 0 8px; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Detail game ---------- */
.detail-layout { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; }
.detail-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.detail-cover img { width: 100%; height: auto; }
.detail-main h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.detail-provider { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.detail-badges .badge { font-size: 12px; }
.rtp-hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px;
}
.rtp-hero .rtp-big { font-size: 44px; font-weight: 800; line-height: 1; }
.rtp-hero .rtp-caption { font-size: 13px; color: var(--muted); max-width: 340px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.spec-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.spec-item .spec-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); margin-bottom: 3px; }
.spec-item .spec-value { font-weight: 700; font-size: 15px; }
.history-note {
  background: var(--surface); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); padding: 16px; color: var(--muted); font-size: 14px;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 3px 11px; font-size: 11px; font-weight: 700;
  border: 1px solid var(--border-strong); color: var(--muted); background: var(--surface-2);
}
.badge-cat { color: var(--gold-soft); border-color: rgba(212, 175, 55, 0.4); }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 44px 0 30px; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 12px; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 380px; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--muted); font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 18px 0 26px;
  color: var(--faint); font-size: 13px;
}
.footer-bottom .disclaimer { margin-bottom: 8px; color: var(--muted); }
.footer-disclaimer-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 12.5px; color: var(--muted); margin-top: 18px;
}

/* ---------- 404 ---------- */
.error-wrap { text-align: center; padding: 90px 20px; }
.error-code { font-size: 72px; font-weight: 800; color: var(--gold-soft); line-height: 1; margin-bottom: 8px; }

/* ---------- Static/legal pages ---------- */
.legal-content { max-width: 820px; }
.legal-content h2 { font-size: 20px; margin-top: 28px; color: var(--gold-soft); }
.legal-content p, .legal-content li { color: #c9cfd7; font-size: 15px; }
.legal-content ul li { margin-bottom: 6px; }
.legal-updated { color: var(--faint); font-size: 13px; margin-bottom: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-layout { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 240px 1fr; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .hamburger { display: inline-flex; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-cover { max-width: 300px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero-inner { padding: 48px 0 44px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .filter-toggle { display: inline-flex; }
  .filter-panel { display: none; }
  .filter-panel.open { display: block; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .rtp-hero .rtp-big { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
