:root {
  color-scheme: dark;
  font-family: "Baloo 2", system-ui, sans-serif;
  --navy: #080d21;
  --navy-soft: #111a35;
  --gold: #f7c848;
  --orange: #ed6a25;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html, body { margin: 0; min-height: 100%; background: var(--navy); }
button,
a {
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
button { font: inherit; }

.load-screen {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 88%, rgba(240, 83, 30, .28), transparent 30%),
    linear-gradient(#111a35 0 22%, #080d21 55% 100%);
  box-shadow: 0 0 80px #000;
}

.load-screen__backdrop {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 30%;
  opacity: .23;
  background: url("https://revoseo1.ams3.digitaloceanspaces.com/fallamania/assets/fallamania-welcome.png") center 18% / cover;
  filter: blur(2px) saturate(.8);
  mask-image: linear-gradient(#000 50%, transparent);
}

.load-header {
  display: grid;
  height: clamp(96px, 17svh, 158px);
  padding-top: env(safe-area-inset-top);
  place-items: center;
}

.load-header__logo {
  width: min(70%, 350px);
  height: min(76%, 118px);
  object-fit: contain;
  filter: drop-shadow(0 7px 5px rgba(0,0,0,.72));
}

.load-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  margin: 0 -7px;
  padding: 8px 72px;
  border: 3px solid #7e2418;
  border-radius: 9px;
  background: linear-gradient(#f15031 0 12%, #cf2d25 13% 82%, #921914 83%);
  box-shadow: 0 5px 0 rgba(0,0,0,.35), inset 0 2px 0 rgba(255,221,144,.45);
}

.load-header__bar h1 {
  z-index: 1;
  margin: 0;
  color: #fff4c7;
  font: 800 clamp(1.45rem, 6.4vw, 2rem)/1 "Baloo 2", sans-serif;
  letter-spacing: .035em;
  text-shadow: 0 3px 0 #37100d;
}

.close-button {
  position: absolute;
  z-index: 2;
  right: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0 0 4px;
  place-items: center;
  border: 2px solid #65dcfa;
  border-radius: 14px;
  color: white;
  background: linear-gradient(#24bfe9,#1864bb);
  box-shadow: inset 0 2px rgba(255,255,255,.25),0 4px 0 #092653;
  font: 800 2rem/1 "Baloo 2",sans-serif;
  text-decoration: none;
}

.login-panel {
  position: relative;
  z-index: 3;
  width: calc(100% - 28px);
  margin: 0 auto max(14px, env(safe-area-inset-bottom));
  padding: 0;
  border-radius: 20px;
  background: #0c1327;
  box-shadow: 0 16px 45px rgba(0,0,0,.65);
  text-align: center;
}

.login-panel__body { padding: clamp(22px, 5vw, 34px); }

.login-panel__intro {
  max-width: 430px;
  margin: 0 auto clamp(20px, 3.5vh, 30px);
  color: #f6f2e9;
  font-size: clamp(1rem, 4.4vw, 1.3rem);
  font-weight: 700;
  line-height: 1.28;
  text-shadow: 0 2px 2px #000;
}

.login-options { display: grid; gap: 16px; }

.login-button {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  min-height: 68px;
  padding: 10px 18px;
  border: 2px solid #d7d9df;
  border-radius: 15px;
  color: #111;
  background: #fff;
  box-shadow: 0 5px 0 rgba(0,0,0,.4), inset 0 -3px 0 #e9e9e9;
  font-size: clamp(1rem, 4.2vw, 1.25rem);
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}

.login-button svg { width: 29px; height: 29px; }
.login-button span { grid-column: 2; }
.login-button:hover { filter: brightness(.96); }
.login-button:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,.4); }
.login-button:focus-visible, .close-button:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }

.login-panel__legal {
  max-width: 380px;
  margin: 19px auto 0;
  color: #8790a8;
  font-size: .72rem;
  line-height: 1.25;
}

.login-panel__status {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--gold);
  font-size: .8rem;
  font-weight: 700;
}

.character-stage {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: min(39svh, 360px);
  border-bottom: max(8px, env(safe-area-inset-bottom)) solid #a72d4c;
}

.character-stage::before {
  content: "";
  position: absolute;
  right: -10%;
  bottom: 0;
  left: -10%;
  height: 34%;
  background: radial-gradient(ellipse at center, #ed6a25 0, #9d274c 35%, transparent 70%);
  filter: blur(8px);
}

.character-stage__glow {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 24%;
  opacity: .45;
  background-image: radial-gradient(circle, #ffcd4a 0 1px, transparent 2px);
  background-size: 16px 12px;
  mask-image: linear-gradient(transparent, #000);
}

.character {
  position: absolute;
  bottom: 0;
  width: min(58vw, 280px);
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 8px 6px rgba(0,0,0,.7));
}
.character--left { left: 2%; transform: rotate(-2deg); }
.character--right { right: 2%; transform: rotate(2deg); }

@media (max-height: 700px) {
  .load-header { height: 82px; }
  .load-header__logo { width: min(52%, 250px); height: 72%; }
  .load-header__bar { min-height: 54px; }
  .login-panel__body { padding-block: 14px; }
  .login-panel__intro { margin-bottom: 11px; font-size: .92rem; }
  .login-options { gap: 10px; }
  .login-button { min-height: 52px; }
  .login-panel__legal { margin-top: 10px; font-size: .62rem; }
  .login-panel__status { margin-top: 3px; font-size: .7rem; }
  .character-stage { height: 27svh; }
}

@media (prefers-reduced-motion: reduce) {
  .login-button { transition: none; }
}
