:root {
  --primary-color: #3366FF;
  --primary-dark: #103cc0;
  --primary-light: #d1c4e9;
  --secondary-color: #2A5AE6;
  --accent-color: #00bcd4;
  --success-color: #4caf50;
  --danger-color: #f44336;
  --warning-color: #ff9800;
  --light-color: #f5f5f5;
  --dark-color: #333;
  --gray-color: #9e9e9e;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(135deg, #030820 0%, #001b56 100%);
  color: var(--dark-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  overflow-x: hidden;
}

.container {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 15px 15px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
  width: 900px;
  max-width: 100%;
  min-height: 580px;
  transition: transform 0.6s ease-in-out;
}

.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sign-in-container {
  left: 0;
  width: 50%;
  z-index: 2;
  opacity: 1;
}

.container.right-panel-active .sign-in-container {
  transform: translateX(100%);
  opacity: 0;
  z-index: 1;
}

.sign-up-container {
  left: 0;
  width: 50%;
  opacity: 0;
  z-index: 1;
}

.container.right-panel-active .sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: show 0.6s;
}

@keyframes show {

  0%,
  49.99% {
    opacity: 0;
    z-index: 1;
  }

  50%,
  100% {
    opacity: 1;
    z-index: 5;
  }
}

.overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 100;
}

.container.right-panel-active .overlay-container {
  transform: translateX(-100%);
}

.overlay {
  background: linear-gradient(to right,
      var(--primary-color),
      var(--secondary-color));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 0 0;
  color: #ffffff;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

.overlay-panel {
  background: linear-gradient(135deg,
      var(--primary-color) 0%,
      var(--secondary-color) 100%);
  color: white;
  z-index: 2;
}

.container.right-panel-active .overlay {
  transform: translateX(50%);
}

.overlay-panel {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  text-align: center;
  top: 0;
  height: 100%;
  width: 50%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

.overlay-panel {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  transition: var(--transition);
  justify-content: space-evenly;
}

.overlay-left {
  transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
  transform: translateX(0);
}

.overlay-right {
  right: 0;
  transform: translateX(0);
}

.container.right-panel-active .overlay-right {
  transform: translateX(20%);
}

.login-form-container {
  width: 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.logo-container {
  margin-bottom: 30px;
  text-align: center;
}

.logo {
  max-width: 200px;
  height: auto;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-header {
  margin-bottom: 30px;
  text-align: center;
}

.login-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.login-header p {
  color: var(--gray-color);
  font-size: 14px;
}

.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-color);
  z-index: 1;
  transition: var(--transition);
}

.form-control {
  width: 100%;
  padding: 15px 15px 15px 45px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  transition: var(--transition);
  background: #f9f9f9;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(103, 58, 183, 0.2);
  background: white;
}

.form-control:focus+i {
  color: var(--primary-color);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 14px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-color);
}

.checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.forgot-password:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.btn {
  display: block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(103, 58, 183, 0.3);
}

.ghost {
  background-color: transparent;
  border-color: #ffffff;
  border: 1px solid white;
  border-radius: 20px;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 80ms ease-in;
  margin-top: 20px;
}

.ghost:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.overlay-panel h1 {
  font-weight: bold;
  margin: 0;
  font-size: 28px;
}

div#container {
  display: flex;
  width: 100%;
  max-width: 1000px;
  min-height: 600px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: white;
  position: relative;
}

.overlay-left::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  top: -50px;
  left: -50px;
}

.overlay-left::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  bottom: -50px;
  right: -50px;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-color);
  cursor: pointer;
  transition: var(--transition);
  padding: 0 15px;
}

.password-toggle:hover {
  color: var(--primary-color);
}

/* Alert styles */
.alert {
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.alert .close {
  float: right;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: 0.5;
  background: none;
  border: none;
  cursor: pointer;
}

.list-group {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Animation for form elements */
.form-group {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.form-group:nth-child(1) {
  animation-delay: 0.1s;
}

.form-group:nth-child(2) {
  animation-delay: 0.2s;
}

.form-options {
  animation-delay: 0.3s;
}

.btn {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Forgot Password Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-color);
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--dark-color);
}

.modal-header {
  margin-bottom: 20px;
}

.modal-header h3 {
  color: var(--primary-color);
  font-size: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    min-height: 100vh;
    border-radius: 0;
  }

  .form-container {
    width: 100%;
  }

  .sign-in-container,
  .sign-up-container {
    width: 100%;
  }

  .overlay-container {
    display: none;
  }

  .login-form-container {
    padding: 30px 20px;
  }
}

.switch-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid white;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.switch-btn:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.logo-container {
  margin-bottom: 30px;
  z-index: 1;
}

.logo {
  max-width: 200px;
  height: auto;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.welcome-text h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  z-index: 1;
}

.welcome-text p {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.9;
  z-index: 1;
}

.features {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature i {
  color: var(--accent-color);
  font-size: 18px;
}

.overlay-right {
  background: linear-gradient(135deg,
      var(--secondary-color) 0%,
      var(--primary-color) 100%);
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.overlay-right::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  top: -50px;
  right: -50px;
}

.overlay-right::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  bottom: -50px;
  left: -50px;
}

.captcha-container {
  margin-bottom: 20px;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-image img {
  border-radius: 5px;
  border: 1px solid #e0e0e0;
}

.reload-captcha {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.reload-captcha:hover {
  color: var(--primary-dark);
}