/* ============================================================
   GRIT — Auth Page  (full redesign)
   auth.css
   ============================================================ */

.auth-body {
  background: #05060f;
  overflow: hidden;
}

/* ── Page shell ──────────────────────────────────────────── */
.auth-page {
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: 100vh;
  overflow: hidden;
}

/* =============================================
   LEFT: BRAND PANEL
   ============================================= */
.auth-brand {
  position: relative;
  overflow: hidden;
  background: #05060f;
  background-image: url("../assets/auth-bg.png");
  background-size: cover;
  background-position: center top;
}

/* Animated canvas */
#authCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.7;
}

/* Grid overlay */
.auth-brand-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,124,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,124,255,0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  z-index: 1;
}

/* Bottom fade so content sits on a clean surface */
.auth-brand-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, rgba(5,6,15,0.85) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Content sits above everything */
.auth-brand-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 56px 64px;
  justify-content: space-between;
}

/* Logo */
.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeUp 0.5s ease both;
}

.brand-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c7cff, #c77dff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 24px rgba(124,124,255,0.5);
  flex-shrink: 0;
}
.brand-logo-mark.small { width: 32px; height: 32px; font-size: 16px; border-radius: 8px; }

.brand-logo-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 40%, #a89bff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-logo-text.small { font-size: 18px; letter-spacing: 2px; }

/* Headline */
.auth-brand-headline {
  animation: fadeUp 0.5s 0.1s ease both;
}

.auth-brand-headline h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 58px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 20%, #c4b8ff 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.auth-brand-headline p {
  font-size: 17px;
  color: rgba(180,185,220,0.7);
  max-width: 420px;
  line-height: 1.7;
}

/* Feature cards */
.auth-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  animation: fadeUp 0.5s 0.2s ease both;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}
.auth-feature:hover {
  border-color: rgba(124,124,255,0.25);
  background: rgba(124,124,255,0.07);
}

.af-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.af-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
  margin-bottom: 3px;
}

.af-desc {
  font-size: 12px;
  color: rgba(180,185,220,0.55);
  line-height: 1.4;
}

/* Games strip */
.auth-games-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  animation: fadeUp 0.5s 0.3s ease both;
}

.auth-game-pill {
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(200,205,240,0.65);
  white-space: nowrap;
  transition: all 0.18s;
}
.auth-game-pill:hover {
  background: rgba(124,124,255,0.1);
  border-color: rgba(124,124,255,0.25);
  color: #a89bff;
}

/* =============================================
   RIGHT: AUTH PANEL
   ============================================= */
.auth-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,124,255,0.35), transparent);
  pointer-events: none;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 48px;
  background: rgba(5,6,14,0.97);
  border-left: 1px solid rgba(124,124,255,0.12);
  backdrop-filter: blur(32px);
  position: relative;
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0,0,0,0.6);
}

/* Mobile logo */
.auth-mobile-logo {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  justify-content: center;
}

/* ── Tab switcher ─────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 32px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.auth-tab.active {
  background: linear-gradient(135deg, #7c7cff, #5a5aff);
  color: #fff;
  box-shadow: 0 2px 12px rgba(124,124,255,0.4);
}

/* ── Forms ───────────────────────────────────────────────── */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 18px;
  animation: fadeUp 0.3s ease both;
}
.auth-form.active { display: flex; }

.form-greeting { margin-bottom: 4px; }
.form-greeting h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}
.form-greeting p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Fields ──────────────────────────────────────────────── */
.auth-field { display: flex; flex-direction: column; gap: 7px; }

.auth-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forgot-link {
  font-size: 12px;
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.forgot-link:hover { color: var(--violet); }

.field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  color: var(--text-hint);
  pointer-events: none;
  flex-shrink: 0;
}

.auth-field input {
  width: 100%;
  padding: 13px 44px 13px 42px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.auth-field input:focus {
  background: rgba(10,12,22,0.9);
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-dim);
}
.auth-field input::placeholder { color: var(--text-hint); }

/* Password toggle */
.pw-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-hint);
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pw-toggle:hover { color: var(--text); }

/* Password strength */
.pw-strength-wrap {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
.pw-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.3s ease, background 0.3s ease;
}
.pw-strength-label {
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 4px;
  height: 14px;
}

/* ── Error ───────────────────────────────────────────────── */
.auth-error {
  background: rgba(255,92,92,0.1);
  border: 1px solid rgba(255,92,92,0.28);
  border-radius: 10px;
  color: #ff8a8a;
  font-size: 13px;
  padding: 10px 14px;
  display: none;
  animation: shake 0.3s ease;
}
.auth-error.show { display: block; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

/* ── Submit button ───────────────────────────────────────── */
.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #7c7cff, #5a5aff);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(124,124,255,0.4);
  margin-top: 4px;
}
.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(124,124,255,0.6);
}
.auth-submit-btn:active { transform: scale(0.98); }
.auth-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Divider ─────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-hint);
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

/* ── Social buttons ──────────────────────────────────────── */
.auth-social { display: flex; gap: 10px; }

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}
.social-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

/* ── Terms ───────────────────────────────────────────────── */
.auth-terms {
  font-size: 11px;
  color: var(--text-hint);
  text-align: center;
  line-height: 1.6;
  margin-top: -4px;
}
.auth-terms a { color: var(--purple); text-decoration: none; }
.auth-terms a:hover { color: var(--violet); }

/* ── Animation ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 40px 32px; justify-content: flex-start; padding-top: 60px; }
  .auth-mobile-logo { display: flex; }
}
@media (max-width: 480px) {
  .auth-panel { padding: 32px 24px; }
  .auth-features { grid-template-columns: 1fr; }
}

/* ── Auth big logo ───────────────────────────────────────── */
.auth-logo-big {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(124,124,255,0.5)) drop-shadow(0 0 80px rgba(199,125,255,0.3));
  animation: logoFloat 4s ease-in-out infinite;
  display: block;
  margin: 0 auto 8px;
}
@keyframes logoFloat {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-8px); }
}

/* ── Auth background logo watermark ─────────────────────── */
.auth-bg-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  width: 580px;
  height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-bg-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.07;
  filter:
    drop-shadow(0 0 60px rgba(124,124,255,0.6))
    drop-shadow(0 0 120px rgba(199,125,255,0.4))
    drop-shadow(0 0 200px rgba(124,124,255,0.3));
}
