/* General Body and Layout */
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1a1a2e; /* Dark background */
  color: #e0e0e0; /* Light text color */
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #1a1a2e, #2a0a4a, #0a2a4a);
  background-size: 400% 400%;
  animation: gradientAnimation 15s ease infinite;
  z-index: -1;
  overflow: hidden;
}

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

.particle {
  position: absolute;
  background-color: rgba(123, 63, 228, 0.3); /* Purple hue */
  border-radius: 50%;
  animation: floatAndFade 10s infinite ease-in-out;
  opacity: 0;
}

@keyframes floatAndFade {
  0% {
    transform: translateY(0) translateX(0) scale(0.5);
    opacity: 0;
  }
  25% {
    opacity: 0.7;
  }
  50% {
    transform: translateY(-50px) translateX(20px) scale(1);
    opacity: 0.5;
  }
  75% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) translateX(-50px) scale(0.5);
    opacity: 0;
  }
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 15px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 10;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 1.5em;
  font-weight: bold;
}

.logo span {
  margin-left: 8px;
}

.header-links a {
  color: #fff;
  text-decoration: none;
  margin-left: 25px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.header-links a:hover {
  color: #7b3fe4; /* Purple hover */
}

/* Main Content */
.main-content {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  position: relative;
  z-index: 5;
}

.login-container {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(123, 63, 228, 0.37); /* Purple shadow */
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

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

.login-title {
  font-size: 2.2em;
  color: #fff;
  margin-bottom: 10px;
}

.login-subtitle {
  font-size: 1.1em;
  color: #bbb;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #e0e0e0;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label a {
  color: #7b3fe4; /* Purple link */
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.3s ease;
}

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

.form-input {
  width: calc(100% - 24px); /* Account for padding */
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 1em;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-input:focus {
  outline: none;
  border-color: #7b3fe4; /* Purple focus */
  box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.3);
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: #fff;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.checkbox-input {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  accent-color: #7b3fe4; /* Purple checkbox */
}

.checkbox-label {
  color: #e0e0e0;
  font-weight: normal;
  margin-bottom: 0; /* Override form-label margin */
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  text-align: center;
  border: none;
}

.btn-primary {
  background-color: #7b3fe4; /* Purple */
  color: #fff;
}

.btn-primary:hover {
  background-color: #6a35c7; /* Darker purple */
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
  margin-top: 25px;
}

.register-link {
  margin-top: 25px;
  color: #bbb;
}

.register-link a {
  color: #7b3fe4;
  text-decoration: none;
  font-weight: 500;
}

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

/* Footer */
footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px 0;
  text-align: center;
  color: #888;
  font-size: 0.9em;
  position: relative;
  z-index: 10;
  margin-top: auto; /* Push footer to bottom */
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .login-container {
    padding: 30px 20px;
    margin: 20px;
  }
  .login-title {
    font-size: 1.8em;
  }
  .login-subtitle {
    font-size: 0.9em;
  }
  .header-links a {
    margin-left: 15px;
  }
}
