* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f8f9fc 0%, #eef0f5 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Animated background */
.bg-elements {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1; overflow: hidden;
}
.bg-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.4;
  animation: float 12s infinite ease-in-out, colorShift 8s infinite alternate;
}
.bg-circle:nth-child(1) {
  width: 300px; height: 300px; top: -80px; left: -80px;
  background: rgba(122,17,40,0.25);
  animation-delay: 0s;
}
.bg-circle:nth-child(2) {
  width: 220px; height: 220px; bottom: -60px; right: -60px;
  background: rgba(255, 215, 0, 0.25);
  animation-delay: 3s;
}
.bg-circle:nth-child(3) {
  width: 200px; height: 200px; top: 40%; left: 25%;
  background: rgba(160,26,58,0.25);
  animation-delay: 5s;
}
@keyframes float {
  0%,100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-20px) scale(1.05); }
  50% { transform: translateY(15px) scale(0.95); }
  75% { transform: translateY(-10px) scale(1.1); }
}
@keyframes colorShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Login box with glowing border */
.login-container {
  width: 100%;
  max-width: 350px;
  background: #fff;
  border-radius: 18px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.login-container::before {
  content: "";
  position: absolute; inset: 0;
  padding: 3px; /* border thickness */
  border-radius: 18px;
  background: linear-gradient(270deg, #7a1128, #a01a3a, #ffd700, #7a1128);
  background-size: 400% 400%;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderMove 6s linear infinite;
  z-index: -1;
}

@keyframes borderMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.login-header { text-align: center; margin-bottom: 25px; }
.login-header h1 {
  font-size: 22px; font-weight: 600; color: #7a1128;
  margin-bottom: 5px;
}
.login-header p { color: #666; font-size: 13px; }

.login-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 55px; height: 55px;
  background: #7a1128; color: white;
  border-radius: 50%; margin-bottom: 15px;
  font-size: 22px;
  box-shadow: 0 5px 12px rgba(122,17,40,0.25);
}

.form-group { margin-bottom: 18px; position: relative; }
.form-control {
  width: 100%; padding: 12px 15px;
  border: 2px solid #eaeaea;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fcfcfc;
}
.form-control:focus {
  border-color: #7a1128;
  box-shadow: 0 0 0 3px rgba(122,17,40,0.1);
  background: #fff;
  outline: none;
}
.toggle-password {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: #888; cursor: pointer; font-size: 14px;
}

.remember-forgot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; margin: 15px 0;
}
.forgot-password { color: #7a1128; text-decoration: none; font-weight: 500; }
.forgot-password:hover { text-decoration: underline; }

.login-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(to right, #7a1128, #a01a3a);
  color: #fff; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.3s ease;
}
.login-btn:hover {
  background: linear-gradient(to right, #8a1330, #b02040);
  transform: translateY(-2px);
}

.login-footer {
  text-align: center; font-size: 12px; margin-top: 20px;
  color: #777;
}
.login-footer a { color: #ffd700; text-decoration: none; font-weight: 500; }
.login-footer a:hover { color: #ffeb80; }

/* Error message styling */
.error-message {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 5px;
  text-align: center;
}

/* Add security indicators */
.login-container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Error message styling */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* Loading spinner */
.login-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}