/* =========================================================
   ThirdMi Games — 2026 theme
   Palette is taken straight from the logo:
   deep navy #060a1c · electric blue #2f8bff · violet #8b5cff · orange #ff9a1f · silver #e8edf8
   ========================================================= */
:root {
  --bg: #060a1c;
  --bg-2: #0a1233;
  --panel: rgba(255, 255, 255, .045);
  --panel-strong: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .095);
  --line-strong: rgba(255, 255, 255, .17);
  --text: #eef2ff;
  --muted: #9ba7c9;
  --silver: #e8edf8;

  --blue: #2f8bff;
  --cyan: #38c9ff;
  --violet: #8b5cff;
  --orange: #ff9a1f;
  --amber: #ffc21a;

  --grad-brand: linear-gradient(120deg, #2f8bff 0%, #8b5cff 55%, #ff9a1f 115%);
  --grad-btn: linear-gradient(135deg, #2a6df4 0%, #7a45f0 100%);
  --grad-warm: linear-gradient(135deg, #ff9a1f, #ffc21a);

  --sb-w: 276px;
  --sb-w-min: 92px;
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);

  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: 'Outfit', 'Inter', sans-serif; line-height: 1.12; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 10px; }
::selection { background: rgba(139, 92, 255, .55); }
.muted { color: var(--muted); }

/* ---------- animated aurora background ---------- */
.bg-aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(1200px 700px at 85% -10%, rgba(47, 139, 255, .16), transparent 60%),
  radial-gradient(900px 600px at -10% 110%, rgba(255, 154, 31, .10), transparent 60%), var(--bg); }
.bg-aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 26s ease-in-out infinite alternate; }
.bg-aurora i:nth-child(1) { width: 520px; height: 520px; background: #1f5cff; top: -140px; left: 30%; }
.bg-aurora i:nth-child(2) { width: 460px; height: 460px; background: #7a3dff; top: 40%; right: -120px; animation-delay: -9s; opacity: .38; }
.bg-aurora i:nth-child(3) { width: 380px; height: 380px; background: #ff8a1a; bottom: -140px; left: 12%; animation-delay: -16s; opacity: .22; }
.bg-aurora::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 75%); }
@keyframes drift { to { transform: translate3d(-60px, 50px, 0) scale(1.15); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s; }
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: 0 10px 30px -10px rgba(122, 69, 240, .8), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(122, 69, 240, .95), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost { background: var(--panel); border-color: var(--line-strong); color: var(--text); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: var(--panel-strong); transform: translateY(-2px); }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  transition: background .2s, transform .2s var(--ease); flex: none; }
.icon-btn:hover { background: var(--panel-strong); transform: translateY(-1px); }

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar { position: fixed; z-index: 60; top: 12px; bottom: 12px; left: 12px; width: var(--sb-w); display: flex; flex-direction: column; gap: 18px;
  padding: 18px 14px; border-radius: 28px; overflow: hidden auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  background: linear-gradient(180deg, rgba(16, 26, 66, .78), rgba(8, 13, 36, .82));
  border: 1px solid var(--line); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
  transition: width .38s var(--ease), transform .38s var(--ease); }
.sidebar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; pointer-events: none;
  background: radial-gradient(220px 120px at 50% 0, rgba(47,139,255,.28), transparent 70%); }
.sb-head { position: relative; display: flex; align-items: center; justify-content: center; }
.sb-brand { display: block; width: 100%; }
.sb-logo { width: 100%; max-width: 210px; margin: 0 auto; filter: drop-shadow(0 8px 24px rgba(47,139,255,.35)); transition: transform .4s var(--ease); }
.sb-brand:hover .sb-logo { transform: scale(1.03) rotate(-1deg); }
.sb-mark { display: none; width: 56px; margin: 0 auto; }
.sb-close { display: none; position: absolute; top: 0; right: 0; }

.sb-stats { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 12px 10px; text-align: center; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line); }
.stat strong { display: block; font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 700; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.sb-label { padding: 0 12px 8px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sb-nav ul { display: grid; gap: 4px; }
.sb-nav a { position: relative; display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 12px; border-radius: 14px; color: #c5cee8; font-weight: 500;
  transition: background .2s, color .2s, transform .25s var(--ease); }
.nav-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.05); color: var(--cyan); font-size: 16px; transition: background .25s, color .25s, box-shadow .25s; }
.nav-ico [class^="icon-"], .nav-ico [class*=" icon-"], .nav-ico .fa { font-size: 17px; }
.nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-nav a:hover { background: var(--panel-strong); color: #fff; transform: translateX(3px); }
.sb-nav li.active a { color: #fff; background: linear-gradient(90deg, rgba(47,139,255,.28), rgba(139,92,255,.16) 70%, transparent); box-shadow: inset 0 0 0 1px rgba(112, 150, 255, .28); }
.sb-nav li.active a::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 6px 6px 0; background: var(--grad-warm); box-shadow: 0 0 14px rgba(255,154,31,.8); }
.sb-nav li.active .nav-ico { background: var(--grad-btn); color: #fff; box-shadow: 0 8px 20px -6px rgba(122,69,240,.9); }

.sb-promo { position: relative; margin-top: auto; padding: 16px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(47,139,255,.22), rgba(139,92,255,.22) 55%, rgba(255,154,31,.22)); border: 1px solid var(--line-strong); }
.promo-kicker { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 4px; }
.sb-promo strong { display: block; font-family: 'Outfit', sans-serif; font-size: 18px; }
.sb-promo p { margin-top: 6px; font-size: 13px; color: #c5cee8; line-height: 1.45; }

.sb-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(2, 5, 18, .6); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; }

/* collapsed icon rail (desktop) */
@media (min-width: 1024px) {
  body.sb-collapsed { --sb-w: var(--sb-w-min); }
  body.sb-collapsed .sb-logo, body.sb-collapsed .sb-stats, body.sb-collapsed .sb-label,
  body.sb-collapsed .nav-text, body.sb-collapsed .sb-promo { display: none; }
  body.sb-collapsed .sb-mark { display: block; }
  body.sb-collapsed .sb-nav a { justify-content: center; padding: 0; }
  body.sb-collapsed .sb-nav li.active a::before { left: -14px; }
  body.sb-collapsed .sb-nav a:hover { transform: none; }
}

/* =========================================================
   SHELL / TOPBAR
   ========================================================= */
.shell { margin-left: calc(var(--sb-w) + 24px); padding-right: 24px; min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .38s var(--ease); }
main { flex: 1; padding: 6px 0 40px; }

.topbar { position: sticky; top: 12px; z-index: 40; display: flex; align-items: center; gap: 12px; margin: 12px 0 22px; padding: 8px 10px;
  border-radius: 22px; background: rgba(10, 16, 44, .9); border: 1px solid var(--line); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06); }
.top-mark { display: none; width: 44px; height: 44px; flex: none; }
.top-mark img { width: 100%; height: 100%; object-fit: contain; }

.search { flex: 1; min-width: 0; max-width: 560px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 999px; color: var(--muted);
  background: rgba(255,255,255,.05); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s, background .2s; }
.search:focus-within { border-color: rgba(56, 201, 255, .6); box-shadow: 0 0 0 4px rgba(56, 201, 255, .14); background: rgba(255,255,255,.07); color: var(--cyan); }
.search input { flex: 1; min-width: 0; width: 100%; height: 100%; background: none; border: 0; outline: 0; color: var(--text); font: inherit; }
.search input::placeholder { color: #7f8bb0; }
.search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.search kbd { font: 600 12px 'Inter', sans-serif; padding: 2px 8px; border-radius: 7px; border: 1px solid var(--line-strong); color: var(--muted); background: rgba(255,255,255,.04); }
.top-cta { margin-left: auto; flex: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; align-items: center; padding: clamp(24px, 4vw, 52px); margin-bottom: 26px; border-radius: 34px; overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 38, 110, .62), rgba(10, 16, 46, .7) 55%, rgba(60, 26, 110, .45));
  border: 1px solid var(--line-strong); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.1); }
.hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,154,31,.35), transparent 65%); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  background: rgba(255,255,255,.06); border: 1px solid var(--line-strong); color: #d7def5; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255,154,31,.25); animation: pulse 2.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,154,31,0); } }
.hero h1 { margin: 18px 0 14px; font-size: clamp(38px, 5.4vw, 68px); font-weight: 800; }
.grad-text { background: linear-gradient(100deg, #5aa8ff, #a07bff 50%, #ffae3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 54ch; color: #c1cbe8; font-size: clamp(15px, 1.4vw, 17px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px 34px; margin: 30px 0 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-family: 'Outfit', sans-serif; font-size: 28px; font-weight: 700; color: #fff; line-height: 1.1; }
.hero-stats dd { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-art { position: relative; display: grid; place-items: center; min-height: 280px; }
.hero-art img { position: relative; width: min(100%, 380px); filter: drop-shadow(0 30px 50px rgba(47, 139, 255, .45)); animation: float 6s ease-in-out infinite; }
.ring { position: absolute; border-radius: 50%; border: 1px solid; inset: 0; margin: auto; }
.ring-a { width: 78%; aspect-ratio: 1; border-color: rgba(56,201,255,.35); animation: spin 28s linear infinite; border-style: dashed; }
.ring-b { width: 100%; aspect-ratio: 1; border-color: rgba(255,154,31,.28); animation: spin 40s linear infinite reverse; border-style: dotted; }
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- category chips ---------- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 8px; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 38px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: #c5cee8;
  background: var(--panel); border: 1px solid var(--line); transition: all .25s var(--ease); }
.chip:hover { background: var(--panel-strong); color: #fff; transform: translateY(-2px); }
.chip.on { color: #fff; background: var(--grad-btn); border-color: transparent; box-shadow: 0 10px 24px -10px rgba(122,69,240,.9); }

/* =========================================================
   GAMES GRID
   ========================================================= */
.games-section { scroll-margin-top: 96px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 10px 0 20px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; }
.section-head p { margin-top: 6px; font-size: 14px; }
.section-head b { color: var(--amber); font-weight: 600; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 20px; }
.game-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.035)); border: 1px solid var(--line);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; }
.game-card::before { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: conic-gradient(from 210deg, var(--blue), var(--violet), var(--orange), var(--blue));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.game-card:hover { transform: translateY(-8px); box-shadow: 0 30px 50px -24px rgba(47, 100, 255, .55), 0 0 0 1px transparent; }
.game-card:hover::before, .game-card:focus-visible::before { opacity: 1; }
.gc-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, #12206b, #3a1c78); }
.gc-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.game-card:hover .gc-media img { transform: scale(1.08); }
.gc-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; z-index: 2; background: linear-gradient(0deg, rgba(6,10,28,.75), transparent); }
.gc-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Outfit', sans-serif; font-size: 64px; font-weight: 800; color: rgba(255,255,255,.35); }
.game-card.no-img .gc-media img { display: none; }
.gc-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 14px 16px; }
.gc-title { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gc-play { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff;
  background: var(--grad-btn); box-shadow: 0 8px 18px -8px rgba(122,69,240,.9); transition: transform .3s var(--ease), background .3s; }
.game-card:hover .gc-play { background: var(--grad-warm); color: #1a1207; transform: scale(1.06); }

/* scroll-in animation (added by JS only) */
.game-card.reveal { opacity: 0; transform: translateY(18px); }
.game-card.reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms), box-shadow .4s var(--ease), border-color .3s; }
.game-card.reveal.in:hover { transform: translateY(-8px); transition-delay: 0ms; }

/* ---------- pager ---------- */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.pg { min-width: 44px; height: 44px; padding: 0 12px; display: grid; place-items: center; border-radius: 14px; font-weight: 600; background: var(--panel); border: 1px solid var(--line); transition: all .2s var(--ease); }
a.pg:hover { background: var(--panel-strong); transform: translateY(-2px); }
.pg-current { background: var(--grad-btn); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -10px rgba(122,69,240,.95); }
.pg-gap { background: none; border-color: transparent; color: var(--muted); }

/* ---------- empty state ---------- */
.empty-state { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 56px 20px; border-radius: 28px; background: var(--panel); border: 1px dashed var(--line-strong); }
.empty-state h1, .empty-state h3 { font-size: 26px; }
.empty-state p { color: var(--muted); max-width: 42ch; margin-bottom: 8px; }
.empty-glyph { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 22px; font: 700 34px 'Outfit', sans-serif; color: #fff; background: var(--grad-btn); box-shadow: 0 16px 34px -12px rgba(122,69,240,.9); }
.empty-logo { width: 220px; }

/* =========================================================
   FOOTER (ThirdMi)
   ========================================================= */
.site-footer { position: relative; margin: 20px 0 24px; padding: 40px clamp(20px, 4vw, 44px) 22px; border-radius: 32px; overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 24, 64, .7), rgba(6, 10, 28, .9)); border: 1px solid var(--line); }
.site-footer::before { content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 2px; background: var(--grad-brand); border-radius: 2px; box-shadow: 0 0 22px rgba(139, 92, 255, .8); }
.ft-glow { position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255,154,31,.22), transparent 65%); pointer-events: none; }
.ft-grid { position: relative; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; }
.ft-logo { width: 190px; margin-bottom: 14px; }
.ft-brand p { max-width: 46ch; color: var(--muted); font-size: 14px; }
.ft-col h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.ft-col li { margin-bottom: 9px; }
.ft-col a { color: #c5cee8; font-size: 14px; transition: color .2s, padding .25s var(--ease); }
.ft-col a:hover { color: #fff; padding-left: 4px; }
.ft-pillars li { display: flex; align-items: center; gap: 10px; font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 600; color: #fff; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.d-blue { background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.d-purple { background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.d-orange { background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.ft-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.ft-bottom { position: relative; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.ft-tag { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; letter-spacing: .06em; }

/* =========================================================
   PLAY PAGE
   ========================================================= */
.play-body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.play-bar { flex: none; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 14px; background: rgba(8, 13, 36, .9); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.pb-back { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-strong); font-weight: 600; font-size: 14px; transition: background .2s; }
.pb-back:hover { background: var(--panel-strong); }
.pb-brand img { width: 40px; height: 40px; object-fit: contain; }
.pb-title { flex: 1; min-width: 0; font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-stage { position: relative; flex: 1; background: #000; }
.play-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.play-loader { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(600px 400px at 50% 40%, #14246e, var(--bg)); transition: opacity .5s .1s; z-index: 1; }
.play-loader.done { opacity: 0; pointer-events: none; }
.play-loader span { width: 14px; height: 14px; border-radius: 50%; animation: bounce 1s infinite ease-in-out; }
.play-loader span:nth-child(1) { background: var(--blue); }
.play-loader span:nth-child(2) { background: var(--violet); animation-delay: .15s; }
.play-loader span:nth-child(3) { background: var(--orange); animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1.2); opacity: 1; } }
.play-missing { min-height: 100vh; align-content: center; border: 0; background: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1279.98px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .ft-grid { grid-template-columns: 1fr 1fr; }
  .ft-brand { grid-column: 1 / -1; }
}

@media (max-width: 1023.98px) {
  .shell { margin-left: 0; padding: 0 14px; }
  .sidebar { width: min(320px, 86vw); transform: translateX(calc(-100% - 20px)); }
  .sb-close { display: grid; }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-overlay { opacity: 1; pointer-events: auto; }
  body.sb-open { overflow: hidden; }
  .top-mark { display: block; }
  .topbar { top: 8px; margin-top: 8px; }
}

@media (max-width: 639.98px) {
  .top-cta span { display: none; }
  .top-cta { width: 44px; padding: 0; height: 44px; }
  .search kbd { display: none; }
  .hero { border-radius: 26px; }
  .hero-actions .btn { flex: 1; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gc-info { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .gc-play { justify-content: center; }
  .gc-title { font-size: 14.5px; }
  .ft-grid { grid-template-columns: 1fr; gap: 26px; }
  .pb-title { font-size: 15px; }
  .pb-back span, #fsBtn span { display: none; }
  .pb-back { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .game-card.reveal { opacity: 1; transform: none; }
}
