/* Flux site: the launcher's own look. Dark navy glass, the PLAY gradient as the one loud thing,
   heavy uppercase titles with the last word lit in sky blue, quiet label/value fact rows. */
:root {
  --bg: #07090f;
  --bg-2: #0c0f19;
  --surface: rgba(7, 9, 16, 0.78);
  --line: rgba(255, 255, 255, 0.07);
  --fg: #eef1f8;
  --muted: #8d95aa;
  --sky: #7aceff;
  --blue: #5682ff;
  --violet: #7a2cff;
  --deep: #3a1d99;
  --coffee: #ffdd00;
  --tab: rgba(86, 130, 255, 0.22);
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The app's blurred game-art glow behind everything. */
.glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }
.glow::before, .glow::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.45;
}
.glow::before { width: 60vw; height: 60vw; left: -15vw; top: -20vw; background: radial-gradient(circle, #1d3b8f, transparent 70%); }
.glow::after { width: 55vw; height: 55vw; right: -15vw; top: 20vh; background: radial-gradient(circle, #3b1786, transparent 70%); }

a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 520px) { .wrap { padding-inline: 16px; } }

/* Top bar, like Flux's: logo, tabs, then actions on the right. */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: rgba(7, 9, 15, 0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 6px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: 14px; color: var(--fg); font-weight: 800; font-size: 18px; letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: auto; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tab {
  padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 15px;
}
.tab:hover { color: var(--fg); text-decoration: none; }
.tab[aria-current="page"] { background: var(--tab); color: var(--fg); }
.topbar .spacer { flex: 1; }

/* Buttons. The PLAY button is Flux's signature: sky → blue → violet with a deep bottom edge. */
.play {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 260px; padding: 14px 28px; border-radius: 10px;
  background: linear-gradient(90deg, var(--sky), var(--blue) 50%, var(--violet));
  box-shadow: 0 4px 0 var(--deep), 0 10px 34px rgba(86, 130, 255, 0.35);
  color: #fff; font-weight: 900; font-size: 22px; letter-spacing: 0.06em; text-transform: uppercase;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.play:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); }
.play:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--deep), 0 6px 20px rgba(86, 130, 255, 0.3); }
.play svg { width: 22px; height: 22px; }
.play.small { min-width: 0; padding: 8px 16px; font-size: 14px; box-shadow: 0 3px 0 var(--deep); }

.ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.03);
  color: var(--fg); font-weight: 600; font-size: 15px;
}
.ghost:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.ghost svg { width: 17px; height: 17px; }

/* Donate: Buy Me a Coffee's yellow cup, the only warm colour on the page. */
.donate {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-right: 8px; border-radius: 50%;
  border: 1px solid rgba(255, 221, 0, 0.35); background: rgba(255, 221, 0, 0.08); color: var(--coffee);
  transition: background 0.15s, transform 0.15s;
}
.donate:hover { background: rgba(255, 221, 0, 0.18); transform: translateY(-1px); text-decoration: none; }
.donate svg { width: 19px; height: 19px; }
.donate-label svg { color: var(--coffee); }

/* Headline, the way Flux titles a game: heavy caps, last word in sky. */
.headline { margin: 0; font-weight: 900; font-size: clamp(38px, 6.4vw, 76px); line-height: 0.98; letter-spacing: -0.01em; text-transform: uppercase; text-wrap: balance; }
.headline em { font-style: normal; color: var(--sky); }
.subhead { margin: 0; font-size: clamp(19px, 2.2vw, 25px); font-weight: 600; text-wrap: balance; }
.meta { color: rgba(255, 255, 255, 0.78); font-size: 15px; }
.meta span + span::before { content: "·"; margin: 0 10px; color: var(--muted); }

.hero { padding-block: 56px 28px; display: grid; gap: 22px; }
.hero .lead { max-width: 62ch; font-size: 18px; color: rgba(255, 255, 255, 0.86); margin: 0; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.note { color: var(--muted); font-size: 13px; }

/* Facts row, copied from the app's "Time played / Last played / Genre" strip. */
.facts { display: flex; flex-wrap: wrap; gap: 18px 44px; }
.fact { display: grid; gap: 2px; min-width: 120px; }
.fact .k { font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.fact .v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Screenshot in a window frame. */
.shot {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(122, 206, 255, 0.06);
  background: var(--bg-2);
}
.hero-shot { margin-top: 10px; }

section { padding-block: 44px; }
.section-title { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.section-head { margin: 0 0 22px; font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; text-transform: uppercase; line-height: 1.05; text-wrap: balance; }
.section-head em { font-style: normal; color: var(--sky); }

/* Feature row: works like the Home row. One tile is selected (white ring + glow); its details show below. */
.row { display: flex; gap: 14px; overflow-x: auto; padding: 14px 4px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) rgba(255,255,255,0.04); }
.tile {
  flex: 0 0 auto; width: 150px; height: 150px; border-radius: 16px; scroll-snap-align: start;
  display: grid; place-items: center; align-content: center; gap: 10px; padding: 12px;
  border: 0; cursor: pointer; color: #fff; font: 700 14px/1.2 var(--font); text-align: center;
  background: linear-gradient(150deg, rgba(122, 206, 255, 0.16), rgba(122, 44, 255, 0.16)), var(--bg-2);
  opacity: 0.8; transition: width 0.26s cubic-bezier(.22,1,.36,1), height 0.26s cubic-bezier(.22,1,.36,1), opacity 0.2s, box-shadow 0.2s;
}
.tile:hover { opacity: 1; }
.tile svg { width: 34px; height: 34px; color: var(--sky); }
.tile[aria-selected="true"] {
  width: 190px; height: 190px; opacity: 1;
  box-shadow: 0 0 0 3px #fff, 0 0 28px 4px rgba(122, 206, 255, 0.5);
}
.tile[aria-selected="true"] svg { width: 44px; height: 44px; }
@media (max-width: 520px) { .tile { width: 120px; height: 120px; } .tile[aria-selected="true"] { width: 150px; height: 150px; } }

.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; align-items: start; padding-top: 22px; }
.feature > * { min-width: 0; }
.feature h3 { margin: 0 0 10px; font-size: clamp(28px, 3.6vw, 44px); font-weight: 900; text-transform: uppercase; line-height: 1.02; text-wrap: balance; }
.feature h3 em { font-style: normal; color: var(--sky); }
.feature p { margin: 0 0 18px; max-width: 58ch; color: rgba(255, 255, 255, 0.86); }
.feature ul { margin: 0 0 18px; padding-left: 18px; color: rgba(255, 255, 255, 0.86); }
.feature li + li { margin-top: 4px; }
.feature .art { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); min-height: 220px; display: grid; place-items: center; }
.feature .art img { width: 100%; height: auto; }
.feature .art .placeholder { padding: 32px; text-align: center; color: var(--muted); }
.feature .art .placeholder svg { width: 70px; height: 70px; color: var(--sky); margin: 0 auto 12px; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* Feature tiles: smaller, so all seven fit on one line (they wrap on phones instead of scrolling). */
.row { flex-wrap: wrap; overflow: visible; align-items: center; scroll-snap-type: none; padding: 12px 6px 6px; }
.tile { width: 118px; height: 118px; gap: 8px; border-radius: 14px; font-size: 13px; }
.tile svg { width: 28px; height: 28px; }
.tile[aria-selected="true"] { width: 140px; height: 140px; }
.tile[aria-selected="true"] svg { width: 34px; height: 34px; }
@media (max-width: 520px) {
  .row { gap: 10px; }
  .tile { width: calc((100% - 20px) / 3); height: auto; aspect-ratio: 1; }
  .tile[aria-selected="true"] { width: calc((100% - 20px) / 3); height: auto; }
}

/* Home-screen demo: a working copy of Flux's Home row, drawn in HTML. */
.demo { position: relative; display: flex; flex-direction: column; height: clamp(440px, 58vw, 700px); }
.demo-bar {
  display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 14px; flex-shrink: 0;
  background: #07090f; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden;
}
.demo-logo { width: 20px; margin-right: 10px; }
.demo-tab { padding: 5px 10px; border-radius: 7px; font-weight: 600; }
.demo-tab.on { background: var(--tab); color: var(--fg); }
.demo-search { margin: 0 auto; width: min(38%, 360px); padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); overflow: hidden; text-overflow: ellipsis; }
.demo-right { display: flex; align-items: center; gap: 14px; }
.demo-avatar { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--sky), var(--violet)); }
@media (max-width: 760px) { .demo-search, .demo-right span:not(.demo-avatar), .demo-tab:not(.on) { display: none; } .demo-right { margin-left: auto; } }

.demo-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; background: #05070c; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.demo-bg { position: absolute; inset: 0; height: 100%; min-height: 640px; overflow: hidden; pointer-events: none; }
.demo-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(34px) brightness(0.42) saturate(1.2); transform: scale(1.15); }
.demo-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,7,12,0.2), rgba(5,7,12,0.85) 85%, #05070c); }
.demo-cover { position: absolute; right: 4%; top: 150px; width: 26%; max-width: 300px; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); opacity: 0.9; }
.demo-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; }
@media (max-width: 760px) { .demo-cover { display: none; } }

.demo-toolbar, .demo-row, .demo-rowbar, .demo-main, .demo-details { position: relative; }
.demo-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 20px 0; font-size: 12px; color: var(--muted); }
.demo-chip { padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--fg); font-size: 13px; }
.demo-add { margin-left: auto; color: var(--fg); font-size: 13px; }

.demo-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; outline: none; }
.demo-row::-webkit-scrollbar { display: none; }
.demo-row:focus-visible { box-shadow: inset 0 0 0 2px rgba(122, 206, 255, 0.5); border-radius: 10px; }
.demo-tile {
  flex: 0 0 auto; width: clamp(82px, 9vw, 112px); aspect-ratio: 1; border-radius: 14px; overflow: hidden; cursor: pointer;
  opacity: 0.85; transition: width 0.26s cubic-bezier(.22,1,.36,1), opacity 0.2s; background: var(--bg-2);
}
.demo-tile:hover { opacity: 1; }
.demo-tile { position: relative; }
.demo-tile img { width: 100%; height: 100%; object-fit: cover; }
.demo-tile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 52%, rgba(0,0,0,0.55), rgba(0,0,0,0.15) 75%); pointer-events: none; }
.demo-tile img.demo-tile-logo {
  position: absolute; z-index: 1; left: 6%; top: 50%; width: 88%; height: 62%; transform: translateY(-50%);
  object-fit: contain; filter: drop-shadow(0 0 1px rgba(0,0,0,0.9)) drop-shadow(0 2px 8px rgba(0,0,0,0.85));
}
.demo-tile[aria-selected="true"] { width: clamp(110px, 12.5vw, 156px); opacity: 1; box-shadow: 0 0 0 3px #fff, 0 0 28px 4px rgba(122, 206, 255, 0.5); }
.demo-more { display: grid; place-content: center; text-align: center; gap: 2px; background: rgba(255,255,255,0.06); cursor: default; font-size: 12px; color: var(--muted); }
.demo-more b { color: var(--fg); font-size: 13px; }
.demo-rowbar { height: 5px; margin: 2px 20px 0; border-radius: 9px; background: rgba(255,255,255,0.05); visibility: hidden; }
.demo-rowbar span { position: absolute; top: 0; height: 100%; border-radius: 9px; background: rgba(255,255,255,0.18); }

.demo-main { padding: 18px 26px 10px; max-width: 70%; }
@media (max-width: 760px) { .demo-main { max-width: none; padding-inline: 18px; } }
.demo-main.in .demo-title { animation: demo-in 0.6s cubic-bezier(.22,1,.36,1); }
.demo-main.in .demo-desc, .demo-main.in .demo-facts { animation: demo-fade 0.5s ease; }
@keyframes demo-in { from { opacity: 0; transform: translateX(-30px); } }
@keyframes demo-fade { from { opacity: 0; } }
.demo-title { min-height: 54px; display: flex; align-items: center; }
.demo-title img { max-height: 82px; max-width: min(380px, 100%); object-fit: contain; object-position: left center; filter: drop-shadow(0 0 1px rgba(255,255,255,0.55)) drop-shadow(0 0 14px rgba(255,255,255,0.18)); }
.demo-title.text { font-weight: 900; font-size: clamp(26px, 3.4vw, 44px); line-height: 1; text-transform: uppercase; display: block; }
.demo-title em { font-style: normal; color: var(--sky); }
.demo-name { margin-top: 10px; font-size: clamp(16px, 1.7vw, 21px); font-weight: 600; }
.demo-meta { margin-top: 4px; font-size: 13px; color: rgba(255,255,255,0.8); white-space: pre; }
.demo-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.demo-play {
  display: inline-grid; place-items: center; width: min(240px, 100%); height: 46px; border-radius: 9px;
  background: linear-gradient(90deg, var(--sky), var(--blue) 50%, var(--violet)); box-shadow: 0 4px 0 var(--deep);
  font-weight: 900; font-size: 20px; letter-spacing: 0.06em;
}
.demo-btn { padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); font-size: 13px; }
.demo-desc { margin: 16px 0 0; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,0.88); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.demo-facts { display: flex; flex-wrap: wrap; gap: 12px 30px; margin-top: 14px; }
.demo-fact { display: grid; gap: 1px; min-width: 96px; }
.demo-fact .k { font-size: 11px; color: rgba(255,255,255,0.55); }
.demo-fact .v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.demo-details {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 28px;
  margin: 26px 26px 26px; padding: 20px; border-radius: 14px; background: rgba(7, 9, 16, 0.78); border: 1px solid var(--line);
}
@media (max-width: 760px) { .demo-details { grid-template-columns: 1fr; margin-inline: 18px; } }
.demo-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.demo-details dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 16px; margin: 0; font-size: 13px; }
.demo-details dt { color: var(--muted); }
.demo-details dd { margin: 0; overflow-wrap: anywhere; }
.demo-about p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.86); }
.demo-from { color: var(--muted) !important; font-size: 12px !important; }
.demo-note { margin-top: -4px; }

/* Controls card beside the Home feature: the app's controller hint chips. */
.feature .art.controls { display: grid; place-items: stretch; align-content: start; gap: 18px; padding: 24px; background: rgba(7, 9, 16, 0.78); }
.controls-head { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.controls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 520px) { .controls-grid { grid-template-columns: 1fr; } }
.controls-col { display: grid; gap: 10px; align-content: start; min-width: 0; }
.controls-label { font-weight: 700; font-size: 15px; }
.key-row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255, 255, 255, 0.86); }
.key {
  flex-shrink: 0; min-width: 34px; padding: 3px 9px; border-radius: 6px; text-align: center;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14); border-bottom-width: 3px;
  font-size: 12px; font-weight: 700; color: var(--fg); white-space: nowrap;
}
.key.pad { min-width: 26px; width: 26px; height: 26px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center; border-bottom-width: 1px; }
.controls-try { font-size: 14px; font-weight: 600; }

/* Panels (details box in the app). */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-3 > * { min-width: 0; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
.panel h4 { margin: 0 0 6px; font-size: 17px; }
.panel p { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 15px; }

.cta { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.cta h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 900; text-transform: uppercase; }

/* Support page. */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--sky); font-weight: 900; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding-bottom: 18px; color: rgba(255, 255, 255, 0.84); max-width: 72ch; }
.faq .answer p { margin: 0 0 10px; }
.faq .answer ol, .faq .answer ul { margin: 0 0 10px; padding-left: 20px; }
code { font-family: "Cascadia Code", Consolas, ui-monospace, monospace; font-size: 0.9em; background: rgba(255, 255, 255, 0.07); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }

footer { border-top: 1px solid var(--line); margin-top: 40px; }
footer .wrap { display: flex; gap: 14px 24px; flex-wrap: wrap; align-items: center; padding-block: 26px; color: var(--muted); font-size: 14px; }
footer .spacer { flex: 1; }
