/* css/register.css — โทนสีฟ้า-ชมพู Glass/Blur แบบเดียวกับ login */

*, *::before, *::after {
  box-sizing: border-box;
}

html { -webkit-text-size-adjust: 100%; }

html, body{ height: 100%; }
body{
  margin: 0;
  font-family: 'Sarabun', sans-serif;
  color: var(--text-color);
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* ป้องกัน scrollbar จาก bg-animation */
  padding: 15px;
}

.register-wrapper {
    z-index: 10;
    width: 100%;
    max-width: 500px; /* กว้างกว่า login นิดนึงเพื่อใส่ข้อความให้พอดี */
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    max-height: 100vh;
    overflow-y: auto;
}

/* Custom scrollbar for wrapper if it overflows vertically */
.register-wrapper::-webkit-scrollbar {
    width: 6px;
}
.register-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.auth-container {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(9, 14, 23, 0.9)); /* Glassmorphism */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.8), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin: auto;
}

.auth-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.9), 0 0 40px rgba(0, 210, 255, 0.15);
  border-color: rgba(0, 210, 255, 0.3);
}

.back-home-btn {
    position: absolute; top: 15px; right: 15px;
    color: var(--text-muted); opacity: 0.8; text-decoration: none;
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
    z-index: 20;
}
.back-home-btn:hover {
    background: rgba(255, 126, 179, 0.1);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: rotate(90deg);
}

.form-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.form-logo-img {
    width: 75px;
    height: 75px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 20px rgba(0, 210, 255, 0.3);
    margin-bottom: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255,255,255,0.05);
}

.form-logo-img:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6), 0 0 30px rgba(0, 210, 255, 0.5);
}

.form-title {
  margin: 0;
  font-size: 2.2rem;
  letter-spacing: 2px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
  font-family: 'Minecraft Ten', 'Kanit', sans-serif;
  text-transform: uppercase;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 25px;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ปรับแต่งส่วนแสดงวิธีการสมัครใหม่ให้ดูทันสมัย */
.register-instructions {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 25px 20px;
  margin-top: 20px;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

.register-instructions h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 15px;
  text-align: center;
  font-family: 'Kanit', sans-serif;
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.register-instructions ol {
  padding-left: 20px;
  color: #ccc;
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.register-instructions li {
  margin-bottom: 10px;
}

.command-box {
  background-color: #000;
  border: 1px dashed var(--primary-color);
  padding: 12px;
  border-radius: 10px;
  font-family: 'Courier New', Courier, monospace;
  color: var(--primary-color);
  margin: 15px 0;
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
  user-select: all; /* ทำให้คลุมดำง่าย */
}

.alert-note {
  background: rgba(255, 126, 179, 0.1);
  border: 1px solid rgba(255, 126, 179, 0.3);
  color: var(--accent-color);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: center;
}

.links{
  margin-top: 25px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.links a{
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
}
.links a:hover{
  text-decoration: underline;
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

/* Background elements */
.bg-animation {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; overflow: hidden; pointer-events: none;
}
.circle {
    position: absolute; border-radius: 50%;
    animation: floatBg 25s infinite ease-in-out alternate;
    filter: blur(40px);
}
.c1 { width: 700px; height: 700px; top: -200px; left: -200px; background: radial-gradient(circle, rgba(0, 210, 255, 0.15) 0%, transparent 70%); animation-delay: 0s; }
.c2 { width: 500px; height: 500px; bottom: -100px; right: -100px; background: radial-gradient(circle, rgba(255, 126, 179, 0.15) 0%, transparent 70%); animation-delay: -5s; }

@keyframes floatBg {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(50px, 30px) scale(1.1) rotate(10deg); }
    100% { transform: translate(-30px, 50px) scale(0.9) rotate(-5deg); }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  body {
    padding: 0;
    align-items: center;
  }
  .register-wrapper {
    padding: 15px;
    max-width: 100%;
  }
  .auth-container {
    padding: 30px 20px;
    border-radius: 20px;
  }
  .form-logo-img {
    width: 65px; height: 65px;
  }
  .form-title { font-size: 2rem; }
  .subtitle { font-size: 0.85rem; margin-bottom: 20px; }
  .register-instructions h3 { font-size: 1.1rem; }
  .register-instructions ol { font-size: 0.9rem; }
  .command-box { font-size: 1rem; padding: 10px; }
  .alert-note { font-size: 0.8rem; }
  .links { margin-top: 20px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .register-wrapper {
      padding: 10px;
  }
  .auth-container {
      padding: 25px 15px;
  }
  .form-logo-img {
      width: 55px; height: 55px;
      margin-bottom: 10px;
  }
  .form-title { font-size: 1.7rem; }
  .subtitle { font-size: 0.8rem; margin-bottom: 15px; }
  .register-instructions { padding: 15px 10px; }
  .register-instructions h3 { font-size: 1rem; }
  .register-instructions ol { font-size: 0.85rem; padding-left: 15px; }
  .command-box { font-size: 0.85rem; padding: 8px; letter-spacing: 0; }
  .alert-note { font-size: 0.75rem; padding: 8px 10px; }
  .links { font-size: 0.8rem; margin-top: 15px; }
}