:root {
  --bg-color: #01040f;
  --surface-color: #040f04;
  --accent-color: #0f0;
  --text-color: #d7ffd2;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

.matrix-grid {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: .5;
  pointer-events: none;
  z-index: -2;
}

.matrix-rain {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 60%);
  opacity: .8;
  pointer-events: none;
  animation: pulse 14s linear infinite;
  mix-blend-mode: screen;
}

@keyframes pulse {
  from { transform: scale(1); opacity: .4; }
  50% { transform: scale(1.05); opacity: .9; }
  to { transform: scale(1); opacity: .4; }
}

.header {
  text-align: center;
  padding: 3rem 1rem 1rem;
  position: relative;
  z-index: 0;
}

.header h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  letter-spacing: 0.35em;
  margin-bottom: .4rem;
}

.mantra-hub {
  margin: 1.25rem auto 1rem;
  max-width: 960px;
  width: min(100%, 740px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
  justify-content: center;
}

.mantra-stage {
  position: relative;
  width: 100%;
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0 0.75rem;
  overflow: visible;
}

.nebula-field {
  --nebula-drift: 48s;
  --nebula-glow: 24s;
  --nebula-brightness: 0.9;
  position: absolute;
  top: -12%;
  bottom: -2%;
  left: -15%;
  right: -15%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
  filter: brightness(var(--nebula-brightness));
  transition: filter 0.5s ease, transform 0.8s ease;
  transform-origin: center;
}

.mantra-stage--pulse .nebula-field {
  --nebula-brightness: 1.15;
  --nebula-drift: 40s;
  --nebula-glow: 20s;
  transform: scale(1.02);
}

.nebula-splat {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  opacity: 0.72;
  filter: blur(24px);
  animation: nebulaDrift var(--nebula-drift, 48s) cubic-bezier(0.25, 0.1, 0.25, 1) infinite alternate,
             nebulaFade var(--nebula-glow, 24s) ease-in-out infinite;
}

.nebula-splat:nth-of-type(1) {
  width: 320px;
  height: 230px;
  top: -12%;
  left: 10%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.78), rgba(255,255,255,0) 65%);
  animation-delay: 0s, 2s;
}

.nebula-splat:nth-of-type(2) {
  width: 280px;
  height: 210px;
  top: 8%;
  right: 14%;
  background: radial-gradient(circle at 50% 50%, rgba(244,114,182,0.6), rgba(244,114,182,0) 70%);
  animation-delay: 6s, 1s;
}

.nebula-splat:nth-of-type(3) {
  width: 260px;
  height: 200px;
  bottom: 2%;
  left: 42%;
  background: radial-gradient(circle at 40% 20%, rgba(94,255,210,0.48), rgba(94,255,210,0) 70%);
  animation-delay: 12s, 3s;
}

.nebula-splat:nth-of-type(4) {
  width: 300px;
  height: 220px;
  bottom: -6%;
  right: 26%;
  background: radial-gradient(circle at 60% 35%, rgba(129,140,248,0.48), rgba(129,140,248,0) 76%);
  animation-delay: 3s, 5s;
}

@keyframes nebulaDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  35% { transform: translate3d(10px, -12px, 0) scale(1.04); }
  65% { transform: translate3d(-6px, 8px, 0) scale(1.02); }
  100% { transform: translate3d(-10px, 4px, 0) scale(1); }
}

@keyframes nebulaFade {
  0% { opacity: 0.58; }
  35% { opacity: 0.88; }
  65% { opacity: 0.74; }
  100% { opacity: 0.6; }
}

@media (min-width: 900px) {
  .mantra-hub {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.mantra {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 260px;
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  transition: opacity 1s ease;
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mantra.fading {
  opacity: 0;
}

.tree {
  list-style: none;
  margin: 2rem auto 0;
  padding: 0 1rem;
  max-width: 960px;
}

.tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tree li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.35rem;
}

.tree li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent-color);
  opacity: 0.6;
}

.tree li.dir::before {
  border-radius: 0.2rem;
}

.node-name {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}

.node-path {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.structure-test {
  min-height: 100vh;
  padding: 2rem 3rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.structure-hero {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.structure-hero .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.structure-hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  margin: 0;
  letter-spacing: 0.2em;
}

.structure-hero p {
  margin: 0;
  color: rgba(255,255,255,0.65);
  max-width: 520px;
}

.structure-breadcrumb {
  margin-top: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.02);
  max-width: fit-content;
}

.structure-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.3fr);
  gap: 1.5rem;
  align-items: stretch;
}

.structure-info {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.info-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

.info-pill strong {
  font-size: 1.3rem;
  letter-spacing: 0.3em;
  color: var(--text-color);
}

.structure-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: inset 0 0 40px rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
}

.structure-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.structure-sublist {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.structure-entry {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.01);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  padding: 0.85rem 1rem;
  padding-left: calc(1rem + (var(--depth, 0) * 0.8rem));
  cursor: default;
}

.structure-entry::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.04);
  pointer-events: none;
}

.structure-entry:hover,
.structure-entry:focus-within {
  transform: translateY(-2px);
  border-color: var(--accent-color);
  box-shadow: 0 15px 40px rgba(0,0,0,0.35), 0 0 15px rgba(255,255,255,0.18);
}

.node-line {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.node-title {
  font-size: 0.95rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}

.node-meta {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

@media (max-width: 900px) {
  .structure-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .structure-grid {
    grid-template-columns: 1fr;
  }
}

.menu-bar {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: .6rem;
}

.menu-btn {
  padding: .55rem 1.4rem;
  border-radius: 999px;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--text-color);
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .75rem;
  cursor: pointer;
  transition: all .2s ease;
}

.menu-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}


.page-nav {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin: 1rem 2rem;
}

.page-nav .menu-btn {
  font-size: .7rem;
  letter-spacing: .4em;
}

.three-status {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  font-size: .75rem;
  letter-spacing: .4em;
  color: rgba(255,255,255,.6);
}

.dash-shell {
  min-height: 100vh;
  padding: 2rem 2rem 3rem;
  background: linear-gradient(180deg, rgba(1,4,15,.95), rgba(5,20,40,.95));
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.dash-header h1 {
  font-size: 3rem;
  margin: 0.2rem 0 0;
  letter-spacing: 0.2em;
}

.dash-subhead {
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .45em;
  margin: 0;
  color: rgba(255,255,255,0.6);
}

.dash-note {
  margin: 0;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.35em;
}

.dash-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dash-details h2 {
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: rgba(255,255,255,0.7);
}

.dash-details p {
  font-size: 2rem;
  margin: 0;
  font-weight: 600;
}

.dash-chart {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  position: relative;
  min-height: 320px;
}

.dash-chart h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  letter-spacing: 0.3em;
}

.dash-chart canvas {
  width: 100% !important;
  height: 260px !important;
}
