/* =========================================
   متغیرها و رنگ‌بندی پریمیوم تیره (Dark Mode)
   ========================================= */
:root {
  --bg-base: #0a77ca;  
  --glass-bg: rgba(15, 23, 42, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Vazirmatn', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.7;
  /* برای وسط‌چین کردن بهتر فرم در کل صفحه */
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === بک‌گراند اختصاصی با مسیر جدید === */
.bg-pattern {
  position: fixed;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background-image: url('../assests/cat.png'); /* مسیر تنظیم شد */
  background-size: 150px;
  opacity: 0.04;
  animation: panPattern 100s linear infinite;
  z-index: -2;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  top: 20%; left: 50%; width: 80vw; height: 80vw;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(2,6,23,0) 70%);
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
}

@keyframes panPattern {
  0% { transform: rotate(-10deg) translate3d(0, 0, 0); }
  100% { transform: rotate(-10deg) translate3d(200px, 200px, 0); }
}

.wrapper {
  width: 100%;
  max-width: 500px;
  padding: 0 20px;
  z-index: 1;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease;
  animation: fadeInDown 0.8s ease-out;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glass-card:hover { border-color: rgba(59, 130, 246, 0.3); }
.glass-card:hover::before { opacity: 1; }

.glass-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 25px;
  color: #fff;
  text-align: center;
}

.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #022330;
  padding: 16px 40px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  margin-top: 20px;
  width: 100%;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(255,255,255,0.2);
  font-family: inherit;
}

.btn-premium:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(255,255,255,0.4);
}

/* =========================================
   استایل‌های اختصاصی فرم لاگین
   ========================================= */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #bfdbfe;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 16px;
  background: rgba(2, 6, 23, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(2, 6, 23, 0.6);
  box-shadow: 0 0 15px var(--primary-glow);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.error-msg {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #fca5a5;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 0.95rem;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .glass-card { padding: 30px 25px; border-radius: 28px; }
  .btn-premium { font-size: 1.1rem; padding: 15px 20px; }
}

/* =========================================
   استایل‌های تکمیلی فرم ثبت‌نام و کدهای OTP
   ========================================= */
/* =========================================
   استایل‌های تکمیلی فرم ثبت‌نام و کدهای OTP
   ========================================= */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 600px) {
  .input-grid { grid-template-columns: 1fr; }
}

.full-width {
  grid-column: 1 / -1;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* اصلاح چیدمان فیلدهای کد تایید */
.otp-group {
  display: flex;
  justify-content: center; /* قرارگیری در مرکز */
  gap: 12px;
  margin-bottom: 30px;
  direction: ltr;
  flex-wrap: nowrap; /* جلوگیری از شکستن به خط بعدی */
}

/* استایل مدرن و 2.5D فیلدها */
.otp-input {
  width: 50px;
  height: 60px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #fff;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3); /* سایه داخلی برای عمق */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0; /* جلوگیری از تغییر سایز ناخواسته */
  font-family: monospace;
}

.otp-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), inset 0 2px 5px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* رسپانسیو برای گوشی‌های خیلی کوچک */
@media (max-width: 400px) {
  .otp-group { gap: 8px; }
  .otp-input { width: 42px; height: 52px; font-size: 1.4rem; border-radius: 10px; }
}

.success-msg {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 0.95rem;
}

.auth-footer {
  text-align: center;
  margin-top: 25px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-footer a.login-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-right: 5px;
}

.auth-footer a.login-link:hover { color: #93c5fd; }

/* استایل دکمه بازگشت / تغییر شماره */
.btn-glass-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-glass-outline:hover {
  background: rgba(220, 38, 38, 0.1); /* تم ملایم قرمز برای اکشن بازگشت */
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.3);
  transform: translateY(-2px);
}