:root {
  --bg: #030604;
  --panel: rgba(0, 16, 8, 0.75);
  --line: rgba(24, 255, 124, 0.3);
  --text: #8dffbf;
  --text-strong: #d4ffe7;
  --accent: #32ff87;
  --danger: #ff6f6f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Share Tech Mono", monospace;
}

body.booting #matrix {
  opacity: 0.55;
  filter: saturate(1.2) brightness(1.1);
}

#matrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.34;
  pointer-events: none;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(8, 34, 18, 0.56), rgba(0, 0, 0, 0.8));
  transition: opacity 500ms ease, visibility 500ms ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-panel {
  width: min(92vw, 540px);
  border: 1px solid rgba(36, 255, 123, 0.35);
  border-radius: 10px;
  background: rgba(3, 14, 8, 0.82);
  padding: 16px;
  box-shadow: 0 0 25px rgba(20, 255, 116, 0.14), inset 0 0 20px rgba(20, 255, 116, 0.1);
}

.preloader-title {
  margin: 0 0 10px;
  color: var(--text-strong);
  letter-spacing: 0.08em;
  font-size: 14px;
}

.preloader-bar {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(36, 255, 123, 0.5);
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.preloader-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(24, 180, 92, 0.65), rgba(56, 255, 143, 0.95));
  box-shadow: 0 0 20px rgba(36, 255, 123, 0.55);
}

.preloader-status {
  margin: 10px 0 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-strong);
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: 16px;
  background: radial-gradient(circle at top, rgba(10, 40, 22, 0.16), rgba(0, 0, 0, 0.64));
  transition: opacity 450ms ease, transform 450ms ease;
}

.app--hidden {
  opacity: 0;
  transform: translateY(8px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.brand-text {
  color: var(--text-strong);
  letter-spacing: 0.08em;
  font-size: 13px;
}

.updated {
  font-size: 12px;
  opacity: 0.85;
}

.menu-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}

.menu-tab {
  appearance: none;
  border: 1px solid rgba(36, 255, 123, 0.35);
  border-radius: 8px;
  background: rgba(0, 16, 8, 0.55);
  color: var(--text);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.menu-tab:hover {
  filter: brightness(1.08);
}

.menu-tab--active {
  color: var(--text-strong);
  border-color: rgba(36, 255, 123, 0.75);
  box-shadow: 0 0 16px rgba(35, 255, 122, 0.18), inset 0 0 14px rgba(35, 255, 122, 0.12);
}

.view {
  display: none;
}

.view--active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 12px;
  border-radius: 8px;
  box-shadow: inset 0 0 16px rgba(40, 255, 130, 0.08);
}

.card.hero {
  background: rgba(6, 25, 13, 0.82);
  box-shadow: inset 0 0 22px rgba(40, 255, 130, 0.12);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text);
  opacity: 0.9;
}

.value {
  margin: 0;
  font-size: 20px;
  color: var(--text-strong);
  text-shadow: 0 0 10px rgba(100, 255, 160, 0.28);
}

.card small {
  opacity: 0.65;
}

.log-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 16, 8, 0.66);
}

.log-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(24, 255, 124, 0.15);
  font-size: 13px;
}

.log-row:last-child {
  border-bottom: 0;
}

.pos {
  color: var(--accent);
}

.neg {
  color: var(--danger);
}

.cta {
  display: block;
  margin-top: 14px;
  text-align: center;
  padding: 12px 14px;
  border: 1px solid rgba(45, 255, 132, 0.7);
  border-radius: 8px;
  color: #d9ffe9;
  text-decoration: none;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, rgba(10, 48, 24, 0.82), rgba(4, 18, 9, 0.9));
  box-shadow: 0 0 16px rgba(35, 255, 122, 0.18), inset 0 0 16px rgba(35, 255, 122, 0.08);
}

.cta:hover {
  filter: brightness(1.08);
}

.info-panel {
  background: rgba(4, 18, 9, 0.82);
  padding: 16px;
}

.info-panel h2 {
  margin: 0 0 10px;
  color: var(--text-strong);
  letter-spacing: 0.08em;
  font-size: 20px;
}

.info-lead {
  margin: 0 0 12px;
  color: var(--text-strong);
  opacity: 0.9;
  line-height: 1.35;
}

.info-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.info-list li {
  line-height: 1.35;
}

@media (max-width: 700px) {
  .app {
    padding: 12px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .menu-tabs {
    margin-bottom: 10px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .card {
    padding: 10px;
  }

  .card h3 {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .value {
    font-size: 16px;
  }

  .log-panel {
    margin-top: 10px;
    padding: 10px;
  }

  .log-row {
    font-size: 12px;
    padding: 3px 0;
  }

  .cta {
    margin-top: 10px;
    padding: 11px 12px;
    font-size: 13px;
  }
}
