@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

html, body {
  height: 100%;
  width: 100%;
  background: #8d0000;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-x: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-grow: 1;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.body-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://upload.wikimedia.org/wikipedia/commons/1/16/Tr%E1%BB%91ng_%C4%91%E1%BB%93ng_%C4%90%C3%B4ng_S%C6%A1n.svg') center bottom no-repeat;
  background-size: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.08;
}

.header {
  position: fixed;
  top: 3vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.header-logo {
  width: 240px;
  position: relative;
  z-index: 2;
}

.login-box {
  display: flex;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  color: #333;
  overflow: hidden;
  flex-wrap: wrap;
  z-index: 2;
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  margin-top: calc(30vh + 60px);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  flex: 1 1 300px;
  padding: 40px 50px;
}

.login-form h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #222;
}

.login-form p {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.login-form label {
  font-weight: 600;
  font-size: 14px;
  color: #666;
  display: block;
  margin-bottom: 8px;
}

.login-form input[type="text"] {
  border: 1px solid #ccc;
  border-radius: 6px;
  height: 44px;
  padding: 0 15px;
  font-size: 16px;
  outline: none;
  width: 100%;
  margin-bottom: 20px;
}

.login-form input[type="text"]:focus {
  border-color: #cc0000;
}

.btn-login {
  background: #cc0000;
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  height: 48px;
  cursor: pointer;
  font-size: 18px;
  transition: background-color 0.3s;
  width: 100%;
}

.btn-login:hover {
  background: #ff0000;
}

.activation-text {
  font-size: 13px;
  color: #999;
  margin-top: 12px;
  text-align: center;
}

.footer {
  background-color: #fff;
  border-top: 2px solid #cc0000;
  text-align: center;
  padding: 10px 0;
  font-size: 12px;
  color: #333;
  position: relative;
  z-index: 2;
  margin-top: 30px;
}

.ketqua {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    text-align: center;
}

.ketqua.err {
    background-color: #ffe0e0;
    border: 1px solid #d00000;
    color: #a00000;
}

.loading {
    display: inline-block;
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

@media (max-width: 768px) {
  .login-box {
    margin-top: calc(25vh + 60px);
    padding: 30px 20px;
  }
}

@media (max-width: 400px) {
  .login-form {
    padding: 25px 20px;
  }
  .header-logo {
    width: 180px;
  }
  .login-box {
    margin-top: calc(28vh + 60px);
  }
}