/* 載入字體 */
@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Noto+Serif+TC&family=Pacifico&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

/* 初始化設定，預設隱藏區塊 */
#loading-screen.hide {
  opacity: 0;
  pointer-events: none;
}

#loading-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  /* 動畫效果慢慢消失區塊 */
  opacity: 1;
  transition: opacity 0.5s ease;
  /* 背景漸層動畫效果 */
  background: linear-gradient(280deg, #AEE4FA, #7CCCEB, #3A7CA5);
  background-size: 600% 600%;
  -webkit-animation: loading_backgroundAn 30s ease infinite;
  -moz-animation: loading_backgroundAn 30s ease infinite;
  animation: loading_backgroundAn 30s ease infinite;
}

@-webkit-keyframes loading_backgroundAn {
  0% {
    background-position: 0% 86%;
  }
  50% {
    background-position: 100% 15%;
  }
  100% {
    background-position: 0% 86%;
  }
}
@-moz-keyframes loading_backgroundAn {
  0% {
    background-position: 0% 86%;
  }
  50% {
    background-position: 100% 15%;
  }
  100% {
    background-position: 0% 86%;
  }
}
@keyframes loading_backgroundAn {
  0% {
    background-position: 0% 86%;
  }
  50% {
    background-position: 100% 15%;
  }
  100% {
    background-position: 0% 86%;
  }
}

/* 動畫效果的容器 */
#loading-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/*圖片LOGO*/
#loading-animation #logo {
  max-width: 180px;
}

/* 主標題：英文品牌名稱 */
#svg_title {
  width: 500px;
  height: auto;
  display: block;
}
#svg_title text {
  font-family: 'Pacifico', cursive;
  font-weight: 400;
  font-style: normal;
  fill: rgba(255, 255, 255, 0);
  stroke: rgba(255, 255, 255, 1);
  stroke-dashoffset: 25%;
  stroke-dasharray: 0 50%;
  stroke-width: 2;
  font-size: 80px;
  text-anchor: middle;
  dominant-baseline: middle;
}

#svg_title text.show {
  fill: rgba(255, 255, 255, 1);
  stroke: rgba(255, 255, 255, 0);
  stroke-dashoffset: -25%;
  stroke-dasharray: 50% 0;
  stroke-width: 0;
  animation: svg_titleAn 5s infinite alternate;
  /* 動畫效果，持續5秒 */
}

@keyframes svg_titleAn {
  0% {
    fill: rgba(255, 255, 255, 0);
    stroke: rgba(255, 255, 255, 1);
    stroke-dashoffset: 25%;
    stroke-dasharray: 0 50%;
    stroke-width: 2;
  }
  70% {
    fill: rgba(255, 255, 255, 0);
    stroke: rgba(255, 255, 255, 1);
  }
  80% {
    fill: rgba(255, 255, 255, 0);
    stroke: rgba(255, 255, 255, 1);
    stroke-width: 3;
  }
  100% {
    fill: rgba(255, 255, 255, 1);
    stroke: rgba(255, 255, 255, 0);
    stroke-dashoffset: -25%;
    stroke-dasharray: 50% 0;
    stroke-width: 0;
  }
}

/* 線性動畫效果，圓形點點 */
#svg_line {
  margin-top: -20px;
  opacity: 0.7;
}

/* 定義顏色變量 */
:root {
  --color-1: #fff;
  --color-2: #fff;
  --color-3: #fff;
  --color-4: #fff;
  --color-5: #fff;
}

/* 圓形形狀的動畫 */
.loading_shape {
  cy: 30; /* 將 cy 調整為 30，使其下移 */
  r: 4.2; /* 將半徑調整為 14，使其縮小 30% */
  animation: svg_lineAn 1250ms ease-in-out both infinite;
}

.loading_shape:nth-child(1) {
  cx: 20;
  fill: var(--color-1);
}

.loading_shape:nth-child(2) {
  cx: 40;
  fill: var(--color-2);
  animation-delay: 100ms;
}

.loading_shape:nth-child(3) {
  cx: 60;
  fill: var(--color-3);
  animation-delay: 200ms;
}

.loading_shape:nth-child(4) {
  cx: 80;
  fill: var(--color-4);
  animation-delay: 300ms;
}

.loading_shape:nth-child(5) {
  cx: 100;
  fill: var(--color-5);
  animation-delay: 400ms;
}

@keyframes svg_lineAn {
  50% {
    cy: 50; /* 將 cy 調整為 105，使其下移 */
    r: 2; /* 將半徑調整為 9.8，使其縮小 30% */
  }
}

/* 次標題中文：品牌名稱 */
#svg_subTitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0); /* 初始設定為完全透明 */
  letter-spacing: 0.5em;
  margin-top: -35px;
  opacity: 0; /* 起始透明度為 0，隱藏元素 */
  animation: subTitleAn 1s ease-in-out 500ms forwards; /* 延遲 5000ms 開始，持續時間 3s */
}

@keyframes subTitleAn {
  from {
    color: rgba(255, 255, 255, 0); /* 起始顏色為完全透明 */
    opacity: 0; /* 起始透明度為 0 */
  }
  to {
    color: rgba(255, 255, 255, 1); /* 結束顏色為完全不透明 */
    opacity: 1; /* 結束透明度為 1，完全顯示 */
  }
}

/* 副標題的文字 */
#svg_subTitle p {
  text-align: center;
  font-size: 13px;
}

/* Logo SVG 樣式 */
#svg_subTitle svg {
  margin-top: 30px;
  margin-bottom: 15px;
  display: block;
}
