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

body {
  background: linear-gradient(180deg, #0f0f1e 0%, #050508 100%);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Animated background decorations */
.bg-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}

.circle-1 {
  width: 400px;
  height: 400px;
  background: #5865f2;
  top: 10%;
  left: 10%;
  animation: float 6s ease-in-out infinite;
}

.circle-2 {
  width: 500px;
  height: 500px;
  background: #8b5cf6;
  bottom: 10%;
  right: 10%;
  animation: float 8s ease-in-out infinite;
  animation-delay: 1s;
}

.circle-3 {
  width: 300px;
  height: 300px;
  background: #5865f2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float 7s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-30px); }
}

/* Login container */
.login-container {
  text-align: center;
  position: relative;
  z-index: 10;
  animation: fadeIn 0.8s ease-out;
}

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

/* Card with glassmorphism effect */
.card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  padding: 50px 40px;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 400px;
}

.card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.15),
              0 0 60px rgba(88, 101, 242, 0.3);
  transform: translateY(-2px);
}

/* Animated gradient border */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  padding: 2px;
  background: linear-gradient(135deg, #5865f2, #8b5cf6, #5865f2);
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gradientShift 3s ease infinite;
  opacity: 0.5;
}

.card:hover::before {
  opacity: 0.8;
}

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

/* Logo icon */
.logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #5865f2, #8b5cf6);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: glowPulse 2s ease-in-out infinite;
}

.logo-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(88, 101, 242, 0.4); }
  50% { box-shadow: 0 0 40px rgba(88, 101, 242, 0.7); }
}

/* Title */
h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #8b9eff, #b690ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  margin-bottom: 40px;
  font-weight: 400;
}

/* Input wrapper */
.input-wrapper {
  position: relative;
  margin-bottom: 25px;
}

input {
  width: 100%;
  padding: 18px 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 16px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(88, 101, 242, 0.5);
  box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.1);
}

input:hover {
  border-color: rgba(88, 101, 242, 0.3);
}

.input-glow {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.3), rgba(139, 92, 246, 0.3));
  opacity: 0;
  filter: blur(20px);
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: -1;
}

input:focus + .input-glow {
  opacity: 1;
}

/* Button */
button {
  width: 100%;
  padding: 18px 32px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #5865f2, #8b5cf6);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-text {
  position: relative;
  z-index: 2;
}

.btn-arrow {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover .btn-arrow {
  transform: translateX(5px);
}

.btn-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8b5cf6, #5865f2);
  opacity: 0;
  transition: opacity 0.3s;
}

button:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
}

button:hover .btn-gradient {
  opacity: 1;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Message display */
#msg {
  margin-top: 20px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  min-height: 20px;
  transition: all 0.3s;
}

#msg:not(:empty) {
  animation: slideIn 0.4s ease-out;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

#msg.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

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

/* Security badge */
.security-badge {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.security-badge svg {
  width: 18px;
  height: 18px;
  color: #4ade80;
}

/* Footer text */
.footer-text {
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 500px) {
  .card {
    min-width: auto;
    padding: 40px 30px;
    margin: 0 20px;
  }
  
  h1 {
    font-size: 32px;
  }
  
  .circle-1, .circle-2, .circle-3 {
    width: 250px;
    height: 250px;
  }
}