:root {
  color-scheme: dark;
  background: #000;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  font-family: Arial, Helvetica, sans-serif;
  touch-action: none;
}

#app {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

.color-haze {
  position: absolute;
  inset: -12vh -12vw;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 28%, rgba(12, 32, 92, 0.42) 0 8%, transparent 24%),
    radial-gradient(circle at 78% 22%, rgba(41, 13, 72, 0.36) 0 7%, transparent 23%),
    radial-gradient(circle at 66% 74%, rgba(8, 28, 76, 0.34) 0 9%, transparent 25%),
    radial-gradient(circle at 28% 82%, rgba(45, 10, 64, 0.28) 0 8%, transparent 24%);
  filter: blur(34px);
}

.background-words {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.background-word {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100vw;
  transform: translate(-50%, -50%);
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.32);
  text-shadow: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 13vw, 220px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
}

#webgl-fallback {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  text-align: center;
  background: #000;
}

#webgl-fallback[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.modal__content {
  position: relative;
  z-index: 1;
  max-width: 80vw;
  max-height: 80vh;
  margin: 0;
}

.modal__content img {
  display: block;
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.72);
}

.modal__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  font-size: 34px;
  line-height: 44px;
  cursor: pointer;
}

.modal__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .modal__close {
    width: 52px;
    height: 52px;
    font-size: 36px;
    line-height: 48px;
  }
}
