@font-face {
  font-family: "ShotaiMono";
  src: local("Consolas"), local("JetBrains Mono"), local("Cascadia Mono"), local("Courier New");
}

:root {
  --bg: #050506;
  --bg2: #0b090a;
  --red: #ff2438;
  --red-soft: rgba(255, 36, 56, 0.38);
  --red-dim: rgba(255, 36, 56, 0.13);
  --cyan: #56f0ff;
  --cyan-soft: rgba(86, 240, 255, 0.24);
  --text: rgba(245, 245, 245, 0.92);
  --muted: rgba(245, 245, 245, 0.52);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 36, 56, 0.13), transparent 27%),
    radial-gradient(circle at 25% 20%, rgba(86, 240, 255, 0.055), transparent 28%),
    linear-gradient(135deg, #020203 0%, #090708 45%, #030304 100%);
  color: var(--text);
  font-family: ShotaiMono, Consolas, monospace;
}

#gridCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.68;
}

.wallpaper {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.symbol-frame {
  position: relative;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  animation: breathe 8s ease-in-out infinite;
}

.logo-wrap {
  position: relative;
  width: 44%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  z-index: 5;
  filter:
    drop-shadow(0 0 18px rgba(255, 36, 56, 0.42))
    drop-shadow(0 0 52px rgba(255, 36, 56, 0.22));
}

.logo-wrap::before {
  content: "";
  position: absolute;
  inset: -26%;
  border: 1px solid var(--red-soft);
  background:
    linear-gradient(90deg, transparent, rgba(255, 36, 56, 0.08), transparent),
    radial-gradient(circle, rgba(255, 36, 56, 0.10), transparent 62%);
  transform: rotate(45deg);
  z-index: -1;
  box-shadow: 0 0 38px rgba(255, 36, 56, 0.12);
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: logoPulse 5.5s ease-in-out infinite;
}

.system-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 36, 56, 0.18);
}

.ring-outer {
  inset: 0;
  border-top-color: rgba(255, 36, 56, 0.72);
  border-right-color: rgba(86, 240, 255, 0.18);
  animation: rotateA 44s linear infinite;
}

.ring-mid {
  inset: 12%;
  border-left-color: rgba(255, 36, 56, 0.48);
  border-bottom-color: rgba(86, 240, 255, 0.20);
  animation: rotateB 38s linear infinite;
}

.ring-inner {
  inset: 24%;
  border-top-color: rgba(255, 36, 56, 0.55);
  border-right-color: rgba(255, 36, 56, 0.12);
  animation: rotateA 28s linear infinite reverse;
}

.orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 36, 56, 0.12);
  pointer-events: none;
}

.orbit::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--red);
}

.orbit-a {
  width: 76%;
  height: 76%;
  animation: rotateA 18s linear infinite;
}

.orbit-b {
  width: 92%;
  height: 48%;
  transform: rotate(-24deg);
  animation: rotateB 24s linear infinite;
}

.orbit-c {
  width: 48%;
  height: 92%;
  transform: rotate(31deg);
  animation: rotateA 29s linear infinite reverse;
}

.title-block {
  position: absolute;
  left: 50%;
  bottom: 8.5vh;
  transform: translateX(-50%);
  text-align: center;
  letter-spacing: 0.18em;
  text-shadow: 0 0 22px rgba(255, 36, 56, 0.26);
}

.title-block .jp {
  color: var(--red);
  font-size: clamp(1.4rem, 2.2vw, 2.4rem);
  letter-spacing: 0.65em;
  margin-left: 0.65em;
  opacity: 0.95;
}

.title-block h1 {
  margin: 0.35rem 0 0.35rem;
  font-size: clamp(1.65rem, 3vw, 4rem);
  font-weight: 800;
  line-height: 1;
}

.title-block p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.58rem, 0.85vw, 0.95rem);
}

.terminal-panel {
  position: absolute;
  min-width: 280px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 36, 56, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 36, 56, 0.06), transparent),
    rgba(5, 5, 6, 0.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 28px rgba(255, 36, 56, 0.08);
}

.terminal-panel::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 0;
  width: 36%;
  height: 1px;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
}

.terminal-panel span {
  display: block;
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  margin-bottom: 0.45rem;
}

.terminal-panel strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.13em;
}

.terminal-panel small {
  display: block;
  color: var(--muted);
  margin-top: 0.4rem;
  font-size: 0.72rem;
}

.top-left {
  top: 7vh;
  left: 5vw;
}

.bottom-right {
  right: 5vw;
  bottom: 7vh;
}

.corner {
  position: absolute;
  width: 58px;
  height: 58px;
  border-color: rgba(255, 36, 56, 0.55);
  opacity: 0.8;
}

.corner-tl {
  top: 3vh;
  left: 3vw;
  border-top: 1px solid;
  border-left: 1px solid;
}

.corner-tr {
  top: 3vh;
  right: 3vw;
  border-top: 1px solid;
  border-right: 1px solid;
}

.corner-bl {
  bottom: 3vh;
  left: 3vw;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.corner-br {
  bottom: 3vh;
  right: 3vw;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 5px
  );
  mix-blend-mode: overlay;
  opacity: 0.22;
}

.noise {
  position: fixed;
  inset: -40%;
  pointer-events: none;
  opacity: 0.055;
  background-image:
    radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 1px),
    radial-gradient(circle at 70% 80%, #fff 0 1px, transparent 1px);
  background-size: 36px 36px, 54px 54px;
  animation: noiseShift 1.8s steps(2) infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 34%, rgba(0,0,0,0.38) 72%, rgba(0,0,0,0.82) 100%);
}

@keyframes rotateA {
  to { transform: rotate(360deg); }
}

@keyframes rotateB {
  to { transform: rotate(-360deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@keyframes logoPulse {
  0%, 100% { opacity: 0.92; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.035); }
}

@keyframes noiseShift {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(36px,-18px,0); }
}

@media (max-aspect-ratio: 4/3) {
  .symbol-frame {
    width: min(70vw, 540px);
  }

  .terminal-panel {
    display: none;
  }

  .title-block {
    bottom: 7vh;
  }
}
