/* Light, clean storefront. Sized to be read and pressed from inside a headset:
   large type, big buttons, nothing that needs precise pointing. */
:root {
  --bg: #ffffff;
  --soft: #f1f3f5;
  --line: #dde1e6;
  --text: #1c1e21;
  --muted: #5f6670;
  --blue: #0a62e6;
  --blue-dark: #0850bd;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; flex: none; }
.wrap { width: min(1400px, 100% - 64px); margin: 0 auto; }
.muted { color: var(--muted); }
.pad { padding: 60px 0; }
.empty { color: var(--muted); font-size: 19px; padding: 40px 0; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; word-break: break-all; }

/* ---------- header ---------- */
.head { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 28px; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--text); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo img { width: 32px; height: 32px; }
.tabs { display: flex; height: 100%; gap: 4px; }
.tabs a { display: flex; align-items: center; padding: 0 14px; color: var(--text); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--blue); }
.tabs a[aria-current="page"] { border-bottom-color: var(--blue); }
.search {
  margin-left: auto; display: flex; align-items: center; gap: 10px; width: 400px; max-width: 38vw; height: 52px;
  padding: 0 16px; border: 1px solid #c4c9d0; border-radius: 10px; color: var(--muted);
}
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 98, 230, 0.15); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 17px; color: var(--text); }

/* ---------- hero carousel ---------- */
.hero { position: relative; margin-top: 28px; height: clamp(320px, 31vw, 430px); border-radius: 24px; overflow: hidden; background: #10131a; }
.slide {
  position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; visibility: hidden;
  background: #10131a center / cover no-repeat; transition: opacity .5s, visibility .5s;
}
.slide.on { opacity: 1; visibility: visible; }
.slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 10, 16, 0.86) 0%, rgba(8, 10, 16, 0.55) 40%, rgba(8, 10, 16, 0) 72%); }
.slide.plain { background: radial-gradient(circle at 80% 30%, #2a5bd7 0%, #142a6b 45%, #0b1430 100%); }
.slide-text { position: relative; max-width: 560px; padding: 0 clamp(28px, 4vw, 56px); color: #fff; }
.kicker { margin: 0 0 10px; font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.85; }
.slide h1 { margin: 0; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.12; font-weight: 700; }
.slide p { font-size: 19px; opacity: 0.92; margin: 12px 0 0; }
.pill {
  display: inline-flex; align-items: center; margin-top: 26px; height: 54px; padding: 0 32px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.9); color: #10131a; font-weight: 600; font-size: 18px;
}
.pill:hover { text-decoration: none; background: #fff; }
.hero-nav { position: absolute; right: 22px; bottom: 22px; display: flex; gap: 10px; }
.hero-nav button {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.85); border: 0; color: #10131a;
}
.hero-nav button:hover { background: #fff; }

/* ---------- shelves and cards ---------- */
.shelf { margin: 52px 0; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.shelf-head h2, .h2 { margin: 0; font-size: 28px; font-weight: 600; }
.see-all { font-weight: 600; font-size: 17px; }
.shelf-row, .grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.card { min-width: 0; }
.card-cover { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card-cover:hover img { transform: scale(1.03); }
.cover-fallback { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(140deg, #e9edf3, #d9dfe8); font-size: 56px; font-weight: 700; color: #9aa3ae; }
.cover-fallback img { width: 34%; height: auto; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 10px 28px rgba(16, 24, 40, 0.22); }
.card-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.card-text { flex: 1; min-width: 0; }
.card-title { display: block; color: var(--text); font-weight: 600; font-size: 19px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tags { color: var(--muted); font-size: 15px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* "Get" sits on every card so one press from a shelf starts the download. */
.get {
  flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 84px; height: 54px; padding: 0 18px; border-radius: 12px;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 18px; line-height: 1.1;
}
.get:hover { text-decoration: none; background: var(--blue-dark); }
.get .free { font-size: 12px; font-weight: 500; opacity: 0.85; }

.rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 32px; }
.rowitem { display: flex; align-items: center; gap: 16px; padding: 10px 0; min-width: 0; }
.rank { width: 22px; font-weight: 700; color: var(--muted); text-align: center; }
.row-icon { flex: none; width: 88px; height: 88px; border-radius: 18px; overflow: hidden; background: var(--soft); display: grid; place-items: center; font-weight: 700; font-size: 30px; color: var(--muted); }
.row-icon img { width: 100%; height: 100%; object-fit: cover; }
.row-text { flex: 1; min-width: 0; }

/* ---------- browse ---------- */
.browse-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 40px 0 18px; }
.browse-head h1 { margin: 0; font-size: 36px; font-weight: 700; }
.sort { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.sort select { height: 50px; padding: 0 14px; border: 1px solid #c4c9d0; border-radius: 10px; background: #fff; font-size: 17px; color: var(--text); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.chip { height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid #c4c9d0; background: #fff; cursor: pointer; font-weight: 500; }
.chip:hover { border-color: var(--text); }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.grid { margin-bottom: 70px; }

/* ---------- game page ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; margin-top: 32px; align-items: start; }
.viewer { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #10131a; }
.viewer > img, .viewer > .cover-fallback { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 12px; margin-top: 12px; overflow-x: auto; }
.thumb { flex: none; width: 150px; aspect-ratio: 16 / 9; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { border-color: var(--blue); }
.subtabs { display: flex; gap: 28px; margin: 36px 0 20px; border-bottom: 1px solid var(--line); }
.subtabs a { padding: 12px 0; color: var(--text); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subtabs a.on { border-bottom-color: var(--text); }
.subtabs a:hover { text-decoration: none; }
.about p { margin: 0 0 18px; font-size: 18px; line-height: 1.65; }
.h2 { margin-top: 36px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; margin: 18px 0 0; }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.facts .wide { grid-column: 1 / -1; }

.buybox { position: sticky; top: 100px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); }
.buy-head { display: flex; gap: 16px; align-items: center; }
.buy-head img { width: 76px; height: 76px; border-radius: 16px; }
.buy-head h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 700; }
.buy-head .card-tags { white-space: normal; margin: 4px 0 0; }
.buy-sum { font-size: 17px; margin: 18px 0 0; }
.btn-primary {
  display: flex; align-items: center; justify-content: center; height: 64px; margin-top: 24px; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 20px;
}
.btn-primary:hover { text-decoration: none; background: var(--blue-dark); }
.buy-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 15px; }
.buy-alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.buy-alt p { margin: 0 0 8px; }
.repo {
  display: inline-flex; align-items: center; height: 46px; padding: 0 16px; margin-bottom: 10px; cursor: pointer;
  font: 500 16px ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--text);
  background: var(--soft); border: 1px solid var(--line); border-radius: 10px;
}
.repo::after { content: "Copy"; margin-left: 14px; font: 600 13px var(--font); color: var(--blue); }
.repo.copied::after { content: "Copied"; color: var(--muted); }

/* ---------- plain pages ---------- */
.doc { max-width: 760px; padding: 40px 0 70px; }
.doc h1 { font-size: 40px; margin: 0 0 10px; }
.doc .lead { font-size: 20px; color: var(--muted); margin: 0 0 30px; }
.doc h2 { font-size: 24px; margin: 36px 0 10px; }
.doc p, .doc li { font-size: 18px; line-height: 1.65; }

.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 16px 24px; border-radius: 14px; background: #1c1e21; color: #fff; font-size: 17px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); transition: opacity .25s, transform .25s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.foot { margin-top: 40px; padding: 30px 0 40px; border-top: 1px solid var(--line); background: var(--soft); color: var(--muted); font-size: 15px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot p { margin: 0; max-width: 760px; }
.foot a { color: var(--muted); text-decoration: underline; }

@media (max-width: 1150px) {
  .shelf-row, .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shelf-row .card:nth-child(4) { display: none; }
  .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 860px) {
  .wrap { width: calc(100% - 32px); }
  .tabs { display: none; }
  .search { max-width: none; flex: 1; width: auto; }
  .shelf-row, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf-row .card:nth-child(4) { display: block; }
  .rows { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
  .buybox { position: static; order: -1; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- headset visitors (NÖPE or a stock Go/Quest browser) ---------- */
.hs-strip { background: var(--blue); color: #fff; font-size: 16px; }
.hs-strip .wrap { padding: 11px 24px; text-align: center; }
.hs-strip b { font-weight: 700; }
/* On a headset, nudge the smallest labels up for the Go's low-res, lensed screen. */
.headset { font-size: 18px; }
.headset .get .free { font-size: 13px; }
.headset .foot { font-size: 15px; }
