* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Prompt', sans-serif;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* ✅ สีดำจางๆ */
  z-index: -1; /* อยู่ระหว่างวิดีโอกับเนื้อหา */
}

video.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: -2; /* ✅ ลึกกว่า overlay */
}

.register-box {
  width: 900px;
  max-width: 95%;
  background: rgba(0,0,0,0.75);
  border-radius: 20px;
  display: flex;
  overflow: visible;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  position: relative;
}

.left {
  width: 50%;
  background: url('../img/bg-left.jpg') center no-repeat;
  background-size: cover;
  position: relative;
  overflow: visible;
}

.left2 {
  width: 50%;
  background: url('../img/bg-left2.jpg') center no-repeat;
  background-size: cover;
  position: relative;
  overflow: visible;
}

.character-floating {
  position: absolute;
  bottom: 10%;
  left: 40%;
  transform: translateX(-50%);
  animation: floatUpDown 3s ease-in-out infinite;
  max-width: 80%;
  pointer-events: none;
}

.character-floating2 {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  animation: floatUpDown 3s ease-in-out infinite;
  max-width: 80%;
  pointer-events: none;
}

@keyframes floatUpDown {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-20px);
  }
}

.right {
  width: 50%;
  background: #111;
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.right img.logo {
  width: 180px;
  margin: 0 auto 5px;
  display: block;
}

.right h2 {
  text-align: center;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: none;
  background: #222;
  color: white;
  font-size: 16px;
}

.form-group select,
.form-group input[type="date"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: none;
  background: #222;
  color: white;
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* ลูกศร dropdown สำหรับ select */
.form-group select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

/* ปิดปุ่มปฏิทินในบางเบราว์เซอร์ (optional) */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1); /* เปลี่ยนเป็นสีขาว */
}

.form-group input::placeholder {
  color: #aaa;
}

.form-group i {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: #aaa;
  cursor: pointer;
}

button {
  width: 100%;
  background: #00aaff;
  border: none;
  padding: 14px;
  font-size: 16px;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.login-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.login-link a {
  color: rgb(0, 204, 255);
  text-decoration: none;
}

.login-link a:hover {
  text-decoration: underline;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 16px;
  height: 70px;
  width: 100%;
  max-width: 400px;
  font-size: 18px;
  font-weight: bold;
  color: rgb(255, 255, 255);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.85);
  border-radius: 16px;
  border: 1px solid #FFCC3C;
  background: linear-gradient(to bottom, rgba(232, 147, 50, 0.5) 0%, rgba(245, 203, 16, 0.5) 100%), url('../img/btn-bg.jpg');
  background-position: center center;
  background-size: 430px;
  box-shadow:
    inset 0 -2px 24px 0 #ffd943,
    0 0 34px 0 rgba(255, 144, 0, 0.85);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover {
  transform: scale(1.03);
  box-shadow:
    inset 0 -2px 28px 0 #ffdd55,
    0 0 38px 0 rgba(255, 144, 0, 1);
}

.login-btn .icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}


.register-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 16px;
  height: 70px;
  width: 100%;
  max-width: 400px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.85);
  border-radius: 16px;
  border: 1px solid #FFCC3C;
  background: linear-gradient(to bottom, rgba(232, 194, 50, 0.5) 0%, rgba(245, 131, 16, 0.5) 100%), url('../img/btn-bg-yellow.jpg');
  background-position: center center;
  background-size: 430px;
  box-shadow:
    inset 0 -2px 24px 0 #ffd943,
    0 0 34px 0 rgba(255, 144, 0, 0.85);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.register-btn:hover {
  transform: scale(1.03);
  box-shadow:
    inset 0 -2px 28px 0 #ffdd55,
    0 0 38px 0 rgba(255, 144, 0, 1);
}

.register-btn .icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.checkbox-group {
  margin: 15px 0 20px;
  font-size: 14px;
  color: #ccc;
}

.checkbox-group .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.6;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ffaa00;
  cursor: pointer;
}

.checkbox-group a {
  color: #00ccff;
  text-decoration: underline;
}

.checkbox-group a:hover {
  text-decoration: none;
  color: #33ddff;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: #111;
  padding: 20px 30px;
  border-radius: 12px;
  color: #fff;
  max-width: 500px;
  box-shadow: 0 0 20px #000;
  text-align: left;
  line-height: 1.6;
}

.modal-actions {
  text-align: right;
  margin-top: 20px;
}

.modal-actions button {
  background: #ffaa00;
  color: #000;
  padding: 8px 16px;
  margin-left: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* === Widen only the Terms modal === */
#terms-modal .modal-content {
  width: min(960px, 94vw);  /* กว้างสุด ~960px หรือ 94% ของจอ */
  max-width: none;          /* ทับค่าเดิม 500px */
  max-height: 85vh;         /* อ่านยาวๆ แต่ไม่ล้นจอ */
  padding: 24px 28px;       /* เผื่อระยะขอบให้อ่านง่าย */
  border-radius: 16px;
}

/* header/ปุ่มปิดดูสบายขึ้น (ออปชัน) */
#terms-modal h2 { font-size: 20px; margin: 6px 0; }
#terms-modal h3 { font-size: 18px; margin: 14px 0 8px; color: #ffcc00; }

/* footer ปุ่มให้ติดขอบล่างเวลาเลื่อน (ออปชัน) */
#terms-modal .modal-actions {
  position: sticky;
  bottom: 0;
  background: rgba(17,17,17,.95);
  margin: 16px -28px -24px;
  padding: 12px 28px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

#terms-modal .terms-close{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;  /* ขนาดกากบาท */
  line-height: 1;   /* กันดันแนวตั้ง */
  cursor: pointer;
  transition: transform .08s ease, background .2s;
}
#terms-modal .terms-close:hover{ background: rgba(255,255,255,.06); transform: translateY(-1px); }
#terms-modal .terms-close:focus-visible{ outline: 2px solid #00ccff; outline-offset: 2px; }
/* ถ้าอยากจูนละเอียดอีกนิด */
#terms-modal .terms-close span{ display:block; transform: translateY(-0.5px); }


/* มือถือยังคงเต็มจอเป็นหลัก */
@media (max-width: 768px){
  #terms-modal .modal-content {
    width: 94vw;
    max-height: 90vh;
    padding: 16px;
  }
  #terms-modal h3 { font-size: 16px; }
}


.highlight-glow {
  animation: glow-pulse 1s ease-in-out infinite;
  box-shadow: 0 0 12px 3px #ffcc00;
  border-radius: 8px;
}


@keyframes glow-pulse {
  0%   { box-shadow: 0 0 5px 2px #ffaa00; }
  50%  { box-shadow: 0 0 20px 5px #ffcc00; }
  100% { box-shadow: 0 0 5px 2px #ffaa00; }
}


/* Responsive */
@media (max-width: 768px) {
  .register-box {
    flex-direction: column;
    height: auto;
  }

  .left {
    display: none;
  }

  .right {
    width: 100%;
    padding: 30px 20px;
  }

  .character-floating {
    display: none;
  }

  .left2 {
    display: none;
  }

  .character-floating2 {
    display: none;
  }
}
