:root {
  --bg: #0b0d12; --bg-2: #12151d; --panel: #171a23; --panel-2: #1f2330;
  --text: #e8e6df; --muted: #9aa0a6; --gold: #d4a55a; --gold-2: #f0c97a;
  --red: #c44a4a; --green: #4caf7a; --border: #2a2f3d;
  --shadow: 0 10px 30px rgba(0,0,0,.45); --radius: 14px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-var.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/playfair-var.woff2') format('woff2');
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(1200px 600px at 80% -10%, rgba(212,165,90,.08), transparent 60%), radial-gradient(900px 500px at 10% 110%, rgba(196,74,74,.06), transparent 60%); pointer-events: none; z-index: 0; }
.hidden { display: none !important; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
a { color: var(--gold); text-decoration: none; } a:hover { color: var(--gold-2); }
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px); background: rgba(11,13,18,.75); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--gold), #8a6a33); color: #1a1408; display: grid; place-items: center; font-weight: 800; box-shadow: 0 4px 14px rgba(212,165,90,.35); }
.brand-name { font-family: var(--font-display); font-size: 1.25rem; }
.nav { display: flex; gap: 16px; }
.nav a { color: var(--muted); font-weight: 500; font-size: .9rem; white-space: nowrap; } .nav a:hover { color: var(--text); }
.brand-name { white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.hero { padding: 90px 0 70px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 600; margin: 0 0 14px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; margin: 0 0 20px; }
.accent { color: var(--gold); font-style: italic; }
.hero-lead { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-stats { display: flex; gap: 34px; list-style: none; padding: 0; margin: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); }
.hero-stats span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; transition: all .18s ease; }
.btn-primary { background: linear-gradient(135deg, var(--gold), #a87d3a); color: #1a1408; box-shadow: 0 6px 18px rgba(212,165,90,.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(212,165,90,.4); color: #1a1408; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-disabled { opacity: .45; pointer-events: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.hero-visual { display: grid; place-items: center; }
.magnifier { width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2a2f3d, #0b0d12); border: 6px solid var(--gold); box-shadow: 0 0 0 12px rgba(212,165,90,.08), var(--shadow); display: grid; place-items: center; animation: float 6s ease-in-out infinite; }
.lens { width: 180px; height: 180px; }
.fingerprint { width: 100%; height: 100%; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.section { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 0 0 10px; }
.section-head p { color: var(--muted); max-width: 620px; margin: 0 auto; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.game-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.game-card:hover { transform: translateY(-6px); border-color: var(--gold); }
.game-card--featured { border-color: rgba(212,165,90,.45); box-shadow: 0 0 0 1px rgba(212,165,90,.12), var(--shadow); }
.game-meta { color: var(--muted); font-size: .82rem; margin: -4px 0 14px; }
.game-thumb { height: 170px; }
.thumb-1 { background-image: radial-gradient(circle at 30% 30%, rgba(212,165,90,.4), transparent 60%), linear-gradient(135deg, #1a2a44, #0b0d12); }
.thumb-2 { background: radial-gradient(circle at 70% 40%, rgba(196,74,74,.4), transparent 60%), linear-gradient(135deg, #2a1a1a, #0b0d12); }
.thumb-3 { background: radial-gradient(circle at 40% 60%, rgba(76,175,122,.35), transparent 60%), linear-gradient(135deg, #1a2a22, #0b0d12); }
.game-body { padding: 20px; }
.tag { display: inline-block; background: rgba(212,165,90,.15); color: var(--gold); font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .08em; }
.game-body h3 { margin: 0 0 8px; font-family: var(--font-display); }
.game-body p { color: var(--muted); font-size: .92rem; margin: 0 0 16px; }
.section-play { background: linear-gradient(180deg, transparent, rgba(23,26,35,.6)); }
.case-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; }
.case-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.case-header h3 { font-family: var(--font-display); margin: 0 0 8px; color: var(--gold); }
.case-header p { color: var(--muted); margin: 0 0 18px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab { background: none; border: none; color: var(--muted); padding: 10px 16px; cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-pane { display: none; } .tab-pane.active { display: block; }
.hint { color: var(--muted); font-size: .88rem; margin: 0 0 14px; }
.clue-list { display: grid; gap: 12px; }
.clue-item { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; cursor: pointer; transition: all .18s; display: flex; gap: 12px; align-items: flex-start; }
.clue-item:hover { border-color: var(--gold); }
.clue-item.collected { border-color: var(--green); background: rgba(76,175,122,.08); cursor: default; }
.clue-item .clue-icon { font-size: 1.4rem; }
.clue-item .clue-title { font-weight: 600; margin-bottom: 2px; }
.clue-item .clue-desc { color: var(--muted); font-size: .88rem; }
.clue-item.collected .clue-title::after { content: ' ✓'; color: var(--green); }
.suspect-list { display: grid; gap: 12px; }
.suspect-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; }
.suspect-avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #2a2f3d, #12151d); border: 2px solid var(--gold); display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.suspect-info { flex: 1; }
.suspect-name { font-weight: 700; margin-bottom: 2px; }
.suspect-role { color: var(--muted); font-size: .85rem; }
.case-side { display: grid; gap: 16px; align-content: start; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card h4 { margin: 0 0 12px; color: var(--gold); font-family: var(--font-display); }
.stat-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.stat-row:last-child { border-bottom: none; }
.stat-row span { color: var(--muted); font-size: .9rem; }
.stat-row strong { color: var(--text); }
.notes { color: var(--muted); font-size: .9rem; } .notes p { margin: 0 0 8px; }
.result-box { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.result-box.success { border-color: var(--green); } .result-box.fail { border-color: var(--red); }
.result-box h4 { margin: 0 0 8px; font-family: var(--font-display); }
.result-box p { margin: 0 0 6px; color: var(--muted); font-size: .92rem; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal.hidden { display: none; }
.modal-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; max-width: 460px; width: 100%; }
.modal-card h3 { margin: 0 0 8px; font-family: var(--font-display); color: var(--gold); }
.modal-suspects { display: grid; gap: 10px; margin: 16px 0; }
.modal-suspect-btn { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; text-align: left; color: var(--text); font-weight: 600; transition: all .18s; }
.modal-suspect-btn:hover { border-color: var(--gold); color: var(--gold); }
.modal-actions { display: flex; justify-content: flex-end; }
.leaderboard { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.leaderboard table { width: 100%; border-collapse: collapse; }
.leaderboard th, .leaderboard td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.leaderboard th { color: var(--gold); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; background: var(--bg-2); }
.leaderboard tbody tr:hover { background: rgba(212,165,90,.05); }
.empty { text-align: center; color: var(--muted); padding: 24px; margin: 0; }
.section-about .about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; }
.about-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.about-card h3 { margin: 0 0 12px; color: var(--gold); font-family: var(--font-display); }
.about-card ul { margin: 0; padding-left: 20px; color: var(--muted); }
.about-card li { margin-bottom: 6px; }
.site-footer { border-top: 1px solid var(--border); padding: 30px 0; text-align: center; color: var(--muted); }
.site-footer p { margin: 4px 0; }
.muted { color: var(--muted); }
@media (max-width: 1180px) {
  .brand-name { font-size: 1.05rem; }
  .header-inner .user-area { gap: 8px; }
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); padding: 16px 24px; border-bottom: 1px solid var(--border); gap: 0; }
  .nav a { padding: 8px 0; font-size: 1rem; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { order: -1; }
  .hero-stats { justify-content: center; }
  .hero-cta { justify-content: center; }
  .case-layout { grid-template-columns: 1fr; }
  .section-about .about { grid-template-columns: 1fr; }
}

.case-selector { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.case-selector label { color: var(--gold); font-weight: 600; }
.case-select { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: .95rem; flex: 1; min-width: 0; max-width: 420px; }
.case-select:focus { outline: none; border-color: var(--gold); }

.challenge-banner { background: linear-gradient(135deg, rgba(212,165,90,.15), rgba(196,74,74,.1)); border: 1px solid var(--gold); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; color: var(--text); }
.challenge-banner strong { color: var(--gold); }
.challenge-banner.hidden { display: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--gold); color: var(--text); padding: 12px 20px; border-radius: 10px; z-index: 200; box-shadow: var(--shadow); }

.user-area { display: flex; align-items: center; gap: 10px; }
.user-label { color: var(--gold); font-weight: 600; }
.icon-btn { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 10px; cursor: pointer; position: relative; }
.icon-btn:hover { border-color: var(--gold); }
.badge { position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff; font-size: .65rem; font-weight: 700; padding: 2px 6px; border-radius: 999px; }
.badge.hidden { display: none; }
.filter-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-row label { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.input { width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: .95rem; }
.input:focus { outline: none; border-color: var(--gold); }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; color: var(--muted); font-size: .85rem; margin-bottom: 4px; }
.notif-panel { position: fixed; top: 80px; right: 20px; width: 320px; max-height: 420px; overflow: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 150; }
.notif-panel.hidden { display: none; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-list { padding: 8px; }
.notif-item { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: .88rem; }
.notif-item.unread { border-color: var(--gold); }
.notif-item .notif-time { color: var(--muted); font-size: .75rem; margin-top: 4px; }
@media (max-width: 860px) {
  .user-area { flex-wrap: wrap; }
  .notif-panel { right: 10px; width: calc(100% - 20px); }
}

/* Halaman 404 */
.error-shell { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 72px 24px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.error-brand { align-self: flex-start; margin-bottom: 12px; text-decoration: none; }
.error-kicker { color: var(--gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; margin: 0; }
.error-title { font-family: var(--font-display); font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.08; margin: 0; }
.error-copy { color: var(--muted); max-width: 58ch; margin: 0; }
.error-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.error-actions .btn { text-decoration: none; }
