/* ============ Bluestone Games — tampilan situs ============ */
:root {
  --bg: #0b1026;
  --bg-2: #121a3d;
  --panel: rgba(255, 255, 255, .06);
  --panel-2: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .1);
  --ink: #f5f7ff;
  --muted: #a8b2d8;
  --yellow: #ffd23f;
  --pink: #ff4f9a;
  --violet: #8b7bff;
  --cyan: #33e1ff;
  --radius: 18px;
  --head-h: 68px;
  --font-head: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 70px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.6 var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* latar bercahaya yang bergerak pelan */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,.4), transparent),
    radial-gradient(1.5px 1.5px at 85% 20%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 40% 60%, rgba(255,255,255,.35), transparent),
    linear-gradient(180deg, #0b1026 0%, #101640 60%, #0b1026 100%);
}
.bg-fx i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(80px); opacity: .38; animation: drift 26s ease-in-out infinite alternate; }
.bg-fx i:nth-child(1) { background: #6a5cff; top: -18vmax; left: -12vmax; }
.bg-fx i:nth-child(2) { background: #ff4f9a; top: 10vmax; right: -18vmax; animation-delay: -8s; opacity: .26; }
.bg-fx i:nth-child(3) { background: #19c3ff; bottom: -24vmax; left: 25vw; animation-delay: -16s; opacity: .24; }
@keyframes drift { to { transform: translate(6vmax, 5vmax) scale(1.12); } }

/* ============ header ============ */
.top {
  position: sticky; top: 0; z-index: 50;
  height: var(--head-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 clamp(12px, 3vw, 28px);
  background: rgba(11, 16, 38, .72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: conic-gradient(from 210deg, #6a5cff, #ff4f9a, #ffd23f, #33e1ff, #6a5cff);
  box-shadow: 0 6px 20px rgba(106, 92, 255, .45), inset 0 -4px 0 rgba(0,0,0,.2);
  transform: rotate(-8deg); transition: transform .3s cubic-bezier(.3,1.6,.5,1);
}
.logo-mark svg { width: 28px; height: 28px; transform: rotate(8deg); }
.logo-mark.sm { width: 36px; height: 36px; border-radius: 11px; }
.logo-mark.sm svg { width: 22px; height: 22px; }
.logo:hover .logo-mark { transform: rotate(6deg) scale(1.08); }
.logo-text { font: 700 23px/1 var(--font-head); letter-spacing: .2px; }
.logo-text b { background: linear-gradient(90deg, var(--yellow), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-left: 3px; }

.search {
  flex: 1; max-width: 520px; margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 8px 0 16px;
  background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 99px;
  color: var(--muted); transition: background .2s, border-color .2s, box-shadow .2s;
}
.search:focus-within { background: rgba(255,255,255,.14); border-color: rgba(139,123,255,.8); box-shadow: 0 0 0 4px rgba(139,123,255,.2); }
.search svg { width: 20px; height: 20px; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: invert(1); }
.search kbd { font: 700 12px var(--font-body); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }

.btn-random {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 12px;
  border: 0; border-radius: 99px; cursor: pointer;
  background: linear-gradient(135deg, #ffe066, #ffb703); color: #2a1d00;
  font: 700 16px var(--font-head);
  box-shadow: 0 4px 0 #c98a00, 0 8px 22px rgba(255, 183, 3, .3);
  transition: transform .12s, box-shadow .12s;
}
.btn-random svg { width: 24px; height: 24px; color: #2a1d00; transition: transform .4s; }
.btn-random:hover svg { transform: rotate(180deg); }
.btn-random:active { transform: translateY(3px); box-shadow: 0 1px 0 #c98a00; }

/* ============ chip kategori ============ */
.cats {
  position: sticky; top: var(--head-h); z-index: 40;
  display: flex; gap: 8px; padding: 10px clamp(12px, 3vw, 28px);
  overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(rgba(11,16,38,.85), rgba(11,16,38,0));
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
  flex-shrink: 0; display: flex; align-items: center; gap: 7px;
  padding: 7px 16px 7px 10px; border-radius: 99px; text-decoration: none;
  font: 600 15px var(--font-head);
  background: var(--panel); border: 1px solid var(--line);
  transition: background .2s, transform .15s, border-color .2s;
}
.cats a .ic { width: 22px; height: 22px; padding: 3px; border-radius: 8px; background: var(--c); color: #fff; }
.cats a:hover { background: var(--panel-2); transform: translateY(-2px); }
.cats a.on { background: #fff; color: #141a3a; border-color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.3); }

main { max-width: 1440px; margin: 0 auto; padding: 0 clamp(12px, 3vw, 28px) 48px; }

/* ============ hero ============ */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(18px, 4vw, 44px) 0 clamp(18px, 3vw, 30px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 5px 14px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line);
  font-weight: 800; font-size: 14px; color: var(--muted);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #3dff9a; box-shadow: 0 0 0 4px rgba(61,255,154,.2); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(61,255,154,0); } }
.hero h1 { font-size: clamp(32px, 5.2vw, 62px); letter-spacing: -.5px; }
.grad { background: linear-gradient(90deg, var(--yellow), var(--pink) 55%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 540px; margin: 16px 0 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 26px;
  border-radius: 16px; text-decoration: none; font: 700 18px var(--font-head);
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn-primary { background: linear-gradient(135deg, #ff6aa9, #ff3d7f); color: #fff; box-shadow: 0 5px 0 #c4245b, 0 12px 30px rgba(255,61,127,.35); }
.btn-primary svg { width: 22px; height: 22px; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #c4245b; }
.btn-ghost { background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--panel-2); }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 26px 0 0; }
.stats a { display: block; padding: 4px 12px; border-radius: 10px; text-decoration: none; font-size: 14px; color: var(--muted); background: var(--panel); border-left: 3px solid var(--c); }
.stats a:hover { color: var(--ink); }
.stats b { color: var(--ink); font-family: var(--font-head); font-size: 16px; }

.hero-cards { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.feat {
  position: relative; display: block; overflow: hidden; border-radius: 22px; text-decoration: none;
  background: var(--bg-2); border: 3px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  transition: transform .25s cubic-bezier(.3,1.4,.5,1), border-color .2s, box-shadow .25s;
  aspect-ratio: 4 / 3;
}
.feat.main { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.feat-info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px;
  display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(transparent, rgba(5,8,25,.88));
}
.feat-info b { font: 700 20px var(--font-head); }
.feat.main .feat-info b { font-size: clamp(22px, 2.6vw, 30px); }
.feat-info span:not(.badge) { color: #d7ddff; font-size: 14px; }
.badge { align-self: flex-start; font: 700 13px var(--font-head); background: var(--yellow); color: #2a1d00; border-radius: 99px; padding: 2px 10px; margin-bottom: 4px; }
.feat:hover { transform: translateY(-5px) rotate(-.6deg); border-color: var(--c); box-shadow: 0 22px 50px rgba(0,0,0,.45), 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); }
.feat:hover img { transform: scale(1.07); }

/* ============ blok & grid ============ */
.block { margin-top: clamp(22px, 3vw, 36px); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { font-size: clamp(22px, 2.4vw, 28px); }
.count { color: var(--muted); font-weight: 800; font-size: 14px; background: var(--panel); padding: 2px 12px; border-radius: 99px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}
.tile {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  background: var(--bg-2);
  border: 3px solid rgba(255,255,255,.1);
  box-shadow: 0 6px 0 rgba(0,0,0,.28);
  transition: transform .2s cubic-bezier(.3,1.5,.5,1), border-color .2s, box-shadow .2s;
  animation: rise .5s backwards;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.tile .thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #1a2350; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.tile .meta { display: flex; flex-direction: column; gap: 1px; padding: 8px 11px 10px; background: linear-gradient(180deg, rgba(255,255,255,.05), transparent); }
.tile .name { font: 600 16px/1.2 var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .cat { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; font-weight: 800; }
.tile .cat .ic { width: 14px; height: 14px; color: var(--c); }
.tile .play {
  position: absolute; left: 50%; top: 37%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.95); color: var(--c);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  opacity: 0; transform: scale(.5); transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.5,1);
}
.tile .play svg { width: 26px; height: 26px; margin-left: 3px; }
.tile .best { position: absolute; top: 8px; right: 8px; background: var(--yellow); color: #2a1d00; font: 700 12px var(--font-head); border-radius: 99px; padding: 1px 9px; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.tile:hover, .tile:focus-visible {
  transform: translateY(-6px) scale(1.02); border-color: var(--c); outline: none;
  box-shadow: 0 12px 0 rgba(0,0,0,.25), 0 0 34px color-mix(in srgb, var(--c) 45%, transparent);
  z-index: 2;
}
.tile:hover img { transform: scale(1.1); }
.tile:hover .play, .tile:focus-visible .play { opacity: 1; transform: scale(1); }

.tile.big { grid-column: span 2; grid-row: span 2; }
.tile.big .thumb { flex: 1; aspect-ratio: auto; }
.tile.big .name { font-size: 22px; }
.tile.big .cat { font-size: 14px; }
.tile.big .play { width: 72px; height: 72px; margin: -36px 0 0 -36px; top: 42%; }
.grid.searching .tile.big { grid-column: auto; grid-row: auto; }
.grid.searching .tile.big .thumb { aspect-ratio: 4 / 3; flex: none; }
.grid.searching .tile.big .name { font-size: 16px; }
.tile[hidden] { display: none; }

.recent { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.recent .tile { width: 168px; flex-shrink: 0; scroll-snap-align: start; animation: none; }

.empty { text-align: center; padding: 28px; border-radius: var(--radius); background: var(--panel); color: var(--muted); }

/* kartu kategori */
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.cc {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
  padding: 18px; border-radius: var(--radius); text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #fff 0%), color-mix(in srgb, var(--c) 55%, #0b1026));
  box-shadow: 0 6px 0 rgba(0,0,0,.28);
  transition: transform .2s cubic-bezier(.3,1.5,.5,1);
}
.cc b { font: 700 20px var(--font-head); color: #fff; }
.cc span { color: rgba(255,255,255,.85); font-weight: 800; font-size: 14px; }
.cc-ic { position: absolute; right: -10px; bottom: -14px; width: 92px; height: 92px; color: rgba(255,255,255,.22); transform: rotate(-12deg); transition: transform .3s; }
.cc:hover { transform: translateY(-5px); }
.cc:hover .cc-ic { transform: rotate(4deg) scale(1.1); }

/* teks SEO + FAQ */
.seo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.seo-text, .faq { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 3vw, 30px); }
.seo h2, .faq h2 { font-size: 22px; margin-bottom: 12px; }
.seo-text p { color: var(--muted); margin: 0 0 12px; }
.seo-text b { color: var(--ink); }
.seo-text a { color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; list-style: none; font: 600 16px var(--font-head); padding: 10px 28px 10px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 6px; font-size: 22px; color: var(--yellow); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 12px; color: var(--muted); }

/* halaman kategori */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.cat-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px;
  margin-top: 14px; padding: clamp(20px, 4vw, 36px); border-radius: 26px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 80%, #000 0%), color-mix(in srgb, var(--c) 35%, #0b1026));
  box-shadow: 0 10px 0 rgba(0,0,0,.25);
}
.cat-hero-ic { flex-shrink: 0; width: clamp(64px, 9vw, 104px); height: clamp(64px, 9vw, 104px); padding: 14px; border-radius: 26px; background: rgba(255,255,255,.2); color: #fff; }
.cat-hero h1 { font-size: clamp(26px, 4vw, 44px); }
.cat-hero p { margin: 8px 0 0; color: rgba(255,255,255,.9); max-width: 720px; }

/* footer */
.foot { margin-top: 40px; background: rgba(5, 8, 25, .6); border-top: 1px solid var(--line); }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 34px clamp(12px, 3vw, 28px); display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.foot-brand p { color: var(--muted); max-width: 420px; }
.foot h3 { font-size: 17px; margin-bottom: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--yellow); }
.foot-bottom { text-align: center; padding: 16px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* ============ responsif ============ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .seo { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --head-h: 60px; --radius: 14px; }
  .top { gap: 10px; }
  .logo-text, .search kbd, .btn-random span { display: none; }
  .logo-mark { width: 40px; height: 40px; }
  .search { height: 42px; }
  .btn-random { height: 42px; padding: 0 9px; }
  .hero-cards { gap: 10px; }
  .feat-info b { font-size: 16px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .tile { border-width: 2px; box-shadow: 0 4px 0 rgba(0,0,0,.28); }
  .tile .meta { padding: 5px 7px 7px; }
  .tile .name { font-size: 13px; }
  .tile .cat { display: none; }
  .tile.big .name { font-size: 17px; }
  .tile .play { display: none; }
  .recent .tile { width: 120px; }
  .cc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cc { padding: 14px; }
  .cc b { font-size: 16px; }
  .cc-ic { width: 64px; height: 64px; }
  .cat-hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* cegah kolom melebar karena teks panjang (overflow di HP) */
.hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.hero > * { min-width: 0; }
.hero-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid { grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr)); }
.tile, .tile .meta { min-width: 0; }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search { min-width: 0; }
  .hero-cta a { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 380px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
