/* =========================================================
   MobileGames.cc — design tokens
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-2: #0f1529;
  --surface: #141b31;
  --surface-2: #1a2340;
  --surface-hover: #1e2848;
  --text: #eef1fb;
  --text-2: #c3c9de;
  --muted: #8a93b2;
  --border: #252f50;
  --border-strong: #34406a;
  --accent: #8b7cff;
  --accent-2: #22d3ee;
  --accent-text: #b4a9ff;
  --accent-soft: #8b7cff1f;
  --gold: #fbbf24;
  --hot: #fb7185;
  --android: #3ddc84;
  --ios: #60a5fa;
  --shadow-sm: 0 2px 8px #02040c40;
  --shadow-md: 0 12px 32px #02040c66;
  --shadow-lg: 0 24px 64px #02040c88;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 68px;
  --container: 1240px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root.light {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-2: #eef0f8;
  --surface: #ffffff;
  --surface-2: #f3f4fa;
  --surface-hover: #f8f8fd;
  --text: #121631;
  --text-2: #353b5c;
  --muted: #646b8a;
  --border: #e2e5f0;
  --border-strong: #cdd2e4;
  --accent: #6d5cf6;
  --accent-2: #0891b2;
  --accent-text: #5b47ec;
  --accent-soft: #6d5cf614;
  --gold: #f59e0b;
  --hot: #e11d48;
  --android: #16a34a;
  --ios: #2563eb;
  --shadow-sm: 0 2px 6px #1b1f3a10;
  --shadow-md: 0 12px 30px #1b1f3a14;
  --shadow-lg: 0 24px 60px #1b1f3a1f;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
img { display: block; max-width: 100%; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
a { color: inherit; }
button { font: inherit; }
.hidden { display: none !important; }
#app { flex: 1; width: 100%; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* =========================================================
   Header
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.topbar-inner {
  max-width: var(--container); margin: 0 auto; height: var(--header-h);
  padding: 0 20px; display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 21px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.brand-text { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.brand-tld { color: var(--accent-text); }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  padding: 8px 14px; border-radius: 10px; color: var(--muted);
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: color .2s, background .2s;
}
.topnav a:hover { color: var(--text); background: var(--surface-2); }
.icon-button {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text-2); font-size: 19px; cursor: pointer;
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.icon-button:hover { color: var(--text); border-color: var(--border-strong); transform: rotate(-12deg); }

/* =========================================================
   Buttons, badges, chips
   ========================================================= */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s, background .2s, box-shadow .2s, opacity .2s, border-color .2s;
}
.button svg { font-size: 18px; }
.button-block { width: 100%; }
.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}
.button-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 45%, transparent); }
.button-primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.button-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.button-ghost:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.button-light { min-height: 40px; padding: 0 16px; font-size: 14px; background: #fff; color: #111527; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.badge-hot { background: #fb718526; color: #ffd1d9; border: 1px solid #fb718555; backdrop-filter: blur(8px); }
.badge-hot svg { color: var(--hot); }

.rating-chip {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 99px;
  background: #0b1020cc; color: #fff; backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 800; border: 1px solid #ffffff1f;
}
.rating-chip svg { color: var(--gold); font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 99px;
  background: #ffffff14; border: 1px solid #ffffff26; color: #e9ecf8;
  font-size: 13px; font-weight: 600; backdrop-filter: blur(8px);
}

/* =========================================================
   Covers with graceful fallback
   ========================================================= */
.cover, .spotlight-bg, .backdrop-img {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, hsl(var(--h) 85% 62% / .9), transparent 55%),
    radial-gradient(circle at 80% 90%, hsl(calc(var(--h) + 60) 80% 50% / .85), transparent 60%),
    hsl(calc(var(--h) + 20) 45% 18%);
}
.cover img, .spotlight-bg img, .backdrop-img img { width: 100%; height: 100%; object-fit: cover; }
.cover.no-img::after {
  content: attr(data-initials);
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #ffffffe6; font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(28px, 6vw, 46px); text-shadow: 0 4px 24px #0006;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; isolation: isolate; overflow: hidden; text-align: center;
  padding: clamp(56px, 9vw, 108px) 20px clamp(48px, 7vw, 84px);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1000px 500px at 50% -10%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 70%),
    radial-gradient(600px 400px at 90% 110%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 70%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 65%);
}
.hero-content { max-width: 720px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  padding: 6px 14px 6px 10px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-sm);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--android); box-shadow: 0 0 0 4px color-mix(in srgb, var(--android) 22%, transparent); }
.hero h1 {
  margin: 0 0 16px; font-size: clamp(2.4rem, 6.4vw, 4.4rem); line-height: 1.04;
  font-weight: 800; letter-spacing: -.045em;
}
.gradient-text {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0 auto 32px; max-width: 520px; color: var(--muted); font-size: clamp(15px, 1.8vw, 18px); }

.search-box { position: relative; display: block; max-width: 560px; margin: 0 auto; }
.search-box input {
  width: 100%; height: 58px; padding: 0 56px 0 54px;
  border-radius: 16px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font: 500 16px var(--font); outline: none;
  box-shadow: var(--shadow-md);
  transition: border-color .2s, box-shadow .2s;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md); }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }
.search-icon { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 21px; display: flex; pointer-events: none; }
.search-kbd {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  min-width: 26px; padding: 2px 8px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--muted); font: 600 12px/1.6 ui-monospace, monospace; pointer-events: none;
}
.search-box input:focus ~ .search-kbd, .search-box input:not(:placeholder-shown) ~ .search-kbd { opacity: 0; }

.hero-stats {
  display: flex; justify-content: center; gap: clamp(20px, 6vw, 56px); margin-top: 38px;
}
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.03em; }
.hero-stats em { font-style: normal; color: var(--gold); font-size: .75em; margin-left: 2px; }
.hero-stats span { color: var(--muted); font-size: 13px; font-weight: 500; }

/* =========================================================
   Sections
   ========================================================= */
.home-main, .detail-main {
  max-width: var(--container); width: 100%; margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) 20px 72px;
  display: flex; flex-direction: column; gap: clamp(40px, 6vw, 64px);
}
.section-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  margin-bottom: 20px;
}
.section-title {
  display: flex; align-items: center; gap: 12px; margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem); font-weight: 800; letter-spacing: -.03em;
}
.section-icon {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent-text); font-size: 18px;
}
.section-icon.icon-fire { background: #fb71851f; color: var(--hot); }
.count-pill {
  padding: 3px 11px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0;
}

.segmented {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--border);
}
.segmented button {
  border: 0; padding: 8px 14px; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 700;
  transition: background .2s, color .2s;
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent); }

/* =========================================================
   Featured spotlight
   ========================================================= */
.spotlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.spotlight {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(300px, 36vw, 400px); border-radius: 24px;
  display: flex; align-items: flex-end; text-decoration: none; color: #fff;
  border: 1px solid #ffffff14; box-shadow: var(--shadow-lg);
  transition: transform .3s, box-shadow .3s;
}
.spotlight-bg { position: absolute; inset: 0; z-index: -2; }
.spotlight-bg img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.spotlight:hover { transform: translateY(-4px); }
.spotlight:hover .spotlight-bg img { transform: scale(1.06); }
.spotlight-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent 15%, #05081299 55%, #050812f2 100%);
}
.spotlight-content { padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 12px; width: 100%; }
.spotlight h3 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.spotlight p {
  margin: 0; max-width: 560px; color: #d5d9ea; font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.spotlight-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.spotlight-rating { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 800; }
.spotlight-rating svg { color: var(--gold); }
.spotlight-rating small { color: #aab1c9; font-size: 13px; font-weight: 600; }

/* =========================================================
   Game cards
   ========================================================= */
.games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.game-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform .25s, border-color .25s, box-shadow .25s, background .25s;
  animation: rise .4s both;
}
.game-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: var(--shadow-md); }
.card-media { position: relative; }
.card-media .cover { aspect-ratio: 16 / 10; }
.card-media .cover img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.game-card:hover .card-media .cover img { transform: scale(1.06); }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.card-body h3 {
  margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-body p {
  margin: 0 0 8px; color: var(--muted); font-size: 12.5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em;
}
.card-cta {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-text); font-size: 13px; font-weight: 700;
}
.card-cta svg { transition: transform .2s; }
.game-card:hover .card-cta svg { transform: translateX(4px); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.empty-state, .not-found { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state h3, .not-found h1 { margin: 14px 0 6px; color: var(--text); font-size: 20px; }
.empty-state p, .not-found p { margin: 0 0 20px; }
.empty-icon {
  display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto;
  border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); font-size: 26px; color: var(--muted);
}
.not-found { max-width: 520px; margin: 60px auto; }

/* =========================================================
   Detail page
   ========================================================= */
.detail-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: #070a14; border-bottom: 1px solid var(--border); }
.detail-backdrop { position: absolute; inset: 0; z-index: -1; }
.backdrop-img { position: absolute; inset: -40px; filter: blur(28px) saturate(1.3); opacity: .65; }
.detail-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #070a1455 0%, #070a14bb 60%, #070a14f2 100%);
}
.detail-hero-inner { max-width: var(--container); margin: 0 auto; padding: 22px 20px clamp(32px, 5vw, 52px); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: clamp(22px, 4vw, 40px);
  padding: 8px 14px 8px 10px; border-radius: 99px;
  background: #ffffff14; border: 1px solid #ffffff22; color: #fff;
  font-size: 14px; font-weight: 600; text-decoration: none; backdrop-filter: blur(8px);
  transition: background .2s;
}
.back-link:hover { background: #ffffff26; }
.detail-head { display: flex; align-items: flex-end; gap: clamp(18px, 3vw, 34px); flex-wrap: wrap; }
.detail-thumb {
  width: clamp(200px, 34vw, 400px); border-radius: 20px; overflow: hidden;
  border: 1px solid #ffffff26; box-shadow: 0 30px 70px #000a;
}
.detail-thumb .cover { aspect-ratio: 16 / 10; }
.detail-titles { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 14px; }
.detail-titles h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
.detail-rating { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.detail-rating strong { font-size: 20px; }
.detail-rating .out-of { color: #aab1c9; }
.stars { position: relative; display: inline-flex; font-size: 19px; }
.stars-base, .stars-fill { display: inline-flex; gap: 2px; white-space: nowrap; }
.stars-base { color: #ffffff2e; }
.stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--gold); }

.detail-main { padding-top: clamp(24px, 4vw, 40px); }
.detail-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); }
.detail-about { padding: clamp(22px, 3.5vw, 34px); }
.detail-about h2 { margin: 0 0 12px; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.description { margin: 0; max-width: 72ch; color: var(--text-2); font-size: 16px; line-height: 1.8; white-space: pre-line; }

.download-panel { width: 100%; max-width: 560px; margin: 0 auto; padding: 28px; text-align: center; position: relative; overflow: hidden; }
.download-panel::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.download-panel h2 { margin: 0 0 4px; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.download-panel .sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.platform {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 8px 14px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 700;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.platform:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.os-icon { font-size: 32px; display: flex; }
.platform[data-os="android"] .os-icon { color: var(--android); }
.platform[data-os="ios"] .os-icon { color: var(--text); }
.tick {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 12px; color: #fff;
  opacity: 0; transform: scale(.5); transition: opacity .2s, transform .2s;
}
.platform.selected .tick { opacity: 1; transform: none; }
.platform.selected[data-os="android"] { border-color: var(--android); background: color-mix(in srgb, var(--android) 10%, var(--surface)); }
.platform.selected[data-os="android"] .tick { background: var(--android); }
.platform.selected[data-os="ios"] { border-color: var(--ios); background: color-mix(in srgb, var(--ios) 10%, var(--surface)); }
.platform.selected[data-os="ios"] .tick { background: var(--ios); }
.hint { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }

.download-progress { padding: 8px 0; }
.ring {
  --p: 0;
  width: 104px; height: 104px; margin: 4px auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(closest-side, var(--surface) 80%, transparent 81%),
    conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0);
}
.ring span { font: 800 20px var(--font); letter-spacing: -.02em; }
.download-progress h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--text-2); }
.progress-track { height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.progress-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }

.notice-icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin: 4px auto 14px;
  border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); font-size: 26px;
}
.preview-note {
  margin: 8px 0 18px; padding: 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 14px; line-height: 1.55;
}

/* =========================================================
   Footer
   ========================================================= */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); margin-top: auto; }
.footer-inner {
  max-width: var(--container); margin: 0 auto; padding: 26px 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  color: var(--muted); font-size: 13px;
}
.footer-brand { color: var(--text); font-weight: 800; font-size: 15px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 640px) {
  .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .card-body { padding: 16px; }
  .card-body h3 { font-size: 16px; }
  .card-body p { font-size: 13px; }
}
@media (min-width: 900px) {
  .games-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
  .spotlight-main { grid-column: span 1; }
}
@media (min-width: 1180px) {
  .games-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  :root { --header-h: 60px; }
  .topbar-inner { padding: 0 16px; gap: 12px; }
  .topnav { display: none; }
  .icon-button { margin-left: auto; }
  .brand-mark { width: 34px; height: 34px; font-size: 19px; }
  .brand-text { font-size: 17px; }
  .home-main, .detail-main { padding-left: 16px; padding-right: 16px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .search-box input { height: 54px; font-size: 15px; }
  .search-kbd { display: none; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .games-grid { gap: 12px; }
  .card-body { padding: 11px; }
  .card-body h3 { font-size: 13.5px; }
  .card-body p { font-size: 11.5px; }
  .card-cta { font-size: 12px; }
  .rating-chip { top: 8px; right: 8px; font-size: 11px; padding: 3px 7px; }
  .spotlight-meta .button-light { display: none; }
  .detail-hero-inner { padding: 16px 16px 28px; }
  .detail-thumb { width: 100%; }
  .detail-titles { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}

/* Frosted glass and ambient color behind the page */
:root {
  --glass-surface: color-mix(in srgb, var(--surface) 70%, transparent);
  --glass-surface-soft: color-mix(in srgb, var(--surface-2) 66%, transparent);
}
:root.light {
  --glass-surface: color-mix(in srgb, #fff 76%, transparent);
  --glass-surface-soft: color-mix(in srgb, #f5f6ff 72%, transparent);
}
body {
  background:
    radial-gradient(ellipse at 8% 16%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%),
    radial-gradient(ellipse at 92% 38%, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 40%),
    radial-gradient(ellipse at 50% 92%, color-mix(in srgb, var(--hot) 8%, transparent), transparent 38%),
    var(--bg);
  background-attachment: fixed;
}
.topbar {
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: saturate(170%) blur(20px);
  -webkit-backdrop-filter: saturate(170%) blur(20px);
  border-bottom-color: color-mix(in srgb, var(--border) 60%, transparent);
}
.eyebrow,.icon-button,.segmented,.card,.game-card,.search-box input {
  background-color: var(--glass-surface);
  backdrop-filter: saturate(145%) blur(16px);
  -webkit-backdrop-filter: saturate(145%) blur(16px);
  border-color: color-mix(in srgb, var(--border-strong) 66%, transparent);
}
.search-box input {
  box-shadow: 0 16px 42px #02040c38, inset 0 1px #ffffff12;
}
.game-card {
  box-shadow: var(--shadow-sm), inset 0 1px #ffffff0b;
}
.game-card:hover {
  background-color: color-mix(in srgb, var(--surface-hover) 76%, transparent);
  box-shadow: var(--shadow-md), 0 0 28px color-mix(in srgb, var(--accent) 12%, transparent);
}
.card-body { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface) 42%, transparent)); }
.spotlight-content {
  background: linear-gradient(180deg, #080d1a38, #080d1ac9);
  border-top: 1px solid #ffffff24;
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
}
.platform {
  background: var(--glass-surface-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.download-panel.card {
  background-color: color-mix(in srgb, var(--surface) 74%, transparent);
  box-shadow: var(--shadow-md), inset 0 1px #ffffff0d;
}
.footer {
  background: color-mix(in srgb, var(--bg-2) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
:root.light .spotlight-content { background: linear-gradient(180deg, #11152738, #111527d9); }

.offer-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px 18px;
  text-align: center;
  animation: offer-reveal .5s cubic-bezier(.2,.75,.25,1) both;
}
.offer-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #fb923c55;
  border-radius: 99px;
  background: #f9731618;
  color: #fdba74;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}
.offer-step svg { width: 15px; height: 15px; color: #fb923c; }
.offer-prompt h2 { margin: 15px 0 7px; font-size: clamp(1.35rem, 4vw, 1.75rem); letter-spacing: -.035em; }
.offer-copy { max-width: 42ch; margin: 0 auto 16px; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.offer-guidance {
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--border-strong) 70%, transparent);
  border-radius: 12px;
  background: var(--glass-surface-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
}
#open-offer { min-height: 50px; box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 30%, transparent); }
#open-offer svg { transition: transform .2s; }
#open-offer:hover svg { transform: translateX(4px); }
#try-again { max-width: 340px; margin: 0 auto; }
.offer-status { margin: 12px 0 0; color: #fca5a5; font-size: 12px; }
@keyframes offer-reveal { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
:root.light .offer-step { color: #9a3412; background: #fff7ed; }
@media (prefers-reduced-motion: reduce) { .offer-prompt { animation: none; } }
