:root {
  --text: #fffdf9;
  --text-soft: rgba(245, 247, 251, 0.78);
  --text-dim: rgba(245, 247, 251, 0.56);
  --orange: #ff833e;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-soft: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

.muted {
  color: var(--text-soft);
}

.app-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.app-grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 20px 20px;
}

.app-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(84px);
  animation: orb-drift 18s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.orb-a {
  top: 4%;
  left: 6%;
  width: 420px;
  height: 420px;
  background: rgba(255, 142, 77, 0.12);
}

.orb-b {
  top: 26%;
  right: 12%;
  width: 340px;
  height: 340px;
  background: rgba(255, 206, 172, 0.08);
  animation-duration: 22s;
  animation-delay: -8s;
}

.orb-c {
  bottom: 10%;
  left: 42%;
  width: 280px;
  height: 280px;
  background: rgba(255, 142, 77, 0.08);
  animation-duration: 16s;
  animation-delay: -4s;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  width: min(1020px, calc(100% - 56px));
  margin: 0 auto;
  min-height: 100svh;
  align-items: center;
}

.workspace {
  min-height: calc(100svh - 56px);
  display: grid;
  align-content: center;
  justify-items: center;
}

.panel {
  width: 100%;
}

.login-panel {
  position: relative;
  overflow: visible;
  width: min(1020px, 100%);
  margin: 0 auto;
  padding: 0 !important;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: #000;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  animation: auth-panel-enter 820ms var(--motion-ease) both;
  will-change: transform, opacity;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 8% 42% 9% 4%;
  z-index: 0;
  border-radius: 44px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 149, 84, 0.34), transparent 34%),
    radial-gradient(circle at 72% 52%, rgba(255, 214, 186, 0.14), transparent 24%),
    radial-gradient(circle at 82% 82%, rgba(255, 113, 84, 0.16), transparent 28%);
  filter: blur(78px);
  opacity: 0.9;
  pointer-events: none;
  animation: panel-aura-drift 14s ease-in-out infinite alternate;
}

body.auth-locked {
  background:
    radial-gradient(980px 640px at 34% 44%, rgba(255, 139, 74, 0.12), transparent 56%),
    radial-gradient(760px 540px at 58% 52%, rgba(255, 196, 160, 0.08), transparent 60%),
    radial-gradient(1200px 760px at 50% 44%, rgba(12, 12, 15, 0.92), transparent 58%),
    radial-gradient(920px 620px at 50% 50%, rgba(34, 30, 34, 0.5), transparent 74%),
    linear-gradient(180deg, #1d1c1d 0%, #181718 100%);
}

body.auth-locked #auth-state {
  display: block !important;
  scrollbar-width: none;
}

body.auth-locked #auth-state::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.auth-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(438px, 1.02fr) minmax(360px, 0.98fr);
  min-height: min(516px, calc(100svh - 248px));
}

.auth-showcase,
.auth-card {
  position: relative;
  padding: clamp(8px, 1.5vw, 12px) clamp(12px, 2vw, 18px);
}

.auth-showcase {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 10px;
  padding-right: clamp(12px, 2vw, 18px);
  padding-top: 16px;
  padding-bottom: 16px;
  overflow: visible;
  background: #000;
}

.auth-showcase::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.auth-showcase-shell {
  width: min(100%, 474px);
  display: grid;
  gap: 18px;
  perspective: 1400px;
  overflow: visible;
  animation: auth-left-enter 860ms 100ms var(--motion-ease) both;
  will-change: transform, opacity;
}

.auth-showcase-poster {
  position: relative;
  min-height: 500px;
  padding: 22px;
  border-radius: 32px;
  overflow: hidden;
  border: none;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 146, 82, 0.92), transparent 34%),
    radial-gradient(circle at 74% 50%, rgba(255, 183, 138, 0.22), transparent 20%),
    radial-gradient(circle at 82% 82%, rgba(255, 118, 88, 0.18), transparent 24%),
    linear-gradient(180deg, #ff8b4a 0%, #c8613b 34%, #733938 66%, #2f1f24 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -28px 36px rgba(21, 10, 12, 0.28),
    0 26px 70px rgba(0, 0, 0, 0.3);
  transform:
    perspective(1400px)
    rotateX(var(--poster-tilt-x, 0deg))
    rotateY(var(--poster-tilt-y, 0deg))
    translate3d(var(--poster-shift-x, 0px), var(--poster-shift-y, 0px), 0);
  transform-style: preserve-3d;
  transition: transform 260ms var(--motion-soft), box-shadow 260ms var(--motion-soft);
  will-change: transform;
}

.auth-showcase-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 52%, rgba(255, 215, 188, 0.14), transparent 22%),
    radial-gradient(circle at 26% 28%, rgba(255, 122, 58, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.2));
  z-index: 1;
  pointer-events: none;
  animation: poster-glow-drift 12s ease-in-out infinite alternate;
}

.auth-showcase-glyph {
  position: relative;
  z-index: 2;
  display: block;
  width: 60px;
  height: 60px;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  animation:
    auth-rise-fade 720ms 220ms var(--motion-ease) both,
    glyph-float 7.2s 1.2s ease-in-out infinite;
  will-change: transform, opacity;
}

.auth-showcase-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.auth-showcase-copy strong {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(36px, 3vw, 46px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  animation: auth-rise-fade 760ms 300ms var(--motion-ease) both;
}

.auth-showcase-copy span {
  max-width: 18rem;
  color: rgba(245, 247, 251, 0.78);
  line-height: 1.45;
  animation: auth-rise-fade 760ms 380ms var(--motion-ease) both;
}

.auth-card {
  align-self: stretch;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  background: #000;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 14px 18px 14px 30px;
  animation: auth-right-enter 860ms 140ms var(--motion-ease) both;
  will-change: transform, opacity;
}

.auth-card-head {
  display: grid;
  gap: 6px;
  width: min(100%, 404px);
  max-width: 404px;
}

.auth-card h2 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  animation: auth-rise-fade 780ms 320ms var(--motion-ease) both;
}

#auth-description {
  margin: 0;
  width: min(100%, 404px);
  max-width: 404px;
  color: rgba(245, 247, 251, 0.88);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-align: center;
  text-transform: none;
  animation: auth-rise-fade 760ms 400ms var(--motion-ease) both;
}

#auth-title {
  width: 100%;
  text-align: center;
}

.auth-actions,
.auth-info {
  width: min(100%, 404px);
  max-width: 404px;
}

.auth-actions {
  display: grid;
  gap: 12px;
}

.primary-button,
.secondary-button,
.auth-button {
  appearance: none;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.045em;
  position: relative;
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
  will-change: transform, box-shadow;
}

.auth-button:hover {
  transform: translateY(-2px);
}

.auth-button:active {
  transform: translateY(0);
}

.auth-button-faceit {
  border: 1px solid rgba(255, 166, 95, 0.34);
  background: linear-gradient(135deg, #ff833e, #ffb06e);
  color: #160f0b;
  box-shadow: 0 20px 44px rgba(255, 117, 53, 0.18);
}

.auth-actions > *:first-child {
  animation: auth-rise-fade 760ms 470ms var(--motion-ease) both;
}

.auth-actions > *:last-child {
  animation: auth-rise-fade 760ms 560ms var(--motion-ease) both;
}

.auth-button-faceit:hover {
  box-shadow: 0 24px 52px rgba(255, 117, 53, 0.24);
}

.auth-button-steam {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #111216;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.auth-button-steam:hover {
  background: #151821;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.auth-button-logo {
  display: block;
  flex: 0 0 auto;
}

.auth-button-logo-faceit {
  width: 20px;
  height: 20px;
}

.auth-button-logo-steam {
  width: 22px;
  height: 22px;
  object-fit: cover;
  object-position: left center;
}

.auth-footer {
  margin: 0;
  color: rgba(245, 247, 251, 0.72);
  text-align: center;
}

.auth-footer strong {
  color: var(--text);
  font-weight: 800;
}

.auth-info {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  animation: auth-rise-fade 780ms 660ms var(--motion-ease) both;
}

.auth-info-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform-origin: center;
  animation:
    auth-divider-in 820ms 620ms var(--motion-ease) both,
    auth-divider-breathe 8s 1.6s ease-in-out infinite;
}

@media (max-width: 1180px) {
  .app-shell {
    width: min(100%, calc(100% - 32px));
  }

  .auth-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-showcase::after {
    display: none;
  }

  .auth-card {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  .login-panel::before {
    inset: 6% 8% 36% 8%;
    filter: blur(72px);
    opacity: 0.82;
  }

  body.auth-locked {
    background:
      radial-gradient(840px 520px at 50% 22%, rgba(255, 139, 74, 0.14), transparent 52%),
      radial-gradient(640px 420px at 50% 36%, rgba(255, 196, 160, 0.08), transparent 56%),
      radial-gradient(1200px 760px at 50% 42%, rgba(12, 12, 15, 0.92), transparent 58%),
      linear-gradient(180deg, #1d1c1d 0%, #181718 100%);
  }

  .auth-showcase-shell {
    width: min(100%, 560px);
  }

  .auth-showcase-poster {
    min-height: 460px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 12px;
  }

  .auth-showcase,
  .auth-card {
    padding: 22px;
  }

  .auth-card h2 {
    font-size: clamp(30px, 10vw, 44px);
  }

  .login-panel {
    width: 100%;
  }

  .login-panel::before {
    inset: 5% 6% 48% 6%;
    filter: blur(58px);
    opacity: 0.76;
  }

  body.auth-locked {
    background:
      radial-gradient(620px 360px at 50% 16%, rgba(255, 139, 74, 0.16), transparent 48%),
      radial-gradient(420px 260px at 50% 28%, rgba(255, 196, 160, 0.08), transparent 52%),
      linear-gradient(180deg, #1c1b1c 0%, #171616 100%);
  }

  .auth-showcase-poster {
    min-height: 370px;
  }
}

@media (max-width: 640px) {
  .login-panel {
    border-radius: 26px;
  }

  .auth-showcase-poster {
    min-height: 320px;
    padding: 20px;
  }

  .auth-showcase-copy strong {
    font-size: 34px;
  }

  .auth-card {
    padding: 20px 18px 18px;
  }

  .auth-button {
    min-height: 52px;
    padding: 0 18px;
  }
}

@keyframes auth-panel-enter {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth-left-enter {
  from {
    opacity: 0;
    transform: translateX(-26px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes auth-right-enter {
  from {
    opacity: 0;
    transform: translateX(22px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes auth-rise-fade {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-divider-in {
  from {
    opacity: 0;
    transform: scaleX(0.72);
  }

  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes auth-divider-breathe {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 0.9;
  }
}

@keyframes panel-aura-drift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(0.98);
  }

  to {
    transform: translate3d(1%, 1.5%, 0) scale(1.03);
  }
}

@keyframes poster-glow-drift {
  from {
    opacity: 0.72;
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }

  to {
    opacity: 1;
    transform: translate3d(1.5%, 1%, 0) scale(1.035);
  }
}

@keyframes glyph-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes orb-drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(0.98);
    opacity: 0.78;
  }

  to {
    transform: translate3d(2.5%, 1.5%, 0) scale(1.04);
    opacity: 1;
  }
}
