:root {
  --bg: #010207;
  --text: #c4f6ff;
  --accent-a: #4fffa2;
  --accent-b: #37b6ff;
  --accent-c: #ff71d6;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  font-family: "Consolas", "Courier New", monospace;
  background:
    radial-gradient(circle at 18% 18%, rgba(27, 53, 89, 0.45) 0%, rgba(3, 5, 12, 0.78) 35%, #000 70%),
    linear-gradient(180deg, #02070d 0%, var(--bg) 42%, #000 100%);
  color: var(--text);
}

body {
  position: fixed;
  inset: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(120, 220, 255, 0.045) 0,
    rgba(120, 220, 255, 0.045) 1px,
    rgba(0, 0, 0, 0) 3px,
    rgba(0, 0, 0, 0) 5px
  );
  mix-blend-mode: screen;
}

#matrixCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100svh;
}

@supports (height: 100dvh) {
  html,
  body,
  #matrixCanvas {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.center-overlay {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 980px);
  text-align: center;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 0 12px rgba(79, 255, 162, 0.7), 0 0 35px rgba(55, 182, 255, 0.5);
}

#focusText {
  margin: 0;
  font-size: clamp(2rem, 9vw, 6.5rem);
  line-height: 1;
  letter-spacing: 0.12em;
  font-weight: 800;
  opacity: 0.86;
  transition: opacity 520ms ease, transform 520ms ease;
  color: #8efbc8;
}

#subText {
  margin-top: 0.75rem;
  font-size: clamp(0.85rem, 2.1vw, 1.2rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.74;
  color: #8cc9ff;
}

.ticker {
  position: fixed;
  left: 0;
  width: 100%;
  overflow: hidden;
  z-index: 4;
  background: linear-gradient(90deg, rgba(3, 14, 22, 0), rgba(3, 14, 22, 0.7), rgba(3, 14, 22, 0));
  border-top: 1px solid rgba(76, 201, 255, 0.28);
  border-bottom: 1px solid rgba(87, 255, 133, 0.28);
  backdrop-filter: blur(3px);
}

.ticker-top {
  top: 1rem;
}

.ticker-bottom {
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.track {
  white-space: nowrap;
  width: max-content;
  display: inline-block;
  min-width: 200%;
  padding: 0.55rem 0;
  font-size: clamp(0.8rem, 2.4vw, 1rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9edfff;
  text-shadow: 0 0 12px rgba(76, 201, 255, 0.32);
  animation: run-left 16s linear infinite;
}

.track.reverse {
  animation: run-right 14s linear infinite;
  color: #9effbf;
}

@keyframes run-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes run-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@media (max-width: 600px) {
  .ticker-top {
    top: 0.5rem;
  }

  .ticker-bottom {
    bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
  }

  #subText {
    letter-spacing: 0.1em;
  }

  .ticker {
    backdrop-filter: blur(1.6px);
    background: linear-gradient(90deg, rgba(3, 14, 22, 0.05), rgba(3, 14, 22, 0.74), rgba(3, 14, 22, 0.05));
  }

  .track {
    padding: 0.5rem 0;
    font-size: clamp(0.72rem, 3.1vw, 0.9rem);
    letter-spacing: 0.08em;
    animation-duration: 19s;
  }
}
