/* ============================================
   ریست و پایه
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif !important; /* قفل شدن فونت کلی */
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8b5cf6;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(to right, #320D5D 0%, #120521 75%);
  padding: 20px;
}

/* کانتینر اصلی جهت تراز اصولی لوگو و باکس */
.wrapper-container {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================================
   لوگو
   ============================================ */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 25px;
}

.home-logo {
  display: block;
  transition: 0.3s ease;
}

.home-logo img {
  max-width: 100%;
  height: auto;
  display: block;
}

.home-logo:hover {
  transform: scale(1.05);
}

/* ============================================
   جعبه اصلی ثبت‌نام
   ============================================ */
.box {
  width: 100%;
  background: rgba(141, 173, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 32px;
  padding: 40px 35px;
  color: white;
  text-align: center;
  backdrop-filter: blur(8px);
}

.box h1 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 10px;
}

.box p {
  font-size: 14px;
  color: #D1D5DB;
  margin-bottom: 30px;
}

/* ============================================
   فیلدهای ورودی و استایل‌های ضد پرش حروف
   ============================================ */
.inp {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.inp input {
  width: 100%;
  height: 56px;
  background: transparent;
  border: 1px solid #6B7280;
  border-radius: 16px;
  outline: none;
  color: #8DAEFF;
  padding: 0 85px 0 20px; /* فضا برای حضور همزمان دو آیکون قفل و چشم */
  font-size: 16px !important;
  font-family: 'Inter', sans-serif !important;
  letter-spacing: 0px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* هماهنگ سازی دایره‌های پسورد با فونت متنی معمولی جهت مسدودسازی باگ پرش سایز */
.inp input[type="password"] {
  font-family: Arial, sans-serif, 'Inter' !important;
  letter-spacing: 3px;
}

.inp input:focus {
  border-color: #4278D0;
  box-shadow: 0 0 0 2px rgba(66, 120, 208, 0.2);
}

.inp input::placeholder {
  color: #8DAEFF;
  opacity: 0.7;
  letter-spacing: 0px;
}

/* آیکون‌های ثابت داخلی */
.inp .main-icon {
  position: absolute;
  right: 20px;
  top: 28px;
  transform: translateY(-50%);
  color: #8DAEFF;
  font-size: 20px;
  pointer-events: none;
}

/* دکمه‌های متغیر چشم */
.inp .toggle-password {
  position: absolute;
  right: 52px;
  top: 28px;
  transform: translateY(-50%);
  font-size: 20px;
  color: #6B7280;
  cursor: pointer;
  transition: color 0.2s;
}

.inp .toggle-password:hover {
  color: #8DAEFF;
}

/* ============================================
   دکمه ثبت‌نام
   ============================================ */
.btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 16px;
  background: #4278D0;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.btn:hover {
  background: #512B81;
  transform: scale(1.01);
}

/* ============================================
   لینک ورود
   ============================================ */
.log {
  margin-top: 30px;
  text-align: center;
}

.log p {
  display: inline;
  font-size: 14px;
  color: #9CA3AF;
}

.log a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  margin-left: 5px;
  transition: 0.2s;
}

.log a:hover {
  color: #8DAEFF;
  text-decoration: underline;
}

/* ============================================
   استایل خطاها
   ============================================ */
.general-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fecaca;
  padding: 12px 16px;
  border-radius: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
  backdrop-filter: blur(4px);
}

.field-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
  margin-bottom: 14px;
  text-align: left;
  display: block;
}

.inp input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.inp:has(input.error) .main-icon {
  color: #ef4444 !important;
}

/* ============================================
   مدیریت ریسپانسیو اختصاصی موبایل
   ============================================ */
@media (max-width: 480px) {
  body {
    padding: 15px;
  }

  .box {
    padding: 30px 20px;
    border-radius: 24px;
  }

  .box h1 {
    font-size: 26px;
  }

  .inp input, .btn {
    height: 50px;
    font-size: 15px;
  }

  .inp .main-icon {
    top: 25px;
  }

  .inp .toggle-password {
    top: 25px;
    right: 46px;
  }

  .inp input {
    padding: 0 76px 0 15px;
  }
}