/* fdroid.oxisoft.io landing page. Kept out of index.html so the page can
   run under a Content-Security-Policy without 'unsafe-inline'. */
:root {
  --bg: #070c17;
  --bg2: #0a1020;
  --card: #111a2c;
  --card2: #141f35;
  --line: #23324c;
  --line2: #2c3e5e;
  --text: #eaf0f9;
  --muted: #94a5c0;
  --dim: #6b7d99;
  --accent: #4da3ff;
  --accent2: #7bd0ff;
  --green: #35d07f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient glow behind the page. Fixed so it does not scroll with content. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(760px 420px at 18% -8%, rgba(77, 163, 255, 0.16), transparent 70%),
    radial-gradient(620px 380px at 88% 4%, rgba(53, 208, 127, 0.10), transparent 70%),
    radial-gradient(900px 500px at 50% 108%, rgba(77, 163, 255, 0.07), transparent 70%);
}
.wrap { position: relative; z-index: 1; max-width: 940px; margin: 0 auto; padding: 0 22px 90px; }

/* ---------- hero ---------- */
/* Horizontal and compact: the centred stacked version pushed the QR panel
   and the app list below the fold on a laptop. */
.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 0 4px;
  flex-wrap: wrap;
}
.heroicon {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  border: 1px solid var(--line2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}
.herotext { flex: 1 1 260px; min-width: 0; }
h1 {
  font-size: clamp(1.4rem, 3.1vw, 1.95rem);
  line-height: 1.18;
  margin: 0 0 3px;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, #ffffff 0%, #a9c6ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tag {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}
.pills { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; }
.pill {
  border: 1px solid var(--line2);
  background: rgba(20, 31, 53, 0.7);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.79rem;
  color: var(--muted);
  white-space: nowrap;
}
.pill b { color: var(--green); font-weight: 600; }

/* ---------- sections ---------- */
h2 {
  font-size: 1.1rem;
  margin: 34px 0 13px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 11px;
}
h2::before {
  content: '';
  width: 3px;
  height: 19px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(77, 163, 255, 0.2));
  flex: 0 0 auto;
}
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg2) 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.32);
}
.card p { margin: 12px 0; }
.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
a { color: var(--accent); }

/* ---------- add-repo panel ---------- */
.add {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.add::after {
  /* soft accent wash so the primary action reads as the hero of the page */
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 60%;
  height: 220%;
  background: radial-gradient(closest-side, rgba(77, 163, 255, 0.10), transparent);
  pointer-events: none;
}
.qrwrap {
  background: #fff;
  padding: 9px;
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
  flex: 0 0 auto;
  line-height: 0;
}
.qrwrap img { width: 124px; height: 124px; display: block; }
.addbody { flex: 1 1 280px; min-width: 0; position: relative; }
.addbody > p:first-child { margin-top: 0; }
/* The mobile lead is swapped in at <=520px where the QR is hidden. */
.addlead-m { display: none; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86rem; }

.copyrow { display: flex; gap: 8px; align-items: stretch; margin: 0; flex-wrap: wrap; }
.url {
  display: block;
  background: #060b16;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  word-break: break-all;
  color: var(--accent2);
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  transition: border-color 0.15s;
}
.copyrow .url { flex: 1; margin: 0; align-content: center; }
.copyrow .url:hover { border-color: var(--accent); }
.copy {
  flex: 0 0 auto;
  background: #1b2843;
  color: var(--text);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 0 17px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.copy:hover { background: #24355a; border-color: var(--accent); }
.copy.done { background: #14563a; border-color: var(--green); color: #d7ffe9; }

.btn {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, #5aaeff, #2f86e8);
  color: #04121f;
  font-weight: 650;
  text-decoration: none;
  padding: 0 18px;
  min-height: 40px;
  justify-content: center;
  font-size: 0.9rem;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(47, 134, 232, 0.3);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(47, 134, 232, 0.42); }
.btnghost {
  display: inline-block;
  border: 1px solid var(--line2);
  border-radius: 11px;
  padding: 11px 19px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  transition: border-color 0.15s, background 0.15s;
}
.btnghost:hover { border-color: var(--accent); background: rgba(77, 163, 255, 0.08); }
.hint { color: var(--dim); font-size: 0.86rem; margin: 10px 0 0; }

/* ---------- app list ---------- */
.applist { padding: 0; overflow: hidden; }
.app {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.app:last-child { border-bottom: 0; }
.app img {
  width: 84px;
  height: 84px;
  border-radius: 19px;
  flex: 0 0 auto;
  /* Dark game artwork bleeds into the dark card without an explicit edge. */
  border: 1px solid var(--line2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  background: #060b16;
}
.appclickable { cursor: pointer; }
.appclickable:hover { background: rgba(77, 163, 255, 0.055); }
.appclickable:hover img { border-color: var(--accent); }
.appmeta { flex: 1; min-width: 0; }
.appmeta strong { display: block; font-size: 1.08rem; letter-spacing: -0.01em; }
.appmeta p { margin: 4px 0 7px; color: var(--muted); font-size: 0.93rem; }
.appver { color: var(--dim); font-size: 0.79rem; font-family: ui-monospace, monospace; }
.applink {
  flex: 0 0 auto;
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.86rem;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.applink:hover { border-color: var(--accent); background: rgba(77, 163, 255, 0.1); }

/* ---------- steps ---------- */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 16px 44px;
  border-left: 1px solid var(--line);
  margin-left: 13px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s);
  position: absolute;
  left: -13px;
  top: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1b2843;
  border: 1px solid var(--line2);
  color: var(--accent2);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- feature grid ---------- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.feat {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg2) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.feat h3 { margin: 0 0 7px; font-size: 0.98rem; }
.feat p { margin: 0; color: var(--muted); font-size: 0.91rem; }

/* ---------- fingerprint ---------- */
.fp {
  display: block;
  background: #060b16;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 17px;
  color: var(--muted);
  word-break: break-all;
  line-height: 2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

footer {
  margin-top: 62px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer .sp { flex: 1; }

@media (max-width: 720px) {
  .hero { padding: 44px 0 4px; }
  .card { padding: 20px; border-radius: 16px; }
  .add { gap: 20px; justify-content: center; }
  h2 { margin: 44px 0 14px; }
}
@media (max-width: 520px) {
  .app { flex-wrap: wrap; }
  .app img { width: 64px; height: 64px; border-radius: 15px; }
  .applink { width: 100%; text-align: center; }
  .qrwrap img { width: 132px; height: 132px; }
  /* You cannot scan a QR code on the screen you are holding. On a phone
     the "Open in F-Droid" button is the real path, so reclaim the space. */
  .qrwrap { display: none; }
  .addlead { display: none; }
  .addlead-m { display: block; }
  footer { gap: 14px; }
  footer .sp { display: none; }
  /* Three items across squeezes the URL into a column of single
     characters. Give it the full row and pair the buttons below. */
  .copyrow .url { flex: 1 1 100%; font-size: 0.78rem; }
  .copyrow .copy, .copyrow .btn { flex: 1 1 0; min-height: 42px; }
}

/* ---------- app detail dialog ---------- */
.shots {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 13, 0.78);
  backdrop-filter: blur(3px);
  display: none;
  z-index: 50;
  padding: 24px 16px;
  /* Centre the panel; the panel scrolls internally, not the page. */
  align-items: center;
  justify-content: center;
}
.shots.open { display: flex; }
.shotsinner {
  background: linear-gradient(180deg, var(--card2) 0%, var(--bg2) 100%);
  border: 1px solid var(--line2);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62);
  width: 100%;
  max-width: 560px;
  /* Cap the height so the dialog never becomes a full-page scroll. */
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.shotshead {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.shotshead img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  background: #060b16;
  flex: 0 0 auto;
}
.shotshead .ht { flex: 1; min-width: 0; }
.shotshead h3 { margin: 0; font-size: 1.12rem; letter-spacing: -0.01em; }
.shotshead .hs { margin: 3px 0 0; color: var(--muted); font-size: 0.88rem; }
.shotsclose {
  background: #1b2843;
  color: var(--text);
  border: 1px solid var(--line2);
  border-radius: 9px;
  width: 34px;
  height: 34px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.shotsclose:hover { background: #24355a; }
.shotsbody { padding: 20px 22px; overflow-y: auto; flex: 1 1 auto; }
.shotsdesc { margin: 0 0 18px; color: var(--muted); font-size: 0.91rem; line-height: 1.62; }
.shotsdesc p { margin: 0 0 10px; }
.shotsdesc p:last-child { margin-bottom: 0; }
/* Horizontal strip: phone screenshots are 1080x1920, so a full-width grid
   of them is what made the first version enormous. */
.shotsgrid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.shotsgrid img {
  height: 220px;
  width: auto;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #000;
  flex: 0 0 auto;
  scroll-snap-align: start;
  cursor: zoom-in;
  transition: border-color 0.15s;
}
.shotsgrid img:hover { border-color: var(--accent); }
.shotsfoot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
.shotsfoot .meta { flex: 1; color: var(--dim); font-size: 0.79rem; font-family: ui-monospace, monospace; }

/* The OS default scrollbar renders bright white on a dark panel. */
.shotsgrid, .shotsbody { scrollbar-width: thin; scrollbar-color: #35496b transparent; }
.shotsgrid::-webkit-scrollbar,
.shotsbody::-webkit-scrollbar { width: 9px; height: 9px; }
.shotsgrid::-webkit-scrollbar-track,
.shotsbody::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); border-radius: 6px; }
.shotsgrid::-webkit-scrollbar-thumb,
.shotsbody::-webkit-scrollbar-thumb { background: #35496b; border-radius: 6px; }
.shotsgrid::-webkit-scrollbar-thumb:hover,
.shotsbody::-webkit-scrollbar-thumb:hover { background: #46608f; }

@media (max-width: 520px) {
  .shotsinner { max-height: 92vh; }
  .shotsgrid img { height: 200px; }
  .shotsfoot { flex-wrap: wrap; }
}

/* ---------- full-size screenshot viewer ---------- */
.zoom {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 11, 0.94);
  display: none;
  z-index: 60;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.zoom.open { display: flex; }
.zoom img {
  max-width: 94vw;
  max-height: 88vh;
  border-radius: 14px;
  border: 1px solid var(--line2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}
.zoomnav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 31, 53, 0.92);
  color: var(--text);
  border: 1px solid var(--line2);
  border-radius: 12px;
  width: 46px;
  height: 64px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.zoomnav:hover { background: #24355a; }
#zoomPrev { left: 16px; }
#zoomNext { right: 16px; }
.zoomcount {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.85rem;
  font-family: ui-monospace, monospace;
  background: rgba(20, 31, 53, 0.92);
  border: 1px solid var(--line2);
  border-radius: 20px;
  padding: 6px 15px;
}
@media (max-width: 520px) {
  .zoomnav { width: 38px; height: 54px; font-size: 1.2rem; }
  #zoomPrev { left: 6px; }
  #zoomNext { right: 6px; }
}

/* ---------- formerly inline style="" attributes ---------- */
.add .addbody p.addlead,
.add .addbody p.addlead-m { margin: 0 0 10px; }
.card p.mb0 { margin-bottom: 0; }

/* Text for screen readers only: names a glyph-only button without an
   aria-label that would differ from what is on screen. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

footer .credit {
  flex-basis: 100%;
  margin: 6px 0 0;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
}
footer .credit a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
footer .credit a:hover { color: var(--text); }

/* ---------- category + tag badges ---------- */
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; margin: 0 0 8px; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(77, 163, 255, 0.07);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
  white-space: nowrap;
}
.badge.cat {
  padding: 3px 12px;
  border-color: rgba(255, 176, 72, 0.55);
  background: linear-gradient(180deg, rgba(255, 176, 72, 0.2), rgba(255, 128, 64, 0.12));
  color: #ffc67a;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.shotshead .badges { margin: 7px 0 0; }
