/* LNXS Speed Test theme (25 Nov 2026) over OpenSpeedTest 2.5.4 (MIT). Loaded after app.css; colours = LNXS.io site
   tokens (src/app/globals.css), fonts = the site's Sora (headings/numbers) + DM Sans (text). */
@font-face { font-family: "Sora"; src: url("../lnxs/sora-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../lnxs/dm-sans-latin.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --bg: #070a2e; --bg-deep: #05072a; --surface: #0e1240; --surface-2: #161b55; --surface-3: #1d2366;
  --gold: #ffc23d; --gold-hover: #ffe08a; --muted: #aaafdc; --text: #f4f5ff;
  --header-h: 92px; --footer-h: 64px;
}

html, body { background: var(--bg-deep); color: var(--text); }
body {
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(60vmax 45vmax at 12% -8%, rgba(255, 194, 61, 0.16), transparent 60%),
    radial-gradient(55vmax 50vmax at 105% 110%, rgba(184, 76, 245, 0.18), transparent 60%),
    radial-gradient(45vmax 40vmax at 90% 0%, rgba(61, 107, 254, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  overflow: hidden;
}

/* sparkles */
.lnxs-sparkles span {
  position: fixed; z-index: 0; pointer-events: none; color: #fff; opacity: 0.0;
  font-size: 14px; line-height: 1; text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
  animation: lnxsTwinkle 5.5s ease-in-out infinite;
}
.lnxs-sparkles span:nth-child(1) { top: 14%; left: 8%;  animation-delay: 0s;   color: #ffe08a; }
.lnxs-sparkles span:nth-child(2) { top: 72%; left: 6%;  animation-delay: 1.4s; color: #22d3ee; font-size: 10px; }
.lnxs-sparkles span:nth-child(3) { top: 22%; left: 90%; animation-delay: 2.6s; color: #ff4f9a; }
.lnxs-sparkles span:nth-child(4) { top: 80%; left: 92%; animation-delay: 0.8s; color: #ffc23d; font-size: 18px; }
.lnxs-sparkles span:nth-child(5) { top: 48%; left: 3%;  animation-delay: 3.4s; color: #b84cf5; font-size: 9px; }
@keyframes lnxsTwinkle { 0%, 100% { opacity: 0; transform: scale(0.6); } 45% { opacity: 0.85; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .lnxs-sparkles span { animation: none; opacity: 0.5; } }

/* header + footer around the app */
.lnxs-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 16px;
}
.lnxs-header img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(255, 79, 154, 0.35)); }
.lnxs-header .lnxs-title { display: flex; flex-direction: column; }
.lnxs-header h1 {
  margin: 0; font-family: "Sora", system-ui, sans-serif; font-weight: 700; font-size: 26px; letter-spacing: -0.01em; color: #fff;
}
.lnxs-header h1 em { font-style: normal; color: var(--gold); }
.lnxs-header p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

.lnxs-footer {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--footer-h); z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 16px;
  text-align: center; font-size: 13px; color: var(--muted);
}
.lnxs-footer .lnxs-tip { color: #d9dbf5; }
.lnxs-footer .lnxs-credit { font-size: 11.5px; opacity: 0.75; }
.lnxs-footer a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted rgba(170, 175, 220, 0.5); }
.lnxs-footer a:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* the app sits between header and footer */
.openSpeedtestApp, .Mobile, .Desktop { height: calc(100vh - var(--header-h) - var(--footer-h)) !important; }
#OpenSpeedTest-UI, svg.openSpeedtestApp { position: relative; z-index: 1; margin-top: var(--header-h); }
.Credits { display: none; }   /* replaced by .lnxs-credit */
.darkmode { display: none !important; }   /* always the LNXS dark look */
.Startsettings { display: none !important; }   /* OpenSpeedTest's "show my IP" button: no lookup address when self-hosted */

/* gauge + cards */
.main-Gaugebg, .progressbg { stroke: var(--surface-2); }
.uiBg { fill: var(--surface-2); }
.main-GaugeWhite { stroke: #ffffff; }
.Cards { fill: rgba(14, 18, 64, 0.82); stroke: rgba(170, 175, 220, 0.16); stroke-width: 1px; }
.intro-Progress, .progressElmstart { stroke: var(--gold); }
#upSymbolDesk, #downSymbolDesk, #upSymbolMob, #downSymbolMob { fill: var(--gold); }
.spinner > div { background-color: var(--gold); }

/* text */
.oDoLive-Speed, .rtextnum { fill: #ffffff; font-family: "Sora", system-ui, sans-serif; font-weight: 600; }
.oDoLive-Status, .oDo-Meter, .oDoTop-Speed { fill: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-weight: 500; }
.rtext { fill: var(--muted); font-family: "DM Sans", system-ui, sans-serif; font-weight: 600; letter-spacing: 0.08em; }
.rtextmbms, .jitter-Mob { fill: #d9dbf5; font-family: "DM Sans", system-ui, sans-serif; font-weight: 500; }
#ipDesk, #ipMob { fill: var(--muted); font-family: "DM Sans", system-ui, sans-serif; }
.buttonTxt { fill: var(--bg); font-family: "Sora", system-ui, sans-serif; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.ConnectError { fill: #ffd3dd; }

/* start button: plain gold, small hover (admin 25 Nov: no gradient, no glow) */
.startButton { fill: var(--gold); transition: filter 0.15s ease; }
use.startButton:hover { filter: brightness(1.12); }

@media (max-width: 560px), (orientation: portrait) {
  :root { --header-h: 84px; --footer-h: 70px; }
  .lnxs-header img { width: 42px; height: 42px; }
  .lnxs-header h1 { font-size: 21px; }
  .lnxs-header p { font-size: 12.5px; }
  .lnxs-footer { font-size: 12px; }
}
