/* ============================================================
   SIZE / ZOOM
   Everything on the page is sized in "rem", so changing the
   font-size on :root below scales the WHOLE site up or down.
   The numbers change with screen width (phone, laptop,
   1080p TV, 1440p, 4K). Raise a number to make that screen
   size bigger, lower it to make it smaller.
   ============================================================ */
:root { font-size: 14px; }                                   /* phones and small screens */
@media (min-width: 900px)  { :root { font-size: 13px; } }    /* laptops and desktops */
@media (min-width: 1600px) { :root { font-size: 11px; } }    /* 1080p TV / 1920 wide */
@media (min-width: 2560px) { :root { font-size: 15px; } }    /* 1440p / 2560 wide */
@media (min-width: 3200px) { :root { font-size: 22px; } }    /* 4K TV / 3840 wide */

/* ---------- Colors and base ---------- */
:root {
  color-scheme: dark;
  --bg: #01142f;
  --line: rgba(120, 190, 255, .2);
  --text: #eaf4ff;
  --mut: #a3bddb;
  --cyan: #00d4ff;
  --blue: #0b5fff;
  --ink: #02173a;
  --gold: #ffc61a;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px); height: 100%;
  /* Background lives on the page root and does not repeat, so there is no visible seam when you scroll to the bottom */
  background-color: var(--bg);
  background-image: radial-gradient(90rem 45rem at 80% -10%, #0a3a85 0%, transparent 60%);
  background-repeat: no-repeat;
}
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0; min-height: 100%;
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}
.wrap { max-width: 86rem; margin: 0 auto; padding: 0 1.7rem; padding: 0 clamp(1.1rem, 4vw, 2.9rem); }
@media (min-width: 1600px) { .wrap { max-width: 150rem; } }
h1, h2, h3, p { margin: 0; }
button, a { font: inherit; color: inherit; }

/* Focus highlight (for TV remotes and keyboards) */
:focus { outline: .22rem solid #fff; outline-offset: .22rem; box-shadow: 0 0 0 .5rem rgba(0, 212, 255, .55); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-gap: 2rem; gap: 2rem; align-items: center; padding: 2.8rem 0 .9rem; padding: clamp(1.7rem, 5vw, 4rem) 0 .9rem; }
.hero h1 { font-size: 2.4rem; font-size: clamp(2rem, 5.5vw, 3.6rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
.hero p { color: var(--mut); margin-top: 1rem; font-size: 1.1rem; font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 34rem; }
/* Banner: a square image shown as a circle. It fills its column on phones and stops growing at a size that
   scales with the screen (rem), and never gets taller than 65% of the screen height. */
.banner { width: 100%; max-width: 42rem; max-width: min(42rem, 65vh); margin: 0 auto; border-radius: 50%; overflow: hidden; border: 0; box-shadow: 0 1.4rem 4.3rem rgba(0, 150, 255, .3); }
.banner img { display: block; width: 100%; height: auto; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 1.1fr; grid-gap: 3.4rem; gap: 3.4rem; } }

/* ---------- Filter buttons ---------- */
.chips { display: flex; flex-wrap: wrap; margin-top: 1.7rem; }
.chip {
  margin: 0 .7rem .7rem 0; padding: .7rem 1.3rem; cursor: pointer;
  border: .07rem solid var(--line); border-radius: 99rem;
  background: rgba(255, 255, 255, .04); color: var(--mut); font-weight: 600;
}
.chip[aria-pressed=true] { background: var(--cyan); color: var(--ink); border-color: var(--cyan); }

.sizer { align-items: center; margin-top: .3rem; }
.sizer-label { margin: 0 .7rem .7rem 0; color: var(--mut); font-weight: 600; }
footer span { opacity: .7; }

/* ---------- App cards ---------- */
.sec-title { display: flex; justify-content: space-between; align-items: baseline; margin: 2.6rem 0 1.3rem; }
.sec-title h2 { font-size: 1.5rem; font-weight: 800; }
.sec-title span { color: var(--mut); font-size: .95rem; }
.grid {
  display: grid; grid-gap: 1.4rem; gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 23rem), 1fr));
}
@media (min-width: 1600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); } }
.app {
  display: flex; flex-direction: column; grid-gap: 1.3rem; gap: 1.3rem;
  padding: 1.6rem; border: .07rem solid var(--line); border-radius: 1.7rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
}
.app[data-accent=gold] {
  border-color: rgba(255, 198, 26, .35);
  background: linear-gradient(160deg, rgba(255, 48, 64, .12), rgba(255, 198, 26, .04));
}
.top { display: flex; align-items: center; }
.icon { width: 6.5rem; height: 6.5rem; margin-right: 1.3rem; border-radius: 1.5rem; flex: none; object-fit: contain; }
.app h3 { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.app .tag { color: var(--mut); font-size: .95rem; margin-top: .3rem; }
ul.meta { display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.meta li { margin: 0 .55rem .55rem 0; list-style: none; font-size: .85rem; color: var(--mut); border: .07rem solid var(--line); padding: .3rem .85rem; border-radius: 99rem; }
.acts { display: flex; margin-top: auto; }
.btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.7rem; padding: 0 1.6rem; border: 0; border-radius: 1rem;
  background: var(--cyan); color: var(--ink); font-weight: 800; text-decoration: none; cursor: pointer;
}
.app[data-accent=gold] .btn { background: var(--gold); }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { flex: none; margin-left: .7rem; background: transparent; border: .07rem solid var(--line); color: var(--text); font-weight: 600; }
.btn svg { width: 1.4rem; height: 1.4rem; margin-right: .7rem; fill: currentColor; }
.empty { display: none; color: var(--mut); padding: 1.7rem 0; }

/* ---------- Downloader guide ---------- */
.guide {
  display: grid; grid-gap: 2rem; gap: 2rem;
  margin: 3.4rem 0 2.3rem; padding: 2rem; padding: clamp(1.4rem, 4vw, 2.6rem);
  border: .07rem solid var(--line); border-radius: 1.7rem; background: rgba(5, 34, 82, .55);
}
.guide h2 { font-size: 1.5rem; font-weight: 800; }
.guide .lead { color: var(--mut); margin-top: .6rem; }
.dlapp { display: inline-flex; align-items: center; margin-top: 1.4rem; padding: 1.1rem 1.9rem 1.1rem 1.1rem; border: .07rem solid var(--line); border-radius: 1.6rem; background: var(--ink); }
.dlapp img { display: block; width: 5.4rem; height: 5.4rem; margin-right: 1.3rem; flex: none; border-radius: 1.3rem; }
.dlapp b { display: block; font-size: 1.6rem; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.1; }
.dlapp small { display: block; color: var(--mut); margin-top: .3rem; font-size: .95rem; }
ol.steps { display: grid; grid-gap: 1rem; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: s; }
ol.steps li { display: flex; align-items: flex-start; counter-increment: s; }
ol.steps li::before {
  content: counter(s); display: grid; place-items: center; flex: none;
  width: 2.4rem; height: 2.4rem; margin-right: 1rem; border-radius: 50%; background: var(--blue); font-weight: 800;
}
@media (min-width: 900px) { .guide { grid-template-columns: 1fr 1fr; align-items: center; } }

footer { color: var(--mut); font-size: .9rem; padding: .6rem 0 2.9rem; }

/* ---------- Pop-up message ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(1.7rem + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 2rem); opacity: 0; pointer-events: none; transition: .25s;
  max-width: 90vw; padding: 1rem 1.6rem; border-radius: 1rem; background: #fff; color: var(--ink); font-weight: 700; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Small phones ---------- */
@media (max-width: 520px) {
  .icon { width: 5.4rem; height: 5.4rem; border-radius: 1.3rem; }
  .app { padding: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
