/* ========================================
   MilliCraft - Auth Pages Stylesheet (v2)
   Professional Minecraft Server Authentication
   Clean typography (Exo 2 + Inter), Azerbaijani glyph support,
   SVG password toggle with eye-slash line, sleek glassmorphism.
======================================== */

.auth-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 15% 45%, rgba(47,211,107,0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(96,165,250,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 85%, rgba(251,191,36,0.06) 0%, transparent 50%),
    var(--bg-primary);
}

.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 1.25rem 2.5rem;
  position: relative;
}

.auth-wrapper {
  width: 100%; max-width: 470px;
  position: relative;
  z-index: 5;
}

/* Brand bar at top */
.auth-brand {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-brand-logo {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.3s ease;
}
.auth-brand-logo:hover {
  transform: scale(1.02);
}
.auth-brand p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Auth Card */
.auth-card {
  background: linear-gradient(180deg, rgba(16, 23, 36, 0.9), rgba(11, 16, 26, 0.94));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.5rem;
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px -10px rgba(47, 211, 107, 0.12);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-gold), var(--accent-blue));
}

.auth-card-title {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800;
  text-align: center; margin-bottom: 0.4rem;
  color: #fff;
  letter-spacing: -0.01em;
}
.auth-card-sub {
  text-align: center; color: var(--text-secondary);
  font-size: 0.92rem; margin-bottom: 2rem;
  line-height: 1.5;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.84rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

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

.field-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 1.05rem; color: var(--text-muted);
  pointer-events: none; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.field-icon svg {
  width: 18px; height: 18px;
  stroke: var(--text-muted);
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 12px 46px 12px 42px;
  color: var(--text-primary); font-size: 0.94rem;
  font-family: var(--font-body);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent-green);
  background: rgba(47, 211, 107, 0.04);
  box-shadow: 0 0 0 3px rgba(47, 211, 107, 0.15);
}
.form-control::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.form-control.is-error {
  border-color: var(--accent-red);
  background: rgba(248, 113, 113, 0.05);
}
.form-control.is-error:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}
.form-control.is-valid {
  border-color: var(--accent-green);
  background: rgba(47, 211, 107, 0.05);
}
.form-control.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(47, 211, 107, 0.18);
}
.form-control:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.015);
}

/* Password Reset Step / Lock States */
.new-pass-area {
  transition: var(--transition);
}
.new-pass-area.is-locked {
  opacity: 0.6;
}
.new-pass-area.is-locked .pass-toggle {
  pointer-events: none;
  opacity: 0.4;
}
.old-pass-status {
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
}
.old-pass-status.verified {
  color: var(--accent-green-light);
}
.old-pass-status.pending {
  color: var(--text-muted);
}

/* Password Recovery Page Tabs & Steps */
.recovery-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  margin-bottom: 1.6rem;
}
.recovery-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.recovery-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}
.recovery-tab.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(47, 211, 107, 0.24), rgba(47, 211, 107, 0.1));
  box-shadow: inset 0 0 0 1px rgba(47, 211, 107, 0.35);
}

.step-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 1.15rem;
  margin-bottom: 1.1rem;
  transition: var(--transition);
}
.step-box.active-step {
  border-color: rgba(47, 211, 107, 0.32);
  background: rgba(47, 211, 107, 0.03);
}
.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.step-title {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(47, 211, 107, 0.16);
  color: var(--accent-green-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
}
.btn-verify-old {
  margin-top: 0.65rem;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(47, 211, 107, 0.13);
  border: 1px solid rgba(47, 211, 107, 0.32);
  color: var(--accent-green-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-verify-old:hover {
  background: rgba(47, 211, 107, 0.22);
  color: #fff;
}

/* Professional Password toggle */
.pass-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: var(--transition);
  z-index: 3;
}
.pass-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border);
}
.pass-toggle svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

/* Eye state: default = password masked (show eye open). Clicked / is-visible = password unmasked (show eye-off with slash line) */
.pass-toggle .eye-off { display: none; }
.pass-toggle .eye-open { display: block; }

.pass-toggle.is-visible {
  color: var(--accent-green-light);
  background: rgba(47, 211, 107, 0.12);
  border-color: rgba(47, 211, 107, 0.3);
}
.pass-toggle.is-visible .eye-off { display: block; }
.pass-toggle.is-visible .eye-open { display: none; }
.pass-toggle.is-visible svg {
  stroke: var(--accent-green-light);
}

.form-err {
  font-size: 0.8rem; color: var(--accent-red);
  margin-top: 0.4rem; display: none;
  font-weight: 500;
}
.form-err.show { display: block; }

/* Checkbox */
.form-check {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 17px; height: 17px; margin-top: 2px;
  accent-color: var(--accent-green); cursor: pointer; flex-shrink: 0;
  border-radius: 4px;
}
.form-check-text {
  font-size: 0.86rem; color: var(--text-secondary); line-height: 1.45;
}
.form-check-text a {
  color: var(--accent-green-light);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-check-text a:hover { color: #fff; }

/* Forgot link */
.forgot-link {
  font-size: 0.82rem; color: var(--accent-green-light);
  transition: var(--transition);
  font-weight: 500;
}
.forgot-link:hover { color: #fff; text-decoration: underline; }

/* Submit button */
.btn-auth-submit {
  width: 100%; margin-top: 1.4rem;
  background: linear-gradient(180deg, var(--accent-green), var(--accent-green-dark));
  border: none; color: #fff; padding: 14px;
  border-radius: 12px; font-size: 0.98rem; font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  letter-spacing: 0.04em; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: var(--btn-3d), 0 8px 24px -6px rgba(47, 211, 107, 0.6);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-auth-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: var(--btn-3d), 0 12px 30px -6px rgba(47, 211, 107, 0.7);
}
.btn-auth-submit:active {
  transform: translateY(1px);
}
.btn-auth-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Divider */
.auth-or {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.6rem 0; color: var(--text-muted); font-size: 0.84rem;
  text-transform: lowercase;
}
.auth-or::before, .auth-or::after {
  content: ''; flex: 1; height: 1px; background: var(--border-strong);
}

/* Switch page link */
.auth-switch {
  text-align: center; margin-top: 1.5rem;
  font-size: 0.9rem; color: var(--text-secondary);
}
.auth-switch a {
  color: var(--accent-green-light);
  font-weight: 700;
  margin-left: 4px;
  transition: var(--transition);
}
.auth-switch a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Password strength */
.pass-strength { margin-top: 0.55rem; }
.ps-bar {
  height: 4px; background: rgba(255,255,255,0.08);
  border-radius: 3px; overflow: hidden; margin-bottom: 5px;
}
.ps-fill { height: 100%; border-radius: 3px; transition: all 0.4s ease; width: 0; }
.ps-text { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; }
.ps-1 .ps-fill { width: 25%; background: var(--accent-red); box-shadow: 0 0 8px rgba(248,113,113,0.5); }
.ps-2 .ps-fill { width: 50%; background: var(--accent-gold); box-shadow: 0 0 8px rgba(251,191,36,0.5); }
.ps-3 .ps-fill { width: 75%; background: var(--accent-blue); box-shadow: 0 0 8px rgba(96,165,250,0.5); }
.ps-4 .ps-fill { width: 100%; background: var(--accent-green); box-shadow: 0 0 8px rgba(47,211,107,0.5); }

/* Avatar floating deco */
.auth-mc-deco {
  position: fixed; bottom: 0; pointer-events: none; z-index: 1;
  image-rendering: pixelated; opacity: 0.22;
  animation: bob 4s ease-in-out infinite;
}
.auth-mc-deco.left  { left: 3%; height: 260px; }
.auth-mc-deco.right { right: 3%; height: 260px; animation-delay: 2s; animation-name: bob-flipped; }

@media (max-width: 520px) {
  .auth-card { padding: 2rem 1.4rem; }
  .auth-mc-deco { display: none; }
  .auth-page { padding-top: calc(var(--nav-h) + 1.25rem); }
}
