* {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(-45deg, #667eea, #764ba2, #3b82f6, #8b5cf6);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: gradientBG 15s ease infinite;
  background-size: 400% 400%;
  position: relative;
  overflow: hidden;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 20s infinite;
  z-index: 0;
}

.shape1 {
  width: 300px;
  height: 300px;
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}

.shape2 {
  width: 400px;
  height: 400px;
  bottom: -200px;
  right: -200px;
  animation-delay: 5s;
}

.shape3 {
  width: 200px;
  height: 200px;
  top: 50%;
  right: 10%;
  animation-delay: 10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }

  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }

  100% {
    transform: translate(0, 0) rotate(360deg);
  }
}

.login-container {
  max-width: 420px;
  width: 100%;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.brand {
  text-align: center;
  margin-bottom: 40px;
  perspective: 1000px;
}

.brand-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 30px 40px -15px rgba(0, 0, 0, 0.4);
  animation: floatIcon 3s ease-in-out infinite;
  transform-style: preserve-3d;
  position: relative;
}

.brand-icon::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

@keyframes floatIcon {
  0% {
    transform: translateY(0px) rotateY(0deg);
  }

  50% {
    transform: translateY(-10px) rotateY(10deg);
  }

  100% {
    transform: translateY(0px) rotateY(0deg);
  }
}

.brand-icon i {
  font-size: 48px;
  color: white;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
  animation: spin 10s linear infinite;
}

@keyframes spin {
  from {
    transform: rotateY(0deg);
  }

  to {
    transform: rotateY(360deg);
  }
}

.brand h1 {
  color: white;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 5px;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.5s ease 0.2s both;
}

.brand p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  margin: 0;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  animation: slideInLeft 0.5s ease 0.3s both;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.login-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 40px;
  padding: 40px;
  box-shadow:
    0 40px 60px -20px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transform: perspective(1000px) rotateX(0deg);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: cardAppear 0.8s ease 0.4s both;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: perspective(1000px) rotateX(-10deg) translateY(30px);
  }

  to {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) translateY(0);
  }
}

.login-card:hover {
  transform: perspective(1000px) rotateX(2deg) translateY(-5px);
  box-shadow:
    0 50px 80px -20px rgba(0, 0, 0, 0.5),
    0 0 0 2px rgba(255, 255, 255, 0.2) inset;
}

.form-group {
  margin-bottom: 25px;
  animation: formAppear 0.5s ease;
  animation-fill-mode: both;
}

.form-group:nth-child(1) {
  animation-delay: 0.5s;
}

.form-group:nth-child(2) {
  animation-delay: 0.6s;
}

@keyframes formAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group label {
  display: block;
  color: white;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.input-group {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s;
  backdrop-filter: blur(5px);
}

.input-group:focus-within {
  border-color: white;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
}

.input-group-prepend .input-group-text {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 15px 0 15px 20px;
}

.form-control {
  background: transparent;
  border: none;
  padding: 15px 20px;
  color: white;
  font-size: 15px;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
  background: transparent;
  box-shadow: none;
  color: white;
}

.password-toggle {
  display: flex;
  align-items: center;
  padding-right: 20px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s;
}

.password-toggle:hover {
  color: white;
  transform: scale(1.1);
}

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  border: none;
  padding: 16px;
  border-radius: 20px;
  color: white;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.2px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
  background-size: 200% 100%;
  background-position: 0% 0%;
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.3);
  animation: buttonAppear 0.5s ease 0.7s both;
}

@keyframes buttonAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
  z-index: 1;
}

.btn-login:hover {
  background-position: 100% 0%;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.4);
}

.btn-login:hover::before {
  width: 400px;
  height: 400px;
}

.btn-login i {
  margin-right: 10px;
  transition: transform 0.3s;
}

.btn-login:hover i {
  transform: translateX(5px);
}

.btn-login:active {
  transform: translateY(-1px) scale(0.98);
}

.alert {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  color: white;
  padding: 15px 20px;
  font-size: 14px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  backdrop-filter: blur(5px);
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-1px);
  }

  20%,
  80% {
    transform: translateX(2px);
  }

  30%,
  50%,
  70% {
    transform: translateX(-4px);
  }

  40%,
  60% {
    transform: translateX(4px);
  }
}

.alert i {
  margin-right: 12px;
  font-size: 20px;
}

.alert .close {
  color: white;
  opacity: 0.8;
  text-shadow: none;
}

.security-badge {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  animation: badgeAppear 0.5s ease 0.8s both;
}

@keyframes badgeAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.security-badge small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.security-badge i {
  color: #10b981;
  animation: shieldPulse 2s ease-in-out infinite;
}

@keyframes shieldPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px #10b981);
  }

  100% {
    transform: scale(1);
  }
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 30px 20px;
  }

  .brand-icon {
    width: 80px;
    height: 80px;
  }

  .brand-icon i {
    font-size: 40px;
  }

  .brand h1 {
    font-size: 28px;
  }

  .shape1 {
    width: 200px;
    height: 200px;
  }

  .shape2 {
    width: 300px;
    height: 300px;
  }

  .shape3 {
    width: 150px;
    height: 150px;
  }
}

.login-card {
  position: relative;
  overflow: hidden;
}

.login-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shine 3s infinite;
  pointer-events: none;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}
