@font-face { font-family: Inter; font-weight: 400; src: url(fonts/Inter-Regular.ttf); font-display: swap; }
@font-face { font-family: Inter; font-weight: 700; src: url(fonts/Inter-Bold.ttf); font-display: swap; }

:root {
  --bg: #0a0b0d;
  --panel: #242424;
  --panel-2: #161616;
  --nav: #101010;
  --text: #ffffff;
  --soft: #cdd2dc;
  --muted: #8b9099;
  --blue: #0a84ff;
  --blue-2: #0b6ad1;
  --glow: #115ea8;
  --red: #ff7878;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 Inter, system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* the animated binary-digit backdrop, with the blue glow rising from the bottom, like the game's sign-in screen */
#backdrop { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.glow { position: fixed; left: 0; right: 0; bottom: 0; height: 45vh; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 100%, rgba(17, 94, 168, .75), rgba(17, 94, 168, 0) 70%); }

/* top bar */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(16, 16, 16, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06); }
header.top .in { max-width: 1180px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 20px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand:hover { text-decoration: none; }
nav.main { display: flex; gap: 6px; }
nav.main a { color: var(--soft); font-weight: 700; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
nav.main a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; color: #fff; }
nav.main a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; border-radius: 999px; font: 700 15px Inter, sans-serif;
  padding: 11px 22px; color: #101216; background: #fff; transition: background .15s, transform .1s; }
.pill:hover { background: #e2e2e2; text-decoration: none; }
.pill:active { transform: scale(.98); }
.pill.blue { background: var(--blue); color: #fff; }
.pill.blue:hover { background: #2f98ff; }
.pill.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75); }
.pill.ghost:hover { background: rgba(255, 255, 255, .12); }
.pill.big { padding: 16px 34px; font-size: 18px; }
.me { display: flex; align-items: center; gap: 10px; background: #242424; border-radius: 999px; padding: 4px 6px 4px 4px; cursor: pointer; border: 0; color: #fff; font: 700 14px Inter, sans-serif; }
.me .av { width: 32px; height: 32px; border-radius: 50%; background: #fff; overflow: hidden; display: block; position: relative; }
.me .av i { position: absolute; left: 50%; top: 5px; width: 14px; height: 14px; margin-left: -7px; border-radius: 4px; background: #f5cc30; }
.me .av b { position: absolute; left: 0; right: 0; bottom: 0; height: 13px; background: #0d69ab; }
.me .nm { padding-right: 12px; }
.menu { position: absolute; right: 20px; top: 58px; background: #242424; border-radius: 14px; padding: 6px; min-width: 170px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); display: none; }
.menu.open { display: block; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: #fff; font: 700 14px Inter, sans-serif; padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.menu button:hover { background: rgba(255, 255, 255, .1); }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px 80px; }

/* landing */
.hero { text-align: center; padding: 120px 0 70px; }
.hero h1 { font-size: clamp(38px, 7vw, 72px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -.02em; }
.hero p { color: var(--soft); font-size: 20px; max-width: 620px; margin: 0 auto 34px; }
.hero .row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .hint { margin-top: 16px; color: var(--muted); font-size: 14px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 30px; }
.card { background: var(--panel); border-radius: 28px; padding: 28px; }
.card h3 { margin: 14px 0 8px; font-size: 20px; }
.card p { margin: 0; color: var(--soft); }
.ico { width: 52px; height: 52px; border-radius: 16px; background: var(--panel-2); display: grid; place-items: center; transform: rotate(-8deg); }
.ico svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h2.sec { font-size: 28px; margin: 70px 0 20px; }
.lead { color: var(--soft); margin: -8px 0 24px; }

/* games */
.page-title { font-size: 34px; margin: 60px 0 6px; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 20px; margin-top: 22px; }
.game { background: #fff; color: #101216; border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; height: 250px; }
.game .stats { margin: 8px; background: #4f4f4f; color: #fff; border-radius: 999px; padding: 6px 14px; display: flex; gap: 18px; font-size: 13px; font-weight: 700; }
.game .art { flex: 1; background: linear-gradient(180deg, #e9f2ff, #bcd9fb); display: grid; place-items: center; }
.game .art img { width: 76px; height: 76px; border-radius: 18px; }
.game .foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 14px 18px; }
.game .foot b { font-size: 16px; }
.game .play { width: 64px; height: 38px; border-radius: 999px; background: var(--blue); border: 0; cursor: pointer; display: grid; place-items: center; }
.game .play:hover { background: #2f98ff; }
.game .play svg { width: 18px; height: 18px; fill: #fff; }
.note { margin-top: 18px; color: var(--soft); background: var(--panel); border-radius: 18px; padding: 14px 18px; display: none; }
.note.show { display: block; }

/* downloads */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 26px; }
.dl .card { display: flex; flex-direction: column; gap: 6px; }
.dl .card img { width: 84px; height: 84px; border-radius: 20px; }
.dl .card h3 { margin: 12px 0 2px; font-size: 24px; }
.dl .meta { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.dl .pill { align-self: flex-start; margin-top: auto; }
.steps { color: var(--soft); padding-left: 20px; }
.steps li { margin: 6px 0; }

/* sign in / sign up */
.auth { max-width: 380px; margin: 90px auto 0; }
.auth .box { background: var(--panel); border-radius: 36px; padding: 30px 28px 28px; }
.auth h1 { margin: 0 0 26px; font-size: 30px; }
.auth label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 8px; }
.auth input { width: 100%; background: #101010; border: 2px solid transparent; border-radius: 999px; padding: 12px 18px; color: #fff; font: 400 15px Inter, sans-serif; outline: 0; }
.auth input:focus { border-color: var(--blue); }
.auth .legal { color: var(--soft); font-size: 12px; text-align: center; margin: 24px 8px 14px; }
.auth .pill { width: 100%; justify-content: center; }
.auth .err { color: var(--red); font-size: 14px; min-height: 20px; margin-top: 12px; text-align: center; }
.auth .switch { text-align: center; color: var(--soft); font-size: 14px; margin-top: 18px; }

footer.bottom { border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(16, 16, 16, .7); padding: 26px 20px; color: var(--muted); font-size: 14px; }
footer.bottom .in { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
footer.bottom a { color: var(--soft); }

@media (max-width: 720px) {
  header.top .in { gap: 10px; height: 58px; }
  .brand span { display: none; }
  nav.main a { padding: 8px 10px; font-size: 14px; }
  .hero { padding: 70px 0 40px; }
  .pill { padding: 10px 16px; }
}

/* logged-in layout: the game's Home screen */
body.shelled { display: block; background: #0f0f0f; }
body.shelled #backdrop, body.shelled .glow { display: none; }
.shell { display: flex; min-height: 100vh; }
.side { width: 72px; background: #0f0f0f; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.side .brand img { width: 36px; height: 36px; margin-bottom: 26px; }
.si { width: 62px; padding: 9px 0 7px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #b9bdc6; font-size: 11px; font-weight: 700; }
.si svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.si:hover { text-decoration: none; background: rgba(255, 255, 255, .07); color: #fff; }
.si.on { color: #fff; }
.si.on svg { fill: #fff; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bar { height: 54px; display: flex; align-items: center; gap: 20px; padding: 0 22px 0 12px; }
.bar h1 { margin: 0; font-size: 18px; flex: 0 0 180px; }
.search { flex: 0 1 330px; margin: 0 auto; display: flex; align-items: center; gap: 8px; background: #242424; border-radius: 999px; padding: 0 14px; height: 34px; }
.search svg { width: 16px; height: 16px; stroke: #9aa0aa; fill: none; stroke-width: 2.2; stroke-linecap: round; display: block; }
.search input { flex: 1; background: none; border: 0; outline: 0; color: #fff; font: 400 13px Inter, sans-serif; min-width: 0; }
.bar #account { margin-left: auto; }
.panel { flex: 1; background: #242424; border-radius: 28px 0 0 0; padding: 26px 26px 60px; }
.shell main { max-width: none; padding: 0; margin: 0; }
.shell .menu { top: 50px; right: 22px; }
.shell .page-title { margin-top: 0; }
.shell .card { background: #161616; }
.shell h2.sec { font-size: 18px; margin: 28px 0 14px; }
h2.sec.first { margin-top: 0; }
.friends { display: flex; gap: 14px; overflow: hidden; }
.fr { width: 76px; height: 76px; flex: 0 0 76px; border-radius: 22px; background: #161616; transform: rotate(-10deg); display: grid; place-items: center; }
.fr svg { width: 34px; height: 34px; fill: #5a5a5a; stroke: none; transform: rotate(10deg); }
@media (max-width: 720px) {
  .side { width: 56px; } .si { width: 50px; } .bar h1 { display: none; } .panel { border-radius: 22px 0 0 0; padding: 20px 14px 50px; }
}
