:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #d0e0f0;
  --blue: #2060f0;
  --orange: #f08050;
  --dim: rgba(208, 224, 240, 0.72);
  --dim2: rgba(208, 224, 240, 0.45);
  --line: rgba(208, 224, 240, 0.18);
  --good: #37ff9b;
  --warn: #ffcc66;
  --bad: #ff6b6b;
  --hint: rgba(208, 224, 240, 0.38);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: transparent;
  color: var(--fg);
  font: 16px/1.5 var(--shell-font, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
  letter-spacing: 0.01em;
  text-shadow: 0 0 2px rgba(208, 224, 240, 0.22);
}

/* ========== TYTEC Fiberbloom ========== */
.fiberbloom {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;

    display: block;

    pointer-events: none;
    z-index: -1;

    opacity: 0.58;
}

.fiberbloom__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.fiberbloom::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
  opacity: 0.14;
}

.wrap {
  min-height: 100vh;
  padding: 16px 16px 28px 16px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.frame {
  width: min(1040px, 100%);
  position: relative;
  z-index: 2;
}

.site,
#app,
#root,
main,
.container,
.page,
#app-root {
  position: relative;
  z-index: 2;
}

.hdr {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  position: sticky;
  top: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(3, 7, 18, 0.28));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  z-index: 10;
  min-height: 190px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 14px;
  text-transform: uppercase;
}

.logo .b {
  color: var(--blue);
}

.logo .o {
  color: var(--orange);
}

.status {
  font-size: 12px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 10px;
  row-gap: 8px;
  white-space: normal;
  min-height: 34px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--dim);
  background: rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font: 12px/1.4 var(--shell-font, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#originPill {
  min-width: 18ch;
}

#apiPill {
  min-width: 11ch;
}

#spinPill {
  min-width: 2.5ch;
}

.pill.good {
  color: var(--good);
  border-color: rgba(55, 255, 155, 0.25);
}

.pill.warn {
  color: var(--warn);
  border-color: rgba(255, 204, 102, 0.25);
}

.pill.bad {
  color: var(--bad);
  border-color: rgba(255, 107, 107, 0.25);
}

.splash {
  white-space: pre;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.2;
  margin: 0;
  min-height: 11em;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.55);
}

.splash-blue {
  color: #2060F0;
  text-shadow: 0 0 10px rgba(32, 96, 240, 0.38), 0 0 4px rgba(255, 255, 255, 0.22);
}

.splash-blue-soft {
  color: #79A7FF;
  text-shadow: 0 0 10px rgba(32, 96, 240, 0.28), 0 0 4px rgba(255, 255, 255, 0.28);
}

.splash-orange {
  color: #F08050;
  text-shadow: 0 0 10px rgba(240, 128, 80, 0.34), 0 0 4px rgba(255, 255, 255, 0.18);
}

.splash-orange-soft {
  color: #FFB08C;
  text-shadow: 0 0 10px rgba(240, 128, 80, 0.28), 0 0 4px rgba(255, 255, 255, 0.24);
}

.splash-white {
  color: #FFFFFF;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2), 0 0 4px rgba(32, 96, 240, 0.18);
}

.screen {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 6px 2px 2px;
  min-height: 18rem;
}

.ctxbar {
  margin: 0 0 8px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--dim);
  font-size: 12px;
  white-space: nowrap;
  overflow: auto;
  min-height: 2.75rem;
  box-sizing: border-box;
}

.blue {
  color: var(--blue);
}

.orange {
  color: var(--orange);
}

.dim {
  color: var(--dim);
}

.dim2 {
  color: var(--dim2);
}

.hint {
  color: var(--hint);
}

.cmd {
  cursor: pointer;
  border-bottom: 1px dashed rgba(240, 128, 80, 0.45);
}

.cmd:hover {
  color: var(--orange);
  border-bottom-color: rgba(240, 128, 80, 0.95);
}

.cta {
  color: var(--orange);
  font-weight: 600;
}

.gui-link {
  position: fixed;
  right: 12px;
  bottom: 8px;
  z-index: 20;
  font-size: 12px;
  color: var(--dim);
  border-bottom: 1px dotted rgba(208, 224, 240, 0.3);
  text-decoration: none;
}

.gui-link:hover {
  color: var(--fg);
  border-bottom-color: rgba(208, 224, 240, 0.8);
}

a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid rgba(208, 224, 240, 0.35);
}

a:hover {
  border-bottom-color: rgba(208, 224, 240, 0.85);
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 1em;
  background: var(--fg);
  vertical-align: -0.2em;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

#hiddenInput {
  position: fixed;
  left: -9999px;
  top: -9999px;
  opacity: 0;
}

.console-sections {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.console-sections section {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.console-sections section:last-child {
  border-bottom: 0;
}

.console-sections h2 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 16px;
  font-weight: 600;
}

.console-sections p,
.console-sections li,
.console-sections td,
.console-sections th {
  color: var(--fg);
  font-size: 14px;
}

.console-sections .legend {
  color: var(--dim);
  font-size: 13px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.section-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.32);
}

.checklist {
  margin: 10px 0 0;
  padding-left: 18px;
}

.checklist li + li {
  margin-top: 6px;
}

.request-template {
  margin: 10px 0 0;
  color: var(--fg);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  white-space: pre-wrap;
}

pre.ascii {
  margin: 8px 0;
  color: var(--fg);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
}

pre.ascii .node {
  color: var(--blue);
}

pre.ascii .flow {
  color: var(--orange);
}

pre.ascii .ok {
  color: var(--good);
}

pre.ascii .warn {
  color: var(--warn);
}

.coverage-city-link {
  color: var(--blue-soft);
  border-bottom: 1px solid rgba(121, 167, 255, 0.35);
  text-decoration: none;
}

.coverage-city-link:hover {
  color: var(--fg);
  border-bottom-color: rgba(208, 224, 240, 0.8);
}

.coverage-city-link-active {
  color: var(--good);
  border-bottom-color: rgba(55, 255, 155, 0.45);
}

.coverage-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.coverage-table th,
.coverage-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 6px 4px;
}

.coverage-active {
  color: var(--good);
}

.coverage-ondemand {
  color: var(--orange);
}

.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  background: rgba(0, 0, 0, 0.96);
  color: var(--fg);
  padding: 18px;
}

.boot-overlay.visible {
  display: block;
}

.boot-wrap {
  max-width: 840px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #000;
}

.boot-title {
  color: var(--blue);
  margin-bottom: 8px;
}

.boot-output {
  min-height: 9.2em;
  white-space: pre-wrap;
}

.boot-skip {
  margin-top: 8px;
  font-size: 12px;
  color: var(--dim);
  border-bottom: 1px dotted var(--dim);
  cursor: pointer;
  display: inline-block;
}

.boot-label {
  color: var(--blue);
}

.boot-step {
  color: var(--orange);
}

.boot-ok {
  color: var(--good);
}

.mobile-only {
  display: none;
}

body.fiberbloom-debug .fiberbloom {
  opacity: 0.98;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .fiberbloom { transform: none; }
}

/* Hacker Easter Egg Styles */
body.matrix-mode {
  background: #000 !important;
  color: #00ff41 !important;
  text-shadow: 0 0 5px #00ff41;
}

body.matrix-mode .dim,
body.matrix-mode .blue,
body.matrix-mode .orange,
body.matrix-mode a {
  color: #00ff41 !important;
  border-color: #00ff41 !important;
}

@media (max-width: 760px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .status {
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .ctxbar {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .request-template {
    font-size: 12.5px;
    line-height: 1.55;
    padding: 9px;
  }

  .hdr {
    position: static;
    min-height: 118px;
  }

  .splash {
    min-height: 3.8em;
  }

  .screen {
    min-height: 14rem;
  }
}
