html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: url(../img/blur-background09.jpg) no-repeat center center fixed;
  background-size: cover;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  transition: background-position 0.3s ease;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(1px);
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 20px;
  position: relative;
  z-index: 1;
  display: block !important;
}

.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.card-header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  text-align: center;
  padding: 30px 20px;
  border-bottom: none;
}

.login-brand img {
  max-width: 200px;
  height: auto;
}

.card-body {
  padding: 40px 30px;
  min-height: 300px;
  display: block;
}

.card-body h4 {
  color: #333;
  font-weight: 600;
  margin-bottom: 30px;
  text-align: center;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  font-weight: 500;
  color: #555;
  margin-bottom: 8px;
  display: block;
}

.form-control {
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #4facfe;
  box-shadow: 0 0 0 0.2rem rgba(79, 172, 254, 0.25);
  outline: none;
}

.input-group-text {
  background-color: #f8f9fa;
  border: 2px solid #e1e5e9;
  border-left: none;
  border-radius: 0 10px 10px 0;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  transition: all 0.3s ease;
}

.form-control:focus + .input-group-append .input-group-text {
  border-color: #4facfe;
  background-color: #e3f2fd;
  color: #4facfe;
}

.input-group .form-control {
  border-radius: 10px 0 0 10px;
  border-right: none;
}

.input-group .form-control:focus {
  border-right: none;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.btn {
  border-radius: 10px;
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: none;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.typing-effect {
  border-right: 2px solid #4facfe;
  animation: blink 1s infinite;
  white-space: nowrap;
  overflow: hidden;
}

@keyframes blink {
  0%, 50% {
    border-color: #4facfe;
  }
  51%, 100% {
    border-color: transparent;
  }
}

.alert {
  border-radius: 10px;
  border: none;
  margin-top: 20px;
}

.invalid-feedback {
  display: none;
  color: #dc3545;
  font-size: 14px;
  margin-top: 5px;
}

/* Input groups para iconos de login */
.input-group-text {
  background: linear-gradient(135deg, #36b9cc 0%, #258391 100%);
  border: none;
  color: white;
  border-radius: 0 10px 10px 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
}

.input-group-text:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(54, 185, 204, 0.3);
}

.input-group .form-control {
  border-radius: 10px 0 0 10px;
  border-right: none;
}

.input-group .form-control:focus + .input-group-append .input-group-text {
  border-color: #4facfe;
  background-color: #e3f2fd;
  color: #4facfe;
}

.was-validated .form-control:invalid {
  border-color: #dc3545;
}

.was-validated .form-control:invalid ~ .invalid-feedback {
  display: block;
}

@media (max-width: 576px) {
  .container {
    padding: 10px;
  }

  .card-body {
    padding: 30px 20px;
  }

  .card-header {
    padding: 20px;
  }

  .login-brand img {
    max-width: 150px;
  }
}