/* GS - GameScape Online: login screen, post-login intro and home hero.
   Layout and motion ported from the NewyorkDev Gamescape build; square corners, GameScape fonts. */

/* ==========================================================================
   Login / register / reset
   ========================================================================== */
html.gsx-auth .r-v2-auth { position: relative; overflow: hidden; }

/* Sky: the wallpaper, dimmed, with drifting colour glows */
html.gsx-auth .r-v2-auth__bg { display: none !important; }
html.gsx-auth .gsx-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 18% 30%, rgb(79 123 255 / 26%), transparent 62%),
    radial-gradient(760px 520px at 82% 18%, rgb(224 60 255 / 22%), transparent 60%),
    radial-gradient(1100px 600px at 50% 120%, rgb(139 61 255 / 34%), transparent 60%),
    linear-gradient(rgb(5 4 15 / 82%) 0%, rgb(5 4 15 / 90%) 55%, rgb(5 4 15 / 98%) 72%, #05040f 100%),
    var(--gs-wallpaper) center / cover no-repeat,
    #05040f;
}
html.gsx-auth .gsx-sky::before {
  /* twinkling data dots */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 72% 14%, #a9f3ff, transparent 60%),
    radial-gradient(1px 1px at 38% 62%, #f3b3ff, transparent 60%),
    radial-gradient(1.5px 1.5px at 86% 48%, #fff, transparent 60%),
    radial-gradient(1px 1px at 54% 30%, #a9f3ff, transparent 60%),
    radial-gradient(1px 1px at 24% 80%, #f3b3ff, transparent 60%);
  background-size: 520px 420px;
  animation: gsx-twinkle 7s ease-in-out infinite alternate;
}

/* Retro grid floor (canvas, drawn by experience.js) */
html.gsx-auth .gsx-grid {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 28vh;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 35%, transparent 100%);
  mask-image: linear-gradient(to top, #000 35%, transparent 100%);
  border-radius: 0 !important;
}

/* Two columns: brand | card */
html.gsx-auth .r-v2-auth__stage {
  z-index: 1;
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 440px);
  align-items: center;
  gap: clamp(32px, 6vw, 110px);
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vh, 64px) clamp(16px, 4vw, 48px);
}
html.gsx-auth .r-v2-auth__stage::after { content: none !important; }

/* ---- Brand panel ---- */
html.gsx-auth .gsx-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  animation: gsx-rise .8s cubic-bezier(.2, .7, .2, 1) both;
}
html.gsx-auth .gsx-logo {
  width: min(100%, 520px);
  filter: drop-shadow(0 0 18px rgb(139 61 255 / 55%));
  animation: gsx-float 7s ease-in-out infinite;
}
html.gsx-auth .gsx-logo img { display: block; width: 100%; height: auto; }
html.gsx-auth .gsx-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgb(34 228 255 / 35%);
  border-radius: 2px;
  background: rgb(5 4 15 / 60%);
  font: 600 11px/1 "Orbitron", system-ui, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgb(225 232 255 / 80%);
}
html.gsx-auth .gsx-dot {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: #ff3ecf;
}
html.gsx-auth .gsx-status.on .gsx-dot {
  background: #22e4ff;
  box-shadow: 0 0 0 0 rgb(34 228 255 / 60%);
  animation: gsx-pulse 2.2s infinite;
}
html.gsx-auth .gsx-title {
  margin: 0;
  font: 800 clamp(36px, 4.8vw, 64px)/1.02 "Orbitron", system-ui, sans-serif;
  letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 0 22px rgb(139 61 255 / 35%);
}
html.gsx-auth .gsx-title span {
  background: var(--gs-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 14px rgb(34 228 255 / 35%));
}
html.gsx-auth .gsx-lede {
  margin: 0;
  max-width: 34em;
  font: 400 16.5px/1.6 "Exo 2", system-ui, sans-serif;
  color: rgb(215 222 255 / 78%);
}
html.gsx-auth .gsx-feats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
html.gsx-auth .gsx-feats li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgb(120 140 255 / 28%);
  border-radius: 2px;
  background: rgb(10 8 30 / 70%);
  font: 600 13.5px/1 "Exo 2", system-ui, sans-serif;
  color: #e8ecff;
}
html.gsx-auth .gsx-feats li:nth-child(odd) i { color: #22e4ff; }
html.gsx-auth .gsx-feats li:nth-child(even) i { color: #e03cff; }

/* ---- Card ---- */
html.gsx-auth .r-v2-auth .auth-card {
  width: 100% !important;
  min-width: 0 !important;
  animation: gsx-rise .8s .12s cubic-bezier(.2, .7, .2, 1) both;
}
html.gsx-auth .r-v2-auth .auth-card__logo { display: none !important; }
html.gsx-auth .gsx-card-head { margin: 4px 0 22px; }
html.gsx-auth .gsx-card-head h2 {
  margin: 0 0 6px;
  font: 700 24px/1.15 "Orbitron", system-ui, sans-serif;
  letter-spacing: .04em;
  color: #fff;
}
html.gsx-auth .gsx-card-head p {
  margin: 0;
  font: 400 14.5px/1.4 "Exo 2", system-ui, sans-serif;
  color: rgb(215 222 255 / 70%);
}
html.gsx-auth .gsx-card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  font: 500 13px/1 "Exo 2", system-ui, sans-serif;
  color: rgb(215 222 255 / 70%);
}
html.gsx-auth .gsx-card-foot i { color: #22e4ff; }

/* Boxed inputs instead of underlines */
html.gsx-auth .r-v2-auth .r-text-field__field {
  height: 50px;
  padding: 0 14px;
  background: rgb(5 4 15 / 70%) !important;
  box-shadow: inset 0 0 0 1px rgb(120 140 255 / 28%) !important;
}
html.gsx-auth .r-v2-auth .r-text-field__field:focus-within {
  box-shadow: inset 0 0 0 1px #22e4ff, 0 0 14px rgb(34 228 255 / 30%) !important;
}
html.gsx-auth .r-v2-auth .r-text-field__underline { display: none; }
html.gsx-auth .r-v2-auth .r-btn[type="submit"] { height: 50px; margin-top: 6px; }

/* Stack on narrow screens: logo + status above the card */
@media (width < 1000px) {
  html.gsx-auth .r-v2-auth__stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    justify-items: center;
    padding-top: 28px;
  }
  html.gsx-auth .gsx-brand { align-items: center; text-align: center; gap: 12px; }
  html.gsx-auth .gsx-title,
  html.gsx-auth .gsx-lede,
  html.gsx-auth .gsx-feats { display: none; }
  html.gsx-auth .gsx-logo { width: min(100%, 360px); }
  html.gsx-auth .r-v2-auth .auth-card { max-width: 440px; }
}

/* ==========================================================================
   Post-login intro video
   ========================================================================== */
html.gsx-intro-lock,
html.gsx-intro-lock body { overflow: hidden !important; }
.gsx-intro {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #05040f;
  opacity: 0;
  transition: opacity .4s ease;
  font-family: "Exo 2", system-ui, sans-serif;
}
.gsx-intro.in { opacity: 1; }
.gsx-intro.out { opacity: 0; }
.gsx-intro-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gsx-intro-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(5 4 15 / 70%) 0%, transparent 55%),
    linear-gradient(to top, rgb(5 4 15 / 85%) 0%, transparent 28%);
}
.gsx-intro-cap {
  position: absolute;
  left: clamp(20px, 5vw, 72px);
  top: clamp(72px, 12vh, 140px);
  max-width: min(560px, 80vw);
  padding-left: 16px;
  border-left: 3px solid #22e4ff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s, transform .5s;
  pointer-events: none;
}
.gsx-intro-cap.show { opacity: 1; transform: none; }
.gsx-intro-cap h2 {
  margin: 0 0 8px;
  font: 800 clamp(26px, 3.6vw, 46px)/1.05 "Orbitron", system-ui, sans-serif;
  color: #fff;
  text-shadow: 0 0 18px rgb(34 228 255 / 55%);
}
.gsx-intro-cap p { margin: 0; font-size: clamp(15px, 1.5vw, 19px); color: rgb(230 236 255 / 88%); }
.gsx-intro-top {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top, 0px));
  right: 18px;
  display: flex;
  gap: 10px;
}
.gsx-intro-top button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgb(34 228 255 / 55%);
  border-radius: 2px;
  background: rgb(5 4 15 / 70%);
  color: #fff;
  font: 600 13px/1 "Orbitron", system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.gsx-intro-top button:hover,
.gsx-intro-top button:focus-visible { border-color: #e03cff; box-shadow: 0 0 14px rgb(224 60 255 / 45%); outline: none; }
.gsx-intro-top kbd {
  padding: 2px 5px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 2px;
  font: 600 10px/1 "Exo 2", system-ui, sans-serif;
}
.gsx-intro-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gsx-intro-never { display: inline-flex; align-items: center; gap: 8px; color: rgb(230 236 255 / 80%); font-size: 13px; cursor: pointer; }
.gsx-intro-never input { accent-color: #c04dff; }
.gsx-intro-bar { height: 3px; background: rgb(255 255 255 / 12%); }
.gsx-intro-bar i {
  display: block;
  height: 100%;
  background: var(--gs-gradient);
  transform-origin: 0 50%;
  transform: scaleX(0);
  box-shadow: 0 0 10px rgb(34 228 255 / 70%);
}

/* ==========================================================================
   Home hero
   ========================================================================== */
.gsx-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  margin: 0 0 28px;
  padding: clamp(22px, 3.5vw, 48px);
  overflow: hidden;
  border: 1px solid rgb(34 228 255 / 35%);
  border-radius: 3px;
  background: linear-gradient(135deg, rgb(16 12 44 / 92%), rgb(7 6 22 / 94%));
  box-shadow: 0 0 22px rgb(34 228 255 / 14%), 0 16px 40px rgb(0 0 0 / 55%);
  animation: gsx-rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.gsx-hero::before {
  /* circuit grid */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(79 123 255 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(79 123 255 / 7%) 1px, transparent 1px);
  background-size: 36px 36px;
}
.gsx-hero__bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(1.3) brightness(.45);
  opacity: .55;
  pointer-events: none;
}
.gsx-hero__body { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.gsx-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 11.5px/1 "Orbitron", system-ui, sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgb(225 232 255 / 80%);
}
.gsx-hero__eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: #22e4ff;
  animation: gsx-pulse 2.2s infinite;
}
.gsx-hero__title {
  margin: 0;
  font: 800 clamp(34px, 4.6vw, 62px)/1.02 "Orbitron", system-ui, sans-serif;
  letter-spacing: .01em;
  word-break: break-word;
}
.gsx-hero__title span {
  background: var(--gs-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgb(34 228 255 / 35%));
}
.gsx-hero__sub { margin: 0; font: 400 17px/1.5 "Exo 2", system-ui, sans-serif; color: rgb(215 222 255 / 78%); }
.gsx-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.gsx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgb(120 140 255 / 30%);
  border-radius: 2px;
  background: rgb(10 8 30 / 75%);
  color: #fff !important;
  font: 600 14.5px/1 "Exo 2", system-ui, sans-serif;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.gsx-btn i { font-size: 18px; }
.gsx-btn:hover,
.gsx-btn:focus-visible {
  border-color: #22e4ff;
  box-shadow: 0 0 16px rgb(34 228 255 / 35%);
  transform: translateY(-1px);
  outline: none;
}
.gsx-btn--primary {
  max-width: 100%;
  border-color: transparent;
  background: var(--gs-gradient);
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgb(34 228 255 / 35%), 0 0 18px rgb(224 60 255 / 30%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gsx-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.gsx-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid rgb(120 140 255 / 24%);
  border-radius: 2px;
  background: rgb(5 4 15 / 55%);
  font: 500 13.5px/1 "Exo 2", system-ui, sans-serif;
  color: rgb(215 222 255 / 75%);
}
.gsx-chip b { font: 700 18px/1 "Orbitron", system-ui, sans-serif; color: #fff; }
.gsx-hero__art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 10;
  border: 1px solid rgb(224 60 255 / 55%);
  border-radius: 2px;
  overflow: hidden;
  background: #07061a;
  box-shadow: 0 0 22px rgb(224 60 255 / 30%), 0 20px 40px rgb(0 0 0 / 60%);
  animation: gsx-float 7s ease-in-out infinite;
}
.gsx-hero__art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gsx-hero__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border: 1px solid rgb(34 228 255 / 55%);
  border-radius: 2px;
  background: rgb(5 4 15 / 80%);
  font: 700 11px/1 "Orbitron", system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #a9f3ff;
}
@media (width < 900px) {
  .gsx-hero { grid-template-columns: minmax(0, 1fr); }
  .gsx-hero__art { justify-self: stretch; max-width: none; }
}

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes gsx-grid { to { background-position: 0 64px, 0 0; } }
@keyframes gsx-twinkle { from { opacity: .35; } to { opacity: .75; } }
@keyframes gsx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes gsx-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes gsx-pulse {
  0% { box-shadow: 0 0 0 0 rgb(34 228 255 / 60%); }
  70%, 100% { box-shadow: 0 0 0 8px rgb(34 228 255 / 0%); }
}
@media (prefers-reduced-motion: reduce) {
  html.gsx-auth .gsx-sky::before,
  html.gsx-auth .gsx-logo,
  html.gsx-auth .gsx-brand,
  html.gsx-auth .gsx-status.on .gsx-dot,
  html.gsx-auth .r-v2-auth .auth-card,
  .gsx-hero,
  .gsx-hero__art,
  .gsx-hero__eyebrow i { animation: none !important; }
}
