@import url(https://fonts.googleapis.com/earlyaccess/cwtexkai.css);
@import url(https://fonts.googleapis.com/earlyaccess/cwtexyen.css);
@import url(https://fonts.googleapis.com/earlyaccess/cwtexfangsong.css);
@import url(https://fonts.googleapis.com/earlyaccess/notosanstc.css);
@import url(https://fonts.googleapis.com/earlyaccess/cwtexming.css);

html, body {
    height: 100%; /* 确保 html 和 body 的高度为 100% */
    margin: 0; /* 去除默认的外边距 */
  }

body {
    display: flex; /* 使用 Flexbox 布局 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    color: #e0e0e0;
}
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("./img/bg_2024幸福婚姻藍圖.png") no-repeat center center;
  background-size: cover;
  z-index: -2; 
}
body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: rgba(5, 59, 80, 0.8);  */
  z-index: -1; /* 确保颜色层在背景图片上面 */
}
img.overlay {
  width: 80%;       /* Resize to 100% of the parent element */
  height: auto;      /* Maintain aspect ratio */
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -50%); 
  z-index: 0; /* 确保图像在半透明颜色层上面 */
}

.container {
  display: flex;
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  height: 80%; 
  width: 100%; 
  padding: 30px; 
  margin: 0; 
  box-sizing: border-box; 
}

/* 表单容器样式 */
form {
  display: none;
  margin-bottom: 20px; /* 底部外边距 */
  padding: 20px; /* 内边距 */
  width: 100%;
  max-width: 900px;
  box-sizing: border-box; 
  border-radius: 8px;
  background-color: transparent; /* 设置表单背景透明 */
}

#reader {
  /* display: none; */
  position: relative; /* 为了绝对定位子元素 */
  width: 100%; 
  background-color: rgba(238, 238, 238, 0.6);
  border: 1px solid rgba(238, 238, 238, 0.8);
  box-sizing: border-box; /* 包括内边距和边框 */
  border-radius: 16px;
}

#reader-content {
  position: absolute; /* 绝对定位以覆盖 padding */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
  
  
fieldset {
    /* border: 3px solid #ff9e00;  */
    border: 3px solid transparent;
    /* background-color: rgba(255, 255, 255, 0.4); */
    background-color: transparent;
    padding: 20px; /* 內邊距 */
    margin: 0; /* 去除外邊距 */
    text-align: center; /* 将 legend 内容水平居中 */
    justify-content: center; /* 水平居中对齐 */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);  */
    border-radius: 20px;
}

legend {
    font-family: 'notosanstc', sans-serif; 
    font-size: 8em; 
    font-weight: 800; 
    color: #FFFFFF;
    margin-bottom: 5px; 
    padding: 0 10px; 
    word-spacing: 0.5em; 
    -webkit-text-stroke: 4px #dca59d;
    text-shadow: 
        1px 1px #dca59d, 
        2px 2px #c46c61, 
        3px 3px #b76b54, 
        4px 4px #a45a4d, 
        5px 5px #9f4f40; /* 逐渐变换的颜色 */
}
.in_lbl {
    font-family: 'notosanstc', sans-serif;
    display: block; /* 顯示為塊級元素 */
    font-size: 3em; 
    font-weight:700;
    color: #624934; 
    margin-bottom: 8px; 
    text-align: left; 
    margin-left: 60px;
    text-shadow: 2px 2px #ffffff;
}

input[type="text"] {
    width: calc(100% - 120px); 
    font-size: 3em; 
    padding: 12px; 
    margin-bottom: 20px; 
    border: none; 
    /* border-bottom: 2px solid #624934;  */
    /* border: 0.13em solid rgb(255, 249, 240); */
    border-radius: 7px; 
    box-sizing: border-box; 
    background: linear-gradient(45deg, rgba(244, 184, 176, 0.5), rgb(252, 208, 111, 0.5));
    /* background-color: rgb(244, 184, 176, 0.4);  */
    color: #ffffff;
}
.form_group:last-of-type {
  margin-bottom: 20px; 
}

.button-container {
  display: flex;
  justify-content: space-between;
  margin: 0 60px;
  margin-top: 25px;
}
input[type="button"], input[type="submit"] {
  background: linear-gradient(45deg, rgba(235, 110, 128, 0.5), rgba(252, 208, 111, 0.5));
  color: #624934; 
  font-family: 'Noto Sans', sans-serif;
  font-weight: bold; 
  border: none; 
  border-radius: 5px; 
  font-size: 3em; 
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s; 
  width: 200px; /* 设置按钮宽度 */
  padding: 12px 25px; 
  cursor: pointer; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); 
  display: inline-block; /* 确保按钮在同一行显示 */
}

input[type="button"] {
  margin-right: 10px; /* 按钮之间的间距 */
}

input[type="submit"]:hover, input[type="button"]:hover {
  background: linear-gradient(45deg, rgba(235, 110, 128, 0.8), rgba(252, 208, 111, 0.9)); 
  color: #624934; 
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7); /* 悬停时阴影效果 */
  transform: scale(1.05); 
}
input[type="submit"]:active, input[type="button"]:active {
  background: linear-gradient(45deg, rgba(235, 110, 128, 0.8), rgba(252, 208, 111, 0.9)); /* 按下时背景渐变效果 */
  box-shadow: 2px 5px 8px rgba(0, 0, 0, 0.2); /* 按下时阴影效果 */
  transform: scale(0.98); /* 按下时按钮轻微缩小 */
}

@media screen and (min-aspect-ratio: 13/20) {
  .container {
    transform: scale(0.8);
  }
  img.overlay{
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8); 
  }
}
@media screen and (orientation: landscape) {
  .container {
    position: fixed; /* 固定定位 */
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%) scale(0.6);
  }
  img.overlay{
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.75);
  }
}

/* #reader__dashboard {
  font-size: 5em;
}

#html5-qrcode-select-camera {
  font-size: 0.8em;
  max-width: 100%;
}
#html5-qrcode-select-camera > option {
  font-size: 0.3em;
}

#html5-qrcode-button-camera-permission {
  font-size: 1em;
  background: linear-gradient(135deg, #1a7493, #41908b);
  color: #EEEEEE; 
  font-family: 'Noto Sans', sans-serif;
  font-weight: bold; 
  border: none; 
  border-radius: 5px; 
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s; 
  margin: 10px;
  padding: 12px 25px; 
  cursor: pointer; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); 
}

#html5-qrcode-button-camera-start {
  font-size: 1em;
  background: linear-gradient(135deg, #1a7493, #41908b);
  color: #EEEEEE; 
  font-family: 'Noto Sans', sans-serif;
  font-weight: bold; 
  border: none; 
  border-radius: 5px; 
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s; 
  margin: 10px;
  padding: 12px 25px; 
  cursor: pointer; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); 
}

#html5-qrcode-button-camera-stop {
  font-size: 1em;
  background: linear-gradient(135deg, #1a7493, #41908b);
  color: #EEEEEE; 
  font-family: 'Noto Sans', sans-serif;
  font-weight: bold; 
  border: none; 
  border-radius: 5px; 
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s; 
  margin: 10px;
  padding: 12px 25px; 
  cursor: pointer; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); 
} */