/* Polbyte Games – catalogue site in the Polbyte visual language (polbyte.com): light, flat, pink→purple brand gradient.
   No build step, no external fonts. Dark mode follows the system, like polbyte.com. */
:root {
  --bg: #f8f7fb;
  --bg-alt: #f1eef7;
  --surface: #ffffff;
  --fg: #1a1424;
  --muted: #625a70;
  --line: #e4dfee;
  --accent: #a0179f;
  --accent-strong: #7d1aa8;
  --accent-soft: #f7e5f6;
  --grad: linear-gradient(120deg, #e83a8c 0%, #c4179f 45%, #8a22c4 100%);
  --hero: linear-gradient(160deg, #ec3d84 0%, #d1208f 35%, #ad21ad 70%, #8a24c2 100%);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0b16;
    --bg-alt: #151020;
    --surface: #1b1528;
    --fg: #eee9f5;
    --muted: #a399b3;
    --line: #2c2340;
    --accent: #e46ad4;
    --accent-strong: #f39be6;
    --accent-soft: #2e1636;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--fg); font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
section { padding: 88px 0; position: relative; scroll-margin-top: 60px; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.15rem; }
.lead { color: var(--muted); font-size: 1.125rem; max-width: 640px; margin: 18px 0 0; }
.muted { color: var(--muted); }
.kicker { margin: 0 0 12px; color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; display: flex; align-items: center; gap: 8px; }
.kicker .dot { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1.5px solid transparent; transition: transform .15s, background-position .3s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); background-size: 140% 100%; color: #fff; }
.btn-primary:hover { background-position: 100% 0; }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); }
.btn.sm { padding: 8px 16px; font-size: .9rem; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; height: 64px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark { display: inline-block; height: 24px; aspect-ratio: 844 / 133; background: linear-gradient(120deg, #f0368a 0%, #e0258f 55%, #c81aa0 100%);
  -webkit-mask: url(polbyte-wordmark.png) center / contain no-repeat; mask: url(polbyte-wordmark.png) center / contain no-repeat; }
.wordmark.sm { height: 14px; vertical-align: -2px; margin-right: 6px; }
.logo-tag { font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1.5px solid currentColor; border-radius: 6px; padding: 2px 7px; }
.nav nav { margin-left: auto; display: flex; gap: 22px; }
.nav nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav nav a:hover { color: var(--fg); }

/* hero – brand gradient band, white text (as on polbyte.com) */
.hero, .game-hero { padding: 76px 0 92px; overflow: hidden; color: #fff; background: var(--hero); }
.hero .kicker, .game-hero .kicker, .game-hero .crumbs, .game-hero .crumbs a { color: rgba(255, 255, 255, .85); }
.hero .lead, .game-hero .lead { color: rgba(255, 255, 255, .9); }
.hero h1 em { font-style: normal; color: #ffd3f1; }
.hero .btn-primary, .game-hero .btn-primary { background: #fff; color: #8a1fb3; }
.hero .btn-ghost, .game-hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero .btn-ghost:hover, .game-hero .btn-ghost:hover { border-color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; position: relative; }
.screen-frame { position: relative; display: block; border-radius: var(--radius); padding: 8px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); transition: transform .2s; }
.screen-frame:hover { transform: translateY(-3px); }
.screen-frame img { border-radius: 12px; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.play-badge { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; padding-left: 4px;
  background: #fff; color: #8a1fb3; transition: transform .2s; }
.screen-frame:hover .play-badge, .cover:hover .play-badge { transform: scale(1.08); }
.play-badge.sm { width: 52px; height: 52px; margin: -26px 0 0 -26px; font-size: 18px; opacity: 0; }
.cover:hover .play-badge.sm { opacity: 1; }
.champ { position: absolute; left: 20px; bottom: 20px; background: #fff; color: #1a1424; border-radius: 999px; padding: 5px 14px; font-weight: 700; font-size: .88rem; }
.pixels { position: absolute; inset: 0; pointer-events: none; }
.pixels i { position: absolute; width: 12px; height: 12px; background: #fff; border-radius: 2px; opacity: .14; }
.pixels i:nth-child(1) { left: 3%; top: 16%; } .pixels i:nth-child(2) { left: 6%; top: 10%; width: 7px; height: 7px; opacity: .1; }
.pixels i:nth-child(3) { left: 46%; bottom: 10%; } .pixels i:nth-child(4) { left: 49%; bottom: 15%; width: 6px; height: 6px; opacity: .08; }
.pixels i:nth-child(5) { right: 4%; top: 12%; width: 10px; height: 10px; } .pixels i:nth-child(6) { right: 7%; top: 7%; width: 6px; height: 6px; opacity: .1; }

/* games grid – scales to any number of titles */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font: inherit; font-weight: 600; font-size: .9rem; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.filters button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.game-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.game-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.game-card[hidden] { display: none; }
.cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.body h3 a { text-decoration: none; }
.body h3 a:hover { color: var(--accent); }
.body p { margin: 0; color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tags span.soft { background: var(--bg-alt); color: var(--muted); }
.game-hero .tags span { background: rgba(255, 255, 255, .2); color: #fff; }
.game-hero .tags span.soft { background: transparent; border: 1px solid rgba(255, 255, 255, .4); color: rgba(255, 255, 255, .9); }
.meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .9rem; margin-top: auto; padding-top: 6px; }
.actions { display: flex; gap: 8px; }
.game-card.soon { border-style: dashed; background: transparent; }
.game-card.soon:hover { transform: none; border-color: var(--line); }
.soon-art { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--bg-alt); border-bottom: 1px dashed var(--line); }
.soon-art span { font-size: 56px; font-weight: 800; color: var(--line); }

/* hall of fame */
.dark { background: var(--bg-alt); }
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 32px; }
.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.board-head a { color: var(--accent); text-decoration: none; font-weight: 700; font-size: .9rem; }
.leaders { list-style: none; margin: 0; padding: 0; counter-reset: r; display: grid; }
.leaders li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); }
.leaders li:first-child { border-top: 0; }
.leaders li::before { counter-increment: r; content: counter(r); color: var(--muted); font-weight: 700; text-align: center; }
.leaders li:nth-child(1)::before { content: "🥇"; } .leaders li:nth-child(2)::before { content: "🥈"; } .leaders li:nth-child(3)::before { content: "🥉"; }
.leaders li.empty { display: block; color: var(--muted); } .leaders li.empty::before { content: none; }
.leaders li.empty a { color: var(--accent); font-weight: 600; }
.leaders .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.leaders .who small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.leaders b { text-align: right; font-variant-numeric: tabular-nums; }
.leaders b small { color: var(--muted); font-weight: 400; font-size: .8rem; }

/* b2b – brand gradient card, like the "startups" band on polbyte.com */
.b2b { padding: 72px 0; }
.b2b-box { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding: 40px; border-radius: 24px; background: var(--hero); color: #fff; max-width: 1120px; }
.b2b-box .lead { color: rgba(255, 255, 255, .9); }
.b2b-box .btn-primary { background: #fff; color: #8a1fb3; }

/* game page */
.game-hero .tags { margin-top: 24px; }
.crumbs { margin: 0 0 14px; font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.rules { padding: 0; list-style: none; display: grid; gap: 10px; margin: 20px 0 32px; }
.rules li { padding-left: 26px; position: relative; color: var(--muted); }
.rules li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 2px; background: var(--grad); }
.keys { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.keys span { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; }
.board.big table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board.big th { text-align: left; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.board.big td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.board.big tr:last-child td { border-bottom: 0; }
.board.big tr:nth-child(-n+3) td { font-weight: 700; }
.board.big .num { text-align: right; }
.board.big td:nth-child(2) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer .legal-links { flex-basis: 100%; }

@media (max-width: 900px) {
  .hero-grid, .two-col { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 600px) {
  section { padding: 64px 0; }
  .wrap { padding: 0 16px; }
  .nav nav a:not(.ext) { display: none; }
  .games, .boards { grid-template-columns: minmax(0, 1fr); }
  .b2b-box { padding: 26px; }
  .board.big th:nth-child(3), .board.big td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .screen-frame, .game-card { transition: none; } }

/* Game page: "About the game" text block */
.about-game { padding-top: 0; }
.narrow { max-width: 780px; }
.about-game p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }

/* Account page + Games Pass */
.account-hero { padding-bottom: 64px; }
.account { padding-top: 56px; }
.account-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.account h2 { font-size: 1.4rem; }
.account .board.big + .board.big, .account .board.big + h2 { margin-top: 24px; }
.plans-title { margin-top: 32px; }
.extend-later { margin-top: 20px; }
.login-form { margin: 18px 0 10px; }
.login-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.login-form .row { display: flex; gap: 10px; flex-wrap: wrap; }
.login-form input { flex: 1 1 220px; font: inherit; padding: 11px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--fg); }
.login-form input:focus { outline: none; border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .spin { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: pbspin .7s linear infinite; }
.btn.loading { opacity: .85; cursor: progress; pointer-events: none; }
.btn.loading .spin { display: inline-block; }
@keyframes pbspin { to { transform: rotate(360deg); } }
.notice { padding: 12px 16px; border-radius: 12px; margin: 0 0 14px; font-size: .95rem; }
.account h2 + .notice, .account h2 + .notice + .notice { margin-top: 16px; }
.notice.ok { background: #e6f7ec; color: #16633a; } .notice.err { background: #fde8ee; color: #9b1c3b; }
@media (prefers-color-scheme: dark) { .notice.ok { background: #143321; color: #8fe0ad; } .notice.err { background: #3a1522; color: #ff9bb6; } }
.small { font-size: .85rem; }
.pass-card .status { font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); }
.pass-card.on .status { background: #e6f7ec; color: #16633a; }
.pass-card.on { border-color: var(--accent); }
.big-date { font-size: 1.15rem; margin: 6px 0 10px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 18px 0; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.plan .badge { position: absolute; top: -11px; right: 16px; background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.plan .price { margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.plan p { margin: 0; }
.plan .btn { margin-top: auto; justify-content: center; }
button.link { font: inherit; background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0; font-size: .9rem; }
details.danger { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.danger summary { cursor: pointer; color: var(--muted); font-size: .9rem; font-weight: 600; }
.delete-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; font-size: .9rem; }
.history tr.revoked td { color: var(--muted); text-decoration: line-through; }
/* Games Pass band on the home page: text + a light price card (deliberately not another gradient box like .b2b) */
.pass-band { padding: 80px 0; }
.pass-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.pass-grid .rules { margin-bottom: 0; }
.price-card { position: relative; background: var(--surface); border: 1.5px solid var(--accent); border-radius: 24px; padding: 34px 32px 28px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 60px -30px rgba(160, 23, 159, .45); }
.price-card .badge { position: absolute; top: -13px; left: 28px; background: var(--grad); color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.price-card .price { margin: 6px 0 0; font-size: 3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.price-card .price small { font-size: 1rem; font-weight: 600; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.price-card .btn { justify-content: center; margin-top: 8px; }
.price-card p { margin: 0; }
@media (max-width: 900px) { .pass-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; } .price-card { margin-top: 10px; } }
@media (max-width: 900px) { .account-grid { grid-template-columns: minmax(0, 1fr); } }
/* signed-in indicator in the top bar */
.nav nav a.me { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: .85rem; max-width: 300px; }
.nav nav a.me:hover { border-color: var(--accent); }
.nav nav a.me .dot { width: 8px; height: 8px; border-radius: 50%; background: #c7bfd3; flex: none; }
.nav nav a.me.pass .dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.nav nav a.me .mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav nav a.me .tag { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); flex: none; }
.nav nav a.me.pass .tag { color: #16a34a; }
@media (max-width: 600px) { .nav nav a.acct { display: inline-flex; } .nav nav a.me .mail { display: none; } }

/* language switch in the top bar */
.nav nav .lang { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.nav nav .lang a { padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.nav nav .lang a.on { background: var(--accent); color: #fff; }
@media (max-width: 600px) { .nav nav .lang { display: inline-flex; } .nav nav { gap: 12px; } }

/* Store */
.hero-text { max-width: 760px; }
.plans-mini { display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.plans-mini span { background: var(--bg-alt); padding: 4px 10px; border-radius: 999px; }
.plans-mini b { color: var(--fg); }
.game-card.soon-product .cover img { filter: saturate(.6); opacity: .85; }
.how { max-width: 820px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.steps li { position: relative; padding-left: 48px; color: var(--muted); }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; }
.buy-box .status { font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; background: var(--bg-alt); color: var(--muted); }
.buy-box .status.on, .access-card .status.on { background: #e6f7ec; color: #16633a; }
.notice.info { background: var(--accent-soft); color: var(--accent-strong); }
.notice.info a { color: inherit; font-weight: 700; }
.access-list { display: grid; gap: 16px; }
.access-card.on { border-color: var(--accent); }
.access-card .actions { margin-top: 12px; }
.plan.subscription .price small { display: block; margin: 2px 0 0; }

/* legal pages */
.legal-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.legal-body { padding: 56px 0 88px; }
.legal-body h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.legal-body p, .legal-body li { color: var(--muted); line-height: 1.7; }
.legal-body ol, .legal-body ul { padding-left: 22px; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.legal-body th, .legal-body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
