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

:root {
  --primary-color: #6d28d9;
  --primary-hover: #7c3aed;
  --background-dark: #121212;
  --card-background: #1e1e1e;
  --text-color: #e2e8f0;
  --text-light: #94a3b8;
  --input-background: #2d2d2d;
  --input-border: #3d3d3d;
  --input-focus: #4d4d4d;
  --error-color: #ef4444;
  --success-color: #10b981;
}

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

body {
  background-color: var(--background-dark);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  width: 450px;
  max-width: 95%;
  margin: auto;
}

.form-container {
  background-color: var(--card-background);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo {
  height: 70px;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 0 10px rgba(109, 40, 217, 0.5));
}

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

.form-header h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
  text-shadow: 0 0 10px rgba(109, 40, 217, 0.3);
}

.form-header p {
  color: var(--text-light);
  font-size: 16px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--input-background);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-color);
  transition: all 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.25);
}

.password-container {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
}

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

.error-message {
  color: var(--error-color);
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

.success-message {
  padding: 12px;
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

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

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

.remember-me label {
  font-size: 14px;
  color: var(--text-light);
}

.forgot-password {
  font-size: 14px;
  color: var(--primary-color);
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.login-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

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

.login-btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

.form-footer {
  margin-top: 25px;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
}

.form-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.form-footer a:hover {
  text-decoration: underline;
}

.terms-privacy {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-light);
}

.terms-privacy input {
  margin-right: 8px;
  margin-top: 3px;
  accent-color: var(--primary-color);
}

.terms-privacy a {
  color: var(--primary-color);
  text-decoration: none;
}

.terms-privacy a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  body {
    display: block;
    padding-top: 2rem;
    padding-bottom: 2rem;
    height: auto;
  }

  .container {
    padding-top: 0;
    margin-top: 0;
    margin-bottom: 0;
  }
  
  .form-container {
    padding: 30px 20px;
    margin-top: 0;
    margin-bottom: 0;
  }

  #particles-js {
    position: fixed;
    z-index: -1;
  }

  .form-header h1 {
    font-size: 24px;
  }

  .form-header p {
    font-size: 14px;
  }

  .remember-forgot {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .terms-privacy {
    flex-wrap: wrap;
  }
}

