/* Devboxly Hub - deep-space theme with a 3D particle network behind glass panels. */
:root {
  --bg: #050816;
  --bg2: #0b1030;
  --text: #e8ecff;
  --muted: #9aa6cf;
  --line: rgba(148, 163, 255, .16);
  --glass: rgba(16, 22, 56, .55);
  --glass-hi: rgba(32, 42, 96, .65);
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --pink: #f472b6;
  --up: #34d399;
  --down: #fb7185;
  --wait: #fbbf24;
  --radius: 18px;
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 10px 25px -10px rgba(56, 189, 248, .12);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  background: radial-gradient(1200px 800px at 75% -10%, #1b1f5e 0%, transparent 60%),
              radial-gradient(900px 700px at -10% 30%, #0e2a52 0%, transparent 55%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%) fixed;
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, "Noto Sans", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code, kbd { font-family: "Cascadia Code", Consolas, ui-monospace, monospace; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.vignette { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(2, 4, 14, .75) 100%); }
header, main, footer { position: relative; z-index: 1; }
main { overflow-x: clip; }

.glass {
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
}

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(5, 8, 22, .55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.cube { width: 26px; height: 26px; position: relative; transform-style: preserve-3d;
  transform: rotateX(-28deg) rotateY(45deg); animation: spin 30s linear infinite; }
.cube i { position: absolute; inset: 0; border: 1.5px solid var(--cyan); background: rgba(56, 189, 248, .12); }
.cube i:nth-child(1) { transform: translateZ(13px); }
.cube i:nth-child(2) { transform: rotateY(90deg) translateZ(13px); border-color: var(--violet); background: rgba(167, 139, 250, .14); }
.cube i:nth-child(3) { transform: rotateX(90deg) translateZ(13px); border-color: var(--pink); background: rgba(244, 114, 182, .12); }
@keyframes spin { to { transform: rotateX(-28deg) rotateY(405deg); } }
.logo-text { background: linear-gradient(90deg, #fff, #c7d2fe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 6px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 10px; font-size: 15px; }
.nav a:hover, .nav a:focus-visible { color: var(--text); background: rgba(255, 255, 255, .06); }
.pulse-pill { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted);
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(52, 211, 153, .06); }
.pulse-pill #onlineCount { color: var(--text); font-weight: 600; }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.account form { margin: 0; }
.signin { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 600; color: #fff;
  padding: 7px 16px; border-radius: 999px; background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
  box-shadow: 0 8px 20px -8px rgba(99, 102, 241, .9); transition: filter .2s, transform .2s; }
.signin:hover, .signin:focus-visible { filter: brightness(1.12); transform: translateY(-1px); }
.signin svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.who { color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signout { font: inherit; font-size: 13px; cursor: pointer; color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; }
.signout:hover { color: var(--text); border-color: rgba(148, 163, 255, .45); }
@media (max-width: 600px) { .pulse-pill, .who { display: none; } .account { margin-left: auto; } }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 72px 0 32px; }
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; font-size: 13px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--cyan); border: 1px solid rgba(56, 189, 248, .35); background: rgba(56, 189, 248, .08); }
.title3d { margin: 0; font-size: clamp(40px, 6.4vw, 78px); line-height: 1.02; font-weight: 800; letter-spacing: -1.5px;
  perspective: 800px; }
.title3d span { display: block; transform-origin: left center; }
.title3d .l1 { color: #fff;
  text-shadow: 0 1px 0 #c7d2fe, 0 2px 0 #a5b4fc, 0 3px 0 #818cf8, 0 4px 0 #6366f1, 0 5px 0 #4f46e5,
               0 6px 1px rgba(0,0,0,.2), 0 10px 20px rgba(0,0,0,.45), 0 22px 40px rgba(0,0,0,.4); }
.title3d .l2 { background: linear-gradient(92deg, var(--cyan) 0%, var(--violet) 55%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(79, 70, 229, .65)) drop-shadow(0 14px 22px rgba(56, 189, 248, .25)); }
.lead { color: var(--muted); font-size: 19px; max-width: 560px; margin: 18px 0 26px; }

.urlbar { display: inline-flex; align-items: center; gap: 0; max-width: 100%; overflow: hidden; white-space: nowrap;
  padding: 12px 18px; border-radius: 14px; font: 600 clamp(15px, 2vw, 19px)/1 "Cascadia Code", Consolas, monospace;
  background: rgba(5, 10, 30, .75); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 40px -18px rgba(56, 189, 248, .45);
  transform: perspective(700px) rotateX(8deg); transform-origin: bottom; }
.urlbar .lock { width: 12px; height: 10px; margin-right: 10px; border-radius: 2px; background: var(--up); position: relative; top: 2px; flex: none; }
.urlbar .lock::before { content: ""; position: absolute; left: 2px; top: -7px; width: 8px; height: 8px; border: 2px solid var(--up); border-bottom: 0; border-radius: 5px 5px 0 0; box-sizing: border-box; }
.urlbar .scheme, .urlbar .domain { color: var(--muted); }
.urlbar .slug { color: var(--cyan); text-shadow: 0 0 18px rgba(56, 189, 248, .6); }
.urlbar .caret { width: 2px; height: 1.1em; margin-left: 3px; background: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.search { display: flex; align-items: center; gap: 10px; margin-top: 22px; max-width: 560px; padding: 4px 8px 4px 16px;
  border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: rgba(56, 189, 248, .6); box-shadow: 0 0 0 4px rgba(56, 189, 248, .15); }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; padding: 12px 0; }
.search input::placeholder { color: #6f7aa6; }
.search kbd { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }

/* 3D orbit of featured systems */
.hero-stage { height: 440px; perspective: 1100px; display: grid; place-items: center; }
/* The ring stays tilted; only the badges glide around it (one turn every 2 minutes) and stay upright. */
@property --spin { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
.orbit { --r: 180px; position: relative; width: 360px; height: 360px; transform-style: preserve-3d;
  transform: rotateX(62deg); animation: orbit 120s linear infinite; }
@keyframes orbit { to { --spin: 360deg; } }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(148, 163, 255, .28); }
.ring.r1 { box-shadow: 0 0 40px rgba(56, 189, 248, .18) inset; }
.ring.r2 { inset: 50px; border-color: rgba(167, 139, 250, .3); }
.ring.r3 { inset: 105px; border-style: dashed; border-color: rgba(244, 114, 182, .3); }
.core { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
  transform: rotateX(-62deg) translateZ(30px); display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #93c5fd 12%, #6366f1 45%, #1e1b4b 100%);
  box-shadow: 0 0 60px rgba(99, 102, 241, .7), 0 0 120px rgba(56, 189, 248, .35); }
.core span { color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.sat { --a: calc(var(--i) * 45deg); position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 14px; display: grid; place-items: center; font: 700 15px/1 "Segoe UI", sans-serif; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 85%, #fff), color-mix(in srgb, var(--accent) 55%, #000));
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 60%, transparent);
  transform: rotateZ(calc(var(--a) + var(--spin))) translateX(var(--r)) rotateZ(calc((var(--a) + var(--spin)) * -1)) rotateX(-62deg); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 12px 0 8px; }
.stat { border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stat b { font-size: 34px; line-height: 1.1; background: linear-gradient(90deg, #fff, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 14px; }

.section-title { font-size: 26px; margin: 56px 0 18px; letter-spacing: -.3px; display: flex; align-items: baseline; gap: 10px; }
.section-title small { font-size: 15px; color: var(--muted); font-weight: 500; }

/* ---------- Cards with real depth ---------- */
.tilt { transform-style: preserve-3d; transition: transform .25s ease, box-shadow .25s ease, border-color .25s; will-change: transform; }
.card { --accent: var(--cyan); position: relative; border-radius: var(--radius); padding: 20px; text-decoration: none; overflow: hidden;
  background: linear-gradient(160deg, var(--glass-hi), var(--glass) 60%);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .8; }
.card:hover, .card:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 40px 70px -25px rgba(0, 0, 0, .8), 0 0 40px -10px color-mix(in srgb, var(--accent) 50%, transparent); }
.card > * { transform: translateZ(0); }
.card .badge, .card .status { transform: translateZ(40px); }
.card h3, .feat-name { transform: translateZ(28px); }
.glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .14), transparent 45%); }
.card:hover .glare { opacity: 1; }
.badge { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 90%, #fff), color-mix(in srgb, var(--accent) 50%, #000));
  box-shadow: 0 10px 20px -6px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }

.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.feat { display: flex; flex-direction: column; gap: 10px; min-height: 180px; }
.feat .badge { width: 56px; height: 56px; font-size: 18px; border-radius: 16px; }
.feat-name { font-size: 18px; font-weight: 650; line-height: 1.3; }
.feat-host { font: 13px/1.3 "Cascadia Code", Consolas, monospace; color: var(--cyan); word-break: break-all; }
.feat .status { margin-top: auto; }

.systems-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: all .2s; }
.chip small { opacity: .7; margin-left: 2px; }
.chip:hover { color: var(--text); border-color: rgba(148, 163, 255, .4); }
.chip.on { color: #fff; border-color: transparent; background: linear-gradient(90deg, rgba(56, 189, 248, .35), rgba(167, 139, 250, .35));
  box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .7); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-top: 18px; }
.grid .card { display: flex; flex-direction: column; gap: 12px; }
.card-top { display: flex; gap: 14px; align-items: flex-start; transform-style: preserve-3d; }
.card-title { flex: 1; min-width: 0; transform-style: preserve-3d; }
.card h3 { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 650; }
.card h3 a { text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cat { font-size: 12.5px; color: var(--muted); }
.desc { margin: 0; color: #b7c0e3; font-size: 14.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.host { flex: 1; min-width: 0; font-size: 13px; color: var(--cyan); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { position: relative; z-index: 2; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); padding: 6px 12px;
  border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); transition: all .2s; }
.copy:hover, .copy:focus-visible { border-color: var(--cyan); color: var(--cyan); }
.copy.done { border-color: var(--up); color: var(--up); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); flex: none; }
.status em { font-style: normal; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wait); display: inline-block; }
.dot.up, .status.up .dot { background: var(--up); box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: ping 2.2s infinite; }
.status.up { color: var(--up); }
.status.down .dot { background: var(--down); }
.status.down { color: var(--down); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- How it works ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 18px; transform: translateZ(30px);
  background: linear-gradient(145deg, var(--cyan), var(--violet)); box-shadow: 0 10px 22px -8px rgba(99, 102, 241, .8); }
.step h3 { margin: 14px 0 6px; font-size: 18px; transform: translateZ(20px); }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.step code { color: var(--cyan); font-size: 14px; }

/* ---------- Footer & toast ---------- */
.foot { margin-top: 80px; border-top: 1px solid var(--line); background: rgba(5, 8, 22, .6); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 0; color: var(--muted); font-size: 14px; }
.admin-link { color: #6f7aa6; text-decoration: none; font-size: 13px; }
.admin-link:hover { color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 12px; background: rgba(15, 23, 60, .95); border: 1px solid var(--line); transition: all .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Unavailable page ---------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.panel { position: relative; z-index: 1; max-width: 560px; text-align: center; border-radius: 24px; padding: 40px 32px; box-shadow: var(--shadow); }
.panel h1 { margin: 16px 0 8px; font-size: 30px; }
.panel p { color: var(--muted); margin: 0 0 22px; }
.panel code { color: var(--cyan); }
.btn { display: inline-block; text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; padding: 11px 20px; border-radius: 12px; border: 0; color: #fff;
  background: linear-gradient(90deg, #0ea5e9, #8b5cf6); box-shadow: 0 12px 26px -10px rgba(99, 102, 241, .9); }
.btn:hover { filter: brightness(1.1); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-stage { height: 320px; order: -1; }
  .orbit { --r: 130px; width: 260px; height: 260px; }
  .sat { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav { display: none; }
  .grid { grid-template-columns: 1fr; }
  .lead { font-size: 17px; }
  .urlbar { transform: none; }
  .hero-stage { height: 260px; }
  .orbit { --r: 100px; width: 200px; height: 200px; }
  .ring.r2 { inset: 30px; }
  .ring.r3 { inset: 60px; }
  .core { width: 90px; height: 90px; margin: -45px 0 0 -45px; font-size: 13px; }
  .sat { width: 38px; height: 38px; margin: -19px 0 0 -19px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* "Demo accounts" button under the search box (link only; the accounts live on the portal's own page) */
.accounts-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 14px; padding: 10px 18px; border-radius: 12px;
  text-decoration: none; font-size: 15px; font-weight: 600; color: #c7d2fe; background: rgba(99, 102, 241, .14);
  border: 1px solid rgba(129, 140, 248, .35); transition: background .2s, border-color .2s, transform .2s; }
.accounts-link:hover, .accounts-link:focus-visible { background: rgba(99, 102, 241, .26); border-color: rgba(165, 180, 252, .7); transform: translateY(-1px); }
.accounts-link svg { width: 18px; height: 18px; fill: none; stroke: #fbbf24; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* External-link cards: small arrow next to the address */
.ext { color: var(--muted); font-size: 14px; flex: none; }
@media (min-width: 981px) { .stats:has(> .stat:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); } }

/* All services: exactly the Featured card (badge, name, address, status) in the same 4-across grid.
   No perspective on the grids: each card tilts with its own perspective() (home.js), so a hovered card lifts
   the same few pixels in place everywhere. A perspective on a tall grid pulled cards up to 33px off. */
.grid.feat-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.grid .card.feat { gap: 10px; }
/* the search / category filter hides cards with the hidden attribute; .card sets display, so force it */
.card[hidden] { display: none !important; }
/* one-line address on every card (Featured and All services), so all cards in a row are the same height */
.feat-host { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }

/* No. on every card (top-right, outside the layout so the card stays exactly like Featured) + ASC / DESC switch */
.card-no { position: absolute; top: 14px; right: 16px; font-size: 12.5px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: .3px; pointer-events: none; }
.systems-head { flex-direction: column; align-items: stretch; }
.title-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.sortbar { display: flex; gap: 8px; }
.sortbar .chip { font-variant-numeric: tabular-nums; }
