@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');

body, html {
  margin: 0;
  padding: 0;
  font-family: 'Poppins';
  background: white;
  height: 100vh;
  overflow: hidden;
}

.container {
  position: relative;
  width: 100%;
  height: 100%;
}

.circle-bg {
  position: absolute;
  top: -300px;
  left: -150px;
  width: 880px;
  height: 800px;
  background: #0D3C69;
  border-radius: 50%;
  box-shadow: 5px 5px 10px rgba(0,0,0,0.2);
  z-index: 1;
}

.circle-bg.circle-2 {
  top: auto;
  left: auto;
  right: -160px;
  bottom: -360px;
  width: 870px;
  height: 800px;
  background: #ffffff;
  border: 6px solid #0D3C69;
  box-shadow: 5px 5px 10px rgba(0,0,0,0.15);
  z-index: 1;
}

.login-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #6D89AD;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 4px 4px 5px #999;
  z-index: 2;
  width: 400px;
}

.login-card h1 {
  text-align: center;
  color: white;
  margin-bottom: 25px;
  text-shadow: 2px 2px #444;
}

.login-card label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  font-size: 0.9em;
  color: #0D0D0D;
}

.login-card input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 20px;
  border: 1px solid #ccc;
  outline: none;
  box-shadow: 1px 1px 3px #aaa inset;
  box-sizing: border-box;
}

/* Override for username input to match design */
.login-card input#username {
  width: 100%;
}

.password-container {
  position: relative;
  width: 100%;
  margin-top: 5px;
  display: inline-block;
}

.password-container input {
  width: 100%;
  padding: 10px 35px 10px 10px; /* Right padding for eye icon space */
  margin-top: 0;
  border-radius: 20px;
  border: 1px solid #ccc;
  outline: none;
  box-shadow: 1px 1px 3px #aaa inset;
  box-sizing: border-box;
  height: 40px;
}

.password-toggle {
  position: absolute;
  right: 12px; /* Position on the far right inside the input field */
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 20px;
  height: 20px;
  color: #000000;
  transition: color 0.2s;
  z-index: 10; /* Ensure it's above the input */
}

.password-toggle:hover {
  color: #555;
}

/* Forgot Password and Remember Me Row */
.forgot-remember-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 20px;
  width: 100%;
  gap: 10px;
}

.forgot-password-link {
  color: white;
  text-decoration: underline;
  font-size: 14px;
  margin: 0;
}

.forgot-password-link:hover {
  color: #ccc;
}

/* Remember Me Styles */
.remember-me-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  flex-shrink: 0;
}

.remember-me-container input[type="checkbox"] {
  margin: 0;
  scale: 1.1;
  flex-shrink: 0;
}

.remember-me-container label {
  color: white;
  font-size: 13px;
  cursor: pointer;
  margin: 0;
  white-space: nowrap;
}

/* Password Strength Indicator */
.password-strength-container {
  margin-top: 8px;
}

.password-strength-meter {
  width: 100%;
  height: 4px;
  background-color: #ddd;
  border-radius: 2px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
  width: 0%;
  background-color: #ccc;
}

.password-strength-text {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
  display: block;
}

/* Reset Input Styles */
.reset-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  margin-top: 5px;
  box-sizing: border-box;
}

.input-container {
  margin-bottom: 15px;
}

.input-container label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

/* OTP Section Styling */
#otp-section {
  margin-top: 15px;
  animation: fadeIn 0.3s ease-in;
}

#otp {
  width: 100%;
  padding: 12px;
  border-radius: 15px;
  border: none;
  outline: none;
  box-shadow: 1px 1px 3px #aaa inset;
  box-sizing: border-box;
  height: 40px;
  text-align: center;
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: bold;
}

#otp-message {
  color: white;
  font-size: 11px;
  text-align: center;
  margin: 8px 0;
  opacity: 0.9;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card button {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  border-radius: 15px;
  background-color: #0D3C69;
  color: white;
  font-weight: bold;
  border: none;
  cursor: pointer;
  box-shadow: 1px 1px 3px #444;
}

.login-card button:hover {
  background-color: #092c4e;
}

footer {
  position: absolute;
  bottom: 10px;
  left: 20px;
  font-size: 0.75em;
  color: #0D3C69;
  z-index: 3;
}

/* Hide footer on tablet and mobile for consistency */
@media (max-width: 1024px) {
  footer { display: none !important; }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: #6D89AD;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px 0px 30px;
}

.modal-header h2 {
  color: white;
  font-size: 1.4em;
  margin: 0;
  font-weight: 600;
}

.close-modal {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: #ff6b6b;
}

.modal-body {
  padding: 20px 30px;
  text-align: center;
}

.modal-body p {
  color: white;
  margin: 0 0 15px 0;
  font-size: 14px;
  opacity: 0.9;
}

.email-display {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  margin-bottom: 20px !important;
}

.otp-input-container {
  margin: 20px 0;
}

.otp-input {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  text-align: center;
  letter-spacing: 5px;
  font-weight: bold;
  color: #0D3C69;
  outline: none;
  transition: all 0.3s ease;
}

.otp-input:focus {
  background: white;
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.test-otp-display {
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid rgba(255, 193, 7, 0.5);
  border-radius: 8px;
  padding: 10px;
  margin-top: 15px;
}

.test-otp-display p {
  margin: 0;
  color: #fff3cd;
  font-size: 13px;
}

.modal-footer {
  padding: 0px 30px 30px 30px;
  display: flex;
  gap: 10px;
}

.verify-btn, .resend-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.verify-btn {
  background: #0D3C69;
  color: white;
}

.verify-btn:hover {
  background: #092c4e;
  transform: translateY(-2px);
}

.resend-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.resend-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 600px) {
  .circle-bg {
    width: 400px;
    height: 400px;
    top: -80px;
    left: -80px;
  }

  .login-card {
    width: 90%;
    padding: 30px 20px;
  }

  .login-card h1 {
    font-size: 1.2em;
  }

  footer {
    font-size: 0.65em;
    left: 10px;
  }

  /* Modal mobile styles */
  .modal-content {
    max-width: 350px;
    margin: 20px;
  }

  .modal-header {
    padding: 20px 20px 0px 20px;
  }

  .modal-header h2 {
    font-size: 1.2em;
  }

  .modal-body {
    padding: 15px 20px;
  }

  .modal-footer {
    padding: 0px 20px 25px 20px;
    flex-direction: column;
  }

  .verify-btn, .resend-btn {
    width: 100%;
    margin-bottom: 10px;
  }
}
