[hidden] {
  display: none !important;
}

#ui-root {
  position: fixed;
  inset: 0;
  z-index: 10;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;

  pointer-events: auto;
}

/* Title */
#title {
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: clamp(2.9rem, 8vw, 6rem);
  letter-spacing: clamp(0.08em, 1.5vw, 0.2em);

  max-width: 90vw;
  text-align: center;
  white-space: nowrap;

  padding: 0.2em 0.4em;

  color: rgba(230, 240, 255, 0.95);

  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);

  border: 1px solid rgba(120, 180, 255, 0.25);

  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);

  text-shadow:
    0 0 10px rgba(120, 180, 255, 0.35);

  margin: 0;

  cursor: default; /* prevent text cursor */
}

@media (max-width: 500px) {
  #title {
    letter-spacing: 0.03em;
    padding-inline: 0.12em;
    max-width: 98vw;
  }
}

/* Button */
.ui-action {
  position: relative;
  overflow: hidden;

  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.25em;

  padding: 0.9rem 2.6rem;

  color: rgba(230, 240, 255, 0.9);

  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);

  border: 1px solid rgba(120, 180, 255, 0.5);

  cursor: pointer;

  box-shadow:
    0 0 16px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;

  animation: idleSheen 6s infinite;
}

.ui-action:hover::before {
  animation: buttonSheen 0.8s ease;
}

.ui-action::before {
  content: "";
  position: absolute;
  top: -120%;
  left: -120%;
  width: 200%;
  height: 200%;

  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 60%
  );

  opacity: 0;
  transform: translateX(-100%) translateY(100%);
}

.ui-action:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 12px rgba(120, 180, 255, 0.4),
    0 0 24px rgba(120, 180, 255, 0.2);
  background: rgba(20, 40, 80, 0.55);
}

.ui-action:active {
  transform: translateY(0);
}

.ui-hidden .ui-action {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.ui-visible .ui-action {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ui-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.ui-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.content-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.ui-visible .ui-action:nth-child(1) { transition-delay: 0.1s; }
.ui-visible .ui-action:nth-child(2) { transition-delay: 0.2s; }
.ui-visible .ui-action:nth-child(3) { transition-delay: 0.3s; }
.ui-visible .ui-action:nth-child(4) { transition-delay: 0.4s; }
.ui-visible .ui-action:nth-child(5) { transition-delay: 0.5s; }
.ui-visible .ui-action:nth-child(6) { transition-delay: 0.6s; }

#ui-console,
#top-banner {
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-out {
  animation: uiFadeOut 0.6s ease forwards;
}

@keyframes uiFadeOut {
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}

@keyframes buttonSheen {
  0% {
    opacity: 0;
    transform: translateX(-100%) translateY(100%);
  }

  10% {
    opacity: 0.25;
  }

  40% {
    opacity: 0.15;
    transform: translateX(100%) translateY(-100%);
  }

  100% {
    opacity: 0;
    transform: translateX(100%) translateY(-100%);
  }
}

@keyframes idleSheen {
  0%, 85% {
    box-shadow:
      0 0 16px rgba(0, 0, 0, 0.6),
      inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  }

  90% {
    box-shadow:
      0 0 20px rgba(120, 180, 255, 0.35),
      inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

#ui-console {
  position: fixed;
  inset: 0;
  z-index: 10;

  opacity: 1;
  transition: opacity 0.4s ease;

  display: grid;
  place-content: center;
  gap: 1rem;

  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: min(90vw, 800px);
  margin: auto;

  pointer-events: auto;
}

/* @media (max-width: 573px) {
  #ui-console {
    grid-auto-rows: minmax(3.2em, auto);
  }
} */

#top-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  z-index: 20;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 1rem 1.5rem;

  pointer-events: none;
}

.banner-right {
  display: flex;
  gap: 1.25rem;

  pointer-events: auto; /* re-enable */
}

.banner-right a {
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;

  color: rgba(220, 235, 255, 0.75);
  text-decoration: none;

  padding: 0.4rem 0.6rem;

  border: 1px solid transparent;
  border-radius: 2px;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    text-shadow 0.2s ease;
}

.banner-right a:hover {
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(120, 180, 255, 0.4);
  text-shadow: 0 0 6px rgba(120, 180, 255, 0.5);
}

.banner-left {
  pointer-events: auto;
}

#banner-home {
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}

#banner-home:hover {
  color: rgba(255, 255, 255, 1);
  border-color: rgba(160, 210, 255, 0.6);
  box-shadow:
    0 0 14px rgba(120, 180, 255, 0.4);
}

.banner-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#banner-home:hover .banner-logo {
  opacity: 1;
  transform: translateY(-1px);
}

#syslog {
  position: fixed;
  right: 1rem;
  bottom: 1rem;

  width: min(90vw, 360px);
  max-height: 35vh;

  z-index: 5; /* behind buttons */

  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  line-height: 1.4;

  color: rgba(170, 210, 255, 0.85);

  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 0 8px rgba(0, 0, 0, 0.5),
    0 0 16px rgba(0, 0, 0, 0.3);

  pointer-events: none;
  overflow: hidden;
}

#syslog::before {
  content: "";
  position: absolute;
  inset: -6px -8px;
  background: rgba(0, 0, 0, 0.25);
  filter: blur(12px);
  z-index: -1;
}

.syslog-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;

  text-shadow: 0 0 6px rgba(120, 180, 255, 0.3);
}

.syslog-inner div {
  opacity: 0.5;
}

.syslog-inner div:nth-last-child(1) {
  opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
  #syslog {
    display: none;
  }
}

#content-panel {
  position: fixed;
  inset: 5vh 5vw;
  z-index: 15;

  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);

  border: 1px solid rgba(120, 180, 255, 0.3);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);

  overflow-y: auto;
  opacity: 0;
  transform: scale(0.96);

  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

#content-panel.active {
  opacity: 1;
  transform: scale(1);
}

.ui-action.expand-to-content {
  position: fixed;
  z-index: 20;

  left: 5vw;
  top: 5vh;
  width: 90vw;
  height: 90vh;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.2rem;
  letter-spacing: 0.15em;

  transform: none !important;

  transition:
    all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#content-close {
  position: sticky;
  top: 0;
  margin-left: auto;

  background: none;
  border: none;
  color: rgba(200, 220, 255, 0.8);

  font-size: 1.5rem;
  cursor: pointer;

  padding: 0.5rem 0.75rem;
  z-index: 30;

  text-shadow: 0 0 8px rgba(120, 180, 255, 0.4);
}

#content-close:hover {
  color: white;
  text-shadow: 0 0 12px rgba(120, 180, 255, 0.8);
}