@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;600;700;900;1000&display=swap");

/* 全局樣式設置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: 100vh;
  font-family: "Noto Serif TC", serif;
  background: url("./img/indexBG.png") center center / cover no-repeat;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #b2a88e9c;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* 背景放在最底層 */
  overflow: hidden;
}

.background-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
}

/* 引導頁面樣式 */
#tipPage {
  display: flex;
  flex-direction: column;
  /*column*/
  justify-content: center;
  align-items: center;
  height: 100vh;
  /*background-color: #f2f2f2;*/
  z-index: 1;
}

.intro-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 700px;
  height: 35vh;
  /*border: 1px solid #ccc;
  border-radius: 10px;*/
  overflow: hidden;
}

.intro-left {
  flex: 3;
  object-fit: contain;
  /* 讓圖片包含顯示 */
  padding: 15px;
}

.intro-right {
  flex: 7;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.intro-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  text-align: center;
}

.tips {
  font-family: "Noto Serif TC", serif;
  background-color: #b8a076;
  color: rgb(32, 36, 17);
  padding: 3px;
  width: fit-content;
  font-weight: bold;
  text-align: left;
}

.text-group {
  /*margin-top: auto;*/
}

.text-chinese,
.text-english {
  margin-top: 10px;
  font-size: 18px;
  color: #b8a076;
  font-family: "Noto Serif TC", serif;
}

.enter-home-button {
  font-family: "Noto Serif TC", serif;
  margin-top: 20px;
  /*padding: 10px 20px;*/
  font-size: 18px;
  background-color: #3498db00;
  /*color: white;*/
  color: #b8a076;
  border: none;
  /*border-radius: 5px;*/
  cursor: pointer;
}

/*.enter-home-button:hover {
  /*background-color: #2980b9;
  font-size: 20px;
  color: #ecd7b3;
}*/
#clickevent {
  position: absolute;
  height: 100%;
  width: 100%;
  /*background-color: aliceblue;*/
  cursor: pointer;
}

/* 引導頁面樣式 END */
.container {
  position: flex;
  width: 100%;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("./img/indexBG_v0.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* 視訊背景設置 */
.background-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.background-video {
  /*bottom: 10;*/
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 確保影片填滿整個視窗 */
  opacity: 1;
  transition: opacity 0.5s ease;
}

.background-video.hidden {
  opacity: 0;
}

/* 其他內容（例如按鈕）置於影片之上 */
.content {
  position: relative;
  z-index: 1;
}

.button-container {
  bottom: 20px;
  z-index: 1;
}

.enter-button {
  position: absolute;
  padding: 15px 30px;
  /*font-size: 18px;*/
  border: none;
  cursor: pointer;
  background: url("./img/index1.png") no-repeat center;
  background-size: contain;
  transition: all 0.3s ease;
  width: 250px;
  height: 10dvh;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  /* 水平置中 */
  opacity: 0;
  z-index: 3;
  visibility: hidden;
}

/* 顯示按鈕 */
.enter-button.visible {
  visibility: visible;
  opacity: 1;
}

.enter-button:hover {
  background-image: url("./img/index1H.png");
}

/* 初始隱藏 enter-button */
#enter-button {
  visibility: hidden;
  opacity: 0;
  transition: opacity 1s ease;
  /* 添加淡入效果 */
}

/* 展介頁樣式 */
.intro-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /*background-color: rgba(255, 255, 255, 0.9);*/
  opacity: 0;
  /*transition: opacity 5s ease-in-out;*/
  animation: fade-in 2s linear forwards;
  /* 使用動畫效果 */
  z-index: 5;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.intro-page.visible {
  opacity: 1;
}

.intro-img {
  text-align: center;
  margin: 10px;
  width: 70%;
  height: 6%;

  background-image: url("./img/title.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.intro-text {
  margin-top: 30px;
  margin-bottom: 30px;
  width: 80%;
  height: 85%;
  max-width: 600px;
  max-height: 500px;

  padding: 10px;

  overflow-y: auto;
  text-align: center;
}

.intro-text p {
  font-size: 18px;
  line-height: 1.5;
  color: #b2a88e;
  font-family: "Noto Serif TC", serif;
  text-align: left;
}

.intro-button {
  position: absolute;
  padding: 15px 30px;
  margin-top: 20px;
  display: flex;
  bottom: 5vh;
  cursor: pointer;
  background-color: transparent;
  background: url("./img/index2.png") no-repeat center;
  background-size: contain;
  transition: all 0.3s ease;

  width: 250px;
  height: 10dvh;
}

.intro-button:hover {
  /*background-color: #333;
  color: #fff;*/
  background: url("./img/index2H.png") no-repeat center;
  background-size: contain;
  transition: all 0.3s ease;
}

@media screen and (max-width: 1200px) {
  .enter-button {
    position: absolute;
    padding: 15px 30px;
    /* font-size: 18px; */
    border: none;
    cursor: pointer;
    background: url(./img/index1.png) no-repeat center;
    background-size: contain;
    transition: all 0.3sease;
    width: 250px;
    height: 10dvh;
    bottom: 9.5vh;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    z-index: 3;
    visibility: hidden;
  }

  .intro-button {
    position: absolute;
    padding: 15px 30px;
    margin-top: 20px;
    display: flex;
    bottom: 8vh;
    cursor: pointer;
    background-color: transparent;
    background: url(./img/index2.png) no-repeat center;
    background-size: contain;
    transition: all 0.3sease;
    width: 250px;
    height: 10dvh;
  }

  .intro-text {
    margin-top: 30px;
    margin-bottom: 81px;
    width: 80%;
    height: 85%;
    max-width: 600px;
    max-height: 412px;
    padding: 10px;
    overflow-y: auto;
    text-align: center;
  }
}

/* 手機橫豎版調整 */
@media screen and (max-width: 768px) {
  .background-img {
    object-fit: cover;
  }

  /* 引導頁面樣式 END */
  .container {
    position: flex;
    width: 100%;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url("./img/indexBG_v0.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .intro-content {
    flex-direction: column;
    /* 改為上下顯示 */
    width: 90vw;
    height: 60vh;
    overflow: hidden;
    justify-content: center;

    display: flex;

    align-items: flex-start;
  }

  .text-chinese,
  .text-english {
    font-size: 18px;
    color: #b8a076;
    font-family: "Noto Serif TC", serif;
  }

  .enter-home-button {
    font-family: "Noto Serif TC", serif;
    margin-top: 20px;
    /*padding: 10px 20px;*/
    font-size: 16px;
    background-color: #3498db00;
    /*color: white;*/
    color: #b8a076;
    border: none;
    /*border-radius: 5px;*/
    cursor: pointer;
  }

  .intro-image {
    width: 60%;
    /* 調整圖片寬度占據容器寬度 */
    max-width: 100%;
    height: auto;
    /* 保持圖片高度自適應 */
    object-fit: contain;
    /* 圖片保持比例顯示 */
    align-self: flex-start;
    /* 確保圖片靠左 */
  }

  .intro-left {
    /*flex: 1;*/
    display: flex;

    justify-content: flex-start;
    /* 左對齊圖片容器 */
    object-fit: contain;
    /* 圖片保持比例顯示 */
    padding: 15px;
  }

  .intro-right {
    /*flex: 9;*/
    display: flex;
    flex-direction: column;
    padding: 15px;
  }

  .background-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    pointer-events: none;
  }

  .background-video {
    width: 100%;
    height: 100dvh;
    object-fit: cover;
    /* 確保影片填滿整個視窗 */
    opacity: 1;
    transition: opacity 0.5s ease;
  }

  .background-video.hidden {
    opacity: 0;
  }

  .enter-button {
    position: absolute;
    border: none;

    background: url("./img/index1.png") no-repeat center;
    background-size: contain;
    transition: all 0.3s ease;
    width: 250px;
    height: 6vh;
    bottom: 10vh;
    left: 50%;
    transform: translateX(-50%);
    /* 水平置中 */
    opacity: 0;
    z-index: 3;
    visibility: hidden;
  }

  /* 顯示按鈕 */
  .enter-button.visible {
    visibility: visible;
    opacity: 1;
  }

  .enter-button:hover {
    background-image: url("./img/index1H.png");
  }

  /* 初始隱藏 enter-button */
  #enter-button {
    visibility: hidden;
    opacity: 0;
    transition: opacity 1s ease;
    /* 添加淡入效果 */
  }

  .intro-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /*background-color: rgba(255, 255, 255, 0.9);*/
    opacity: 0;
    animation: fade-in 2s linear forwards;
    /* 使用動畫效果 */
    z-index: 5;
  }

  .intro-page.visible {
    opacity: 1;
  }

  @keyframes fade-in {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  .intro-img {
    text-align: center;
    height: 8vh;
    margin: 10px;
    width: 60%;

    background: url("./img/title.png") no-repeat center;
    background-size: contain;
  }

  .text-chinese,
  .text-english {
    margin-top: 15px;
    font-size: 16px;
    color: #b8a076;
    font-family: "Noto Serif TC", serif;
  }

  .intro-text {
    margin-top: 10px;
    margin-bottom: 10px;
    /*width: 90vw;*/
    height: 60dvh;
    max-width: 400px;
    max-height: 5500px;
    padding-right: 10px;
    padding-left: 10px;
    overflow-y: auto;
    text-align: center;

    width: 80%;
    /* 可根据需要调整宽度 */

    position: relative;
    padding-bottom: 20px;
    /* 给底部增加空间以容纳遮罩效果 */
  }

  .intro-text p {
    font-size: 18px;
    line-height: 1.5;
    color: #b2a88e;
    font-family: "Noto Serif TC", serif;
    text-align: left;
  }

  .intro-button {
    position: absolute;
    bottom: 4dvh;
    /*margin-top: 30px;*/
    padding: 10px;

    cursor: pointer;

    background: url("./img/index2.png") no-repeat center;
    background-size: contain;
    transition: all 0.3s ease;
    width: 250px;
    height: 6vh;
  }
}