@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #3a86ff;
  --primary-dark: #2667cc;
  --secondary-color: #8338ec;
  --accent-color: #ff006e;
  --success-color: #38b000;
  --text-color: #333;
  --text-light: #777;
  --bg-color: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem;
}

.login-container {
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  max-height: 85vh;
  box-shadow: var(--shadow-strong);
  animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-image {
  flex: 1;
  background: linear-gradient(135deg, #8338ec, #3a86ff);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.login-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.3;
}

.main-image {
  max-width: 65%;
  height: auto;
  margin-bottom: 0.8rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.main-image:hover {
  transform: scale(1.02);
}

.features-list {
  width: 100%;
  text-align: left;
}

.features-list h2 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
  text-align: center;
}

.features-list p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  text-align: center;
}

.features-list ul {
  list-style: none;
}

.features-list li {
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  animation: slideIn 0.5s ease-in-out;
  animation-fill-mode: both;
}

.features-list li:nth-child(1) {
  animation-delay: 0.1s;
}
.features-list li:nth-child(2) {
  animation-delay: 0.2s;
}
.features-list li:nth-child(3) {
  animation-delay: 0.3s;
}
.features-list li:nth-child(4) {
  animation-delay: 0.4s;
}
.features-list li:nth-child(5) {
  animation-delay: 0.5s;
}
.features-list li:nth-child(6) {
  animation-delay: 0.6s;
}
.features-list li:nth-child(7) {
  animation-delay: 0.7s;
}
.features-list li:nth-child(8) {
  animation-delay: 0.8s;
}
.features-list li:nth-child(9) {
  animation-delay: 0.9s;
}
.features-list li:nth-child(10) {
  animation-delay: 1s;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.features-list li i {
  color: var(--success-color);
  margin-right: 0.4rem;
  font-size: 0.85rem;
}

.login-form {
  flex: 1;
  padding: 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
}

.logo-pulse {
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  margin-right: 0.7rem;
  position: relative;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(58, 134, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(58, 134, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(58, 134, 255, 0);
  }
}

.logo-container h1 {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.social-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.social-login p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.social-icon:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #eee;
}

.divider span {
  padding: 0 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.alert-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 0.6rem;
  border-radius: 8px;
  margin-bottom: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.alert-message i {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.form-group {
  position: relative;
  margin-bottom: 0.8rem;
}

.input-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1rem;
  transition: color 0.3s ease;
}

.form-group input {
  width: 100%;
  padding: 0.65rem 0.8rem 0.65rem 2.3rem;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background: var(--bg-color);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.1);
}

.form-group input:focus + .input-focus-effect {
  width: 100%;
}

.form-group input:focus ~ .input-icon {
  color: var(--primary-color);
}

.input-focus-effect {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.toggle-password {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
}

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

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

.remember-me {
  display: flex;
  align-items: center;
}

.remember-me input {
  margin-right: 0.5rem;
  accent-color: var(--primary-color);
}

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

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

.login-button {
  width: 100%;
  padding: 0.7rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.login-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.login-button:hover::before {
  left: 100%;
}

.login-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.login-button i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.login-button:hover i {
  transform: translateX(5px);
}

.register-link {
  text-align: center;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.register-link a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.register-link a:hover {
  text-decoration: underline;
}

footer {
  background: rgba(0, 0, 0, 0.8);
  color: var(--white);
  padding: 0.8rem;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.copyright {
  font-size: 0.75rem;
  opacity: 0.8;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social-icon {
  color: var(--white);
  font-size: 1rem;
  transition: color 0.3s ease;
}

.footer-social-icon:hover {
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
  .login-container {
    flex-direction: column;
    max-width: 600px;
  }

  .login-image,
  .login-form {
    width: 100%;
  }

  .login-image {
    padding: 2rem 1rem;
  }

  .features-list {
    display: none;
  }

  .main-image {
    max-width: 60%;
    margin-bottom: 0;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 1rem;
  }

  .login-form {
    padding: 2rem 1.5rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .logo-container h1 {
    font-size: 1.8rem;
  }
}
