/* Arcade zone: mini-sayt uchun alohida dizayn (World of games asosiy dizaynidan mustaqil).
   Ranglarni o'zgartirish uchun :root dagi tokenlarni tahrirlang. */
:root {
  --bg: #07030F;
  --bg2: #0E0720;
  --cab: #140B2B;
  --cab2: #1C1038;
  --line: #3B2470;
  --text: #F4EEFF;
  --mute: #A99BD0;
  --pink: #FF3DDC;
  --cyan: #29F0FF;
  --yellow: #FFE14D;
  --display: 'Press Start 2P', 'Courier New', ui-monospace, monospace;
  --body: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 500 15px/1.5 var(--body);
  background: radial-gradient(900px 480px at 50% -80px, rgba(255, 61, 220, .22), transparent 70%), radial-gradient(700px 400px at 100% 30%, rgba(41, 240, 255, .10), transparent 70%), var(--bg);
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px));
  -webkit-text-size-adjust: 100%;
}
/* faint scanlines over the whole page */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 20; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; opacity: .55; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: max(18px, env(safe-area-inset-top, 0px)); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 8px;
  background: rgba(20, 11, 43, .8); color: var(--text); font: 700 13px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 14px rgba(41, 240, 255, .25); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn.icon { padding: 9px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 38px 0 8px; }
.logo { margin: 0; font: 400 clamp(26px, 6.4vw, 54px)/1.25 var(--display); letter-spacing: .02em; text-transform: uppercase; text-wrap: balance; }
.logo .a { color: var(--cyan); text-shadow: 0 0 10px rgba(41, 240, 255, .8), 0 0 34px rgba(41, 240, 255, .45); }
.logo .b { color: var(--pink); text-shadow: 0 0 10px rgba(255, 61, 220, .8), 0 0 34px rgba(255, 61, 220, .45); display: block; }
.tagline { margin: 16px auto 0; max-width: 46ch; color: var(--mute); font-size: 16px; text-wrap: pretty; }
.coin { margin: 18px auto 0; display: inline-block; font: 400 11px/1 var(--display); color: var(--yellow); letter-spacing: .08em; animation: blink 1.2s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- search + list ---------- */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }
.count { font: 400 11px/1.4 var(--display); color: var(--mute); letter-spacing: .06em; }
.search { position: relative; flex: 1 1 220px; max-width: 340px; min-width: 0; }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--mute); pointer-events: none; }
.search input { width: 100%; min-width: 0; padding: 10px 14px 10px 40px; border-radius: 8px; background: var(--cab); border: 1.5px solid var(--line); color: var(--text); font-size: 15px; }
.search input::placeholder { color: var(--mute); opacity: 1; }
.search input:hover { border-color: #5a3aa8; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 20px; list-style: none; margin: 20px 0 0; padding: 0; }
.grid > li { min-width: 0; display: flex; }
.cab {
  position: relative; display: flex; flex-direction: column; width: 100%; overflow: hidden; text-decoration: none;
  background: linear-gradient(180deg, var(--cab2), var(--cab)); border: 2px solid var(--line); border-radius: 14px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cab:hover { transform: translateY(-4px); border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink), 0 10px 34px rgba(255, 61, 220, .28); }
.screen { position: relative; aspect-ratio: 4 / 3; margin: 10px 10px 0; overflow: hidden; border-radius: 8px; border: 2px solid #000; background: #000; box-shadow: inset 0 0 22px rgba(41, 240, 255, .25); }
.screen .art { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h) 55% 22%), hsl(calc(var(--h) + 50) 60% 10%)); }
.screen .art b { font: 400 54px/1 var(--display); color: hsl(var(--h) 90% 75% / .35); user-select: none; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px); }
.num { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 4px 6px; border-radius: 4px; background: rgba(7, 3, 15, .85); color: var(--yellow); font: 400 9px/1 var(--display); }
.cab-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.cab h2 { margin: 0; font: 400 13px/1.5 var(--display); letter-spacing: .02em; text-transform: uppercase; overflow-wrap: anywhere; }
.cab p { margin: 8px 0 0; color: var(--mute); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cab-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 16px; font: 700 13px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.go { color: var(--cyan); }
.go::after { content: " \25B6"; font-size: 11px; }
.tag { padding: 3px 6px; border-radius: 4px; border: 1px solid var(--yellow); color: var(--yellow); font: 400 8px/1.2 var(--display); }

/* ---------- empty state ---------- */
.empty { margin-top: 20px; padding: 40px 18px 46px; text-align: center; border: 2px dashed var(--line); border-radius: 16px; background: rgba(20, 11, 43, .35); }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 540px; margin: 0 auto 26px; }
.slot { aspect-ratio: 4 / 5; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 10px; color: #5f45a6; font: 400 10px/1.4 var(--display); }
.slot i { display: block; width: 46%; aspect-ratio: 4 / 3; border: 2px solid currentColor; border-radius: 6px; opacity: .6; }
.empty h2 { margin: 0 0 10px; font: 400 15px/1.5 var(--display); color: var(--yellow); text-wrap: balance; }
.empty p { margin: 0 auto; max-width: 48ch; color: var(--mute); text-wrap: pretty; }
.empty .btn { margin-top: 18px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }

/* ---------- player ---------- */
html.player-root { height: 100%; }
body.player { height: 100%; min-height: 0; display: flex; flex-direction: column; padding: 0; background: #000; }
body.player::after { display: none; }
.pbar {
  flex: none; display: flex; align-items: center; gap: 10px; background: var(--bg2); border-bottom: 2px solid var(--line);
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
}
.pbar .ttl { flex: 1; min-width: 0; }
.pbar h1 { margin: 0; font: 400 12px/1.4 var(--display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cyan); text-shadow: 0 0 10px rgba(41, 240, 255, .5); }
.pbar .acts { display: flex; gap: 8px; flex: none; }
.hint { flex: none; margin: 0; padding: 7px max(16px, env(safe-area-inset-right, 0px)) 7px max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); color: var(--mute); font-size: 13px; border-bottom: 1px solid var(--line); }
.stage { position: relative; flex: 1; min-height: 0; background: #000; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--yellow); font: 400 11px/1.4 var(--display); pointer-events: none; }
.spin { width: 28px; height: 28px; border: 4px solid var(--line); border-top-color: var(--pink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notfound { margin: auto; padding: 24px; text-align: center; max-width: 420px; }
.notfound h1 { margin: 0 0 12px; font: 400 16px/1.5 var(--display); color: var(--pink); }
.notfound p { margin: 0 0 18px; color: var(--mute); }

@media (max-width: 560px) {
  .lbl { display: none; }
  .slots { gap: 8px; } .slot { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
