#svgContainer {
  width: 100%;
  height: 100vh;
  position: relative;
  aspect-ratio: 1910.67457 / 953.31504;
  /* background: #0A0A32; */
}

#mainSVG {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  display: block;
  background-color: #0A0A32;
}

#introOverlay {
  transition: opacity 3s ease;
  /* 設定 7 秒淡出效果 */
  opacity: 1;
}

/* 開場動畫樣式 */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 11, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease-out;
}

.intro-content {
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards;
}

.intro-title {
  font-size: 2.5em;
  margin-bottom: 0.5em;
  color: #03D7F4;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  ;
}

.intro-subtitle {
  font-size: 1.8em;
  margin-bottom: 1.5em;
  color: #03D7F4;
}

.intro-text {
  font-size: 1.2em;
  line-height: 1.8;
  margin-bottom: 2em;
  white-space: pre-line;
  color: rgba(255, 255, 255, 0.9);
}

.start-button {
  padding: 15px 40px;
  font-size: 1.2em;
  background: linear-gradient(155deg, #EA86F4, #007CFF, #3F1DB1);
  border: none;
  border-radius: 30px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6), ;
}

.start-button:hover {
  transform: translateY(-2px);
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.typing-effect {
  overflow: hidden;
  border-right: 2px solid rgba(0, 255, 255, 0.6);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}



/* 太空風格彈窗 */
.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 40px;
  border-radius: 16px;
  color: white;
  z-index: 1000;
  min-width: 400px;
  max-width: 600px;

  /* 液態玻璃核心樣式 */
  background: linear-gradient(135deg, rgba(10, 12, 32, 0.6), rgba(30, 30, 60, 0.4));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);

  /* 高光與內陰影提升玻璃立體感 */
  box-shadow:
    0 0 30px rgba(0, 255, 255, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.05);

  overflow: hidden;
  animation: popupFadeIn 0.4s ease-out;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}


/* 彈窗啟動動畫 */
.popup.active {
  display: block;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 光線環繞動畫四邊框 */
.popup-border {
  position: absolute;
  background: linear-gradient(to right, transparent, #00ffff, transparent);
  pointer-events: none;
}

.popup-border.top {
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  animation: border-glow-horizontal 3s linear infinite;
}

.popup-border.bottom {
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  animation: border-glow-horizontal 3s linear infinite reverse;
}

.popup-border.right {
  top: -100%;
  right: 0;
  width: 2px;
  height: 100%;
  animation: border-glow-vertical 3s linear infinite;
}

.popup-border.left {
  top: -100%;
  left: 0;
  width: 2px;
  height: 100%;
  animation: border-glow-vertical 3s linear infinite reverse;
}

/* 動畫定義 */
@keyframes border-glow-horizontal {
  0% {
    left: -100%;
  }

  50% {
    left: 100%;
  }

  100% {
    left: 100%;
  }
}

@keyframes border-glow-vertical {
  0% {
    top: -100%;
  }

  50% {
    top: 100%;
  }

  100% {
    top: 100%;
  }
}

/* 彈窗內容樣式（如有需要再擴充） */
.popup-content {
  position: relative;
  /* z-index: 2; */
}

.popup:hover .popup-border {
  animation-duration: 1.5s;
}

/* 關閉按鈕 - 液態玻璃霓虹圓形 */
.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 8px rgba(0, 255, 255, 0.3),
    inset 0 0 4px rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}

.popup-close:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 12px rgba(0, 255, 255, 0.5),
    inset 0 0 6px rgba(255, 255, 255, 0.2);
}

/* 內容容器 */
.popup-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 20px;
}

/* 圖示 - 類似霓虹光影玻璃 */
.popup-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: block;
  filter:
    drop-shadow(0 0 10px rgba(0, 255, 255, 0.3)) drop-shadow(0 0 20px rgba(0, 255, 255, 0.2));
  border-radius: 16px;
}

/* 標題文字 */
.popup h2 {
  font-size: 28px;
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(0, 255, 255, 0.6),
    0 0 20px rgba(0, 255, 255, 0.2);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

/* 內文文字 */
.popup p {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 6px rgba(0, 255, 255, 0.2);
  margin: 0;
  white-space: pre-line;
  text-align: justify;
  padding: 0 8px;
}


@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.5);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes scanline {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes scanEffect {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 0 100%;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translate(var(--x, 0), calc(var(--y, 0) - 15px));
  }

  50% {
    transform: translate(calc(var(--x, 0) * -1),
        calc(var(--y, 0) + 15px));
  }
}

.glow-filter {
  filter: url(#glow);
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes blink-caret {

  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: rgba(0, 255, 255, 0.6);
  }
}

/* RWD for 開場動畫 */
@media (max-width: 768px) {
  .intro-title {
    font-size: 2em;
  }

  .intro-subtitle {
    font-size: 1.5em;
  }

  .intro-text {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 1.5em;
    padding: 0 1em;
  }

  .start-button {
    padding: 12px 30px;
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .intro-title {
    font-size: 1.6em;
  }

  .intro-subtitle {
    font-size: 1.2em;
  }

  .intro-text {
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 1.2em;
    padding: 0 1em;
  }

  .start-button {
    padding: 10px 24px;
    font-size: 0.95em;
  }
}

/* 添加產品按鈕樣式 */
.product-button {
  display: inline-block;
  padding: 12px 25px;
  margin-top: 20px;
  background: linear-gradient(155deg, #EA86F4, #007CFF, #3F1DB1);
  border: none;
  border-radius: 25px;
  color: white;
  text-decoration: none;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.product-button:hover {
  color: #FFF;
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.6);
}

/* 建築物發光效果 */
/* .building-glow {
  filter: drop-shadow(0 0 12px rgba(0, 184, 255, 0.7)) drop-shadow(0 0 20px rgba(0, 184, 255, 0.5)) drop-shadow(0 0 30px rgba(0, 184, 255, 0.3));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
} */

.building-glow:hover {
  filter: drop-shadow(0 0 15px rgba(0, 184, 255, 0.9)) drop-shadow(0 0 25px rgba(0, 184, 255, 0.7)) drop-shadow(0 0 40px rgba(0, 184, 255, 0.5));
  transform: scale(1.35);
}

.tutorial-box {
  background: rgba(13, 17, 38, 0.95);
  border: 1px solid #00b8ff;
  border-radius: 8px;
  padding: 20px 25px;
  box-shadow: 0 0 20px rgba(0, 184, 255, 0.2);
  max-width: 350px;
  animation: techPulse 2s infinite, floatBox 3s ease-in-out infinite;
  backdrop-filter: blur(5px);
  transform-origin: center;
}

.tutorial-box p {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(0, 184, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
}

.highlight {
  color: #00b8ff;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 184, 255, 0.8);
  animation: textGlow 2s ease-in-out infinite;
}

.hand-icon {
  font-size: 1.4rem;
  animation: handWave 1.5s ease-in-out infinite;
}

.building-tooltip {
  position: absolute;
  background: rgba(13, 17, 38, 0.95);
  border: 1px solid #00b8ff;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 1rem;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 0 20px rgba(0, 184, 255, 0.2);
  backdrop-filter: blur(5px);
}

@keyframes techPulse {
  0% {
    box-shadow: 0 0 20px rgba(0, 184, 255, 0.2);
  }

  50% {
    box-shadow: 0 0 30px rgba(0, 184, 255, 0.4);
  }

  100% {
    box-shadow: 0 0 20px rgba(0, 184, 255, 0.2);
  }
}

@keyframes floatBox {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes textGlow {

  0%,
  100% {
    text-shadow: 0 0 10px rgba(0, 184, 255, 0.8);
  }

  50% {
    text-shadow: 0 0 20px rgba(0, 184, 255, 1);
  }
}

@keyframes handWave {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-20deg);
  }

  75% {
    transform: rotate(20deg);
  }
}

#svgContainer {
  position: relative;
}