@font-face {
  font-family: "Futurot";
  src: url("./fonts/futurot.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Skinbones";
  src: url("./fonts/skinbones.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Zombnze";
  src: url("./fonts/zombnze.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "RP Mola";
  src: url("./fonts/RP Mola.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Anthem";
  src: url("./fonts/anthem.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg-image: url("./images/zs4.png");

  --title-font: "Anthem", sans-serif;
  --category-font: "Anthem", sans-serif;
  --body-font: "Anthem", sans-serif;
  --feature-font: "Anthem", sans-serif;

  --title-color: #1cff2e;
  --text-color: #f5f5f5;
  --accent-color: #1cff2e;
  --panel-bg: rgba(0, 0, 0, 0.42);
  --page-bg: #050505;
  --text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.85);

  --title-size: clamp(2rem, 3vw, 3.35rem);
  --subtitle-size: clamp(1.75rem, 2.4vw, 2.8rem);
  --heading-size: clamp(2rem, 2.8vw, 3.3rem);
  --body-size: clamp(1.1rem, 1.55vw, 2.1rem);
  --small-size: clamp(0.95rem, 1.1vw, 1.5rem);
  --panel-gap: 1.5vw;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page-bg);
}

body {
  font-family: var(--body-font);
  overflow: hidden;
}

.loading-screen {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.58));
}

.canvas {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000000;
  overflow: hidden;
}

.panel,
.title-block {
  position: absolute;
  text-align: center;
  text-transform: none;
  text-shadow: var(--text-shadow);
}

.bg-layer,
.bg-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bg-layer {
  background-image: var(--bg-image);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  transform-origin: center center;
  will-change: transform;
  z-index: 0;
}

.bg-layer.zooming {
  animation: bg-zoom 18s linear forwards;
}

.bg-fade {
  background: #000000;
  opacity: 0;
  z-index: 1;
}

.loading-spinner {
  position: absolute;
  left: 1.4%;
  bottom: 1.8%;
  width: clamp(2.25rem, 3.2vw, 4.25rem);
  height: clamp(2.25rem, 3.2vw, 4.25rem);
  display: grid;
  place-items: center;
  z-index: 3;
}

.loading-tip {
  position: absolute;
  left: 50%;
  bottom: 1.8%;
  transform: translateX(-50%);
  width: min(52vw, 56rem);
  padding: 0.45rem 0.8rem;
  text-align: center;
  color: #ffd54a;
  font-family: var(--body-font);
  font-size: clamp(0.8rem, 1vw, 1.15rem);
  line-height: 1.2;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
  z-index: 3;
}

.loading-tip-icon {
  display: inline-block;
  margin-right: 0.35rem;
}

.loading-spinner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: spinner-rotate 9s linear infinite;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.7));
}

.panel {
  background: var(--panel-bg);
  padding: 1.1% 1.4%;
  max-width: calc(100vw - (var(--panel-gap) * 2));
  z-index: 2;
}

.title-block {
  top: 1.1%;
  left: 50%;
  width: 42%;
  transform: translateX(-50%);
  z-index: 2;
}

.title-line {
  font-family: var(--title-font);
  font-size: var(--title-size);
  line-height: 0.95;
  color: var(--title-color);
  letter-spacing: 0.03em;
}

.title-subline {
  margin-top: 0.25em;
  font-size: var(--subtitle-size);
}

.panel h2,
.panel h3,
.panel p {
  margin: 0;
}

.panel h2 {
  font-family: var(--category-font);
  font-size: var(--heading-size);
  line-height: 1;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 0.3em;
}

.panel h3 {
  font-family: var(--feature-font);
  font-size: clamp(1.7rem, 2.1vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--accent-color);
  margin-bottom: 0.3em;
}

.panel p {
  font-size: var(--body-size);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-color);
}

.panel p + p {
  margin-top: 1em;
}

.panel-left {
  top: 12%;
  left: 0;
  width: 25.8%;
}

.panel-right {
  top: 12%;
  right: 0;
  width: 25.8%;
}

.panel-bottom-center {
  left: 50%;
  bottom: 7.6%;
  width: 42%;
  transform: translateX(-50%);
}

.panel-discord {
  left: 0;
  bottom: 7.4%;
  width: 26.2%;
}

.panel-discord p {
  font-family: var(--feature-font);
  font-size: clamp(1.7rem, 1.95vw, 2.6rem);
  line-height: 1.05;
  color: var(--accent-color);
  letter-spacing: 0.04em;
}

.panel-note {
  right: 1.6%;
  bottom: 14%;
  width: 24%;
}

.panel-note p {
  font-size: var(--small-size);
  line-height: 1.2;
}

@keyframes spinner-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes bg-zoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

@media (max-aspect-ratio: 16/9) {
  .bg-layer {
    background-size: auto 100%;
  }
}

@media (max-width: 1500px) {
  :root {
    --body-size: clamp(1rem, 1.35vw, 1.7rem);
    --small-size: clamp(0.9rem, 0.95vw, 1.2rem);
  }

  .panel-bottom-center {
    width: 44%;
  }

  .panel-note {
    width: 25%;
    bottom: 13.5%;
  }
}

@media (max-width: 1250px) {
  :root {
    --heading-size: clamp(1.7rem, 2.2vw, 2.5rem);
    --body-size: clamp(0.95rem, 1.2vw, 1.35rem);
    --small-size: clamp(0.8rem, 0.9vw, 1rem);
  }

  .title-block {
    width: 48%;
  }

  .panel-left,
  .panel-right {
    width: 28%;
  }

  .panel-bottom-center {
    width: 46%;
    bottom: 6.8%;
  }

  .panel-note {
    width: 26%;
    right: 1.2%;
    bottom: 13%;
  }
}

@media (max-width: 900px) {
  :root {
    --title-size: clamp(1.5rem, 4vw, 2.2rem);
    --subtitle-size: clamp(1.2rem, 3vw, 1.75rem);
    --heading-size: clamp(1.3rem, 2.5vw, 1.9rem);
    --body-size: clamp(0.8rem, 1.5vw, 1rem);
    --small-size: clamp(0.72rem, 0.95vw, 0.92rem);
  }

  .panel {
    padding: 1.1% 1%;
  }

  .title-block {
    width: 58%;
  }

  .panel-left,
  .panel-right {
    width: 30%;
  }

  .panel-bottom-center {
    width: 50%;
    bottom: 5.8%;
  }

  .panel-note {
    width: 28%;
    right: 1%;
    bottom: 13%;
  }

  .panel-discord {
    width: 29%;
  }

  .loading-spinner {
    left: 1.2%;
    bottom: 1.4%;
  }

  .loading-tip {
    width: min(56vw, 40rem);
    bottom: 1.4%;
    font-size: clamp(0.72rem, 0.95vw, 0.95rem);
  }
}

@media (max-width: 700px), (max-height: 700px) {
  body {
    overflow: auto;
  }

  .loading-screen,
  .canvas {
    min-height: 100vh;
    height: auto;
  }

  .canvas {
    padding: 1rem 0 2rem;
  }

  .bg-layer {
    background-size: cover;
  }

  .title-block,
  .panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    width: min(92vw, 42rem);
    max-width: min(92vw, 42rem);
    margin-left: auto;
    margin-right: auto;
    transform: none;
  }

  .title-block {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
  }

  .panel + .panel {
    margin-top: 0.85rem;
  }

  .panel-bottom-center,
  .panel-discord,
  .panel-note,
  .panel-left,
  .panel-right {
    width: min(92vw, 42rem);
  }

  .loading-spinner {
    position: relative;
    left: auto;
    bottom: auto;
    width: 3rem;
    height: 3rem;
    margin: 0.85rem auto 0;
  }

  .loading-tip {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(92vw, 42rem);
    margin: 0.85rem auto 0;
    transform: none;
  }

  .panel-discord,
  .panel-note {
    margin-bottom: 0;
  }

  .panel-discord p,
  .panel h3,
  .panel h2,
  .panel p,
  .title-line {
    word-break: break-word;
  }
}
