/* 基礎設定 */
html {
  overflow-x: hidden; /* 防止整個網頁左右滑動 */
}

body {
  font-family: "微軟正黑體", "Arial", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f7f4;
  color: #333;
  overflow-x: hidden; /* 防止整個網頁左右滑動 */
}

/* ------------------
            固定的頂部導覽列 (Header) 
            ------------------ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #f8f7f4;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 10px 20px;
  height: 110px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 頂部 Logo 和主標題的容器 */
.top-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 50px;
  margin-bottom: 5px;
}

/* === 圖片 Logo 樣式 === */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-top: 5px;
}

.main-logo-img {
  height: 40px;
  width: auto;
  display: block;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.main-logo-img:hover {
  opacity: 0.5;
}

.top-left-logo {
  position: absolute;
  left: 10px;
  top: 10px;
  height: 30px;
  width: auto;
  display: block;
}

.top-left-logo img {
  height: 30px;
  width: auto;
  display: block;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.top-left-logo img:hover {
  opacity: 0.5;
}

/* 導覽選單 */
.nav-menu {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 10px;
}

.nav-menu li {
  margin: 0 30px;
}

.nav-menu a {
  text-decoration: none;
  color: #000;
  font-size: 16px;
  padding: 5px 0;
  display: block;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap; /* 防止文字換行 */
}

.nav-menu a.active,
.nav-menu a:hover {
  color: #7c9082;
  border-bottom-color: #7c9082;
}

/* ------------------
            固定的底部 (Footer)
            ------------------ */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #f8f7f4;
  color: #333;
  text-align: center;
  padding: 5px 0;
  font-size: 11px;
  border-top: none;
  z-index: 999;
  line-height: 1.3;
  transition: transform 0.3s ease; /* 平滑過渡效果 */
}

/* 電腦版：往上滾動時隱藏 footer */
.footer.footer-hidden {
  transform: translateY(100%); /* 向下移出螢幕 */
}

.copyright-link {
  cursor: pointer;
  text-decoration: underline;
  color: #333;
  margin-left: 5px;
}

/* =========================================
   右下角功能按鈕群組樣式 (Action Buttons)
   ========================================= */

/* 1. 群組容器：負責固定在右下角並控制排列 */
.action-btn-group {
  position: fixed;
  bottom: 20px; /* 距離底部 20px */
  right: 20px; /* 距離右邊 20px */
  display: flex;
  flex-direction: column; /* 垂直排列 (上下) */
  align-items: center; /* 水平置中對齊 (讓圓形跟長條形按鈕的中線對齊) */
  gap: 15px; /* 按鈕之間的間距 (原本黏太近，這裡拉開) */
  z-index: 1001; /* 確保浮在最上層 */
}

/* 2. 回到頂端按鈕 (修改版) */
.back-to-top {
  /* 重置定位，因為現在由 .action-btn-group 控制位置 */
  position: static;
  margin: 0;

  /* 保留原本的大小與樣式 */
  width: 60px;
  height: 60px;
  background-color: #7c9082;
  color: white;
  border-radius: 50%;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

  /* 隱藏邏輯 (搭配 JS 使用) */
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s,
    transform 0.3s,
    background-color 0.3s;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: scale(1.1); /* 放大效果 */
  background-color: #6a7c71; /* 變深色 */
}

/* 3. 使用說明按鈕 (新樣式) */
.tour-btn {
  padding: 10px 20px;
  background-color: #7c9082;
  color: #f8f7f4;
  border: none;
  border-radius: 50px; /* 膠囊形狀 */
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 加入陰影讓它浮起來 */
  display: flex;
  align-items: center;
  gap: 8px;

  /* 加入過渡動畫 */
  transition:
    transform 0.3s,
    background-color 0.3s;
}

/* 使用說明按鈕的滑鼠互動效果 (與 Top 按鈕一致) */
.tour-btn:hover {
  transform: scale(1.1); /* 滑鼠移過去稍微放大 */
  background-color: #6a7c71; /* 顏色變深 */
}

.back-to-top:hover {
  transform: scale(1.05);
  background-color: #6a7c71;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.top-text {
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
}

.up-arrow {
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
}

/* ------------------
            主內容區塊 (Main Content)
            ------------------ */
.main-content {
  padding-top: 160px !important; /* 原本是 120px，改成 160px (不夠可再加) */
  padding-bottom: 40px;
  padding-left: 15px;
  padding-right: 15px;
  min-height: 100vh;
}

.page-content {
  padding: 0 0 20px 0; /* 原本是 20px 0，改為上方 0，下方保留 20px */
  display: none;
  min-height: 1000px;
}

.page-content.active {
  display: block;
}

.content-card {
  background-color: #ffffff;
  padding: 40px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.accordion-container {
  max-width: 900px;
  margin: 0 auto 30px auto;
}

.image-float-card {
  max-width: 900px;
  margin: 30px auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  background-color: #ffffff;
}

.content-image {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  margin: 25px auto;
  border-radius: 12px;
}

.image-float-card .content-image {
  margin: 0;
  border-radius: 0;
}

/* 搶先看圖片與公民記者定位圖 - 移除 hover 效果避免誤導 */
.image-float-card .content-image,
.mindmap-image {
  cursor: default;
}

.image-float-card .content-image:hover,
.mindmap-image:hover {
  filter: none;
  transform: none;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 900px;
  width: 100%;
  margin: 25px auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------
            聊天室 UI 樣式
            ------------------ */
.chat-container {
  background-color: #f7f7f7;
  padding: 30px; /* 統一為 30px，與手機版一致 */
  border-radius: 12px;
  max-width: 800px;
  margin: 0 auto 30px auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.message-bubble {
  max-width: 70%;
  padding: 15px 20px; /* 從 12px 16px 增加到 15px 20px */
  border-radius: 20px;
  line-height: 1.4;
  font-size: 17px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ★★★ 對話氣泡間距統一設定 ★★★ */
.reporter-message {
  justify-content: flex-end;
  display: flex;
  margin-bottom: 30px; /* 統一間距：30px，確保不會擠在一起 */
}

.reporter-message .message-bubble {
  background-color: #7c9082;
  color: white;
  border-bottom-right-radius: 5px;
  margin-left: auto;
}

.passerby-message {
  justify-content: flex-start;
  display: flex;
  margin-bottom: 30px; /* 統一間距：30px */
}

.passerby-message .message-bubble {
  background-color: #fff;
  color: #333;
  border: 1px solid #ddd;
  border-bottom-left-radius: 5px;
}

.message-sender {
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 5px;
  display: block;
  color: #555;
  clear: both;
}

.reporter-message-group,
.passerby-message-group {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.reporter-message-group {
  align-items: flex-end;
}
.passerby-message-group {
  align-items: flex-start;
}

/* ------------------
            浮動視窗 (Modal)
            ------------------ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.modal-overlay.active {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 80%;
  background-color: #fff;
  padding: 30px 40px;
  box-sizing: border-box;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 30px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.3s;
}

.modal-close:hover {
  color: #333;
}

.modal-body p {
  line-height: 1.8;
  font-size: 17px;
  color: #555;
  margin-bottom: 15px;
}

/* 內容樣式 */
.page-main-heading {
  font-size: 28px;
  color: #333;
  margin-top: 0px;
  margin-bottom: 20px;
  border-bottom: 3px solid #eee;
  padding-bottom: 10px;
  font-weight: 600;
  text-align: left;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  font-size: 28px;
  color: #333;
  margin-top: 0;
  margin-bottom: 10px;
  border-bottom: 3px solid #eee;
  padding-bottom: 10px;
  font-weight: 600;
}

.article-body {
  line-height: 2;
  font-size: 18px;
  text-align: justify;
}

/* Accordion */
.accordion-header {
  background-color: #f7f7f7;
  color: #333;
  cursor: pointer;
  padding: 20px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition:
    background-color 0.3s,
    border-radius 0.3s;
  font-size: 24px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.accordion-header:hover {
  background-color: #7c9082;
  color: #fff;
}

.accordion-header.active {
  background-color: #7c9082;
  color: #fff;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.accordion-icon {
  font-size: 20px;
  transition: transform 0.3s;
  line-height: 1;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 20px;
  background-color: white;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease-out,
    padding 0.4s ease-out;
  border: 1px solid #ddd;
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  margin-bottom: 30px;
}

.accordion-content.open {
  max-height: 10000px;
  padding: 20px;
}

.accordion-content h4 {
  color: #7c9082;
  font-weight: bold;
  border-bottom: 1px dotted #ccc;
  padding-bottom: 5px;
  margin-top: 15px;
  font-size: 19px;
}

.accordion-content p {
  line-height: 2;
  font-size: 17px;
  color: #444;
  margin-bottom: 15px;
  text-align: justify;
}

.accordion-content ul li {
  font-size: 17px;
}

/* 表格 */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.responsive-table th,
.responsive-table td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
  min-width: 120px; /* 確保手機上表格不會擠在一起 */
}

.responsive-table th {
  background-color: #f0f0f0;
  color: #333;
  font-weight: 700;
}

.table-wrapper {
  overflow-x: auto; /* 手機版表格可橫向捲動 */
  margin-top: 20px;
  -webkit-overflow-scrolling: touch; /* 優化 iOS 捲動體驗 */
}

/* 微體驗按鈕 */
.exp-option-button {
  width: 45%;
  display: inline-flex;
  margin-right: 5%;
  justify-content: center !important;
  align-items: center;
}

.exp-prompt-text {
  font-size: 20px;
  margin-top: 15px;
  font-weight: bold;
  text-align: center;
}

/* 微體驗 emoji 文字統一（電腦版） */
#section-exp-A h4,
#section-exp-B h4 {
  font-size: 18px; /* 電腦版 18px */
  color: #7c9082;
  font-weight: bold;
  margin-top: 0;
}

#section-exp-A h4 span,
#section-exp-B h4 span {
  font-size: 18px; /* 與 h4 一致 */
}

#section-exp-A p.article-body strong,
#section-exp-B p.article-body strong {
  font-size: 18px; /* 與內文一致 */
  color: #7c9082;
}

.case-study-title {
  font-size: 32px;
  color: #7c9082;
  border-bottom: 2px dashed #f0f0f0;
  padding-bottom: 5px;
  margin-top: 5px;
  font-weight: bold;
  text-align: center;
}

/* 隱藏 Vlog 頁面的案例標題（電腦版 + 手機版） */
#page-vlog .case-study-title {
  display: none !important;
}

/* SVG 心智圖 */
.mindmap-container {
  width: 100%;
  max-width: 100%; /* 從 1100px 改為 100%，移除左右空白 */
  height: 650px; /* 從 500px 放大到 650px */
  margin: 15px auto;
  text-align: center;
  overflow-x: auto; /* 允許橫向捲動 */
  -webkit-overflow-scrolling: touch;
}

.mindmap-node {
  fill: #fff;
  stroke: #7c9082;
  stroke-width: 2;
  /* rx: 10;  <-- 移除 CSS 中的 rx，改用 HTML 屬性以相容 iOS */
}

.mindmap-text {
  font-family: "微軟正黑體", sans-serif;
  font-size: 22px; /* 從 20px 放大到 22px */
  font-weight: bold;
  fill: #333;
  text-anchor: middle;
  dominant-baseline: central;
}

.mindmap-line {
  stroke: #7c9082;
  stroke-width: 2;
}

/* 公民記者定位圖片（取代心智圖） */
.mindmap-image-container {
  width: 100%;
  max-width: 100%; /* 電腦版滿版 */
  margin: 30px auto;
  text-align: center;
  overflow: hidden;
  border-radius: 12px;
  /* 移除陰影 */
}

.mindmap-image {
  width: 100%;
  height: auto;
  display: block;
  /* 移除點擊功能 */
}

/* 電腦版顯示桌機圖片，隱藏手機版圖片 */
.mindmap-image-desktop {
  display: block;
}

.mindmap-image-mobile {
  display: none;
}

/* === 圖片放大檢視窗 (Lightbox) 樣式 === */
.lightbox {
  display: none; /* 預設隱藏 */
  position: fixed;
  z-index: 3000; /* 確保在最上層 */
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9); /* 黑色半透明背景 */
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 5px;
  animation: zoomIn 0.3s;
}

/* 放大動畫 */
@keyframes zoomIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* 關閉按鈕 */
.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 手機版 Lightbox 調整 */
@media only screen and (max-width: 768px) {
  .lightbox-content {
    width: 95%;
  }
}

/* ============================================
   1. 手機專用換行 (必須放在最外面！)
   ============================================ */
/* 電腦版預設：隱藏這個換行 */
.mobile-br {
  display: none;
}

/* ============================================
   2. RWD 響應式設計 (手機版優化)
   ============================================ */
@media (max-width: 768px) {
  /* --- A. 基礎排版與 Logo --- */
  .header {
    height: auto;
    padding: 10px 0;
  }

  .top-bar {
    padding: 0 10px;
  }

  .top-left-logo {
    display: block;
    left: 15px;
    top: 12px;
  }

  .top-left-logo img {
    height: 18px; /* 縮小左上角 Logo */
  }

  .main-logo-img {
    height: 28px; /* 縮小中間主 Logo */
  }

  /* --- B. 導覽選單 (可滑動) --- */
  .nav-menu {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu::-webkit-scrollbar {
    display: none;
  }

  .nav-menu li {
    margin: 0 15px;
    flex-shrink: 0;
  }

  /* --- C. 內容區塊調整 (修正版) --- */
  .main-content {
    padding-top: 140px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    padding-bottom: 40px;
  }

  .page-content {
    padding-top: 0 !important;
  }

  /* 1. 設定所有卡片容器的基礎外觀 (統一寬度、圓角、陰影) */
  .content-card,
  .image-float-card,
  .video-container,
  .chat-container,
  .accordion-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 25px !important; /* 稍微加大卡片間距 */
    border-radius: 12px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05) !important;
  }

  /* 2. 針對「文字卡片」：加大內距，解決文字太貼邊的問題 */
  .content-card,
  .chat-container {
    /* ★★★ 這裡控制文字離邊緣的距離 ★★★ */
    /* 原本是 20px，改為 30px 讓空間更寬敞 */
    padding: 30px !important;
  }

  /* 3. 針對「圖片容器」：移除內距，讓圖片可以滿版好看 */
  .image-float-card {
    padding: 0 !important;
    overflow: hidden;
  }

  /* 4. 針對「影片容器」：
     ★★★ 重點修正：絕對不能設 padding: 0，否則影片會消失！ ★★★
     這裡不寫 padding 設定，讓它維持原本的 padding-bottom: 56.25% 即可 */
  .video-container {
    margin: 0 0 25px 0 !important;
    /* 確保影片容器背景色是透明或白色，避免視覺干擾 */
    background-color: #fff;
  }

  /* 針對巢狀在卡片內的元件，取消下邊距以避免空隙過大 */
  .content-card .video-container,
  .content-card .accordion-container,
  .content-card .accordion-content {
    margin-bottom: 0 !important;
  }

  /* 確保最後一個子元素不會有額外間距 */
  .content-card > *:last-child {
    margin-bottom: 0 !important;
  }

  /* 手風琴容器 */
  .accordion-container {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* 圖片設定 */
  .content-image {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  /* 如果圖片是在文字卡片內 (例如詳細看的案例圖片)，補回圓角 */
  .content-card .content-image {
    border-radius: 8px !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
  }

  /* --- D. 功能元件 (換行、表格、按鈕) --- */

  /* 開啟手機版換行功能 */
  .mobile-br {
    display: inline;
  }

  /* 表格優化 */
  .table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  .responsive-table {
    min-width: 600px;
  }

  /* 心智圖優化 */
  .mindmap-container {
    height: auto;
    overflow-x: auto;
    padding-bottom: 20px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .mindmap-container svg {
    min-width: 800px;
    height: auto;
    display: block;
  }

  /* === 浮動按鈕位置調整 === */
  .action-btn-group {
    bottom: 65px; /* 往下移一點 */
    right: 10px; /* 往右移到底 */
  }

  /* 單獨調整 TOP 按鈕 */
  .back-to-top {
    /* 例如：想讓它往右邊凸出去一點 */
    margin-right: 0px;
    /* 或者：想讓它跟下面的按鈕分開遠一點 */
    margin-bottom: -10px;
  }

  /* ============================================
     圓形按鈕與圖示置中修正 (手機版)
     ============================================ */

  /* 1. 按鈕容器設定 (Top & 使用說明) */
  .back-to-top,
  .tour-btn {
    width: 40px !important; /* 固定寬度 */
    height: 40px !important; /* 固定高度 */
    border-radius: 50% !important; /* 正圓形 */
    padding: 0 !important; /* 清除內距，這很重要 */

    /* ★★★ 新增這行：設定半透明背景 ★★★ */
    /* rgba(紅, 綠, 藍, 透明度) -> 0.7 代表 70% 不透明 */
    background-color: rgba(124, 144, 130, 0.7) !important;

    /* 使用 Flexbox 進行絕對置中 */
    display: flex !important;
    align-items: center !important; /* 垂直置中 */
    justify-content: center !important; /* 水平置中 */

    font-size: 0 !important; /* 隱藏多餘文字 */
  }

  /* 2. 箭頭圖示修正 */
  .back-to-top .up-arrow {
    font-size: 24px !important; /* 圖示大小 */
    line-height: 1 !important; /* ★關鍵：將行高設為 1，避免垂直偏移 */
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;

    /* 微調：如果視覺上覺得還是歪，可以改這個數字 (負數往上，正數往下) */
    transform: translateY(-2px);
  }

  /* 3. 書本圖示修正 */
  .tour-btn .btn-icon {
    font-size: 22px !important;
    line-height: 1 !important; /* ★關鍵 */
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;

    /* 微調：Emoji 通常視覺重心偏高，往下壓一點點看起來比較正 */
    transform: translateY(-3px);
  }

  /* 4. 隱藏原本的文字 */
  .back-to-top .top-text,
  .tour-btn .btn-text {
    display: none !important;
  }

  /* 5. 按鈕群組位置 */
  .action-btn-group {
    bottom: 15px;
    right: 15px;
    gap: 15px;
    align-items: center;
  }

  /* ============================================
     ★★★ 超強優先級 - 新聞標題手機版放大 ★★★
     ============================================ */

  /* 方法1：使用 ID 選擇器 + 屬性選擇器 (最高優先級) */
  html body div#section-exp-A p.article-body[style*="font-size: 30px"],
  html body div#section-exp-B p.article-body[style*="font-size: 30px"] {
    font-size: 20px !important;
    line-height: 1.3 !important;
    margin-bottom: 20px !important;
  }

  /* 方法2：針對置中且粗體的段落 (雙重保險) */
  html body div#section-exp-A p[style*="text-align: center"][style*="font-weight: bold"],
  html body div#section-exp-B p[style*="text-align: center"][style*="font-weight: bold"] {
    font-size: 20px !important;
    line-height: 1.3 !important;
  }

  /* 方法3：針對 content-card 內的新聞標題 (三重保險) */
  html body div#section-exp-A .content-card > p.article-body[style*="30px"],
  html body div#section-exp-B .content-card > p.article-body[style*="30px"] {
    font-size: 20px !important;
    line-height: 1.3 !important;
  }

  /* 方法4：最暴力版本 - 針對所有符合條件的段落 */
  html body #section-exp-A p[style*="30px"],
  html body #section-exp-B p[style*="30px"],
  html body #page-action strong[style*="30px"] {
    font-size: 20px !important;
  }

  /* 針對 action 頁面的「報導主題：」小標題與描述文 */
  html body #page-action span[style*="20px"],
  html body #page-action p[style*="20px"] {
    font-size: 16px !important;
  }

  /* ============================================
     ★★★ 統一字體層級規範 ★★★
     ============================================
     
     【字體大小對照表】
     ┌────────┬─────────┬──────────────────────┐
     │ 層級   │ 大小    │ 用途                 │
     ├────────┼─────────┼──────────────────────┤
     │ 標題一 │ 22px    │ 頁面主標題           │
     │ 標題二 │ 19px    │ 區塊/章節標題        │
     │ 標題三 │ 17px    │ 小節/影片標題        │
     │ 內文   │ 15px    │ 正文內容             │
     │ 小字   │ 13px    │ 註解、說明文字       │
     └────────┴─────────┴──────────────────────┘
     
  ============================================ */

  /* ------------------------------------------
     【標題一】頁面主標題 - 26px
     例如：公民記者搶先看、Vlog、詳細看...
     ------------------------------------------ */
  .page-main-heading {
    font-size: 22px !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
    text-align: center !important;
    margin-top: 20px !important;
    margin-bottom: 25px !important;
    padding-top: 0 !important;
  }

  /* ------------------------------------------
     【標題二】區塊/章節標題 - 22px
     例如：案例一、報導主題、比較表格標題...
     ------------------------------------------ */
  .case-study-title,
  .section-heading,
  .content-card h3,
  .accordion-header,
  h2.section-heading {
    font-size: 19px !important;
    font-weight: bold !important;
    line-height: 1.5 !important;
    margin-bottom: 15px !important;
  }

  /* Vlog 綠色框框標題特別處理 */
  .case-study-title {
    border-bottom-width: 2px;
    padding-bottom: 10px;
  }

  /* 手風琴標題 */
  .accordion-header {
    padding: 15px !important;
  }

  /* ------------------------------------------
     【標題三】小節/影片標題 - 18px
     例如：影片上方標題、新聞稿標題...
     ------------------------------------------ */
  #page-vlog .article-body[style*="font-size: 22px"],
  .content-card h4,
  .content-card h5,
  h4,
  h5 {
    font-size: 17px !important;
    font-weight: bold !important;
    line-height: 1.5 !important;
    margin-bottom: 15px !important;
  }

  /* Vlog 影片標題特別放大（27px 的那些） */
  #page-vlog .article-body[style*="font-size: 27px"] {
    font-size: 22px !important; /* 放大到 22px */
    font-weight: bold !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
    text-align: center !important;
  }

  /* Vlog 案例標題（24px 的那些） */
  #page-vlog .article-body strong[style*="font-size: 24px"] {
    font-size: 19px !important;
  }

  /* 影片標題置中 */
  #page-vlog .article-body[style*="font-size: 22px"] {
    text-align: center !important;
  }

  /* 內文與描述文縮小（18px, 20px 的那些） */
  #page-vlog .article-body[style*="font-size: 18px"],
  #page-action .article-body[style*="font-size: 20px"],
  #page-action p[style*="font-size: 20px"] {
    font-size: 15px !important;
  }

  /* ------------------------------------------
     【內文】正文內容 - 15px
     ------------------------------------------ */
  .article-body,
  .content-card p,
  .chat-container p {
    font-size: 15px !important;
    line-height: 1.9 !important;
    text-align: justify !important;
  }

  /* 例外：HTML 中已設定置中的內文不要被覆蓋 */
  .article-body[style*="text-align: center"],
  .content-card .article-body[style*="text-align: center"] {
    text-align: center !important;
  }

  /* 聊天氣泡文字 */
  .message-bubble {
    max-width: 85%;
    padding: 15px 20px !important; /* 與電腦版一致 */
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  /* 對話氣泡間距統一（與電腦版一致） */
  .reporter-message,
  .passerby-message {
    margin-bottom: 30px !important; /* 確保間距一致，不會擠在一起 */
  }

  /* ------------------------------------------
     【小字】註解、說明、表格 - 14px
     ------------------------------------------ */
  .message-sender,
  figcaption,
  .caption,
  .note {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  /* Footer 手機版 */
  .footer {
    font-size: 11px !important; /* 保持 11px */
    padding: 3px 0 !important;
    line-height: 1.2 !important;
  }

  .copyright-link {
    font-size: 11px !important;
  }

  /* 表格文字 - 15px */
  .responsive-table th,
  .responsive-table td {
    font-size: 15px !important;
    padding: 10px !important;
  }

  /* ------------------------------------------
     【按鈕文字】
     ------------------------------------------ */
  .exp-option-button {
    font-size: 16px !important;
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
    display: flex;
  }

  .nav-menu a {
    font-size: 16px !important;
  }

  .tour-btn {
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.2 !important;
    gap: 6px !important;
    padding: 10px 18px !important;
  }

  .tour-btn .btn-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    /* 針對 iPhone Safari 的表情符號對齊修正 */
    font-size: 16px !important;
    position: relative !important;
    top: 0 !important;
    /* WebKit 專用修正 */
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
  }

  /* iOS Safari 專用：強制表情符號居中 */
  @supports (-webkit-touch-callout: none) {
    .tour-btn .btn-icon {
      position: relative !important;
      top: 3px !important;
    }
  }

  /* ------------------------------------------
     【微體驗 emoji 文字統一】
     ------------------------------------------ */
  /* 統一地點和採訪文字的字體大小 */
  #section-exp-A h4,
  #section-exp-B h4,
  #section-exp-A p.article-body strong,
  #section-exp-B p.article-body strong {
    font-size: 16px !important; /* 統一為 16px，與內文一致 */
  }

  /* 地點文字內的 span 也要統一 */
  #section-exp-A h4 span,
  #section-exp-B h4 span {
    font-size: 16px !important;
  }

  /* ============================================
     細節調整 - 手機版內文置中
     ============================================ */

  /* 1. 「請選擇你的採訪路線：」文字置中（experience.html） */
  div[style*="text-align: center"] > p[style*="font-size: 18px"],
  #section-exp-intro div[style*="text-align: center"] p {
    text-align: center !important;
  }

  /* 2. 隱藏 Vlog 的「案例一」「案例二」綠色標題 */
  #page-vlog .case-study-title {
    display: none !important;
  }

  /* 3. 良好素質/沒有素質記者按鈕放大 */
  .exp-option-button {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 20px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 18px 25px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    min-height: 60px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
  }

  .exp-option-button:active {
    transform: scale(0.98) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  }

  /* 4. 心智圖左右空白處刪掉 */
  .mindmap-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-15px) !important;
    margin-right: calc(-15px) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .mindmap-container svg {
    min-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
  }

  /* 公民記者定位圖片（手機版）*/
  .mindmap-image-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 25px !important;
    margin-bottom: 25px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }

  .mindmap-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 0 !important;
    display: block !important;
    object-fit: contain !important;
  }

  /* 手機版顯示不同的圖片 */
  .mindmap-image-desktop {
    display: none !important; /* 隱藏電腦版圖片 */
  }

  .mindmap-image-mobile {
    display: block !important; /* 顯示手機版圖片 */
  }
}

/* ========================================
   左下角小人物裝飾 👧
   固定在頁面左下角的可愛小人物
   手機版不顯示
   ======================================== */

.page-girl {
  position: fixed;
  bottom: 0px;
  left: 80px;
  width: 200px;
  height: auto;
  z-index: 999;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.page-girl:hover {
  opacity: 1;
}

/* 手機版隱藏 */
@media (max-width: 768px) {
  .page-girl {
    display: none;
  }
}

/* ========================================
   左下角小人物裝飾 👧
   包含對話框和跳動文字動畫
   ======================================== */

/* 小人物容器 */
.page-girl-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 999;
  pointer-events: none;
}

/* 小人物圖片 */
.page-girl {
  width: 180px;
  height: auto;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.page-girl:hover {
  opacity: 1;
}

/* 對話框 */
.girl-dialog {
  position: absolute;
  bottom: 310px; /* 在小人物上方 */
  left: 50px;
  background: transparent;
  border: 2px solid #7c9082;
  border-radius: 15px;
  padding: 12px 20px;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(124, 144, 130, 0.2);
}

/* 對話框小三角 */
.girl-dialog::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 30px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid #7c9082;
}

/* 對話框內三角(製造空心效果) */
.girl-dialog::before {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 32px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid white;
  z-index: 1;
}

/* 對話框文字 */
.girl-dialog-text {
  font-size: 16px;
  font-weight: 600;
  color: #7c9082;
  display: flex;
  gap: 2px;
}

/* 每個字的跳動動畫 */
.girl-dialog-text span {
  display: inline-block;
  animation: text-bounce 1.5s ease-in-out infinite;
}

/* 每個字延遲不同時間開始動畫 */
.girl-dialog-text span:nth-child(1) {
  animation-delay: 0s;
}
.girl-dialog-text span:nth-child(2) {
  animation-delay: 0.1s;
}
.girl-dialog-text span:nth-child(3) {
  animation-delay: 0.2s;
}
.girl-dialog-text span:nth-child(4) {
  animation-delay: 0.3s;
}
.girl-dialog-text span:nth-child(5) {
  animation-delay: 0.4s;
}
.girl-dialog-text span:nth-child(6) {
  animation-delay: 0.5s;
}
.girl-dialog-text span:nth-child(7) {
  animation-delay: 0.6s;
}
.girl-dialog-text span:nth-child(8) {
  animation-delay: 0.7s;
}
.girl-dialog-text span:nth-child(9) {
  animation-delay: 0.8s;
}

/* 跳動動畫 */
@keyframes text-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* 平板和小螢幕隱藏（1440px 以下） */
@media (max-width: 1440px) {
  .page-girl-container {
    display: none;
  }
}

/* 手機版隱藏（保留作為備用） */
@media (max-width: 768px) {
  .page-girl-container {
    display: none;
  }
}

/* ========================================
   右上角功能按鈕 (位置調整版)
   按鈕位置往下移
   ======================================== */

/* 按鈕容器 - 位置往下 */
.header-buttons {
  position: absolute;
  right: 20px;
  top: 50%; /* 從上方 50% 開始 */
  transform: translateY(-50%); /* 往上拉回一半高度 */
  display: flex;
  gap: 10px;
  z-index: 1001;
}

/* 通用按鈕樣式 */
.header-btn {
  height: 36px;
  border-radius: 18px;
  background: transparent;
  border: 2px solid #7c9082;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #7c9082;
  font-size: 16px;
  padding: 0;
  gap: 6px;
  text-decoration: none;
}

/* 深色模式按鈕 - 圓形 */
.theme-toggle-btn {
  width: 36px;
  padding: 0;
}

/* 問題回報按鈕 - 電腦版膠囊形 */
.feedback-btn {
  width: auto;
  padding: 0 15px 0 10px;
  font-size: 14px;
  font-weight: 500;
}

.feedback-icon {
  font-size: 18px;
  font-weight: 600;
}

.feedback-text {
  display: inline;
  white-space: nowrap;
}

/* 懸停效果 */
.header-btn:hover {
  background: rgba(124, 144, 130, 0.1);
  border-color: #5f7a6b;
  color: #5f7a6b;
  transform: scale(1.05);
}

/* 點擊效果 */
.header-btn:active {
  transform: scale(0.95);
}

/* 深色模式按鈕 icon */
.theme-btn-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 手機版調整 */
@media (max-width: 768px) {
  .header-buttons {
    right: 15px;
    top: 50px;
    gap: 8px;
  }

  .header-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
  }

  .feedback-text {
    display: none;
  }

  .feedback-icon {
    font-size: 14px;
    line-height: 1; /* 修正垂直對齊 */
  }

  .theme-btn-icon {
    width: 14px;
    height: 14px;
  }
}

/* ========================================
   深色模式 - 擴充版
   ======================================== */

/* 基礎深色模式 */
body.dark-mode {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

/* 深色模式 Logo 切換 */
.logo-dark {
  display: none !important;
}
.logo-light {
  display: block;
}

body.dark-mode .logo-light {
  display: none !important;
}
body.dark-mode .logo-dark {
  display: block !important;
}

body.dark-mode .header {
  background-color: #2a2a2a;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* 導覽選單 */
body.dark-mode .nav-menu a {
  color: #e0e0e0;
}

body.dark-mode .nav-menu a:hover,
body.dark-mode .nav-menu a.active {
  color: #8fa895;
  border-bottom-color: #8fa895;
}

/* 按鈕 */
body.dark-mode .header-btn {
  border-color: #8fa895;
  color: #8fa895;
}

body.dark-mode .header-btn:hover {
  background: rgba(143, 168, 149, 0.1);
  border-color: #a0b9a8;
  color: #a0b9a8;
}

/* 主要內容區 */
body.dark-mode .main-content {
  background-color: #1a1a1a;
}

/* 所有卡片/區塊 */
body.dark-mode .content-section,
body.dark-mode .info-card,
body.dark-mode .card,
body.dark-mode .section-card,
body.dark-mode .intro-section,
body.dark-mode .feature-section {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border-color: #3a3a3a;
}

/* 標題 */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: #8fa895;
}

/* 段落和文字 */
body.dark-mode p,
body.dark-mode li,
body.dark-mode span {
  color: #d0d0d0;
}

/* 連結 */
body.dark-mode a {
  color: #8fa895;
}

body.dark-mode a:hover {
  color: #a0b9a8;
}

/* 對話框 */
body.dark-mode .girl-dialog {
  background: #2a2a2a;
  border-color: #8fa895;
}

body.dark-mode .girl-dialog-text {
  color: #8fa895;
}

body.dark-mode .girl-dialog::before {
  border-top-color: #2a2a2a;
}

/* 按鈕(一般按鈕,不是 header 的) */
body.dark-mode button,
body.dark-mode .btn {
  background-color: #3a3a3a;
  color: #e0e0e0;
  border-color: #4a4a4a;
}

body.dark-mode button:hover,
body.dark-mode .btn:hover {
  background-color: #4a4a4a;
}

/* 體驗頁面的選項按鈕 */
body.dark-mode .exp-option-button {
  background: linear-gradient(135deg, #3a4a3a 0%, #4a5a4a 100%);
  border-color: #8fa895;
  color: #e0e0e0;
}

body.dark-mode .exp-option-button:hover {
  background: linear-gradient(135deg, #4a5a4a 0%, #5a6a5a 100%);
}

/* 圖片容器 */
body.dark-mode .image-container,
body.dark-mode .img-wrapper {
  background-color: #2a2a2a;
  border-color: #3a3a3a;
}

/* Footer */
body.dark-mode footer {
  background-color: #2a2a2a;
  color: #d0d0d0;
  border-top-color: #3a3a3a;
}

/* 分隔線 */
body.dark-mode hr {
  border-color: #3a3a3a;
}

/* 表格 */
body.dark-mode table {
  background-color: #2a2a2a;
  color: #e0e0e0;
}

body.dark-mode th {
  background-color: #3a3a3a;
}

body.dark-mode td {
  border-color: #3a3a3a;
}

/* 輸入框 */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background-color: #3a3a3a;
  color: #e0e0e0;
  border-color: #4a4a4a;
}

/* 所有白色背景的元素 */
body.dark-mode [style*="background: white"],
body.dark-mode [style*="background-color: white"],
body.dark-mode .white-bg,
body.dark-mode .bg-white {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
}

/* ========================================
   右上角功能按鈕 - 與導覽選單對齊
   ======================================== */

/* 按鈕容器 - 與導覽選單垂直對齊 */
.header-buttons {
  position: absolute;
  right: 20px;
  bottom: 10px; /* 使用 bottom 對齊導覽選單 */
  display: flex;
  gap: 10px;
  z-index: 1001;
}

/* 通用按鈕樣式 */
.header-btn {
  height: 36px;
  border-radius: 18px;
  background: transparent;
  border: 2px solid #7c9082;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #7c9082;
  font-size: 16px;
  padding: 0;
  gap: 6px;
}

/* 深色模式按鈕 - 圓形 */
.theme-toggle-btn {
  width: 36px;
  padding: 0;
}

.theme-toggle-btn .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" 0,
    "opsz" 24;
}

/* 客服按鈕 - 圓形（與深淺模式按鈕一致） */
.feedback-btn {
  width: 36px;
  padding: 0;
}

.feedback-btn .material-symbols-rounded {
  font-size: 20px;
  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" 0,
    "opsz" 24;
}

/* 懸停效果 */
.header-btn:hover {
  background: rgba(124, 144, 130, 0.1);
  border-color: #5f7a6b;
  color: #5f7a6b;
  transform: scale(1.05);
}

/* 點擊效果 */
.header-btn:active {
  transform: scale(0.95);
}

/* 深色模式按鈕 icon */
.theme-btn-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 手機版調整 */
@media (max-width: 768px) {
  .header-buttons {
    right: 15px;
    bottom: 8px;
    gap: 8px;
  }

  .header-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
  }

  .theme-toggle-btn .material-symbols-rounded {
    font-size: 18px;
    font-variation-settings:
      "FILL" 0,
      "wght" 300,
      "GRAD" 0,
      "opsz" 24;
  }

  .feedback-btn .material-symbols-rounded {
    font-size: 18px;
    font-variation-settings:
      "FILL" 0,
      "wght" 300,
      "GRAD" 0,
      "opsz" 24;
  }
}

/* ========================================
   深色模式樣式 - 完整加強版
   ======================================== */

/* 基礎深色模式 */
body.dark-mode {
  background-color: #1a1a1a !important;
  color: #e0e0e0 !important;
}

/* Header */
body.dark-mode .header {
  background-color: #2a2a2a !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

/* 導覽選單 */
body.dark-mode .nav-menu a {
  color: #e0e0e0 !important;
}

body.dark-mode .nav-menu a:hover,
body.dark-mode .nav-menu a.active {
  color: #8fa895 !important;
  border-bottom-color: #8fa895 !important;
}

/* 按鈕 */
body.dark-mode .header-btn {
  border-color: #8fa895 !important;
  color: #8fa895 !important;
}

body.dark-mode .header-btn:hover {
  background: rgba(143, 168, 149, 0.1) !important;
  border-color: #a0b9a8 !important;
  color: #a0b9a8 !important;
}

/* 主要內容區 - 最重要! */
body.dark-mode .main-content {
  background-color: #1a1a1a !important;
}

body.dark-mode .page-content {
  background-color: #1a1a1a !important;
}

/* 所有卡片 - 用 !important 強制覆蓋 */
body.dark-mode .content-card,
body.dark-mode .image-float-card,
body.dark-mode .info-card,
body.dark-mode .card {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
  border-color: #3a3a3a !important;
}

/* 標題 */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .section-heading,
body.dark-mode .page-main-heading {
  color: #8fa895 !important;
}

/* 段落和文字 */
body.dark-mode p,
body.dark-mode li,
body.dark-mode .article-body {
  color: #d0d0d0 !important;
}

/* 強調文字 */
body.dark-mode strong,
body.dark-mode b {
  color: #8fa895 !important;
}

/* detail 頁面中使用內聯樣式的綠色文字元素 - 覆蓋內聯樣式 */
body.dark-mode [style*="color: #7c9082"],
body.dark-mode [style*="color:#7c9082"] {
  color: #8fa895 !important;
}

/* detail 頁面中的 h4 標題（包含內聯樣式的） */
body.dark-mode .accordion-content h4,
body.dark-mode .content-card h4 {
  color: #8fa895 !important;
}

/* detail 頁面中使用深色文字的內聯樣式元素 - 在深色模式下改為淺色 */
body.dark-mode [style*="color: #333"],
body.dark-mode [style*="color:#333"],
body.dark-mode [style*="color: #444"],
body.dark-mode [style*="color:#444"] {
  color: #d0d0d0 !important;
}

/* 連結 */
body.dark-mode a {
  color: #8fa895 !important;
}

body.dark-mode a:hover {
  color: #a0b9a8 !important;
}

/* 對話框 */
body.dark-mode .girl-dialog {
  background: #2a2a2a !important;
  border-color: #8fa895 !important;
}

body.dark-mode .girl-dialog-text {
  color: #8fa895 !important;
}

body.dark-mode .girl-dialog::before {
  border-top-color: #2a2a2a !important;
}

/* 體驗頁面的選項按鈕 */
body.dark-mode .exp-option-button {
  background: linear-gradient(135deg, #3a4a3a 0%, #4a5a4a 100%) !important;
  border-color: #8fa895 !important;
  color: #e0e0e0 !important;
}

body.dark-mode .exp-option-button:hover {
  background: linear-gradient(135deg, #4a5a4a 0%, #5a6a5a 100%) !important;
  box-shadow:
    0 8px 20px rgba(143, 168, 149, 0.3),
    0 4px 12px rgba(143, 168, 149, 0.2) !important;
}

/* 圖片容器 */
body.dark-mode .image-container,
body.dark-mode .img-wrapper,
body.dark-mode .content-image {
  background-color: #2a2a2a !important;
  border-color: #3a3a3a !important;
}

/* 圖片亮度調整 */
body.dark-mode img {
  opacity: 0.9;
  filter: brightness(0.9);
}

body.dark-mode img:hover {
  opacity: 1;
  filter: brightness(1);
}

/* 搶先看圖片與公民記者定位圖 - 深色模式下也不要有 hover 效果 */
body.dark-mode .image-float-card .content-image,
body.dark-mode .mindmap-image {
  opacity: 0.9;
  filter: brightness(0.9);
}

body.dark-mode .image-float-card .content-image:hover,
body.dark-mode .mindmap-image:hover {
  opacity: 0.9;
  filter: brightness(0.9);
  transform: none;
}

/* Modal */
body.dark-mode .modal-content {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
}

body.dark-mode .modal-overlay {
  background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Accordion */
body.dark-mode .accordion-content {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
}

/* Lightbox */
body.dark-mode .lightbox-content {
  background-color: #2a2a2a !important;
}

/* Footer */
body.dark-mode footer {
  background-color: #2a2a2a !important;
  color: #d0d0d0 !important;
  border-top: 1px solid #3a3a3a !important;
}

/* 分隔線 */
body.dark-mode hr {
  border-color: #3a3a3a !important;
}

/* 表格 */
body.dark-mode table {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
}

body.dark-mode th {
  background-color: #3a3a3a !important;
  color: #8fa895 !important;
}

body.dark-mode td {
  border-color: #3a3a3a !important;
}

/* 輸入框 */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background-color: #3a3a3a !important;
  color: #e0e0e0 !important;
  border-color: #4a4a4a !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #888 !important;
}

/* 滾動條 */
body.dark-mode::-webkit-scrollbar {
  width: 12px;
  background: #1a1a1a;
}

body.dark-mode::-webkit-scrollbar-track {
  background: #2a2a2a;
}

body.dark-mode::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 6px;
}

body.dark-mode::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

/* 所有白色背景強制改深色 */
body.dark-mode [style*="background: white"],
body.dark-mode [style*="background-color: white"],
body.dark-mode [style*="background:#fff"],
body.dark-mode [style*="background-color:#fff"] {
  background-color: #2a2a2a !important;
}

/* 所有黑色文字改淺色 */
body.dark-mode [style*="color: black"],
body.dark-mode [style*="color:#000"],
body.dark-mode [style*="color: #333"] {
  color: #e0e0e0 !important;
}

/* 聊天對話框深色模式 */
body.dark-mode .chat-container {
  background-color: #2a2a2a !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .reporter-message .message-bubble {
  background-color: #5a6a5a !important;
  color: #e0e0e0 !important;
}

body.dark-mode .passerby-message .message-bubble {
  background-color: #3a3a3a !important;
  color: #d0d0d0 !important;
  border-color: #4a4a4a !important;
}

body.dark-mode .message-sender {
  color: #a0a0a0 !important;
}

/* 公民記者新聞稿邊框 - 深色模式 */
/* 綠色邊框 (良好素質) */
body.dark-mode .content-card[style*="border: 3px solid #7c9082"] {
  border-color: #8fa895 !important;
}

/* 紅色邊框 (無良好素質) - 使用適合深色模式的紅色 */
body.dark-mode .content-card[style*="border: 3px solid #d9534f"] {
  border-color: #c9534f !important;
}

/* 新聞稿標題顏色 - 深色模式 */
body.dark-mode .section-heading[style*="color: #7c9082"] {
  color: #8fa895 !important;
}

body.dark-mode .section-heading[style*="color: #d9534f"] {
  color: #e97571 !important;
}
