/* 📁 /css/header.css */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans TC", sans-serif;
}
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 72px;
  background: rgba(50, 245, 245, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1000;
  border-bottom: 1px solid rgba(50, 245, 245, 0.5);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  height: 100%;
  position: relative;
}

.nav-left .logo {
  height: 48px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
  padding-top: 8px;
}

.nav-list li a {
  text-decoration: none;
  color: #000;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  display: inline-block;
  white-space: nowrap;
  transition: color 0.3s;
}

.nav-list li a:hover {
  color: #0ab7e7;
}

.nav-buttons {
  display: flex;
  gap: 0.5rem;
  order: 2; /* 預設桌機靠右 */
  margin-right: 0.5rem; /* ✅ 手機版與漢堡距離更近 */
}

.custom-btn {
  padding: 0.4rem 1rem;
  border: 1px solid #03ebeb;
  border-radius: 4px;
  background: rgba(1, 202, 175, 0.8);
  color: #101110;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.custom-btn:hover {
  background: #55ef83;
  color: #000;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  order: 3; /* 手機時顯示在最右側 */
}

/* 隱藏手機版按鈕（完全不顯示） */
.mobile-buttons {
  display: none !important;
}

/* -------------------- 共用按鈕 -------------------- */
.btn-cta {
  padding: 10px 20px;
  background: #f33;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

html, body {
  scroll-padding-top: 120px;
}

/* -------------------- 主結構區塊 -------------------- */
.hot-section {
  display: flex; /* 把內容變成橫向排列（sidebar + main） */
  background: linear-gradient(135deg, #1f1f1f, #1a1e23); /* 背景漸層，提升質感 */
  color: #fff; /* 文字顏色設為白色 */
  padding: 60px; /* 區塊內部留白 */
  border-radius: 16px; /* 邊角圓滑 */
  position: relative; /* 為後續定位元素預留空間 */
  margin: 80px 40px; /* 區塊外部間距（上下 80px，左右 20px） */
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6); /* 黑色陰影讓整塊浮起來 */
  gap: 20px; /* sidebar 和 main 之間的間距 */
  flex-wrap: wrap; /* 小螢幕時允許換行 */
  overflow: hidden; /* 👈 防止內容爆出來 */
}

.preview-wrapper {
  display: none; /* 預設全部都隱藏 */
  gap: 5px;
  align-items: flex-start;
}

.preview-wrapper.active {
  display: flex; /* 加上 .active 的才顯示出來 */
}

/* -------------------- 左側欄內容 -------------------- */
.sidebar {
  width: 120px;
  margin-right: 32px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  padding: 14px 10px; /* 內距：上下 14px，左右 18px */
  background: #2e2e2e; /* 深灰背景 */
  margin-bottom: 10px; /* 每個選項之間間距 */
  border-radius: 10px; /* 邊角圓滑 */
  font-size:large;
  text-align: center; /* 文字置中 */
  font-weight: bold; /* 加粗文字 */
  transition: all 0.3s ease; /* 做出滑動或變化的平滑效果 */
}

.sidebar li.active {
  transform: scale(1.02); /* 放大一點點 */
  background: #fcd67f;
  color: #111;
    font-weight: bold; /* 加粗文字 */
}

.sidebar li:hover {
  background: #fcd667; /* hover 時改成金黃色背景 */
  color: #000; /* 文字變黑 */
  transform: scale(1.1); /* 放大一點點 */
  box-shadow: 0 0 12px rgba(252, 214, 103, 0.6); /* 加上發光效果 */
  cursor:pointer;
}

.hot-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hot-content h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.hot-content .desc {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.preview-left {
  flex: 0 0 60%;
}


/* -------------------- 左側卡片樣式 -------------------- */
.desc {
max-width: 700px;
line-height: 1.6;
}

.game-list {
  max-width: 700px;
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  flex: 1;
  flex-wrap: wrap;
}

.game-icon {
  width: 110px; /* 卡片寬度 */
  text-align: center; /* 圖片和文字置中 */
  cursor: pointer; /* 滑鼠移過去變成手指圖示 */
  padding: 3px; /* 卡片內部留白 */
  background: #1e1e1e; /* 深色背景 */
  border-radius: 10px; /* 圓角邊框 */
  color: #fff; /* 白色文字 */
  transition: all 0.3s ease; /* 動畫過渡效果 */
  box-shadow: 0 4px 10px rgba(0, 255, 255, 0.15); /* 輕微陰影增加立體感 */
}

.game-icon:hover {
  transform: scale(1.1); /* hover 時放大 */
  background: #fcd667; /* 改成亮色背景 */
  color: #111; /* 深色文字（黑色） */
  font-weight: bold;
  box-shadow: 0 6px 16px rgba(0, 214, 186, 0.3); /* hover 時再加亮光 */
}

.game-icon img {
  width: 100%;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}

.game-icon p {
  margin-top: 6px;
  font-size: 14px;
}

/* -------------------- 右側遊戲預覽區 -------------------- */
.game-preview {
  flex: 1; /* 佔據剩餘空間 */
  min-width: 400; /* 最小寬度 400px */
  max-width: 1000px; /* 最大寬度 1000px */
  max-height: 450px; /* 最大高度 480px */
  display: flex; /* 使用 flex 排版 */
  flex-direction: column; /* 元素直排（圖片 > 文字 > 按鈕） */
  align-items: center; /* 水平置中 */
  justify-content: center; /* 垂直置中 */
  padding-left: 0; /* 左側內距清除（原本有 300px） */
  gap: 16px; /* 圖片與文字之間距離 */
  margin-left: auto; /* 👈 自動推到最右 */
}

.game-preview img {
  width: 80%;
  aspect-ratio: 16 / 9; /* 固定 16:9 比例 */
  object-fit: contain; /* 裁切圖片讓它剛好填滿區塊 */
  border-radius: 12px; /* 圓角邊框 */
  transition: all 0.3s ease; /* 動畫效果 */
  margin: -20px; /* 向上移動 8px，讓預覽區塊與內容區塊對齊 */
}

.game-preview img:hover {
  transform: scale(1.1); /* 滑過放大一點 */
  box-shadow: 0 0 24px rgba(238, 205, 16, 0.15); /* 微亮邊框陰影 */
  border-color: #fcd667; /* 描邊變成金黃色 */
}

.preview-desc {
  margin: 8px 0; /* 上下空出 12px，左右不留白 */
  font-size: 18px; /* 文字大小 */
  text-align: center; /* 文字置中 */
}

.preview-cta {
  padding: 12px 28px; /* 上下12px 左右28px */
  background: linear-gradient(to right, #ff5f6d, #ffc371); /* 紅色到橘色的漸層 */
  border: none; /* 移除邊框 */
  border-radius: 8px; /* 圓角 */
  color: white; /* 文字白色 */
  font-weight: bold; /* 粗體 */
  cursor: pointer; /* 滑鼠指標變手指 */
  box-shadow: 0 4px 12px rgba(255, 76, 76, 0.4); /* 陰影（紅色調） */
  transition: all 0.3s ease; /* 動畫過渡 */
}

.preview-cta:hover {
  background: #ff1f1f; /* 滑過後變成深紅色 */
  transform: translateY(-2px); /* 按鈕向上浮起一點 */
}

/* -------------------- Tab 遊戲區塊（可選） -------------------- */
.tab-area {
  background: #121212; /* 深色背景 */
  color: #fff; /* 白色文字 */
  padding: 40px 20px; /* 上下 40px，左右 20px */
  padding-top: 80px;
}

.tab-area h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 24px;
}

.game-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.game-card {
  width: 240px;
  background: #1e1e1e;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}

.game-card:hover {
  transform: translateY(-6px);
}

.game-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.game-card p {
  font-size: 15px;
  margin: 8px 0 12px;
}

.btn-demo {
  display: inline-block;
  padding: 8px 16px;
  background: #f33;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}

/* 📦 APP下載區塊樣式 */
.appdownload {
  padding: 4rem 1rem;
  background: linear-gradient(to bottom, #ffffff 50%,#f2fcfc);
  position: relative;
}

.appdownload h2 {
  text-align: center;
  margin-bottom: 4rem;
  background: linear-gradient(45deg, #000000, rgb(2, 3, 129));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.8rem;
  position: relative;
}

.appdownload h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

/* ✅ 背景圖片放在此容器左側 */
.appdownload-info {
  display: flex;
  justify-content: flex-end; /* 內容推向右側 */
  align-items: stretch; /* ✅ 讓所有子項目的高度一致 */
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  background-image: url('/img/logo/otyb-app.png');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  min-height: 300px; /* 可調整依實際圖片 */
}

/* 🧱 卡片基本樣式 */
.appdownload-item {
  text-align: center;
  padding: 3rem;
  display: flex;
  flex-direction: column;       /* ✅ 垂直排列內部元素 */
  justify-content: flex-start;  /* ✅ 內容從上方開始，不壓縮內容 */
  background: rgb(51, 167, 181);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex: 1 1 280px;
  max-width: 300px;
}


/* 📸 QR Code 圖片樣式 */
.appdownload-item.qr img {
  width: 140px;
  height: 140px;
  display: block;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transform: scale(1.2);
}

.appdownload-item.qr h3 {
  margin-top: 2rem;
  color: #fff;
  font-size: 1.1rem;
  top: 30px;
  transform: scale(1.4); /* ✅ 視覺放大，不撐開容器 */
  display: inline-block; /* ✅ 確保 transform 有效 */
}

/* 📲 按鈕排列 */
.appdownload-item.buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.appdownload-item.buttons .btn {
  background-color: rgba(182, 227, 212, 0.9);
  color: #ffffff;
  min-width: 100px;
  max-width: 200px;
  width: 80%;
  padding: 0.8rem 1.6rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.appdownload-item.buttons .btn:hover {
  background-color: var(--secondary-color);
}

/* ✨ Hover 效果 */
.appdownload-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 40px var(--shadow-color);
  border-color: var(--primary-color);
}

/* 🎨 標題與內容 */
.appdownload-item h3 {
  color: var(--primary-color);
  margin-top: 1rem;
  font-size: 1.4rem;
}

.appdownload-item p {
  color: var(--text-color);
  font-size: 1.2rem;
}

/* 🔧 手機版調整（最大寬度 768px） */
@media (max-width: 1024px) {
  html, body {
  scroll-padding-top: 90px;
  }

  .hot-section {
    flex-direction: column;
    padding: 24px;
  }

  .preview-wrapper {
    flex-direction: column;
    width: 100%;         /* ✅ 保證不超出畫面 */
    max-width: 100vw;    /* ✅ 限制最大寬度不超過螢幕 */
    overflow-x: hidden;  /* ✅ 防止橫向溢位視覺問題 */
    display: none;
  }

  .preview-wrapper.active {
    display: flex;
    flex-direction: column;
  }

  /* 🔧 Tab 區（橫向可滑動） */ 
  .sidebar {
    width: 100%; /* 撐滿整行 */
    margin-right: 0;
  }

  .sidebar ul {
    display: flex;         /* tab 按鈕橫排 */
    overflow-x: auto;      /* 超出時可滑動 */
    gap: 12px;
    padding-bottom: 10px;
  }

  .sidebar li {
    flex: 0 0 auto;         /* 不要壓縮 */
    white-space: nowrap;    /* 不換行 */
    font-size: 14px;
    padding: 10px 14px;
  }

  /* 🔧 將 game-icon 拉到 preview 區上方，變橫向滾動 */
  .hot-content {
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
  overflow-x: hidden;
  }

  .preview-list {
  overflow-x: auto;
  width: 100%;
  padding: 12;
  -webkit-overflow-scrolling: touch;
  }

  .game-list {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  gap: 20px;
  overflow-x: auto;
  width: max-content; /* ✅ 這是橫向捲動的關鍵 */
  }

  .game-icon {
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 100px;
    width: 100px;
  }
  /* 🔧 調整 preview 區的圖與文字置中與縮放 */
  .game-preview {
    order: 2;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 12px;
  }

  .game-preview img {
    width: 80%;
    max-width: 500px;
    margin: 0 auto;
  }

  .preview-desc {
    font-size: 16px;
    margin-top: 12px;
  }}

/* 🔧 平板尺寸調整（最大寬度 1440px） */
@media (min-width: 1024px) and (max-width: 1440px) {
    html, body {
  scroll-padding-top: 90px;
  }
  
  .hot-section {
    flex-direction: column;
    padding: 24px;
  }

  .sidebar {
    width: 100%;
    margin-right: 0;
  }

  .sidebar ul {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 10px;
  }

  .sidebar li {
    width: 15%;
    max-width: 60%;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 14px;
    padding: 10px 14px;
  }

  .hot-content {
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .hot-section {
    padding: 32px 24px;
    gap: 24px;
  }

  .hot-content {
    flex: 1;
    padding: 0;
    box-sizing: border-box;
  }

  .preview-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .preview-list {
    width: 100%;
    overflow-x: auto;
    padding: 12px 0;
  }

  .game-list {
    justify-content: center;  /* ✅ 讓卡片群組置中 */
    flex-wrap: wrap;          /* ✅ 換行，避免一排太多 */
    gap: 20px;
  }

  .game-icon {
    width: 100%;
    max-width: 15%;
    flex: 0 0 auto;
  }

  .game-preview {
    align-items: center;
    text-align: center;
    padding: 0 16px;
  }

  .game-preview img {
    width: 100%;
    max-width: 60%;
    margin: 0 auto;
  }
}

@media (max-width: 1024px) {
  .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .hamburger {
    display: block;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px;
    right: 0;
    width: 240px;
    background: #08e9f9;
    height: auto;
    padding: 1rem 0;
    z-index: 999;
    border-radius: 0 0 0 8px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.4);
  }

  .nav-list.show {
    display: flex;
  }

  .nav-buttons {
    display: flex;
    order: 1; /* 手機時顯示在漢堡左邊 */
    margin-right: -60px; /* ✅ 調整與漢堡間距更靠近 */
  }
}

.single article {
  display: flex;
  flex-direction: column;
  gap:1.5rem;
  padding:3rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.single h1 {
  font-size: 2rem;
  margin-top: 5rem;
}

.single .post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.article-list {
  margin: 7rem 7rem auto; /*上、左、下、右*/
}

.article-list h1{
    margin-bottom:3rem;
    font-size:40px;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  outline: 3px dashed red; /* 測試用 */
}

.site-main {
  flex: 1;
  outline: 2px solid blue; /* 測試用 */
}

.site-footer {
  outline: 2px solid green; /* 測試用 */
}

/* 分頁樣式 */
.pagination,
.nav-links {
  text-align: center;
  margin: 2rem 0;
}

.page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 4px;
  background: #f5f5f5;
  color: #333;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s;
}

.page-numbers:hover {
  background: #ddd;
}

.page-numbers.current {
  background: #333;
  color: #fff;
  font-weight: bold;
}

/* 上一頁、下一頁不變色 */
.page-numbers.prev:hover,
.page-numbers.next:hover {
  background: none;
  color: inherit;
}
