/* Modal Container */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.5);
  padding-top: 60px;
}

/* Modal Login Box */
.modal .login-container {
  display: flex;
  width: 90%;
  max-width: 800px;
  margin: auto;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.3s;
  background-color: rgba(255, 255, 255, 0.9);
  animation: fadeIn 0.8s ease;
}

/* Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover Effect */
.modal .login-container:hover {
  transform: scale(1.02);
}

/* Form Container */
.form-container {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Heading */
h2 {
  color: #388e3c;
  text-align: center;
}

/* Labels */
label {
  font-size: 16px;
  color: #2e7d32;
  font-weight: bold;
}

/* Inputs */
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #4caf50;
  border-radius: 8px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

/* Inputs Focus State */
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #66bb6a;
  outline: none;
  box-shadow: 0 0 8px rgba(102, 187, 106, 0.3);
}

/* Submit Button */
input[type="submit"] {
  width: 100%;
  padding: 12px;
  background-color: #388e3c;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* Submit Button Hover */
input[type="submit"]:hover {
  background-color: #2e7d32;
}

/* Extra Links */
.forgot-password,
.already-registered {
  text-align: center;
  /* margin-top: 15px; */
}

/* Modal Logo Styling */
.modal .logo {
  display: block;
  margin: 0 auto 10px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
}

/* Eye Icon for Password Toggle */
.eye-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  cursor: pointer;
  transform: translateY(-50%);
}

/* Back to Homepage Button */
.back-homepage {
  display: block;
  text-align: center;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #388e3c;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s;
}

/* Back Homepage Hover */
.back-homepage:hover {
  background-color: #2e7d32;
  text-decoration: underline;
}

/* close button */

.close-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: #555;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
}

.close-button:hover {
  color: #000;
}

.otp-digit {
  width: 30px;
  height: 50px;
  font-size: 24px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 5px;
  outline: none;
  transition: border-color 0.2s;
}

.otp-digit:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}
/* selection */
#login-mode-selection {
  text-align: center;
  margin-bottom: 20px;
}

#login-mode-selection h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #333;
  font-weight: bold;
}

#login-mode-selection button {
  background-color: #4caf50; /* green */
  color: white;
  border: none;
  padding: 12px 25px;
  margin: 5px 10px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 120px;
}

#login-mode-selection button:hover {
  background-color: #45a049; /* darker green */
}

#login-mode-selection {
  text-align: center;
  font-family: "Segoe UI", sans-serif;
  margin-top: 20px;
}

.card-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.login-card {
  width: 140px;
  height: 180px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}

.login-card span {
  font-weight: bold;
  font-size: 16px;
  color: #333;
}
.back-button {
  /* margin-top: 15px; */
  background-color: #f1f1f1;
  border: none;
  color: #333;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.back-button:hover {
  background-color: #ddd;
}

/* Responsive Tweaks */
@media (max-width: 600px) {
  .modal .login-container {
    flex-direction: column;
    width: 95%;
    margin: 0 10px;
  }
  .form-container {
    padding: 20px;
  }
  .logo {
    width: 100px;
    height: 100px;
  }
}
