:root {
  --primary-color: #4a90e2;
  --secondary-color: #2c3e50;
  --error-color: #e74c3c;
  --success-color: #2ecc71;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
  backdrop-filter: blur(10px);
}

.login-container h1 {
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2em;
  position: relative;
}

.login-container h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
  outline: none;
}

button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button[type="submit"]:hover {
  background: #357abd;
  transform: translateY(-2px);
}

button[type="submit"]:active {
  transform: translateY(0);
}

.error {
  background: rgba(231, 76, 60, 0.1);
  color: var(--error-color);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border-left: 4px solid var(--error-color);
  animation: shake 0.5s ease-in-out;
}

.register-link {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--secondary-color);
}

.register-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.register-link a:hover {
  color: #357abd;
  text-decoration: underline;
}

.captcha-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Responsive Design */
@media (max-width: 480px) {
  .login-container {
    margin: 1rem;
    padding: 1.5rem;
  }

  .login-container h1 {
    font-size: 1.5em;
  }
}

/* Loading effect for button */
button[type="submit"]::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 300%;
  background: rgba(255, 255, 255, 0.2);
  top: -100%;
  left: -100%;
  transform: rotate(45deg);
  transition: all 0.3s ease;
}

button[type="submit"]:hover::after {
  left: 100%;
}

.success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Thêm style cho trang xác thực 2FA */
.login-container p {
    margin-bottom: 20px;
    color: #666;
    text-align: center;
}

input[type="text"][name="2fa_code"] {
    letter-spacing: 4px;
    font-family: monospace;
    font-size: 1.2em;
    text-align: center;
}
.additional-links {
  margin-top: 20px;
  text-align: center;
}

.additional-links a {
  color: #666;
  text-decoration: none;
  margin: 0 10px;
}

.additional-links a:hover {
  text-decoration: underline;
  color: #333;
}

.forgot-password {
  float: left;
}

.register {
  float: right;
}