:root {
  color-scheme: dark;
  --ink: #f5fbfa;
  --muted: #aebfbc;
  --line: rgba(211, 238, 233, 0.18);
  --gold: #f7c65a;
  --teal: #39d8c6;
  --blue: #65bfff;
  --deep: #020708;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  background: var(--deep);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.start-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: fixed;
  inset: -2vh -2vw;
  z-index: -4;
  width: 104vw;
  height: 104vh;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.18) contrast(1.08) brightness(1.12);
  transform: scale(1.02);
  animation: sceneDrift 19s ease-in-out infinite alternate;
}

.cinema-shade {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 74% 24%, rgba(247, 198, 90, 0.2), transparent 30%),
    linear-gradient(90deg, rgba(1, 6, 8, 0.92) 0%, rgba(1, 6, 8, 0.72) 34%, rgba(1, 6, 8, 0.16) 68%, rgba(1, 6, 8, 0.3) 100%),
    linear-gradient(180deg, rgba(1, 6, 8, 0.5) 0%, rgba(1, 6, 8, 0.02) 46%, rgba(1, 6, 8, 0.78) 100%);
}

.cinema-shade::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(57, 216, 198, 0.11) 50%, transparent 100%),
    repeating-linear-gradient(90deg, rgba(101, 191, 255, 0.07) 0 1px, transparent 1px 118px),
    repeating-linear-gradient(0deg, rgba(57, 216, 198, 0.045) 0 1px, transparent 1px 96px);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, transparent 80%);
  animation: gridSweep 11s linear infinite;
  content: "";
}

.cinema-shade::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 40%, rgba(247, 198, 90, 0.15), transparent 24%),
    radial-gradient(circle at 14% 68%, rgba(57, 216, 198, 0.14), transparent 22%);
  mix-blend-mode: screen;
  opacity: 0.7;
  animation: reactorPulse 5s ease-in-out infinite;
  content: "";
}

.energy-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.58;
}

.home-nav {
  position: relative;
  z-index: 4;
  width: min(1520px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(101, 191, 255, 0.5);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(101, 191, 255, 0.2), rgba(57, 216, 198, 0.1));
  box-shadow: 0 0 38px rgba(57, 216, 198, 0.22);
}

.brand-mark i {
  width: 25px;
  height: 34px;
  clip-path: polygon(50% 0, 88% 0, 62% 42%, 100% 42%, 34% 100%, 49% 56%, 14% 56%);
  background: linear-gradient(180deg, #ffe08b, #39d8c6);
}

.brand small,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(760px, calc(100vw - 48px));
  margin: min(16vh, 138px) 0 0 max(24px, calc((100vw - 1520px) / 2 + 24px));
}

.title-lockup {
  position: relative;
}

.title-lockup::before {
  position: absolute;
  left: 0;
  top: -34px;
  width: min(620px, 78vw);
  height: 1px;
  background: linear-gradient(90deg, rgba(247, 198, 90, 0.96), rgba(57, 216, 198, 0.52), transparent);
  box-shadow: 0 0 22px rgba(247, 198, 90, 0.4);
  content: "";
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  margin-top: 12px;
  font-size: clamp(66px, 8.6vw, 128px);
  line-height: 0.92;
  font-weight: 950;
  text-shadow: 0 9px 38px rgba(0, 0, 0, 0.7), 0 0 36px rgba(247, 198, 90, 0.16);
}

.tagline {
  max-width: 650px;
  margin-top: 20px;
  color: rgba(231, 243, 240, 0.9);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.72;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.66);
}

.start-actions {
  display: grid;
  gap: 12px;
  width: min(310px, 100%);
  margin-top: 38px;
}

.menu-button,
.console-submit,
.resume-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 54px;
  border-radius: 8px;
  font-weight: 950;
}

.console-submit::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.62) 46%, transparent 62%);
  transform: translateX(-120%);
  animation: buttonSweep 3.8s ease-in-out infinite;
  content: "";
}

.menu-button,
.resume-button {
  border: 1px solid transparent;
  color: rgba(245, 251, 250, 0.86);
  background: linear-gradient(90deg, rgba(7, 19, 23, 0.7), rgba(7, 19, 23, 0.18));
  padding: 0 20px;
  text-align: left;
  backdrop-filter: blur(8px);
}

.menu-button:hover,
.resume-button:hover {
  border-color: rgba(57, 216, 198, 0.42);
  color: #fff;
  background: linear-gradient(90deg, rgba(57, 216, 198, 0.16), rgba(7, 19, 23, 0.12));
}

.join-console {
  position: absolute;
  right: max(24px, calc((100vw - 1520px) / 2 + 24px));
  top: min(18vh, 164px);
  z-index: 5;
  width: min(410px, calc(100vw - 48px));
  padding: 24px;
  border: 1px solid rgba(211, 238, 233, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(10, 26, 31, 0.82), rgba(4, 12, 15, 0.82));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48), 0 0 60px rgba(57, 216, 198, 0.1);
  backdrop-filter: blur(22px);
  transform: translateX(0);
  transition: opacity 240ms ease, transform 240ms ease;
}

.console-top {
  margin-bottom: 20px;
}

.console-top h2 {
  margin-top: 6px;
  font-size: 28px;
}

.join-console form {
  display: grid;
  gap: 13px;
}

.join-console label {
  display: grid;
  gap: 8px;
}

.join-console label span {
  color: #d7e8e5;
  font-size: 13px;
  font-weight: 900;
}

.join-console input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(211, 238, 233, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  padding: 0 13px;
  outline: 0;
}

.join-console input:focus {
  border-color: rgba(57, 216, 198, 0.82);
  box-shadow: 0 0 0 3px rgba(57, 216, 198, 0.13);
}

.console-submit {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  color: #071014;
  background: linear-gradient(135deg, #ffe188, #39d8c6 68%, #65bfff);
  overflow: hidden;
}

.resume-button {
  justify-content: center;
  width: 100%;
  margin-top: -2px;
}

.join-toast {
  min-height: 22px;
  color: var(--gold);
  font-size: 13px;
  line-height: 1.45;
}

@keyframes sceneDrift {
  from {
    transform: scale(1.02) translate3d(-0.4vw, -0.4vh, 0);
  }

  to {
    transform: scale(1.06) translate3d(0.7vw, 0.35vh, 0);
  }
}

@keyframes gridSweep {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(0, 96px, 0);
  }
}

@keyframes reactorPulse {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.84;
  }
}

@keyframes buttonSweep {
  0%,
  50% {
    transform: translateX(-120%);
  }

  74%,
  100% {
    transform: translateX(140%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 980px) {
  body {
    overflow-y: auto;
  }

  .start-screen {
    min-height: 100vh;
    padding-bottom: 28px;
  }

  .hero-bg,
  .cinema-shade,
  .energy-canvas {
    position: absolute;
    min-height: 100%;
  }

  .home-nav,
  .hero-content,
  .join-console {
    width: calc(100vw - 32px);
  }

  .home-nav {
    padding: 18px 0;
  }

  .hero-content {
    margin: 11vh auto 0;
  }

  h1 {
    font-size: clamp(56px, 15vw, 92px);
  }

  .start-actions {
    width: min(340px, 100%);
    margin-top: 34px;
  }

  .join-console {
    position: relative;
    right: auto;
    top: auto;
    margin: 34px auto 0;
    transform: none;
  }
}
