*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* 可愛溫馨的淺黃色微漸層背景 */
  background: radial-gradient(circle, #fcfbe7 0%, #e2dfb5 100%) !important;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  color: #4a4940;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* 可愛漂浮氣泡 */
.bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: bubbleFloat 6s ease-in-out infinite alternate;
}

.bubble-1 {
  width: 140px;
  height: 140px;
  top: 8%;
  left: 10%;
  background: rgba(254, 237, 185, 0.6); /* 鵝黃 */
  animation-delay: 0s;
}

.bubble-2 {
  width: 90px;
  height: 90px;
  bottom: 12%;
  right: 10%;
  background: rgba(249, 196, 209, 0.5); /* 蜜桃粉 */
  animation-delay: 1s;
}

.bubble-3 {
  width: 70px;
  height: 70px;
  bottom: 25%;
  left: 8%;
  background: rgba(206, 234, 208, 0.45); /* 薄荷綠 */
  animation-delay: 2s;
}

.bubble-4 {
  width: 100px;
  height: 100px;
  top: 15%;
  right: 15%;
  background: rgba(202, 228, 252, 0.5); /* 晴空藍 */
  animation-delay: 3s;
}

@keyframes bubbleFloat {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    transform: translateY(-25px) scale(1.08) rotate(15deg);
  }
}

/* 閃爍可愛小星星 ✨ */
.star {
  position: absolute;
  font-size: 24px;
  color: #ffd257;
  pointer-events: none;
  z-index: 0;
  animation: starTwinkle 2.5s ease-in-out infinite alternate;
}

.star-1 { top: 18%; left: 28%; animation-delay: 0s; }
.star-2 { top: 70%; left: 22%; animation-delay: 0.8s; font-size: 20px; }
.star-3 { top: 25%; right: 28%; animation-delay: 0.4s; font-size: 18px; }
.star-4 { top: 62%; right: 25%; animation-delay: 1.2s; }

@keyframes starTwinkle {
  0% {
    opacity: 0.3;
    transform: scale(0.8) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1.2) rotate(15deg);
  }
}

/* 登入區塊進場動畫：Q彈縮放彈入 */
@keyframes cutePop {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  70% {
    transform: translateY(-6px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-container {
  margin: auto;
  width: 100%;
  max-width: 760px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  animation: cutePop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* Logo 區域 */
.logo-area {
  margin-bottom: 25px;
  text-align: center;
  width: 100%;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-area:hover {
  transform: translateY(-5px) rotate(-1deg) scale(1.03);
}

.logo-area img {
  max-width: 100%;
  max-height: 270px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.05));
}

/* 可愛提示對話氣泡：改為細邊框與柔和羽化投影，視覺更輕盈 */
.greeting-bubble {
  background-color: #ffffff;
  border: 2px solid rgba(74, 73, 64, 0.15);
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 16px;
  font-weight: 700;
  color: #e59738;
  position: relative;
  margin-bottom: 30px;
  box-shadow: 0 8px 20px -8px rgba(132, 126, 91, 0.15);
  display: inline-block;
  animation: cuteJump 3s ease-in-out infinite;
  text-align: center;
  max-width: 90%;
}

/* 對話氣泡的小尖角 */
.greeting-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: #ffffff transparent;
  display: block;
  width: 0;
  z-index: 2;
}

.greeting-bubble::before {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 12px 12px 0;
  border-style: solid;
  border-color: rgba(74, 73, 64, 0.15) transparent;
  display: block;
  width: 0;
  z-index: 1;
}

@keyframes cuteJump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* 表單 */
form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 帳號密碼並排 */
.form-row {
  display: flex;
  width: 100%;
  max-width: 620px;
  margin-bottom: 28px;
}

.form-row .form-group:first-child {
  margin-right: 12px;
}

.form-row .form-group:last-child {
  margin-left: 12px;
}

.form-group {
  flex: 1;
  position: relative;
}

.form-group input {
  width: 100%;
  height: 58px;
  border-radius: 29px;
  /* 輕盈可愛風：極細溫和邊框 + 柔和擴散陰影 */
  border: 2px solid rgba(74, 73, 64, 0.1);
  background-color: #ffffff;
  padding: 0 25px;
  font-size: 20px;
  font-weight: 500;
  color: #4a4940;
  text-align: center;
  outline: none;
  box-shadow: 
    0 8px 24px -8px rgba(132, 126, 91, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.form-group input::placeholder {
  color: #a6a498;
  font-weight: 400;
  letter-spacing: 1px;
}

/* 輸入框聚焦時，輕微上浮並發光 */
.form-group input:focus {
  border-color: #ffd685;
  background-color: #ffffff;
  box-shadow: 
    0 12px 30px -8px rgba(132, 126, 91, 0.2),
    0 0 0 4px rgba(255, 214, 133, 0.25);
  transform: translateY(-2px);
}

/* reCAPTCHA */
.recaptcha-area {
  margin-bottom: 28px;
  display: flex;
  justify-content: center;
  width: 100%;
  filter: drop-shadow(0 8px 20px rgba(132, 126, 91, 0.08));
}

/* 送出按鈕 */
.btn-submit-container {
  width: 100%;
  max-width: 620px;
  margin-top: 10px;
}

@keyframes cuteBounce {
  0% { transform: scale(1); }
  30% { transform: scaleX(1.06) scaleY(0.94); }
  40% { transform: scaleX(0.94) scaleY(1.06) translateY(-3px); }
  60% { transform: scaleX(1.03) scaleY(0.97) translateY(0); }
  100% { transform: scale(1); }
}

.btn-submit {
  width: 100%;
  height: 60px;
  border-radius: 30px;
  /* 輕盈可愛按鈕：白色發光邊框 + 鵝黃色背景 + 柔和擴散橘黃陰影 */
  border: 2px solid #ffffff;
  background-color: #ffd685;
  color: #ffffff; /* 改為白色字，整體更加清爽 */
  text-shadow: 0 1px 2px rgba(132, 91, 30, 0.2);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 8px;
  text-indent: 8px;
  cursor: pointer;
  outline: none;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 25px -8px rgba(229, 151, 56, 0.35);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-submit:hover {
  background-color: #ffca61; /* 更亮眼黃色 */
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -8px rgba(229, 151, 56, 0.5);
  animation: cuteBounce 0.8s ease-in-out;
}

.btn-submit:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 8px 15px -6px rgba(229, 151, 56, 0.4);
}

/* 首次登入說明與警告標語 */
.login-help-text {
  text-align: center;
  font-size: 15px;
  color: #a55a00;
  margin-top: 15px;
  margin-bottom: 15px;
  font-weight: 500;
}

/* RWD 響應式排版 */
@media (max-width: 640px) {
  .bubble, .star {
    display: none; /* 手機版隱藏裝飾 */
  }

  .logo-area {
    margin-bottom: 20px;
  }
  
  .logo-area img {
    max-height: 180px;
  }

  .greeting-bubble {
    font-size: 14px;
    padding: 6px 16px;
    margin-bottom: 20px;
  }

  .form-row {
    flex-direction: column;
    width: 100% !important;
    max-width: 320px;
    margin-bottom: 20px;
    align-items: stretch !important;
  }

  .form-row .form-group:first-child {
    margin: 0 0 16px 0 !important;
  }

  .form-row .form-group:last-child {
    margin: 0 !important;
  }

  .form-group input {
    height: 52px;
    border-radius: 26px;
    font-size: 18px;
    box-shadow: 0 6px 16px -6px rgba(132, 126, 91, 0.1);
  }
  
  .form-group input:focus {
    transform: translateY(-1px);
  }

  .btn-submit-container {
    max-width: 320px;
  }

  .btn-submit {
    height: 54px;
    border-radius: 27px;
    font-size: 22px;
    box-shadow: 0 8px 20px -6px rgba(229, 151, 56, 0.3);
  }
}

/* Fancybox 彈窗精緻可愛化 */
.fancybox-skin {
  border-radius: 24px !important;
  background: #ffffff !important;
  border: 1px solid rgba(74, 73, 64, 0.1) !important;
  box-shadow: 0 20px 50px -10px rgba(132, 126, 91, 0.15) !important;
}

.fancybox-inner h2,
.fancybox-inner p,
.fancybox-inner div {
  font-family: "Noto Sans TC", sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  color: #4a4940 !important;
  margin-bottom: 20px;
}

.fancybox-inner a {
  display: inline-block !important;
  padding: 10px 40px !important;
  background: #ffd685 !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border-radius: 22px !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
  box-shadow: 0 6px 15px -4px rgba(229, 151, 56, 0.3);
}

.fancybox-inner a:hover {
  background: #ffca61 !important;
  box-shadow: 0 10px 20px -4px rgba(229, 151, 56, 0.4);
  transform: translateY(-1px);
}
