@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ---------- Global styles ---------- */
body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  background: #000;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Modern Animated Background */
body::before {
  content: '';
  position: absolute;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 15% 50%, #1a0b2e 0%, #000 50%),
    radial-gradient(circle at 85% 30%, #0c1220 0%, #000 50%);
  z-index: -1;
}

body::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: conic-gradient(from 180deg at 50% 50%, #6366f1 0deg, #a855f7 180deg, #6366f1 360deg);
  filter: blur(120px);
  opacity: 0.15;
  animation: spinBlob 20s linear infinite;
  z-index: -1;
  border-radius: 50%;
}

@keyframes spinBlob {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.2);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

/* ---------- Container ---------- */
.login-container {
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

.login-box {
  background: rgba(20, 20, 25, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Top Accent Line */
.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #d946ef);
}

.login-box:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ---------- Logo ---------- */
.logo {
  margin-bottom: 30px;
}

.logo .icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #fff, #a5b4fc);
  mask: url('https://cdn-icons-png.flaticon.com/512/2965/2965278.png') center / contain no-repeat;
  margin: 0 auto;
}

/* ---------- Title ---------- */
h2 {
  margin-bottom: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}

p.subtitle {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 32px;
}

/* ---------- Error ---------- */
.error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* ---------- Input fields ---------- */
.input-group {
  text-align: left;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 8px;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  transition: all 0.2s;
}

.input-group input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.4);
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* ---------- Button ---------- */
button {
  width: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  border-radius: 12px;
  padding: 16px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
  margin-top: 10px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(99, 102, 241, 0.5);
  filter: brightness(1.1);
}

button:active {
  transform: scale(0.98);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .login-box {
    padding: 30px 24px;
  }
}

background: linear-gradient(135deg, #2a0845, #6441A5);
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}

/* ---------- Container ---------- */
.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-box {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  padding: 40px 30px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  text-align: center;
  transition: all 0.3s ease-in-out;
}

.login-box:hover {
  transform: translateY(-3px);
}

/* ---------- Logo ---------- */
.logo .icon {
  width: 60px;
  height: 60px;
  background: #fff;
  mask: url('https://cdn-icons-png.flaticon.com/512/1041/1041916.png') center / contain no-repeat;
  margin: 0 auto 20px;
  opacity: 0.85;
}

/* ---------- Title ---------- */
h2 {
  margin-bottom: 25px;
  color: #fff;
  font-weight: 600;
}

/* ---------- Error ---------- */
.error {
  background: rgba(255, 0, 0, 0.2);
  color: #ffb3b3;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 15px;
}

/* ---------- Input fields ---------- */
.input-group {
  text-align: left;
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 14px;
  color: #ddd;
  margin-bottom: 6px;
}

.input-group input {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: 0.2s;
}

.input-group input:focus {
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- Button ---------- */
button {
  width: 100%;
  background: #7a4de0;
  border: none;
  border-radius: 8px;
  padding: 12px;
  color: white;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #9c6df3;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .login-box {
    padding: 30px 20px;
  }

  h2 {
    font-size: 20px;
  }
}