/* @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"); */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  /* background: #252432; */
  background-image: url('https://natchal.ttv-supplychain.com/mmth/assets/bg_mmth.png'); /* ใส่ URL ของภาพจากเว็บภายนอก */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  height: 100vh;
  margin: 0;
}

@property --a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.box {
  position: relative;
  width: 400px;
  height: 200px;
  background: repeating-conic-gradient(
    from var(--a),
    #E7001E 0%,
    #E7001E 5%,
    transparent 5%,
    transparent 40%,
    #E7001E 50%
  );
  filter: drop-shadow(0 15px 50px #000);
  animation: rotating 4s linear infinite;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.5s;
}

.box:hover {
  width: 450px;
  height: 500px;
}

@keyframes rotating {
  0% {
    --a: 0deg;
  }
  100% {
    --a: 360deg;
  }
}

.box::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: repeating-conic-gradient(
    from var(--a),
    #45f3ff 0%,
    #45f3ff 5%,
    transparent 5%,
    transparent 40%,
    #45f3ff 50%
  );
  filter: drop-shadow(0 15px 50px #000);
  border-radius: 20px;
  animation: rotating 4s linear infinite;
  animation-delay: -1s;
}

.box::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: #2d2d39;
  border-radius: 15px;
  border: 8px solid #25252b;
}

.login {
  position: absolute;
  inset: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.4); /* ลดความทึบของพื้นหลัง */
  z-index: 1000;
  box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  transition: 0.5s;
  color: #fff;
  overflow: hidden;
}

.box:hover .login {
  inset: 40px;
}

.loginBx {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transform: translateY(105px);
  gap: 20px;
  width: 70%;
  transition: 0.5s;
}

.box:hover .loginBx {
  transform: translateY(0px);
}

.loginBx h2 {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
}

.loginBx h2 i {
  color: #E7001E;
  text-shadow: 0 0 5px #E7001E, 0 0 30px #E7001E;
}

.loginBx input {
  width: 100%;
  padding: 10px 20px;
  outline: none;
  font-size: 1em;
  color: #fff;
  background: rgba(0, 0, 0, 0.1);
  border: 2px solid #fff;
  border-radius: 10px;
}

.loginBx input::placeholder {
  color: #999;
}

.loginBx input[type="submit"] {
  background: #45f3ff;
  color: #111;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: 0.5s;
  margin-bottom: 10%;
}

.loginBx input[type="submit"]:hover {
  box-shadow: 0 0 10px #45f3ff, 0 0 60px #45f3ff;
}
/* 
.group {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

.group a {
  color: #fff;
  text-decoration: none;
}

.group a:nth-child(2) {
  color: #E7001E;
  font-weight: 600;
} */


.loader {
  display: flex;
}

.loader .dot {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  border: 2px solid #e8e8e8;
  background: #E7001E;
  animation: jump 0.8s ease-in-out infinite alternate;
}

@keyframes jump {
  100% {
      background: #45f3ff;
      transform: translateZ(-3rem) scale(1.9);
  }
}

.loader .dot:nth-child(1) {
  animation-delay: 0.1s;
}

.loader .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loader .dot:nth-child(3) {
  animation-delay: 0.3s;
}

.loader .dot:nth-child(4) {
  animation-delay: 0.4s;
}

.loader .dot:nth-child(5) {
  animation-delay: 0.5s;
}


.text {
  display: inline-block;
  position: relative;
  font-size: 2.5rem;
  font-family: "Dangrek", serif;
  cursor: pointer;
  color: #e8e8e8;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.text::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  color: transparent;
  background: linear-gradient(to right,
          #E7001E, #45f3ff);
  background-clip: text;
  transition: width 0.3s;
}

.box:hover .text::before {
  width: 100%;
}