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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background: #0f0f0f;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated gradient background */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #1a1a1a, #2d4a3a, #1f3a2a, #0f1f1a);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: -2;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Floating particles effect */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(139, 195, 74, 0.1);
  border-radius: 50%;
  animation: float 20s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Auth Container */
.auth-container {
  width: 100%;
  max-width: 450px;
  margin: 2rem;
  position: relative;
  z-index: 10;
}

.auth-card {
  background: linear-gradient(
    135deg,
    rgba(139, 195, 74, 0.1),
    rgba(15, 15, 15, 0.95)
  );
  backdrop-filter: blur(20px);
  border-radius: 25px;
  padding: 3rem 2.5rem;
  border: 1px solid rgba(139, 195, 74, 0.3);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
  animation: slideUp 0.8s ease 0.2s forwards;
}

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

/* Logo */
.logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-link {
  font-size: 2.5rem;
  font-weight: 700;
  color: #8bc34a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.logo-link:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.logo::before {
  content: "";
  display: inline-block;
  width: 50px;
  height: 50px;
  background-image: url("../images/logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Form Switcher */
.form-switcher {
  display: flex;
  background: rgba(25, 25, 25, 0.8);
  border-radius: 15px;
  padding: 0.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(139, 195, 74, 0.2);
}

.switch-btn {
  flex: 1;
  padding: 1rem;
  text-align: center;
  background: transparent;
  color: #cccccc;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.switch-btn.active {
  background: linear-gradient(135deg, #8bc34a, #689f38);
  color: white;
  box-shadow: 0 5px 15px rgba(139, 195, 74, 0.4);
  transform: translateY(-2px);
}

.switch-btn:hover:not(.active) {
  color: #8bc34a;
  transform: translateY(-1px);
}

/* Forms */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

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

.user-select {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(25, 25, 25, 0.8);
  border: 2px solid rgba(139, 195, 74, 0.3);
  border-radius: 12px;
  color: #cccccc;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #8bc34a;
  text-align: center;
}

.form-subtitle {
  text-align: center;
  color: #cccccc;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #8bc34a;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(25, 25, 25, 0.8);
  border: 2px solid rgba(139, 195, 74, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-input:focus {
  outline: none;
  border-color: #8bc34a;
  box-shadow: 0 0 0 4px rgba(139, 195, 74, 0.2);
  background: rgba(25, 25, 25, 0.9);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: #888888;
}

/* Password Toggle */
.password-group {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8bc34a;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.password-toggle:hover {
  color: #689f38;
  transform: translateY(-50%) scale(1.1);
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: #8bc34a;
}

.checkbox-label {
  color: #cccccc;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-label a {
  color: #8bc34a;
  text-decoration: none;
  transition: color 0.3s ease;
}

.checkbox-label a:hover {
  color: #689f38;
  text-decoration: underline;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 1.2rem;
  background: linear-gradient(135deg, #8bc34a, #689f38);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(139, 195, 74, 0.4);
  margin-bottom: 1.5rem;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(139, 195, 74, 0.6);
}

.submit-btn:active {
  transform: translateY(-1px);
}

/* Loading state */
.submit-btn.loading {
  position: relative;
  color: transparent;
}

.submit-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Divider */
.divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
  color: #666666;
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: rgba(139, 195, 74, 0.3);
}

.divider::before {
  left: 0;
}
.divider::after {
  right: 0;
}

/* Social Buttons */
.social-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  grid-column: 2;
}

.social-btn {
  flex: 1;
  padding: 1rem;
  border: 2px solid rgba(139, 195, 74, 0.3);
  background: rgba(25, 25, 25, 0.8);
  color: #cccccc;
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  width: 50%;
}

.social-btn:hover {
  border-color: #8bc34a;
  color: #8bc34a;
  transform: translateY(-2px);
  background: rgba(139, 195, 74, 0.1);
}

/* Back Link */
.back-link {
  text-align: center;
  margin-top: 2rem;
}

.back-link a {
  color: #8bc34a;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link a:hover {
  color: #689f38;
  transform: translateX(-5px);
}

/* Success Message */
.success-message {
  background: linear-gradient(
    135deg,
    rgba(76, 175, 80, 0.2),
    rgba(56, 142, 60, 0.2)
  );
  border: 1px solid rgba(76, 175, 80, 0.5);
  color: #81c784;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  text-align: center;
  display: none;
}

.success-message.show {
  display: block;
  animation: slideDown 0.5s ease;
}

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

/* Error Message */
.error-message {
  background: linear-gradient(
    135deg,
    rgba(244, 67, 54, 0.2),
    rgba(198, 40, 40, 0.2)
  );
  border: 1px solid rgba(244, 67, 54, 0.5);
  color: #ef5350;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  text-align: center;
  display: block;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
  .auth-container {
    margin: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .logo-link {
    font-size: 2rem;
  }

  .form-title {
    font-size: 1.5rem;
  }

  /* .social-buttons {
    flex-direction: column;
  } */
}

/* Input validation styles */
.form-input.valid {
  border-color: #4caf50;
}

.form-input.invalid {
  border-color: #f44336;
}

.validation-message {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

.validation-message.error {
  color: #f44336;
}

.validation-message.success {
  color: #4caf50;
}
