@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

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

html,
body {
  width: 100%;
  min-height: 100%;
  background: #000;
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
}

.page {
  min-height: 100dvh;
  background: #000;
}

/* GAME */

.game-section {
  position: relative;
  height: 70dvh;
  min-height: 540px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(143,92,255,.24), transparent 34%),
    radial-gradient(circle at 75% 22%, rgba(0,234,255,.16), transparent 30%),
    radial-gradient(circle at 20% 24%, rgba(255,53,207,.14), transparent 30%),
    linear-gradient(135deg, #03020a, #020208 72%);
  border-bottom: 1px solid rgba(0,234,255,.22);
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.game-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 18%, rgba(0,0,0,.25) 64%, rgba(0,0,0,.88) 100%),
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 25%, rgba(0,0,0,.48));
}

/* GAME UI */

.game-ui {
  position: absolute;
  z-index: 20;
  left: 2rem;
  right: 2rem;
  top: 1.35rem;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.game-ui div:nth-child(2) {
  text-align: center;
}

.game-ui div:nth-child(3) {
  text-align: right;
}

.game-ui span {
  display: block;
  margin-bottom: .28rem;
  color: rgba(255,255,255,.55);
  font-size: .64rem;
  letter-spacing: .26em;
}

.game-ui strong {
  color: white;
  font-size: clamp(1rem, 2vw, 1.65rem);
  font-weight: 300;
}

/* TILT BUTTON */

.motion-button {
  display: none;
  position: absolute;
  z-index: 60;
  left: 50%;
  bottom: 3.55rem;
  transform: translateX(-50%);
  padding: .78rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(0,234,255,.72);
  background: rgba(0,0,0,.58);
  color: white;
  font-family: inherit;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .18em;
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: opacity .35s ease, transform .35s ease;
  box-shadow:
    0 0 28px rgba(0,234,255,.16),
    inset 0 0 18px rgba(255,255,255,.04);
}

.motion-button.visible {
  display: block;
}

.motion-button.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(.96);
}

/* SHOOT */

.shoot-hint {
  position: absolute;
  z-index: 20;
  left: 2rem;
  bottom: 4.5rem;
  padding: .9rem 1rem;
  min-width: 130px;
  border: 1px solid rgba(255,53,207,.34);
  border-radius: 18px;
  background: rgba(0,0,0,.34);
  backdrop-filter: blur(12px);
  color: white;
  pointer-events: none;
}

.shoot-hint span {
  display: block;
  font-size: .56rem;
  letter-spacing: .22em;
  color: rgba(255,255,255,.65);
}

.shoot-hint strong {
  display: block;
  margin-top: .35rem;
  font-size: .62rem;
  letter-spacing: .15em;
  color: #ff35cf;
}

.game-help {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  width: 90%;
  text-align: center;
  color: rgba(255,255,255,.45);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  pointer-events: none;
}

/* GAME OVER */

.game-over {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: none;
  place-items: center;
  text-align: center;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(14px);
}

.game-over.active {
  display: grid;
}

.game-over h2 {
  font-size: clamp(.72rem, 1.3vw, 1.15rem);
  font-weight: 700;
  letter-spacing: .34em;
  color: #ff35cf;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(255,53,207,.42);
}

.final-stats {
  display: flex;
  justify-content: center;
  gap: 3.8rem;
  margin: 1.45rem 0 2.65rem;
}

.final-stats span {
  display: block;
  margin-bottom: .55rem;
  color: rgba(255,255,255,.42);
  font-size: .58rem;
  letter-spacing: .24em;
}

.final-stats strong {
  display: block;
  color: white;
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: .08em;
}

.restart-text {
  margin-top: 2.1rem;
  margin-bottom: 2.85rem;
  color: rgba(255,255,255,.82);
  font-size: clamp(1rem, 2.1vw, 1.75rem);
  font-weight: 300;
  letter-spacing: .38em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(143,92,255,.35);
}

.restart-button {
  margin-top: .95rem;
  padding: .85rem 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(0,234,255,.68);
  background: rgba(0,0,0,.44);
  color: white;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: .22em;
  cursor: pointer;
}

/* LOGIN */

.login-section {
  position: relative;
  padding: 1.25rem 5vw 1.45rem;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 25%, rgba(255,53,207,.09), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(0,234,255,.08), transparent 32%),
    linear-gradient(180deg, #090713, #020208 78%);
}

.login-card {
  position: relative;
  width: min(88vw, 520px);
  padding: 1.35rem 1.55rem 1.05rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    rgba(0,0,0,.24);
  box-shadow:
    0 22px 90px rgba(0,0,0,.35),
    inset 0 0 40px rgba(255,255,255,.018);
  backdrop-filter: blur(18px);
}

.login-card h1 {
  font-size: clamp(1.6rem, 3.05vw, 2.85rem);
  font-weight: 300;
  letter-spacing: .28em;
  line-height: .95;
  color: rgba(255,255,255,.94);
}

.role {
  margin-top: .55rem;
  color: #ff35cf;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .32em;
}

.archive-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  margin: 1rem 0 .72rem;
}

.archive-divider span {
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
}

.archive-divider p {
  color: #9a6cff;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .28em;
  white-space: nowrap;
}

form {
  width: min(100%, 400px);
  margin: 0 auto;
  display: grid;
  gap: .5rem;
}

input,
form button {
  height: 42px;
  border-radius: 999px;
  font-family: inherit;
}

input {
  width: 100%;
  padding: 0 1.05rem;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.035);
  color: white;
  outline: none;
  font-size: .82rem;
}

input::placeholder {
  color: rgba(255,255,255,.42);
}

form button {
  border: 2px solid transparent;
  background:
    linear-gradient(#050611,#050611) padding-box,
    linear-gradient(90deg,#ff35cf,#8f5cff,#00eaff) border-box;
  color: white;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .26em;
  cursor: pointer;
}

.message {
  min-height: .62rem;
  font-size: .56rem;
  color: #ff35cf;
  opacity: 0;
  transition: opacity .25s ease;
}

.message.visible {
  opacity: 1;
}

/* PREMIUM SOCIAL ICONS */

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .72rem;
  margin-top: .55rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.12), transparent 38%),
    rgba(255,255,255,.035);
  color: rgba(255,255,255,.82);
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(0,234,255,.55);
  box-shadow: 0 0 22px rgba(0,234,255,.16);
}

.social-links svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* MOBILE */

@media (max-width: 700px) {
  .game-section {
    height: 58dvh;
    min-height: 390px;
  }

  .game-ui {
    left: .9rem;
    right: .9rem;
    top: .9rem;
  }

  .game-ui span {
    font-size: .48rem;
    letter-spacing: .14em;
  }

  .game-ui strong {
    font-size: .78rem;
  }

  .shoot-hint {
    display: none;
  }

  .motion-button {
    bottom: 3rem;
    font-size: .54rem;
    padding: .68rem .95rem;
  }

  .game-help {
    bottom: .8rem;
    font-size: .48rem;
    line-height: 1.35;
  }

  .final-stats {
    gap: 1.6rem;
    margin: 1.35rem 0 2.15rem;
  }

  .final-stats strong {
    font-size: .92rem;
  }

  .restart-text {
    margin-top: 1.75rem;
    margin-bottom: 2.55rem;
    font-size: 1.02rem;
    line-height: 1.6;
    letter-spacing: .2em;
  }

  .login-section {
    padding: .85rem 1rem 1rem;
  }

  .login-card {
    width: 100%;
    padding: 1.05rem .95rem .9rem;
    border-radius: 22px;
  }

  .login-card h1 {
    font-size: 1.25rem;
    letter-spacing: .16em;
  }

  .role {
    margin-top: .42rem;
    font-size: .52rem;
    letter-spacing: .2em;
  }

  .archive-divider {
    gap: .55rem;
    margin: .82rem 0 .58rem;
  }

  .archive-divider span {
    width: 42px;
  }

  .archive-divider p {
    font-size: .5rem;
    letter-spacing: .18em;
  }

  form {
    width: min(100%, 315px);
    gap: .42rem;
  }

  input,
  form button {
    height: 39px;
  }

  input {
    font-size: .78rem;
  }

  form button {
    font-size: .6rem;
    letter-spacing: .2em;
  }

  .social-links {
    margin-top: .42rem;
    gap: .55rem;
  }

  .social-links a {
    width: 32px;
    height: 32px;
  }

  .social-links svg {
    width: 15px;
    height: 15px;
  }
}