:root{
  --bg:#050816;
  --panel:rgba(10,12,24,.82);
  --panel2:rgba(12,14,28,.70);
  --text:#ecf4ff;
  --muted:#9fb6d6;

  --cyan:#4df3ff;
  --cyan2:#31c8ff;
  --magenta:#ff3cac;
  --green:#3cff9b;
  --amber:#ffd166;
  --red:#ff4d6d;

  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --border: 1px solid rgba(77,243,255,.14);
  --radius: 14px;

  --core: rgba(0,234,255,.9);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(circle at 50% 10%, rgba(40,82,158,.18), transparent 45%),
    radial-gradient(circle at 50% 60%, rgba(64,26,76,.22), transparent 55%),
    var(--bg);
  color: var(--text);
  overflow-x:hidden;
}

.bg-grid{
  position:fixed; inset:0;
  z-index: 1;
  background:
    linear-gradient(rgba(0,229,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, black 0, black 45%, transparent 80%);
  opacity:.35;
  pointer-events:none;
}
.bg-grid-parallax{
  position:fixed; inset:0;
  z-index: 1;
  background:
    linear-gradient(rgba(0,234,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,234,255,.08) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity:.16;
  transform: translateZ(0);
  pointer-events:none;
  animation: gridDrift 24s linear infinite;
}
@keyframes gridDrift{
  0%{ transform: translate3d(0px, 0px, 0); }
  50%{ transform: translate3d(-12px, -10px, 0); }
  100%{ transform: translate3d(0px, 0px, 0); }
}

.bg-vignette{
  position:fixed; inset:0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 30%, rgba(0,229,255,.10), transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(0,0,0,.5), rgba(0,0,0,.88));
  pointer-events:none;
  animation: vignettePulse 22s ease-in-out infinite;
}
@keyframes vignettePulse{
  0%,100%{ opacity: 1; }
  50%{ opacity: 0.85; }
}
.bg-vault-glow{
  position:fixed; inset:0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(0,234,255,.12), transparent 50%),
    radial-gradient(circle at 50% 60%, rgba(0,120,255,.10), transparent 70%);
  filter: blur(60px);
  opacity:.55;
  mix-blend-mode: screen;
  pointer-events:none;
  animation: vaultGlow 26s ease-in-out infinite;
}
@keyframes vaultGlow{
  0%,100%{ opacity:.45; filter: blur(60px); }
  50%{ opacity:.70; filter: blur(80px); }
}

.bg-glyphs{
  position:fixed; inset:0;
  z-index: 1;
  pointer-events:none;
  overflow:hidden;
}
.glyph{
  position:absolute;
  color: rgba(0,234,255,.32);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  opacity:.16;
  mix-blend-mode: screen;
  animation: glyphDrift linear infinite;
}
@keyframes glyphDrift{
  0%{ transform: translateY(0) translateX(0); }
  100%{ transform: translateY(-30px) translateX(8px); opacity: 0; }
}

.bg-embers{
  position:fixed; inset:0;
  z-index: 1;
  pointer-events:none;
  overflow:hidden;
}
.ember{
  position:absolute;
  width:4px; height:4px;
  border-radius:50%;
  background: rgba(0,234,255,.45);
  box-shadow: 0 0 12px rgba(0,234,255,.55);
  opacity:.55;
  animation: emberRise linear infinite;
}
@keyframes emberRise{
  0%{ transform: translateY(0) scale(1); opacity:.45; }
  70%{ opacity:.55; }
  100%{ transform: translateY(-120px) scale(1.2); opacity:0; }
}

.bg-noise{
  position:fixed; inset:0;
  z-index: 2;
  pointer-events:none;
  opacity:.08;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='40' height='40' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
}

.topbar{
  z-index: 5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0,229,255,.10);
  background: rgba(5,8,18,.75);
  backdrop-filter: blur(10px);
  position: sticky;
  top:0;
}

.brand{ display:flex; gap:12px; align-items:center; }
.brand-mark{
  width:14px; height:14px;
  border-radius: 4px;
  background: var(--cyan);
  box-shadow: 0 0 22px rgba(0,229,255,.75);
}
.brand-title{
  font-weight:900;
  letter-spacing:.16em;
  text-transform:uppercase;
  text-shadow: 0 0 10px rgba(0,234,255,.32);
}
.brand-subtitle{
  color: var(--muted);
  font-size: 12px;
  margin-top:2px;
  text-shadow: 0 0 8px rgba(0,234,255,.18);
}

.topbar-right{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.pill{
  padding: 8px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(77,243,255,.14), rgba(77,243,255,.04));
  border: 1px solid rgba(77,243,255,.25);
  color: var(--text);
  font-size: 12px;
  letter-spacing:.02em;
}
.pill.subtle{ color: var(--muted); }

.btn{
  border: 1px solid rgba(77,243,255,.28);
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  color: #04101c;
  padding: 9px 12px;
  font-weight: 700;
  letter-spacing:.04em;
  border-radius: 12px;
  cursor:pointer;
}
.btn:hover{ filter: brightness(1.08); box-shadow: 0 0 16px rgba(77,243,255,.24); }

.btn.subtle{
  background: rgba(77,243,255,.08);
  color: var(--text);
  border-color: rgba(77,243,255,.18);
}

.layout{
  position: relative;
  z-index: 3;
  display:grid;
  grid-template-columns: 340px 1fr 340px;
  gap: 14px;
  padding: 14px;
}
@media (max-width: 1100px){
  .layout{ grid-template-columns: 1fr; }
}

.panel{
  background: var(--panel);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.panel::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(77,243,255,.18), rgba(77,243,255,.02), rgba(255,60,172,.10));
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding:1px;
  opacity:.4;
  animation: panelPulse 8s ease-in-out infinite;
  pointer-events:none;
}
@keyframes panelPulse{
  0%,100%{ opacity:.28; }
  50%{ opacity:.55; }
}
.panel-title{
  margin:0 0 12px 0;
  font-size: 13px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color: var(--muted);
  text-shadow: 0 0 10px rgba(0,234,255,.24);
}

.link-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}
.link-card{
  display:block;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(0,229,255,.10);
  text-decoration:none;
  color: var(--text);
  position: relative;
  overflow:hidden;
  box-shadow: 0 0 0 rgba(0,234,255,.0);
  transition: box-shadow .25s ease, border-color .25s ease, transform .2s ease;
}
.link-card::after{
  content:"";
  position:absolute;
  inset:-60% -80%;
  background: radial-gradient(circle at 30% 30%, rgba(0,229,255,.18), transparent 55%);
  transform: rotate(10deg);
  opacity: .0;
  transition: opacity .2s ease;
}
.link-card:hover::after{ opacity: .9; }
.link-card:hover{
  border-color: rgba(0,229,255,.32);
  background: rgba(0,229,255,.09);
  box-shadow: 0 0 16px rgba(0,234,255,.22);
  transform: translateY(-1px);
}
.link-title{ font-weight:800; letter-spacing:.02em; }
.link-sub{ color: var(--muted); font-size: 12px; margin-top:4px; }

.mini{
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(0,229,255,.10);
}
.mini-title{
  font-size: 12px;
  color: var(--muted);
  text-transform:uppercase;
  letter-spacing:.12em;
}
.mini-body{
  margin-top:8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #cfe9ff;
  line-height: 1.4;
  white-space: pre-wrap;
}

.hint{
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(77,243,255,.05);
  border: 1px solid rgba(77,243,255,.14);
}
.hint-title{ font-weight:900; font-size:12px; letter-spacing:.14em; text-transform:uppercase; }
.hint-body{ margin-top:6px; color: var(--muted); font-size:12px; }
code{
  background: rgba(0,0,0,.25);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
}

.center{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: calc(100vh - 86px);
  position: relative;
}
.core-wrap{
  width:min(720px, 100%);
  padding: 18px;
  text-align:center;
  position:relative;
  transform-style: preserve-3d;
}

.core-halo{
  position:absolute;
  inset: 16px 48px;
  border-radius: 26px;
  filter: blur(18px);
  opacity: .38;
  background: radial-gradient(circle at 50% 40%, rgba(0,229,255,.18), transparent 62%);
  transition: background .25s ease, opacity .25s ease;
  animation: coreBreathe 18s ease-in-out infinite;
  pointer-events:none;
  z-index: 1;
}
@keyframes coreBreathe{
  0%,100%{ opacity:.32; filter: blur(18px); }
  50%{ opacity:.52; filter: blur(22px); }
}

.cube-stage{
  margin: 36px auto 18px;
  width: 260px;
  height: 260px;
  perspective: 800px;
  transform-style: preserve-3d;
  position: relative;
  z-index: 3;
}
.cube{
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: center center;
  animation: spin 12s linear infinite;
  /* IMPORTANT: no filter here (filters flatten 3D in many browsers) */
}


.face{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: 50px;
  letter-spacing: .22em;
  text-transform: uppercase;
  border-radius: 18px;
  border: 1px solid rgba(0,229,255,.30);
  background:
    linear-gradient(135deg, rgba(0,229,255,.32), rgba(0,229,255,.12)),
    radial-gradient(circle at 32% 28%, rgba(0,229,255,.20), transparent 62%),
    rgba(0,229,255,.06);
  box-shadow:
    inset 0 0 14px rgba(0,229,255,.16),
    0 8px 22px rgba(0,0,0,.38),
    0 0 12px rgba(0,234,255,.10);
  text-shadow: 0 0 12px rgba(0,229,255,.28);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Outer cube faces */
.face.front  { transform: translateZ(130px); }
.face.back   { transform: rotateY(180deg) translateZ(130px); filter: brightness(0.9); }
.face.right  { transform: rotateY(90deg)  translateZ(130px); filter: brightness(0.95); }
.face.left   { transform: rotateY(-90deg) translateZ(130px); filter: brightness(0.95); }
.face.top    { transform: rotateX(90deg)  translateZ(130px); filter: brightness(1.08); }
.face.bottom { transform: rotateX(-90deg) translateZ(130px); filter: brightness(0.85); }

@keyframes spin{
  0%{ transform: rotateX(28deg) rotateY(0deg); }
  25%{ transform: rotateX(-18deg) rotateY(-90deg); }
  50%{ transform: rotateX(28deg) rotateY(-180deg); }
  75%{ transform: rotateX(-18deg) rotateY(-270deg); }
  100%{ transform: rotateX(28deg) rotateY(-360deg); }
}

.core-readout{
  margin: 0 auto;
  width: min(560px, 100%);
  background: var(--panel2);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  text-align:left;
}
.readout-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(77,243,255,.10);
}
.readout-row:last-child{ border-bottom:none; }
.readout-label{
  color: var(--muted);
  font-size: 12px;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.readout-value{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #cfe9ff;
}

.small-note{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.services{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.components{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.card{
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(12,14,28,.88), rgba(6,8,18,.92));
  border: 1px solid rgba(77,243,255,.14);
  box-shadow: 0 0 0 rgba(0,234,255,.0);
  transition: box-shadow .25s ease, border-color .25s ease, transform .2s ease;
}
.card.ok{ border-left: 4px solid rgba(60,255,155,.9); }
.card.fail{ border-left: 4px solid rgba(255,77,109,.9); }
.card-title{ display:flex; justify-content:space-between; align-items:center; }
.card-name{ font-weight:900; letter-spacing:.10em; text-transform:uppercase; font-size: 12px; }
.badge{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--muted);
}
.badge.ok{ color: var(--green); border-color: rgba(60,255,155,.25); background: rgba(60,255,155,.06); }
.badge.fail{ color: var(--red); border-color: rgba(255,77,109,.25); background: rgba(255,77,109,.06); }
.badge.warn{
  color: var(--amber);
  border-color: rgba(255,209,102,.35);
  background: rgba(255,209,102,.08);
}

.card-meta{
  margin-top: 8px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color: var(--muted);
  font-size: 12px;
}
.kv{
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.2);
  padding: 6px 8px;
  border-radius: 10px;
}
.card:hover{
  border-color: rgba(0,234,255,.24);
  box-shadow: 0 0 16px rgba(0,234,255,.18);
  transform: translateY(-1px);
}

.footer-note{
  margin-top: 12px;
  display:flex;
  align-items:center;
  gap:8px;
  color: var(--muted);
  font-size: 12px;
}
.dot{
  width:10px; height:10px; border-radius:50%;
  background: rgba(255,255,255,.25);
  box-shadow: 0 0 18px rgba(255,255,255,.10);
}
.dot.ok{ background: rgba(60,255,155,.9); box-shadow: 0 0 18px rgba(60,255,155,.45); }
.dot.fail{ background: rgba(255,77,109,.9); box-shadow: 0 0 18px rgba(255,77,109,.45); }

.skeleton{ color: var(--muted); }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce){
  .cube, .scan-band, .core-halo, .face { animation: none !important; }
  .panel::before, .bg-grid-parallax, .bg-vignette, .bg-vault-glow { animation: none !important; }
}
