/* Login Page Styles with Floating Background Animation */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Floating Background Shapes */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 50%
    );
  animation: backgroundFloat 8s ease-in-out infinite;
}

@keyframes backgroundFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  33% {
    transform: translateY(-20px) rotate(120deg);
  }

  66% {
    transform: translateY(10px) rotate(240deg);
  }
}

/* Floating Shapes */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-shape:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 20%;
  right: 15%;
  animation-delay: 2s;
}

.floating-shape:nth-child(3) {
  width: 100px;
  height: 100px;
  bottom: 15%;
  left: 20%;
  animation-delay: 4s;
}

.floating-shape:nth-child(4) {
  width: 70px;
  height: 70px;
  bottom: 25%;
  right: 10%;
  animation-delay: 1s;
}

.floating-shape:nth-child(5) {
  width: 90px;
  height: 90px;
  top: 60%;
  left: 70%;
  animation-delay: 3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) scale(1);
  }

  25% {
    transform: translateY(-20px) translateX(10px) scale(1.1);
  }

  50% {
    transform: translateY(-10px) translateX(-10px) scale(0.9);
  }

  75% {
    transform: translateY(-30px) translateX(5px) scale(1.05);
  }
}

/* Geometric Shapes */
.geometric-shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  animation: geometricFloat 10s ease-in-out infinite;
}

.geometric-shape.triangle {
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-bottom: 43px solid rgba(255, 255, 255, 0.08);
}

.geometric-shape.square {
  width: 40px;
  height: 40px;
  border-radius: 4px;
}

.geometric-shape.circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.geometric-shape:nth-child(6) {
  top: 15%;
  right: 25%;
  animation-delay: 0s;
}

.geometric-shape:nth-child(7) {
  top: 70%;
  left: 15%;
  animation-delay: 5s;
}

.geometric-shape:nth-child(8) {
  bottom: 20%;
  right: 30%;
  animation-delay: 8s;
}

@keyframes geometricFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }

  25% {
    transform: translateY(-15px) rotate(90deg) scale(1.2);
  }

  50% {
    transform: translateY(-5px) rotate(180deg) scale(0.8);
  }

  75% {
    transform: translateY(-25px) rotate(270deg) scale(1.1);
  }
}

.login-wrapper {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-container {
  padding: 40px 30px;
}

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

.logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: white;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
  }
}

.logo i {
  color: white;
  animation: iconFloat 2s ease-in-out infinite;
}

@keyframes iconFloat {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-3px);
  }
}

h1 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.8rem;
  font-weight: 600;
}

.logo-section p {
  color: #666;
  font-size: 0.9rem;
}

.error-message,
.success-message {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-message {
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.success-message {
  background-color: #efe;
  color: #363;
  border: 1px solid #cfc;
}

.error-message i,
.success-message i {
  font-size: 1.1rem;
}

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

label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8d96a8;
  pointer-events: none;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.login-btn {
  width: 100%;
  padding: 12px 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.login-btn::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: left 0.5s;
}

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

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
  transform: translateY(0);
}

.forgot-password-trigger {
  width: 100%;
  margin-top: 2px;
  background: transparent;
  border: 0;
  color: #5563d7;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
  padding: 2px 0 6px;
}

.forgot-password-trigger:hover {
  color: #3e4bc2;
  text-decoration: underline;
}

.forgot-password-panel {
  margin-top: 12px;
  margin-bottom: 4px;
  border: 1px solid #d8ddf2;
  background: #f6f8ff;
  border-radius: 10px;
  padding: 12px;
}

.forgot-password-panel p {
  color: #4f5e89;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.forgot-send-btn {
  margin-top: 10px;
  font-size: 0.92rem;
  padding: 10px 12px;
}

.divider {
  position: relative;
  text-align: center;
  margin: 20px 0;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e6e9f3;
}

.divider span {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  padding: 0 10px;
  color: #7a8196;
  font-size: 0.86rem;
}

.register-link {
  text-align: center;
}

.register-link p {
  color: #697089;
  margin-bottom: 8px;
}

.register-link a {
  color: #4f5fe0;
  text-decoration: none;
  font-weight: 600;
}

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

.test-credentials {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  font-size: 0.9rem;
  color: #6c757d;
}

.test-credentials h4 {
  margin: 0 0 10px;
  color: #495057;
}

.login-links {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e1e5e9;
}

.login-links a {
  color: #667eea;
  text-decoration: none;
  font-size: 0.9rem;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.login-links a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
  .login-container {
    padding: 30px 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .logo {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
}

/* Loading Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}
