:root {
  --bg: #0b1026;
  --bar: rgba(11, 16, 38, .85);
  --ink: #f5f7ff;
  --muted: #a8b2d8;
  --line: rgba(255, 255, 255, .1);
  --panel: rgba(255, 255, 255, .06);
  --accent: #ffd23f;
  --accent-ink: #2a1d00;
  --pink: #ff4f9a;
  --font-head: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(60vmax 60vmax at 0% 0%, rgba(106, 92, 255, .28), transparent 60%),
    radial-gradient(50vmax 50vmax at 100% 30%, rgba(255, 79, 154, .16), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 500 16px/1.6 var(--font-body);
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; }

/* ---------- top bar ---------- */
.g-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 14px;
  background: var(--bar);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.g-logo { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.g-logo-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: conic-gradient(from 210deg, #6a5cff, #ff4f9a, #ffd23f, #33e1ff, #6a5cff);
  font: 700 21px var(--font-head); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  box-shadow: 0 4px 14px rgba(106, 92, 255, .4), inset 0 -3px 0 rgba(0,0,0,.2);
  transform: rotate(-8deg);
}
.g-logo-text { font: 700 19px var(--font-head); }
.g-logo-text b { color: var(--accent); margin-left: 2px; }
.g-title { flex: 1; margin: 0; font-size: 20px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-stats { display: flex; gap: 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.g-stats span { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 2px 12px; }
.g-stats b { color: var(--ink); font: 700 16px var(--font-head); margin-left: 4px; }
.g-stats span + span b { color: var(--accent); }
.g-actions { display: flex; gap: 6px; }
.g-btn {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--ink); font-size: 19px; cursor: pointer;
  transition: background .15s, transform .15s;
}
.g-btn:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }

/* ---------- area game ---------- */
#game-root {
  position: relative;
  height: calc(100vh - 58px);
  height: calc(100dvh - 58px);
  display: grid; place-items: center;
  overflow: hidden;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
}
#game-root canvas {
  display: block; border-radius: 16px; touch-action: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 20px 60px rgba(0,0,0,.55);
}

.g-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: none; place-items: center;
  background: rgba(6, 10, 30, .7);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  padding: 16px;
}
.g-overlay.show { display: grid; }
.g-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #eef1ff);
  color: #1b2145;
  border-radius: 26px; padding: 28px 28px 22px;
  max-width: 400px; width: 100%; text-align: center;
  box-shadow: 0 14px 0 rgba(0,0,0,.2), 0 30px 70px rgba(0,0,0,.5);
  animation: pop .35s cubic-bezier(.3,1.6,.5,1);
}
.g-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: linear-gradient(90deg, #6a5cff, #ff4f9a, #ffd23f, #33e1ff);
}
@keyframes pop { from { transform: scale(.8) translateY(20px); opacity: 0; } }
.g-card h2 { margin: 4px 0 8px; font-size: 30px; }
.g-card p { margin: 0 0 20px; line-height: 1.55; color: #4a5175; }
.g-new { display: inline-block; background: var(--pink); color: #fff; border-radius: 99px; padding: 0 12px; font-weight: 800; animation: pop .5s .1s backwards; }
.g-play {
  border: 0; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, #ff6aa9, #ff3d7f); color: #fff;
  font: 700 22px var(--font-head); padding: 13px 46px;
  box-shadow: 0 5px 0 #c4245b, 0 10px 24px rgba(255,61,127,.35);
  transition: transform .12s, box-shadow .12s;
}
.g-play:hover { transform: translateY(-2px); }
.g-play:active { transform: translateY(3px); box-shadow: 0 1px 0 #c4245b; }
.g-home { display: block; width: fit-content; margin: 14px auto 0; color: #5a63a0; font-size: 14px; font-weight: 700; }

/* ---------- info SEO & game terkait ---------- */
.g-info { max-width: 1200px; margin: 0 auto; padding: 28px 16px 0; }
.g-crumbs { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.g-crumbs a { color: var(--muted); text-decoration: none; }
.g-crumbs a:hover { color: var(--ink); }
.g-info-card {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 20px;
}
.g-info-card img { width: 160px; height: auto; border-radius: 16px; flex-shrink: 0; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.g-info-card h2 { margin: 0 0 8px; font-size: 24px; }
.g-info-card p { margin: 0 0 10px; color: var(--muted); }
.g-info-card b { color: var(--ink); }
.g-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.g-tags a, .g-tags span { font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--accent); text-decoration: none; }
.g-tags span { color: var(--muted); }
.g-rel-h { font-size: 22px; margin: 26px 0 12px; }
.g-rel { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

/* "Game Lainnya" dari shell.js dan daftar terkait memakai gaya ubin yang sama */
.g-more { padding: 26px 16px 48px; max-width: 1200px; margin: 0 auto; }
.g-more h2 { margin: 0 0 12px; font-size: 22px; }
.g-more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.g-tile, .g-rel a {
  position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3;
  background: #1a2350; border: 2px solid rgba(255,255,255,.1);
  box-shadow: 0 5px 0 rgba(0,0,0,.28);
  transition: transform .2s cubic-bezier(.3,1.5,.5,1), border-color .2s;
  text-decoration: none; color: #fff;
}
.g-tile:hover, .g-rel a:hover { transform: translateY(-5px) scale(1.03); border-color: var(--accent); }
.g-tile img, .g-rel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-tile span, .g-rel span {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 9px 6px; font: 600 14px var(--font-head); color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.78));
}

@media (max-width: 640px) {
  .g-logo-text, .g-title { display: none; }
  .g-stats { flex: 1; justify-content: center; }
  .g-bar { gap: 8px; padding: 0 10px; }
  .g-info-card { flex-direction: column; }
  .g-info-card img { width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
