@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap');

:root {
  --primary-color: #0ea5e9;
  --primary-color-dark: #0284c7;
  --text-light: #252525;
  --error-color: #ef4444;
  --success-color: #10b981;
}

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

body {
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

/* ===== Main ===== */
.main {
  width: 100%;
  height: 100vh;
  background-color: white;
  position: relative;
  padding: 0 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Navbar ===== */
nav {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  padding: 2rem 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo {
  color: var(--text-light);
  font-size: 1.2rem;
  font-weight: 500;
}

nav ul {
  display: flex;
  gap: 3rem;
  list-style: none;
}

nav ul li span {
  color: var(--text-light);
  font-size: 1.2rem;
  opacity: 0.9;
}

nav ul li a.register {
  font-size: 1.2rem;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  border: 2px solid #252525;
  background-color: #252525;
  color: white;
  text-decoration: none;
  transition: 0.3s;
  margin-right: -1.5rem;
}

nav ul li a.register:hover {
  background-color: #000;
  border-color: #000;
}

.right-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ===== Content ===== */
.content {
  text-align: center;
  color: var(--text-light);
  max-width: 500px;
}

.content h1 {
  font-size: 2.5rem;
}

.content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
  opacity: 0.9;
}

/* ===== Login Form ===== */
.login__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: right;
}

.field label {
  font-size: 0.95rem;
  color: #f3f4f6d0;
}

.field input {
  padding: 0.75rem 1.2rem;
  border-radius: 2rem;
  border: 1.5px solid #252525a0;
  background-color: transparent;
  color: var(--text-light);
  font-size: 1rem;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  outline: none;
  transition: border-color 0.3s, background-color 0.3s;
}

.field input::placeholder {
  color: #252525a0;
}

.field input:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.field input:focus {
  border-color: var(--primary-color);
}

/* زر الدخول */
.login__form button {
  padding: 0.75rem 1.5rem;
  width: 200px;
  border-radius: 2rem;
  border: 2px solid var(--primary-color);
  background-color: var(--primary-color);
  color: white;
  font-size: 1.1rem;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 400;
  cursor: pointer;
  transition: 0.3s;
  align-self: center;
}

.login__form button:hover {
  background-color: var(--primary-color-dark);
  border-color: var(--primary-color-dark);
}

/* ===== Notification ===== */
.notification {
  position: fixed;
  top: 2rem;
  right: 50%;
  transform: translateX(50%) translateY(-20px);
  min-width: 280px;
  max-width: 90%;
  padding: 0.9rem 1.5rem;
  border-radius: 1rem;
  font-size: 0.95rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.notification.show {
  opacity: 1;
  transform: translateX(50%) translateY(0);
  pointer-events: auto;
}

.notification.error {
  background-color: #7f1d1d;
  color: #fee2e2;
  border: 1px solid var(--error-color);
}

.notification.success {
  background-color: #064e3b;
  color: #d1fae5;
  border: 1px solid var(--success-color);
}

/* ===== Button Loading State ===== */
#loginBtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

#loginBtn .spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 1);
  display: none;
  animation: spin 0.8s linear infinite;
}

#loginBtn.loading {
  opacity: 0.85;
  cursor: not-allowed;
}

#loginBtn.loading .spinner {
  display: inline-block;
}

.back-home-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 1.2rem;
  background-color: white;
  border: 2px solid #25252515;
  border-radius: 2rem;
  text-decoration: none;
  color: #252525;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  direction: rtl;
}

.back-home-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: #252525;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #f3f4f6;
  border-radius: 50%;
  color: #252525;
  transition: all 0.3s ease;
}

.back-home-card:hover .card-icon {
  background-color: #252525;
  color: white;
}

.card-text span {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  nav ul li span {
    display: none;
  }

  nav {
    padding: 1.5rem 2rem;
    z-index: 1000;
  }

  .content h1 {
    font-size: 2rem;
  }

  .content p {
    font-size: 1rem;
  }

  .notification {
    top: 7rem;
  }

  .back-home-card {
    padding: 0.4rem;
    gap: 0;
  }

  .back-home-card .card-text {
    display: none;
  }

  .back-home-card .card-icon {
    width: 32px;
    height: 32px;
  }
}