/* === 基本設定 === */
body {
    margin: 0;
    background: #111;
    font-family: Arial, sans-serif;
  }
  
  /* === Header 設定 === */
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(270deg, #ffb7b7, #ffe499, #8db9e9, #afafff, #8c8cff, #f2b0ff);
    background-size: 1200% 1200%;
    animation: gradientFlow 20s ease-in-out infinite alternate;
    padding: 0 10px;
    height: 60px;
    position: fixed; /* ✅ 固定在頂部 */
    top: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  /* Header 背景漸層動畫 */
  @keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  
  /* Header 白光+紋理 */
  header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.011);
    pointer-events: none;
  }
  
  header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 300%;
    height: 300%;
    background-image: url('https://www.transparenttextures.com/patterns/asfalt-light.png');
    background-size: cover;
    opacity: 0.04;
    pointer-events: none;
    animation: noiseMove 60s linear infinite alternate;
  }
  
  @keyframes noiseMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, -50px); }
  }
  
  /* Logo 區 */
  .logo-container {
    height: 100%;
    display: flex;
    align-items: center;
  }
  
  .logo-container video,
  .logo-container img {
    height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
  }
  
  /* === 選單 nav 設定 === */
  nav {
    display: flex;
    gap: clamp(10px, 2vw, 20px); /* ✅ 項目之間的距離，隨螢幕寬度變化 */
    align-items: center;
    margin-right: 20px;
  }
  
  nav a {
    color: white;
    text-decoration: none;
    font-size: clamp(1rem, 2.5vw, 1.5rem); /* ✅ 字體大小跟螢幕寬度自動縮放 */
    position: relative;
    padding: clamp(5px, 1vw, 10px) clamp(8px, 2vw, 15px); /* ✅ 內距padding隨螢幕變動 */
    transition: all 0.3s ease;
    text-shadow:
      -0.5px -0.5px 0 rgba(0, 0, 0, 0.5), /* ✅ 左上方黑色陰影，透明度0.5 */
      0.5px -0.5px 0 rgba(0, 0, 0, 0.5),  /* ✅ 右上方黑色陰影，透明度0.5 */
      -0.5px 0.5px 0 rgba(0, 0, 0, 0.5),  /* ✅ 左下方黑色陰影，透明度0.5 */
      0.5px 0.5px 0 rgba(0, 0, 0, 0.5);   /* ✅ 右下方黑色陰影，透明度0.5 */
  }
  
  /* nav底下小橫線動畫 */
  nav a::after {
    content: "";
    display: block;
    width: 0%;
    height: 2px;
    background: white;
    transition: width 0.3s;
    margin-top: 2px;
    border-radius: 5px; /* 圓角 */
  }
  
  nav a:hover::after,
  nav a.active::after {
    width: 100%;
  }
  
  /* 高亮選單 */
  nav a.active {
    color: #FFD700; /* 金黃色 */
  }
  
  /* === 手機版 RWD 設定 === */
  .menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
  }
  
  .menu-toggle span {
    height: 3px;
    width: 27px;
    background: white;
    margin: 3px 0;
    border-radius: 2px;
  }
  
  /* 手機版 nav */
  @media (max-width: 945px) {
    nav {
      position: fixed;
      top: 60px;
      right: -220px; /* ✅ 預設藏在畫面外 */
      background: rgba(34, 34, 34, 0.95);
      flex-direction: column;
      width: auto;
      /*clamp(150px, 40vw, 220px);  ✅ 寬度也隨螢幕調整 */
      height: auto;
      max-height: calc(100vh - 60px); /* ✅ 最多只佔滿螢幕高度，減去Header高度 */
      overflow-y: auto; /* ✅ 超出時出現垂直捲軸 */
      border-radius: 12px 12px 12px 12px; /* ✅ 只有左側圓角，右側是直角 */
      padding: clamp(10px, 5vw, 20px); /* ✅ 內部padding隨螢幕調整 */
      box-sizing: border-box;
      transition: right 0.4s ease; /* ✅ 加右側滑動動畫 */
      z-index: 999;
    }
  
    nav.active {
      right: -15px; /* ✅ 完全貼齊右邊 */
      opacity: 1;
    }
  
    
  
    /* 漢堡按鈕位置 */
    /* === 手機版 兩條線漢堡按鈕 (全新改版) === */
  
  
  /* === 手機版 兩條線漢堡按鈕設定（分段動畫版） === */
  .menu-toggle {
    display: flex; /* 預設隱藏，手機版顯示 */
    flex-direction: column; /* 垂直排列線條 */
    justify-content: center; /* 垂直置中 */
    align-items: center; /* 水平置中 */
    width: 40px; /* 按鈕寬度40px */
    height: 40px; /* 按鈕高度40px */
    position: relative; /* 給子元素絕對定位用 */
    cursor: pointer; /* 滑鼠指標 */
  }
  
  /* 線條基礎樣式 */
  .menu-toggle span {
    display: block; /* 區塊元素 */
    position: absolute; /* 絕對定位 */
    height: 3px; /* 線條高度 */
    width: 30px; /* 線條寬度 */
    background: white; /* 線條顏色 */
    border-radius: 2px; /* 圓角 */
    transition: top 0.4s ease, transform 0.4s ease; /* 同時支援top、transform動畫 */
  }
  
  /* 初始上條線 */
  .menu-toggle span:nth-child(1) {
    top: 7px; /* 上條線位置 */
  }
  
  /* 初始下條線 */
  .menu-toggle span:nth-child(2) {
    top: 23px; /* 下條線位置 */
  }
  
  /* 點開階段一：靠攏到中間，但先不旋轉 */
  .menu-toggle.move-center span:nth-child(1),
  .menu-toggle.move-center span:nth-child(2) {
    top: 15px; /* 上下條線移到中間 */
  }
  
  /* 點開階段二：旋轉成X */
  .menu-toggle.rotate-x span:nth-child(1) {
    transform: rotate(45deg); /* 上條旋轉45度 */
  }
  
  .menu-toggle.rotate-x span:nth-child(2) {
    transform: rotate(-45deg); /* 下條旋轉-45度 */
  }
  
  
  /* 保證切換時有動畫 */
  .menu-toggle span {
    transition: all 0.4s ease;
  }
  
  /* === 自訂 nav 捲軸樣式 === */
  nav::-webkit-scrollbar {
    width: 6px; /* ✅ 捲軸寬度縮細，原本系統的是15px左右 */
  }
  
  nav::-webkit-scrollbar-track {
    background: transparent; /* ✅ 捲軸軌道透明，不要有背景色 */
  }
  
  nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4); /* ✅ 捲軸顏色白色半透明 */
    border-radius: 10px; /* ✅ 捲軸圓角，變得圓潤 */
  }
  
  nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7); /* ✅ 滑鼠移上去變稍微更亮 */
  }
  
  }
  /* === LOGO 掃光遮罩效果（調整版） === */
.logo-container {
  position: relative;         /* ✅ 給遮罩定位依據 */
  display: inline-block;      /* ✅ 自動縮放包住圖片 */
  height: 100%;               /* ✅ 和 header 高度對齊 */
}

.logo-container img {
  display: block;
  height: 100%;               /* ✅ 固定高度與 header 對齊 */
  width: auto;
  object-fit: contain;
  border-radius: 10px;
}

.shine-mask {
  position: absolute;
  inset: 0;                   /* ✅ 縮寫 = top: 0; right: 0; bottom: 0; left: 0 */
  z-index: 2;
  pointer-events: none;
  mask-image: url('../images/DCC.png');
  mask-repeat: no-repeat;
  mask-size: cover;
  -webkit-mask-image: url('../images/DCC.png');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  overflow: hidden;
}

.shine-stripe {
  position: absolute;
  top: 0;
  left: -60px;
  width: 15px;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.676) 30%,
    transparent 100%
  );
  transform: skewX(-20deg);
  opacity: 0;
  filter: blur(6.5px);
}

@keyframes sweep {
  0% {
    left: -60px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}
/* === 滑鼠描邊發光效果 === */
.hover-outline {
  width: 200px; /* ✅ 可依需求調整寬度 */
  transition: filter 0.4s ease;
}

.hover-outline:hover {
  filter:
    drop-shadow(0 0 0 white)
    drop-shadow(0 0 2px white)
    drop-shadow(0 0 3px white);
}

footer {
  background-color: #333; /* 深色背景 */
  color: #fff; /* 白色字體 */
  text-align: center; /* 文字置中 */
  padding: 20px 0; /* 上下留白 */
  font-size: 14px; /* 字體大小 */
  font-weight: bold; /* 字體加粗 */
  border-top: 2px solid #555; /* 頁腳上方邊框 */
  margin-top: 50px; /* 與上方內容間距 */
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3); /* 頁腳陰影 */
  width: 100%; /* 讓頁腳寬度佔滿 */
  flex-shrink: 0; /* 禁止壓縮 */
  position: relative; /* 確保正常定位 */
  left: 0; /* 防止偏移 */
   box-sizing: border-box; /* 新增，確保邊框計算 */
}

footer:hover {
  background-color: #555; /* 滑鼠懸停變色 */
  color: #ddd; /* 字體變淡 */
}

footer a {
  color: #00aaff; /* 連結顏色 */
  text-decoration: none; /* 移除底線 */
}

footer a:hover {
  color: #0099cc; /* 懸停時變色 */
}