body {
  margin: 0;
  padding: 0;
}

/* 引入一般字重 */
@font-face {
  font-family: 'NotoSansTC'; /* 自定義名稱 */
  src: url('../fonts/NotoSansTC-ExtraLight.ttf') format('truetype');
  font-weight: 400; /* 正常字重 */
  font-style: normal;
  font-display: swap; /* 加載策略，可避免 FOUT */
}

/* 引入粗體字重 */
@font-face {
  font-family: 'NotoSansTC2';
  src: url('../fonts/NotoSansTC-Black.ttf') format('truetype');
  font-weight: 900; /* 粗體 */
  font-style: normal;
  font-display: swap;
}


/* ===== 彈窗 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  width: 90%;
  max-width: 500px;
  padding: 30px;
  border-radius: 20px;
  position: relative;
}

.modal-content{
 border: 3px solid rgb(23, 179, 215);
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease;
  z-index: 9999;
}

.modal-mask.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #e2fffa;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  padding: 20px;
  transform: scale(.9);
  transition: transform .3s ease;
}

.modal-mask.active .modal {
  transform: scale(1);
  display:unset;
}

.modal-mask.modal-csm.active .modal {
  height:345px;
}

.modal .close {
  position: absolute;
 right: 45px;
  top: 33px;
  font-size: 28px;
  cursor: pointer;
  z-index:5;
  color: #fff;
}

.modal .title{
 font-family: 'NotoSansTC2';
 font-weight: bold;
  background-image: url('../images/subtitle1.png');
  background-repeat: no-repeat;
  color: #fff;
  padding: 10px;
  line-height: 12px;
}

.modal .form-control{ 
  border: #3ab9ce 1px solid;
}
.modal .form-check-input {
  border: #3ab9ce 1px solid;
}

.sending-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.4s ease;
}

/* 信封 */
.envelope {
  width: 60px;
  height: 40px;
  position: relative;
  margin-bottom: 15px;
}

.envelope .body {
  width: 100%;
  height: 100%;
  background: #007bff;
  border-radius: 4px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* flap 固定在 body 上，直接蓋住 */
.envelope .flap {
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-top: 20px solid #0056b3; /* 頂點朝下 */
  position: absolute;
  top: 0;    /* 直接蓋住 body */
  left: 0;
  z-index: 2;
}

/* 信封飛出右上角 */
@keyframes envelopeFlyOut {
  0% { transform: translate(0,0) rotate(0deg); opacity:1; }
  100% { transform: translate(200px,-200px) rotate(720deg); opacity:0; }
}

/* 覆蓋層 */
.sending-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.4s ease;
}



/* overlay */
.login-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 10;
}

/* icon */
.login-icon {
  font-size: 60px;
  color: #6c757d;
  margin-bottom: 15px;
}

/* spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #dee2e6;
  border-top-color: #6c757d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 文字 */
.login-text {
  font-size: 18px;
  font-weight: 600;
}

.success-text {
  display: none;
  font-size: 18px;
  font-weight: 700;
  color: #198754;
}

.error-text {
  display: none;
  font-size: 16px;
  font-weight: 600;
  color: #dc3545;
  margin-top: 8px;
}

/* 失敗抖動 */
.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

.toggle-password {
  cursor: pointer;
  border-color: #CCCCCCA6;
}

.toggle-password i {
  font-size: 1.1rem;
}






