* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 2;
}

/* Animated Background */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.floating-shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  animation: float 15s infinite ease-in-out;
}

.shape-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 150px;
  height: 150px;
  top: 20%;
  right: 15%;
  animation-delay: 3s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 6s;
}

.shape-4 {
  width: 120px;
  height: 120px;
  bottom: 30%;
  right: 10%;
  animation-delay: 9s;
}

.shape-5 {
  width: 80px;
  height: 80px;
  top: 50%;
  left: 50%;
  animation-delay: 12s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  25% {
    transform: translateY(-20px) rotate(90deg);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-40px) rotate(180deg);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-20px) rotate(270deg);
    opacity: 0.8;
  }
}

/* Login Card */
.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: slideUp 0.8s ease-out;
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-header {
  text-align: center;
  padding: 40px 40px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.logo-container {
  margin-bottom: 24px;
}

.logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

.welcome-title {
  font-size: 32px;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 16px;
  color: #64748b;
  font-weight: 400;
  line-height: 1.5;
}

.card-body {
  padding: 20px 40px 40px;
}

/* Alert Styles */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  position: relative;
}

.alert-error {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fca5a5;
  color: #dc2626;
}

.alert-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-content {
  flex: 1;
}

.alert-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.alert-message {
  font-size: 14px;
  opacity: 0.9;
}

.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.alert-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.login-form {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  transition: all 0.3s ease;
  z-index: 10;
}

.input-wrapper.focused {
  transform: translateY(-2px);
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  transition: all 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.input-wrapper.focused .input-icon {
  color: #667eea;
}

.form-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  background: #ffffff;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
  position: relative;
  z-index: 5;
}

.form-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.3s ease;
  padding: 4px;
  border-radius: 6px;
  z-index: 6;
}

.password-toggle:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

/* Login Button */
.login-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.card-footer {
  padding: 24px 40px;
  background: rgba(248, 250, 252, 0.8);
  border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.security-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #64748b;
}

.security-info svg {
  color: #10b981;
}

.copyright {
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-container {
    padding: 16px;
  }

  .login-card {
    border-radius: 20px;
  }

  .card-header {
    padding: 32px 24px 16px;
  }

  .card-body {
    padding: 16px 24px 32px;
  }

  .card-footer {
    padding: 20px 24px;
  }

  .welcome-title {
    font-size: 28px;
  }

  .welcome-subtitle {
    font-size: 15px;
  }

  .logo {
    width: 70px;
    height: 70px;
  }

  .floating-shape {
    opacity: 0.5;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 12px;
  }

  .card-header {
    padding: 24px 20px 12px;
  }

  .card-body {
    padding: 12px 20px 24px;
  }

  .card-footer {
    padding: 16px 20px;
  }

  .welcome-title {
    font-size: 24px;
  }

  .form-input {
    padding: 14px 14px 14px 44px;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .login-btn {
    padding: 14px 20px;
    font-size: 15px;
  }

  .floating-shape {
    display: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .login-card {
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
  }

  .welcome-title {
    color: #f1f5f9;
  }

  .welcome-subtitle {
    color: #94a3b8;
  }

  .form-label {
    color: #e2e8f0;
  }

  .form-input {
    background: rgba(51, 65, 85, 0.8);
    border-color: #475569;
    color: #f1f5f9;
  }

  .form-input::placeholder {
    color: #64748b;
  }

  .card-footer {
    background: rgba(15, 23, 42, 0.8);
    border-top-color: rgba(71, 85, 105, 0.5);
  }
}