@font-face {
  font-family: "Share Tech Mono";
  font-style: normal;
  font-weight: 400;
  font-display: auto;
  src: url(/ShareTechMono.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary-color: #0ff;
  --secondary-color: #ff0;
  --body-color: #d0d0d0;
}

/* Base styles */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100dvh;
}

body {
  margin: 0;
  background: black;
  color: var(--body-color);
  font-family: "Share Tech Mono", monospace;
  font-size: 1.5rem;
  overflow: hidden;
  height: 100dvh;
}

#mainContent {
  display: flex;
  position: fixed;
  top: 2.5rem;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  width: calc(100% - 2rem);
  max-width: 1920px;
  margin-inline: auto;
  transition:
    opacity,
    transform 300ms ease;
  border: 4px double var(--primary-color);
  opacity: 0;
  transform: scale(0.5);
  transform-origin: center 100%;
}

.nebula {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 30% 30%,
      color-mix(in oklab, var(--primary-color) 15%, transparent),
      transparent 60%
    ),
    radial-gradient(
      circle at 70% 70%,
      color-mix(in oklab, var(--secondary-color) 15%, transparent),
      transparent 60%
    );
  background-repeat: no-repeat;
  background-size:
    100% 100%,
    100% 100%;
  z-index: 0;
  pointer-events: none;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      color-mix(in oklab, var(--primary-color) 13%, transparent) 1px,
      transparent 2px
    ),
    repeating-linear-gradient(
      90deg,
      color-mix(in oklab, var(--secondary-color) 13%, transparent) 1px,
      transparent 2px
    );
  background-size: 40px 40px;
  z-index: 0;
}

body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.2) 3px
  );
  z-index: 3;
  pointer-events: none;
}

/* Panels */
.pane {
  padding: 1.5rem 2rem;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}
.mobile-welcome {
  display: none;
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-shadow: 0 0 10px var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 1rem;
  font-weight: bold;
}
.left {
  width: 30%;
  min-width: 400px;
  display: flex;
  flex-direction: column;
  border-right: 4px double var(--primary-color);
  font-size: larger;
}
.right {
  width: 70%;
  position: relative;
  overflow: hidden;
  font-size: larger;
}

/* Links */
.link {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  color: var(--body-color);
  text-decoration: none;
  padding: 0.75rem 0;
  text-transform: uppercase;
}

.link::before {
  content: "⎔";
  color: var(--secondary-color);
  margin-right: 8px;
  text-shadow:
    0 0 6px var(--secondary-color),
    0 0 12px var(--secondary-color);
}

.link:hover {
  color: color-mix(in oklab, var(--primary-color) 50%, white);
  text-shadow:
    0 0 8px var(--primary-color),
    0 0 20px var(--primary-color);
}

/* Description text */
.description {
  white-space: pre-wrap;
  line-height: 1.5;
  text-shadow: 0 0 10px var(--primary-color);
  animation: textFlicker 0.15s infinite;
}
@keyframes textFlicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.95;
  }
}

#bootScreen {
  position: fixed;
  inset: 0;
  color: var(--body-color);
  padding: 20px;
  padding-inline: max(20px, calc((100% - 1920px) / 2));
  font-size: 1.2rem;
  white-space: pre;
  overflow: hidden;
  z-index: 9999;
  background-color: color-mix(in oklab, var(--primary-color) 20%, black);
  filter: url(#chromatic);

  &::before {
    content: "⎔";
    position: absolute;
    top: -10%;
    right: -20%;
    font-size: 100rem;
    font-weight: 100;
    opacity: 0.01;
  }

  #loadingbar {
    border: 1px solid var(--body-color);
    border-radius: 0.25rem;
    padding: 2px;
    width: calc(27ch + 4px);
    opacity: 0.1;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%);
  }

  .green {
    --color-green: #86ff52;
    color: var(--color-green);
    text-shadow: 0 0 5px var(--color-green);
  }

  .red {
    --color-red: #ff6d6d;
    color: var(--color-red);
    text-shadow: 0 0 5px var(--color-red);
  }

  .primary {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
  }

  .secondary {
    color: var(--secondary-color);
    text-shadow: 0 0 5px var(--secondary-color);
  }

  .bold {
    --color-bold: #ffffff;
    color: var(--color-bold);
    text-shadow: 0 0 5px var(--color-bold);
  }
}
.cursor {
  display: inline-block;
  width: 10px;
  height: 2px;
  animation: blink 0.8s infinite;
}
@keyframes blink {
  0%,
  50% {
    background: var(--body-color);
  }
  51%,
  100% {
    background: none;
  }
}

#topBar,
#bottomBar {
  position: fixed;
  left: 0;
  right: 0;
  width: calc(100% - 2rem);
  max-width: 1920px;
  margin-inline: auto;
  display: flex;
  color: var(--primary-color);
  font-size: 1rem;
}

#topBar {
  top: 0.75rem;
  justify-content: space-between;

  h1 {
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
  }

  > div {
    display: flex;
    gap: 2rem;
  }

  span {
    white-space: nowrap;
  }
}

#bottomBar {
  bottom: 0.75rem;
  justify-content: end;

  span {
    white-space: nowrap;
  }
}

.particle-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  color: transparent;
  animation-name: rotate;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  pointer-events: none;
  opacity: 0.1;
  will-change: transform;

  &::before {
    content: "⎔";
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  body {
    font-size: 1.1rem;
    overflow: auto;
  }

  #bootScreen {
    font-size: 0.9rem;
  }

  #topBar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem;
  }

  #topBar h1 {
    font-size: 0.9rem;
  }

  #topBar > div {
    gap: 1rem;
  }

  #topBar div span:nth-child(n + 2) {
    display: none;
  }

  #bottomBar {
    font-size: 0.7rem;
    padding: 0.5rem;
  }

  #mainContent {
    flex-direction: column;
    top: 3rem;
    bottom: 2.5rem;
    left: 0.5rem;
    right: 0.5rem;
    overflow-y: auto;
    border-width: 2px;
  }

  .mobile-welcome {
    display: block;
  }

  .pane.left {
    width: 100%;
    min-width: auto;
    border-right: none;
    padding: 1rem;
  }

  .pane.right {
    display: none;
  }

  .link {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    white-space: normal;
  }

  .link::after {
    content: attr(data-desc);
    display: block;
    font-size: 0.8rem;
    text-transform: none;
    color: var(--body-color);
    opacity: 0.8;
    margin-top: 0.25rem;
    margin-left: 2.5rem;
    line-height: 1.4;
    text-shadow: none;
    white-space: normal;
    word-break: break-word;
  }

  .link:last-child {
    border-bottom: none;
  }
}

@media (max-width: 500px) {
  #topBar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.5rem;
  }

  #topBar div span:nth-child(n + 1) {
    display: none;
  }
}
