/* ===============================
   Base & Reset
================================ */
.register-popup,
.register-popup * {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* ===============================
   Popup Layout
================================ */
.register-popup {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9000;
}

.register-popup.active {
  display: flex;
}

/* ===============================
   Card
================================ */
.register-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 28px 26px;
  border-radius: 22px;
  background: linear-gradient(160deg, #1b002b, #0b0012);
  box-shadow: 0 25px 60px rgba(120, 0, 255, 0.45);
  margin-right: 3px;
  margin-left: 3px;
}

/* ===============================
   Buttons
================================ */

/* === Open Register Button (Idle Animation) === */

@keyframes floatBtn {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@keyframes shineAuto {
  0%   { left: -120%; }
  35%  { left: 120%; }
  100% { left: 120%; }
}

.open-register-btn {
  position: relative;
  padding: 8px 32px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6a00ff, #b76cff);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border: none;
  cursor: pointer;

  box-shadow: 0 12px 30px rgba(140, 0, 255, 0.6);
  overflow: hidden;

  /* idle animation */
  animation: floatBtn 3s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Shine layer */
.open-register-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 120%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );
  animation: shineAuto 4.5s ease-in-out infinite;
}

/* Hover */
.open-register-btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(160, 90, 255, 0.85);
  animation-play-state: paused;
}

.open-register-btn:hover::before {
  animation-play-state: paused;
}

/* ===============================
   Close Button
================================ */
.close-popup {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #6a00ff;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* ===============================
   Title
================================ */
.register-title {
  text-align: center;
  font-size: 26px;
  color: #e9c6ff;
}

/* ===============================
   Form Group
================================ */
.form-group {
  position: relative;
  width: 100%;
  margin-bottom: -10px;
}

/* ===============================
   Input & Select
================================ */
.form-group input,
.form-group select {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 54px;
  border-radius: 14px;
  border: 1px solid rgba(180, 80, 255, 0.35);
  background: #120018;
  color: #fff;
  font-size: 15px;
  outline: none;
}

/* ===============================
   Left Icon
================================ */
.input-icon {
  position: absolute;
  left: 18px;
  top: 65%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #c77dff;
  pointer-events: none;
}

/* ===============================
   Toggle Password Icon
================================ */
.togglePwd {
  position: absolute;
  right: 16px;
  top: 65%;
  transform: translateY(-50%);
  font-size: 18px;
  background: none;
  border: none;
  color: #d18bff;
  cursor: pointer;
}

/* ===============================
   Register Button (Idle Animation)
================================ */

@keyframes idleGlow {
  0% {
    box-shadow: 0 10px 30px rgba(140, 0, 255, 0.45);
    background-position: 0% 50%;
  }
  50% {
    box-shadow: 0 18px 45px rgba(180, 120, 255, 0.85);
    background-position: 100% 50%;
  }
  100% {
    box-shadow: 0 10px 30px rgba(140, 0, 255, 0.45);
    background-position: 0% 50%;
  }
}

.btn-register {
  position: relative;
  width: 100%;
  height: 52px;
  margin-top: 20px;
  border-radius: 18px;
  border: none;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;

  background: linear-gradient(
    135deg,
    #6a00ff,
    #b76cff,
    #6a00ff
  );
  background-size: 200% 200%;

  box-shadow: 0 10px 30px rgba(140, 0, 255, 0.55);
  overflow: hidden;

  animation: idleGlow 3s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-register:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(180, 120, 255, 0.9);
  animation-play-state: paused;
}

.btn-register:active {
  transform: scale(0.97);
}

/* ปุ่มสมัครปกติ */
#submitRegister{
    transition: all 0.3s ease;
}

/* ตอนกำลังสมัคร */
#submitRegister.is-loading{
    opacity: 0.6;
    cursor: not-allowed;
}
