/* ══════════════════════════════════════════════
   Auth pages — Games for Play
   Login and register use a split screen (.gfa): a dark brand panel and
   the form. Forgotten / reset / verify keep their single card
   (.auth-page + .auth-card) and share the form styles below.
   ══════════════════════════════════════════════ */

/* No page scroll from the footer on auth pages */
body { display: flex; flex-direction: column; min-height: 100dvh; }
body > .main-content { flex: 1 0 auto; }

/* ── Split screen (login, register) ── */
.gfa {
  --gfa-header: 120px;
  min-height: calc(100dvh - var(--gfa-header));
  padding: 168px 0 56px;
  background: var(--bg);
}
.gfa__wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 600px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}
@media (min-width: 1168px) { .gfa__wrap { padding: 0; } }

/* Brand panel (always dark) */
.gfa__brand {
  position: relative;
  overflow: hidden;
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  color: #F3F5F7;
  background:
    radial-gradient(70% 55% at 0% 0%, rgba(53, 255, 122, 0.22), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, rgba(53, 255, 122, 0.12), transparent 70%),
    #08090B;
  isolation: isolate;
}
.gfa__brand::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(160deg, #000 10%, transparent 75%);
          mask-image: linear-gradient(160deg, #000 10%, transparent 75%);
}
.gfa__mark { width: 64px; height: 43px; }
.gfa__brand h2 {
  margin: 28px 0 12px;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #F3F5F7;
}
.gfa__brand h2 em { font-style: normal; color: #35FF7A; }
.gfa__brand p { margin: 0; max-width: 380px; font-size: 16px; line-height: 1.65; color: rgba(243, 245, 247, 0.68); }
.gfa__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gfa__perks li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 14px;
  font-weight: 600;
  color: rgba(243, 245, 247, 0.88);
}
.gfa__perks svg {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(53, 255, 122, 0.14);
  color: #35FF7A;
}

/* Form panel */
.gfa__panel { display: flex; align-items: center; justify-content: center; padding: 48px 56px; }
.gfa__panel-inner { width: 100%; max-width: 420px; }
.gfa__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 32px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.gfa__tabs a, .gfa__tabs span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.gfa__tabs a:hover { color: var(--text); background: rgba(var(--blue-rgb), 0.06); }
.gfa__tabs .is-active { background: var(--surface); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }
.gfa__panel h1 { margin: 0 0 6px; font-size: 28px; font-weight: 900; letter-spacing: -0.02em; color: var(--text); }
.gfa__lead { margin: 0 0 26px; font-size: 15px; color: var(--text-secondary); }
.gfa__form { display: grid; gap: 18px; }
.gfa__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gfa__label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.gfa__label-row .auth-label { margin: 0; }

.gfa__alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.gfa__alert--error { background: rgba(240, 82, 82, 0.1); border: 1px solid rgba(240, 82, 82, 0.3); color: #F87171; }
.gfa__alert--success { background: rgba(var(--blue-rgb), 0.1); border: 1px solid rgba(var(--blue-rgb), 0.3); color: var(--blue); }
.gfa__alert i { margin-top: 3px; }

@media (max-width: 991px) {
  .gfa { padding: 124px 0 32px; }
  .gfa__wrap { grid-template-columns: 1fr; min-height: 0; max-width: 560px; border-radius: 22px; padding: 0; margin: 0 16px; }
  .gfa__brand { padding: 28px 28px 26px; gap: 0; }
  .gfa__brand h2 { margin: 16px 0 6px; font-size: 26px; }
  .gfa__brand p { font-size: 14px; }
  .gfa__mark { width: 48px; height: 32px; }
  .gfa__perks { display: none; }
  .gfa__panel { padding: 28px 24px 32px; }
  .gfa__panel h1 { font-size: 24px; }
}
@media (max-width: 479px) {
  .gfa__row { grid-template-columns: 1fr; }
}

/* ── Single card pages (forgotten, reset, verify) ── */
@media (max-width: 991px) { .auth-page { padding-top: 124px; } }
.auth-page {
  min-height: calc(100dvh - 120px);
  display: flex;
  align-items: center;
  padding-top: 168px;
  padding-bottom: 56px;
  background:
    radial-gradient(40% 50% at 50% 0%, rgba(var(--blue-rgb), 0.1), transparent 70%),
    var(--bg);
}
.auth-page > .container { width: 100%; }
.auth-page h1 { color: var(--text) !important; }
.auth-page .text-slate-400 { color: var(--text-secondary) !important; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

/* ── Shared form controls ── */
.auth-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}
.auth-field { position: relative; }
.auth-field__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.15s;
}
.auth-field:focus-within .auth-field__icon { color: var(--blue); }
.auth-input {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 44px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.auth-input::placeholder { color: var(--text-muted); }
.auth-input:hover { border-color: var(--border-hover); }
.auth-input:focus {
  border-color: var(--blue);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(var(--blue-rgb), 0.15);
}
.auth-input--toggle { padding-right: 48px; }
.auth-input.is-invalid { border-color: #F05252; }
.auth-input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(240, 82, 82, 0.15); }
/* Browser autofill keeps the field dark/light like the others */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

/* Show/hide password; the wrapper does the positioning because a global
   rule forces position:relative on buttons */
.auth-toggle-wrap {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
}
.auth-toggle {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-toggle:hover { color: var(--text); background: rgba(var(--blue-rgb), 0.08); }

.auth-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #F87171;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  cursor: pointer;
}
.auth-check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--btn-bg);
  cursor: pointer;
}
.auth-check a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

.auth-submit {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 28px rgba(var(--btn-rgb), 0.25);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.auth-submit:hover { background: var(--btn-bg-hover); transform: translateY(-1px); box-shadow: 0 14px 34px rgba(var(--btn-rgb), 0.32); }
.auth-submit:active { transform: translateY(0); }

.auth-link { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

.auth-footer {
  margin: 4px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-footer a { color: var(--blue); font-weight: 700; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Light mode header on auth pages ──
   These pages have no dark hero behind the header, so in light mode it
   gets the light glass look (as on category/cart) with the dark logo and
   dark controls. This file is only loaded on auth pages. */
html:not(.dark) .site-header {
  background: rgba(248, 250, 252, 0.92) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06) !important;
}
html:not(.dark) body .site-header .hdr-logo .logo-for-light { display: block !important; }
html:not(.dark) body .site-header .hdr-logo .logo-for-dark { display: none !important; }
html:not(.dark) .site-header .nav-link-c { color: rgba(15, 23, 42, 0.72) !important; }
html:not(.dark) .site-header .nav-link-c:hover { color: #0F172A !important; }
html:not(.dark) .site-header .hdr-btn,
html:not(.dark) .site-header .hdr-signin-btn,
html:not(.dark) .site-header .hdr-hamburger {
  border-color: rgba(15, 23, 42, 0.16) !important;
  background: rgba(15, 23, 42, 0.04) !important;
  color: rgba(15, 23, 42, 0.72) !important;
}
