/* =========================================
   Fonts Setup (Matching Main Site)
   ========================================= */
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 100;
  src: url("../fonts/Vazirmatn-Thin.woff2") format("woff2");
}

@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
}

@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 900;
  src: url("../fonts/Vazirmatn-Black.woff2") format("woff2");
}

@font-face {
  font-family: "Material Icons";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/maticons.woff2") format("woff2"); /* Adjust path if needed */
}

.material-icons {
  font-family: "Material Icons";
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  vertical-align: middle;
}

/* =========================================
   Base & Background Styles
   ========================================= */
* {
  box-sizing: border-box;
  font-family: "Vazirmatn", sans-serif;
}

body.auth-page {
  background: #0a0a0f;
  margin: 0;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  direction: rtl;
}

/* Animated Background from your main site */
.auth-bg {
  animation: slide 3s ease-in-out infinite alternate;
  background-image: linear-gradient(-60deg, #0a0a0f 50%, #161620 50%);
  bottom: 0;
  left: -50%;
  opacity: 0.6;
  position: fixed;
  right: -50%;
  top: 0;
  z-index: -1;
}

@keyframes slide {
  0% {
    transform: translateX(-25%);
  }
  100% {
    transform: translateX(25%);
  }
}

/* =========================================
   Authentication Box (Glassmorphism)
   ========================================= */
.auth-container {
  width: 90%;
  max-width: 420px;
  background: rgba(26, 26, 36, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 30px;
  padding: 40px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 10;
  transition: transform 0.3s ease;
}

.auth-container:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

/* =========================================
   Header & Logo
   ========================================= */
.auth-header {
  text-align: center;
  margin-bottom: 30px;
  display: block;
  text-decoration: none;
}

.auth-header img {
  max-width: 160px;
  height: auto;
  margin-bottom: 15px;
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.4));
  transition: transform 0.3s;
}

.auth-header:hover img {
  transform: scale(1.05);
}

.auth-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================
   Form Elements
   ========================================= */
.modern-form-group {
  margin-bottom: 20px;
  text-align: right;
}

.modern-form-group label {
  display: block;
  font-size: 14px;
  color: #a0a0a0;
  margin-bottom: 8px;
  font-weight: 500;
}

.modern-form-group input {
  width: 100%;
  background: rgba(10, 10, 15, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  direction: ltr; /* Keeps email/pass typing natural */
  text-align: left;
}

.modern-form-group input:focus {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* =========================================
   Buttons
   ========================================= */
.modern-btn {
  width: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
  margin-top: 10px;
}

.modern-btn:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

/* =========================================
   Alert Messages
   ========================================= */
.alert-message {
  width: 100%;
  margin-bottom: 20px;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 14px;
  text-align: center;
  display: none;
  backdrop-filter: blur(10px);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.2);
}

/* =========================================
   Loading Overlay
   ========================================= */
.loading-overlay {
  position: absolute;
  top: 0;
  left: -10px;
  right: -10px;
  bottom: -18px;
  background: rgb(23, 23, 32);
  backdrop-filter: blur(8px);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  display: none;
}

.loading-overlay img {
  width: 64px;
  height: 64px;
}

/* =========================================
   Footer Links
   ========================================= */
.auth-footer {
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-footer a {
  color: #a0a0a0;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.auth-footer a:hover {
  color: #6366f1;
}

.auth-footer a i {
  font-size: 18px;
}
