@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --primary-color: #337c9d;
  --secondary-color: #337c9d;
  --text-primary: #1a2a33;
  --text-secondary: #4e6a7a;
  --background: #eaf3f8;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(51, 124, 157, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
a {
  text-decoration: none;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.loading-card {
  background-color: var(--white);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  z-index: 10;
  transition: all 0.5s ease;
}

.logo-area {
  margin-bottom: 30px;
}

.logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.spinner-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 30px;
}

.spinner-outer {
  width: 100px;
  height: 100px;
  border: 4px solid rgba(51, 124, 157, 0.1);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  animation: spin 1.5s linear infinite;
  position: absolute;
  top: 0;
  left: 0;
}

.spinner-middle {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(51, 124, 157, 0.15);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  animation: spin 2s linear infinite;
  position: absolute;
  top: 10px;
  left: 10px;
}

.spinner-inner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(51, 124, 157, 0.2);
  border-radius: 50%;
  border-top: 4px solid var(--primary-color);
  animation: spin 2.5s linear infinite;
  position: absolute;
  top: 20px;
  left: 20px;
}

.countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.loading-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.loading-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.6;
}

.progress-container {
  width: 100%;
  height: 8px;
  background-color: rgba(51, 124, 157, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 10px;
  transition: width 0.2s ease;
}

.background-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
}

.shape-1 {
  width: 80px;
  height: 80px;
  background-color: rgba(51, 124, 157, 0.2);
  top: 10%;
  left: 15%;
  animation: float 6s infinite alternate;
}

.shape-2 {
  width: 120px;
  height: 120px;
  background-color: rgba(51, 124, 157, 0.2);
  bottom: 15%;
  right: 10%;
  animation: float 8s infinite alternate-reverse;
}

.shape-3 {
  width: 60px;
  height: 60px;
  background-color: rgba(51, 124, 157, 0.2);
  bottom: 10%;
  left: 20%;
  animation: float 7s infinite alternate;
}

.shape-4 {
  width: 100px;
  height: 100px;
  background-color: rgba(51, 124, 157, 0.2);
  top: 15%;
  right: 20%;
  animation: float 9s infinite alternate-reverse;
}

.cancel-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.cancel-link:hover {
  color: var(--primary-color);
}

.error-message {
  display: none;
  color: #dc3545;
  margin-top: 15px;
  font-size: 14px;
}

/* Nút chuyển hướng */
.redirect-button {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(51, 124, 157, 0.25);
  opacity: 0;
  animation: fadeIn 0.5s ease-in-out forwards;
  animation-delay: calc(var(--index) * 0.3s);
  margin: 20px 5px 0 5px;
}

.redirect-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(51, 124, 157, 0.35);
}

.redirect-button:active {
  transform: translateY(1px);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(30px) rotate(180deg);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.background-logo {
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  bottom: 0;
  min-width: 45rem;
  min-height: 5rem;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
  pointer-events: none;
  filter: blur(2px) brightness(0.7);
}

@media (max-width: 600px) {
  .loading-card {
    padding: 30px 20px;
    width: 90%;
    margin: 0 auto;
  }

  .spinner-container {
    width: 80px;
    height: 80px;
  }

  .spinner-outer {
    width: 80px;
    height: 80px;
  }

  .spinner-middle {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
  }

  .spinner-inner {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
  }

  .countdown {
    font-size: 22px;
  }

  .loading-title {
    font-size: 20px;
  }

  .background-logo {
    width: 20rem;
    height: 7rem;
  }
  .redirect-button {
    font-size: 16px;
    font-weight: 600;
    padding: 10px 14px;
  }
}

.background-video {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
  pointer-events: none;
  filter: blur(2px) brightness(0.7);
}
