/* ============================================
   ریست و پایه
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

::-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);
}

/* ============================================
   جعبه ورود
   ============================================ */
.login {
  width: 100%;
  background: rgba(141, 173, 255, 0.2);
  color: white;
  border-radius: 32px;
  padding: 40px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.login h1 {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
}

.login p {
  text-align: center;
  font-size: 14px;
  color: #D1D5DB;
  margin-bottom: 30px;
}

/* ============================================
   فیلدهای ورودی و آیکون‌ها
   ============================================ */
.login .inputbox {
  position: relative;
  width: 100%;
  margin: 20px 0;
}

.inputbox input {
  width: 100%;
  height: 56px;
  background: transparent;
  border: 1px solid #6B7280;
  outline: none;
  border-radius: 16px;
  padding: 0 85px 0 20px; /* ایجاد فضا در سمت راست فیلد برای قرارگیری آیکون‌ها */
  color: #8DAEFF;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.inputbox input:focus {
  border-color: #4278D0;
  box-shadow: 0 0 0 2px rgba(66, 120, 208, 0.2);
}

.inputbox input::placeholder {
  color: #8DAEFF;
  opacity: 0.7;
}

/* استایل آیکون‌های اصلی فیلدها (پاکت نامه و قفل) */
.inputbox .main-icon {
  position: absolute;
  right: 20px;
  top: 28px;
  transform: translateY(-50%);
  font-size: 20px;
  color: #8DAEFF;
  pointer-events: none;
}

/* استایل آیکون تعاملی چشم (نمایش/مخفی کردن پسورد) */
.inputbox .toggle-password {
  position: absolute;
  right: 52px;
  top: 28px;
  transform: translateY(-50%);
  font-size: 20px;
  color: #6B7280;
  cursor: pointer;
  transition: color 0.2s;
}

.inputbox .toggle-password:hover {
  color: #8DAEFF;
}

/* ============================================
   لینک فراموشی رمز و دکمه اصلی
   ============================================ */
.login .forget {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  margin-bottom: 25px;
}

.forget a {
  color: #9CA3AF;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}

.forget a:hover {
  color: #8DAEFF;
  text-decoration: underline;
}

.login .btn {
  width: 100%;
  height: 56px;
  background: #4278D0;
  border: none;
  outline: none;
  border-radius: 16px;
  cursor: pointer;
  color: white;
  font-size: 16px;
  font-weight: 600;
  transition: 0.3s;
}

.login .btn:hover {
  background: #512B81;
  transform: scale(1.01);
}

/* ============================================
   استایل خطاها
   ============================================ */
.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;
  text-align: left;
  display: block;
}

.inputbox 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); }
}

/* ============================================
   مدیریت ریسپانسیو موبایل و تبلت کوچک
   ============================================ */
@media (max-width: 480px) {
  body {
    padding: 15px;
  }

  .login {
    padding: 30px 20px;
    border-radius: 24px;
  }

  .login h1 {
    font-size: 26px;
  }

  .inputbox input, .login .btn {
    height: 50px;
    font-size: 15px;
  }

  .inputbox .main-icon {
    top: 25px;
  }

  .inputbox .toggle-password {
    top: 25px;
    right: 46px;
  }

  .inputbox input {
    padding: 0 76px 0 15px;
  }
}

/* ============================================
   کدهای دکمه سفارشی گلیچ (محفوظ مانده)
   ============================================ */
.button-49,
.button-49:after {
  width: 150px;
  height: 76px;
  line-height: 78px;
  font-size: 20px;
  font-family: 'Bebas Neue', sans-serif;
  background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
  border: 0;
  color: #fff;
  letter-spacing: 3px;
  box-shadow: 6px 0px 0px #00E6F6;
  outline: transparent;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.button-49:after {
  --slice-0: inset(50% 50% 50% 50%);
  --slice-1: inset(80% -6px 0 0);
  --slice-2: inset(50% -6px 30% 0);
  --slice-3: inset(10% -6px 85% 0);
  --slice-4: inset(40% -6px 43% 0);
  --slice-5: inset(80% -6px 5% 0);
  content: 'ALTERNATE TEXT';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 3%, #00E6F6 3%, #00E6F6 5%, #FF013C 5%);
  text-shadow: -3px -3px 0px #F8F005, 3px 3px 0px #00E6F6;
  clip-path: var(--slice-0);
}

.button-49:hover:after {
  animation: 1s glitch;
  animation-timing-function: steps(2, end);
}

@keyframes glitch {
  0% { clip-path: var(--slice-1); transform: translate(-20px, -10px); }
  10% { clip-path: var(--slice-3); transform: translate(10px, 10px); }
  20% { clip-path: var(--slice-1); transform: translate(-10px, 10px); }
  30% { clip-path: var(--slice-3); transform: translate(0px, 5px); }
  40% { clip-path: var(--slice-2); transform: translate(-5px, 0px); }
  50% { clip-path: var(--slice-3); transform: translate(5px, 0px); }
  60% { clip-path: var(--slice-4); transform: translate(5px, 10px); }
  70% { clip-path: var(--slice-2); transform: translate(-10px, 10px); }
  80% { clip-path: var(--slice-5); transform: translate(20px, -10px); }
  90% { clip-path: var(--slice-1); transform: translate(-10px, 0px); }
  100% { clip-path: var(--slice-1); transform: translate(0); }
}

@media (min-width: 768px) {
  .button-49,
  .button-49:after {
    width: 200px;
    height: 86px;
    line-height: 88px;
  }
}