/* ============================================================
   auth.css — تم دارک-نئونِ صفحات ورود و ثبت‌نام (cafe-gpt)
   فونت: IRANYekanXVF
   ============================================================ */

:root {
  --neon-cyan:   #22d3ee;
  --neon-blue:   #3b82f6;
  --neon-violet: #a855f7;
  --neon-pink:   #ec4899;
  --neon-grad: linear-gradient(110deg, #22d3ee 0%, #6366f1 45%, #ec4899 100%);
  --ink:    #eaf2ff;
  --muted:  #8ea2c0;
  --bg-0:   #070a16;
  --bg-1:   #0c1226;
  --card:   rgba(18, 24, 48, 0.62);
  --border: rgba(120, 160, 255, 0.18);
  --error:  #fb7185;
  --glow-cyan:   0 0 0 3px rgba(34, 211, 238, 0.18);
  --glow-violet: 0 0 0 3px rgba(168, 85, 247, 0.20);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.auth-page {
  font-family: 'IRANYekanXVF', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background: var(--bg-0);
  position: relative;
  overflow: hidden;
}
/* هاله‌های نئونِ متحرک پس‌زمینه */
.auth-page::before,
.auth-page::after {
  content: "";
  position: fixed;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  z-index: 0;
  pointer-events: none;
}
.auth-page::before {
  background: radial-gradient(circle, rgba(34,211,238,.55), transparent 60%);
  top: -22vmax; right: -14vmax;
  animation: floatA 16s ease-in-out infinite alternate;
}
.auth-page::after {
  background: radial-gradient(circle, rgba(168,85,247,.50), transparent 60%);
  bottom: -24vmax; left: -16vmax;
  animation: floatB 18s ease-in-out infinite alternate;
}
@keyframes floatA { to { transform: translate(-6vmax, 8vmax) scale(1.12); } }
@keyframes floatB { to { transform: translate(7vmax, -6vmax) scale(1.16); } }

.auth-shell {
  min-height: 100vh;
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 18px; gap: 24px;
}

/* ---- Brand ---- */
.auth-brand { display: flex; justify-content: center; }
.auth-logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.auth-logo img { width: 40px; height: 40px; object-fit: contain; }
.auth-logo strong {
  display: block; font-size: 22px; font-weight: 800; line-height: 1.2;
  background: var(--neon-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(99,102,241,.45));
}
.auth-logo span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ---- Card (glass + neon border) ---- */
.auth-card {
  width: 100%; max-width: 430px;
  background: var(--card);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 28px;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
  animation: authIn .4s cubic-bezier(.2,.7,.3,1);
}
/* خط نئونِ دور کارت */
.auth-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 25px; padding: 1px;
  background: var(--neon-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .65; pointer-events: none;
}
@keyframes authIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.auth-step[hidden] { display: none; }

.auth-card-head { margin-bottom: 22px; text-align: center; }
.auth-card-head h1 { font-size: 24px; font-weight: 800; color: #fff; }
.auth-card-head p { margin-top: 10px; font-size: 14px; line-height: 1.9; color: var(--muted); }
.auth-card-head strong { color: var(--neon-cyan); font-weight: 700; }

.auth-otp-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  display: grid; place-items: center; font-size: 26px; color: #fff;
  background: var(--neon-grad);
  box-shadow: 0 0 30px rgba(99,102,241,.55);
}

/* ---- Form ---- */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field > span { font-size: 13px; font-weight: 600; color: #c7d6f0; }
.auth-field > span i { color: var(--error); font-style: normal; }
.auth-field > span small { color: var(--muted); }

.auth-field input {
  width: 100%; font-family: inherit; font-size: 14.5px; color: #fff;
  background: rgba(8, 12, 28, 0.7);
  border: 1.5px solid var(--border);
  border-radius: 13px; padding: 13px 15px; outline: none;
  transition: border-color .15s, box-shadow .2s, background .2s;
}
.auth-field input::placeholder { color: #5e6f8e; }
.auth-field input:focus {
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan), 0 0 18px rgba(34,211,238,.25);
  background: rgba(10, 16, 36, 0.9);
}
.auth-field input[dir="ltr"] { letter-spacing: .5px; }
.auth-field input.error,
.auth-field input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(251,113,133,.18); }

/* پیشوند @ نام کاربری */
.auth-input-prefix { position: relative; display: flex; align-items: stretch; }
.auth-input-prefix input { flex: 1; }
.auth-input-prefix .prefix {
  display: flex; align-items: center; padding: 0 12px;
  font-size: 13px; font-weight: 700; color: var(--neon-cyan);
  background: rgba(34,211,238,.08);
  border: 1.5px solid var(--border);
}

/* خطاها */
.auth-error { font-size: 12.5px; color: var(--error); line-height: 1.6; }
.auth-error:empty { display: none; }
.auth-error.hidden { display: none; }
.auth-hint { font-size: .78rem; color: var(--muted) !important; margin-top: 3px; }

/* ---- Buttons ---- */
.auth-submit {
  width: 100%; font-family: inherit; font-size: 15px; font-weight: 800; color: #fff;
  background: var(--neon-grad); background-size: 200% 100%;
  border: 0; border-radius: 13px; padding: 15px; cursor: pointer;
  transition: background-position .4s, transform .1s, box-shadow .2s, filter .2s;
  box-shadow: 0 10px 30px rgba(99,102,241,.40), 0 0 18px rgba(34,211,238,.25);
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px;
  letter-spacing: .3px;
}
.auth-submit:hover { background-position: 100% 0; transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 36px rgba(236,72,153,.40), 0 0 26px rgba(34,211,238,.35); }
.auth-submit:active { transform: scale(.99); }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: grayscale(.3); }

.auth-back {
  width: 100%; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--muted);
  background: transparent; border: 1.5px solid var(--border); border-radius: 13px;
  padding: 12px; cursor: pointer; transition: .2s; margin-top: 10px;
}
.auth-back:hover { background: rgba(34,211,238,.08); color: var(--neon-cyan); border-color: rgba(34,211,238,.4); }

/* ---- Alt / terms links ---- */
.auth-alt { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.auth-alt a { color: var(--neon-cyan); font-weight: 700; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.auth-terms { text-align: center; font-size: 12.5px; color: var(--muted); }

/* ---- OTP digits ---- */
.otp-inputs { display: flex; gap: 9px; justify-content: center; }
.otp-inputs input {
  width: 46px; height: 56px; text-align: center;
  font-family: inherit; font-size: 22px; font-weight: 800; color: #fff;
  background: rgba(8,12,28,.7); border: 1.5px solid var(--border); border-radius: 13px;
  outline: none; transition: border-color .15s, box-shadow .2s, background .2s, transform .1s;
}
.otp-inputs input:focus { border-color: var(--neon-violet); box-shadow: var(--glow-violet), 0 0 16px rgba(168,85,247,.3); }
.otp-inputs input.is-filled,
.otp-inputs input.filled {
  border-color: var(--neon-cyan);
  background: rgba(34,211,238,.12);
  box-shadow: 0 0 16px rgba(34,211,238,.35); transform: translateY(-1px);
}
.otp-inputs input.error-state { border-color: var(--error); box-shadow: 0 0 0 3px rgba(251,113,133,.18); }
.otp-form.has-error .otp-inputs input { border-color: var(--error); }

/* ---- OTP heading ---- */
.otp-heading { text-align: center; margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.otp-heading > span { font-size: 12.5px; color: var(--muted); }
.otp-heading strong { font-size: 18px; font-weight: 800; color: #fff; }
.otp-heading small { font-size: 13px; color: var(--neon-cyan); }

.otp-form[hidden] { display: none; }
.login-panel.is-otp .phone-form { display: none; }
.auth-form[aria-hidden="true"] { display: none; }

footer { color: var(--muted) !important; }

@media (max-width: 440px) {
  .auth-card { padding: 24px 20px; border-radius: 20px; }
  .otp-inputs input { width: 42px; height: 52px; font-size: 19px; }
}
