:root{
  --bg0:#05060a;
  --bg1:#070a12;
  --panel: rgba(10,14,24,.64);
  --panel2: rgba(8,10,16,.62);
  --text:#e8ecff;
  --muted: rgba(232,236,255,.72);
  --faint: rgba(232,236,255,.45);

  --a:#7c3aed;   /* violet */
  --b:#06b6d4;   /* cyan */
  --c:#22c55e;   /* green */
  --d:#f59e0b;   /* amber */
  --e:#ef4444;   /* red */

  --shadow: 0 24px 90px rgba(0,0,0,.55);
  --radius: 18px;
  --radius2: 26px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font-family:var(--sans);
  background:
    radial-gradient(1200px 700px at 18% -10%, rgba(124,58,237,.22), transparent 55%),
    radial-gradient(900px 600px at 105% 20%, rgba(6,182,212,.20), transparent 48%),
    radial-gradient(800px 600px at 40% 120%, rgba(34,197,94,.12), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

#fx{position:fixed; inset:0; pointer-events:none; z-index:0}
.scanlines{
  position:absolute; inset:0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,.02),
      rgba(255,255,255,.02) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 6px
    );
  opacity:.35;
  mix-blend-mode:overlay;
}
.vignette{
  position:absolute; inset:-10%;
  background: radial-gradient(circle at 50% 40%, transparent 35%, rgba(0,0,0,.55) 78%);
  opacity:.85;
}

.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0}

.wrap{position:relative; z-index:1; max-width:1180px; margin:0 auto; padding:28px 18px 50px}
.topbar{
  position:sticky; top:0;
  z-index:10;
  display:flex; gap:18px; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(5,6,10,.92), rgba(5,6,10,.55));
  backdrop-filter: blur(12px);
}
.brand{display:flex; align-items:center; gap:12px}
.brand-mark{
  width:44px; height:44px; border-radius:14px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 45%),
    linear-gradient(135deg, rgba(124,58,237,.95), rgba(6,182,212,.85));
  box-shadow: 0 10px 40px rgba(124,58,237,.18), 0 10px 40px rgba(6,182,212,.16);
  border:1px solid rgba(255,255,255,.16);
}
.brand-title{font-weight:800; letter-spacing:.2px}
.brand-sub{color:var(--muted); font-size:12px; margin-top:2px}

.top-stats{
  display:flex; gap:10px; flex-wrap:wrap;
  align-items:stretch; justify-content:flex-end;
}
.stat{
  min-width:170px;
  padding:10px 12px;
  border-radius:14px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}
.stat-k{font-size:11px; color:var(--faint); text-transform:uppercase; letter-spacing:.14em}
.stat-v{font-weight:700; margin-top:2px}
.mono{font-family:var(--mono)}

.hero{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:18px;
  margin:26px 0 18px;
}
@media (max-width: 980px){ .hero{grid-template-columns:1fr} }

.chip{
  display:inline-flex; align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(124,58,237,.22), rgba(6,182,212,.18));
  border:1px solid rgba(255,255,255,.10);
  color:rgba(232,236,255,.92);
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.h1{
  margin:12px 0 8px;
  font-size:46px;
  line-height:1.06;
  letter-spacing:-.02em;
}
@media (max-width: 520px){ .h1{font-size:36px} }
.glow{
  background: linear-gradient(90deg, rgba(124,58,237,1), rgba(6,182,212,1), rgba(34,197,94,1));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  filter: drop-shadow(0 10px 30px rgba(6,182,212,.18));
}
.p{color:var(--muted); margin:0 0 14px; max-width:64ch}
.muted{color:var(--faint)}

.search-row{display:flex; gap:10px; align-items:center; margin:14px 0 8px}
.search{
  flex:1;
  padding:14px 14px;
  border-radius:16px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);
  outline:none;
  box-shadow: 0 0 0 0 rgba(6,182,212,0);
  transition: box-shadow .2s, border-color .2s, transform .15s;
}
.search:focus{
  border-color: rgba(6,182,212,.38);
  box-shadow: 0 0 0 6px rgba(6,182,212,.10);
  transform: translateY(-1px);
}
.btn{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  color:var(--text);
  cursor:pointer;
  transition: transform .15s, border-color .2s;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(255,255,255,.20) }

.hero-badges{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.badge{
  padding:8px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  color:rgba(232,236,255,.86);
  font-size:12px;
}

.terminal{
  border-radius: var(--radius2);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.terminal-top{
  display:flex; align-items:center; gap:8px;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.20);
}
.dot{width:10px;height:10px;border-radius:99px; display:inline-block; opacity:.9}
.dot.red{background:rgba(239,68,68,.95)}
.dot.yellow{background:rgba(245,158,11,.95)}
.dot.green{background:rgba(34,197,94,.95)}
.term-title{margin-left:8px; color:rgba(232,236,255,.76); font-size:12px}
.terminal-body{
  margin:0;
  padding:16px 16px 18px;
  color:rgba(232,236,255,.86);
  font-size:13px;
  line-height:1.45;
  background:
    radial-gradient(600px 320px at 35% -20%, rgba(124,58,237,.18), transparent 60%),
    radial-gradient(600px 320px at 115% 40%, rgba(6,182,212,.16), transparent 60%),
    rgba(0,0,0,.10);
}

.grid-section{margin:22px 0}
.section-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:12px; margin-bottom:12px;
}
.h2{margin:0; font-size:22px; letter-spacing:-.01em}
.sub{color:var(--muted); font-size:13px}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
}

.card{
  position:relative;
  grid-column: span 4;
  min-height:118px;
  padding:14px 14px 12px;
  border-radius: var(--radius2);
  background: var(--panel);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  overflow:hidden;
  cursor:pointer;
  transition: transform .16s ease, border-color .2s ease, box-shadow .2s ease;
}
@media (max-width: 1000px){ .card{grid-column: span 6} }
@media (max-width: 640px){ .card{grid-column: span 12} }

.card::before{
  content:"";
  position:absolute; inset:-2px;
  background: linear-gradient(120deg,
    rgba(124,58,237,.65),
    rgba(6,182,212,.50),
    rgba(34,197,94,.35),
    rgba(245,158,11,.20));
  opacity:.18;
  filter: blur(16px);
  pointer-events:none;
}
.card::after{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(420px 220px at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.12), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,0));
  opacity:.95;
  pointer-events:none;
}

.card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 22px 80px rgba(0,0,0,.35);
}

.card-top{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; position:relative; z-index:1}
.card-title{font-weight:850; letter-spacing:.2px; margin:0}
.card-desc{color:var(--muted); font-size:13px; margin:6px 0 0; max-width:46ch}
.card-meta{margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; position:relative; z-index:1}

.pill{
  font-family:var(--mono);
  font-size:11px;
  color:rgba(232,236,255,.85);
  padding:6px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.card-icon{
  width:40px; height:40px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  display:grid; place-items:center;
}
.card-icon svg{width:22px;height:22px; opacity:.92}

.footer{
  margin-top:28px;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,.08);
  color:rgba(232,236,255,.60);
  display:flex; gap:10px; flex-wrap:wrap;
}
.sep{opacity:.35}

/* Palette */
.palette{
  position:fixed; inset:0;
  display:none;
  place-items:center;
  z-index:50;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  pointer-events:auto;
}
.palette.open{display:grid}
.palette-card{
  width:min(760px, 92vw);
  border-radius: 26px;
  background: rgba(10,14,24,.72);
  border:1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 110px rgba(0,0,0,.60);
  overflow:hidden;
}
.palette-top{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.palette-title{font-weight:800}
.x{
  border:0; background:transparent; color:rgba(232,236,255,.75);
  font-size:16px; cursor:pointer;
}
.palette-input{
  width:100%;
  padding:14px 16px;
  border:0;
  outline:none;
  background: rgba(0,0,0,.18);
  color:var(--text);
  font-family:var(--mono);
}
.palette-list{max-height: 320px; overflow:auto}
.item{
  padding:12px 16px;
  border-top:1px solid rgba(255,255,255,.06);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  cursor:pointer;
}
.item:hover{background: rgba(255,255,255,.04)}
.item .k{color:rgba(232,236,255,.85); font-family:var(--mono)}
.item .t{color:rgba(232,236,255,.70); font-size:12px}
.palette-hint{padding:12px 16px; color:rgba(232,236,255,.55); border-top:1px solid rgba(255,255,255,.08)}

/* Toast */
.toast{
  position:fixed;
  right:18px; bottom:18px;
  z-index:80;
  display:none;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(10,14,24,.78);
  box-shadow: 0 18px 70px rgba(0,0,0,.55);
  color: rgba(232,236,255,.92);
}

/* Boot screen */
#boot{
  position:absolute; inset:0;
  display:grid; place-items:center;
  pointer-events:auto;
  background:
    radial-gradient(900px 500px at 30% 20%, rgba(124,58,237,.22), transparent 60%),
    radial-gradient(900px 500px at 90% 40%, rgba(6,182,212,.18), transparent 60%),
    rgba(0,0,0,.78);
  backdrop-filter: blur(10px);
}
#boot.hidden{display:none}
.boot-card{
  width:min(720px, 92vw);
  border-radius: 28px;
  background: rgba(10,14,24,.72);
  border:1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 120px rgba(0,0,0,.65);
  padding:18px 18px 16px;
}
.boot-title{
  font-family:var(--mono);
  font-weight:900;
  letter-spacing:.22em;
  color:rgba(232,236,255,.92);
}
.boot-sub{color:rgba(232,236,255,.70); margin-top:6px}
.boot-log{
  margin-top:12px;
  padding:12px 12px;
  border-radius:18px;
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(232,236,255,.78);
  font-family:var(--mono);
  font-size:12px;
  line-height:1.5;
  min-height:100px;
  white-space:pre-wrap;
}
.boot-bar{
  height:12px;
  border-radius:999px;
  margin-top:12px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  overflow:hidden;
}
.boot-bar-fill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(124,58,237,.95), rgba(6,182,212,.95), rgba(34,197,94,.85));
}
.boot-hint{
  margin-top:10px;
  color:rgba(232,236,255,.55);
  font-family:var(--mono);
  font-size:12px;
}
