/* === 主體樣式 === */
body {
  background-color: #7DB9DE !important;
  font-family: "Noto Sans TC", "Helvetica Neue", sans-serif !important;
  font-weight: 400 !important;
}

a {
  color: #66BAB7;
  text-decoration: none;
}

html {
  font-size: 14.4px;
}

@media (min-width: 769px) {
  html {
    font-size: 16px; /* 桌面版，1rem = 16px */
  }
}

/* === 導覽列樣式 === */
@media screen and (min-width: 769px) {
  .fixed-header {
    position: fixed;
    top: 25vh; /* 上方留 10% 高度 */
    left: 0;
    width: 64px;
    height: 50vh; /* 垂直只佔 80% 螢幕 */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 平均分布 */
    align-items: center;
    border-radius: 0 12px 12px 0;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 9999;
  }

  .fixed-header a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 64px;
  }

  .fixed-header img {
    width: 32px;
    height: 32px;
  }

  .fixed-header .post-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  }
}

@media screen and (max-width: 768px) {
  .fixed-header {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
    border-radius: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.05);
    z-index: 9999; /* 很重要 */
    transition: transform 0.3s ease;
  }

  body {
    padding-bottom: 56px; /* 保留空間給底部導覽列 */
  }

  .fixed-header.hide-on-scroll {
    transform: translateY(100%);
  }

  .notification-badge {
    top: 0px !important;
    left: 25px !important;
  }
}

@media screen and (min-width: 769px) {
  .fixed-header.hide-on-scroll {
    transform: none; /* 電腦版不應該移動 */
  }
}

/* 🔴 通知紅點樣式 */
.notification-container {
  position: relative;
  display: inline-block;
}

.notification-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 8px;
  height: 8px;
  background-color: #ff4444;
  border-radius: 50%;
  border: 1px solid #fff;
  display: none;
  z-index: 10;
}

.notification-badge.show {
  display: block;
}

/* === 調整字體大小 === */
.font-controls {
  position: fixed;
  top: 90%;
  left: 1rem;
  transform: translateY(-50%);
  display: none; /* 桌面才顯示 */
  flex-direction: column;
  align-items: center;
  z-index: 9999;
  gap: 4px;
}

.font-controls button,
.font-controls span {
  background: #fff;
  color: #000;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 35px;
  height: 35px;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.font-controls span {
  font-weight: bold;
  flex-direction: column;
  position: relative;
}

.font-px {
  font-size: 0.5rem;
  color: #666;
  line-height: 1;
  margin-top: 2px;
}

@media (min-width: 769px) {
  .font-controls {
    display: flex;
  }
}

/* === backToTop === */
#backToTop {
  position: fixed !important;
  bottom: 100px !important;
  right: 20px !important;
  width: 48px;
  height: 48px;
  background-color: #1E88A8;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s, transform 0.3s;
  display: none;
  z-index: 9999;
}
#backToTop.show {
  display: block !important;
}

#backToTop img {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ===== 檢舉泡泡樣式 ===== */
.report-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
}
.report-modal.hidden { display: none; }

.report-box {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.report-header {
  display: flex; justify-content: space-between;
  font-weight: bold; font-size: 1.2rem;
  margin-bottom: 1rem;
}

.close-btn {
  background: none; border: none; font-size: 20px;
  cursor: pointer;
}

.section-title {
  font-size: 0.8rem; font-weight: bold;
  margin-bottom: 8px;
}

.report-tags button {
  margin: 4px;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: #f8f8f8;
  cursor: pointer;
}

.report-tags button.active {
  background: #1E88A8;
  color: white;
  border-color: #1E88A8;
}

textarea#reportReason {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  resize: none;
  height: 60px;
}

.submit-btn {
  margin-top: 16px;
  background-color: #1E88A8;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
}

/* 預設 footer 固定在視窗底部、置中 */
#site-footer {
  bottom: 0px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #eee;
  font-size: 14px;
}

#site-footer.float-footer {
  position: fixed;
  right: 16px;
  left: auto;
  width: auto;
  color: #eee;
}

@media screen and (max-width: 1500px) {
  #site-footer.float-footer {
    position: relative;
    right: auto;
    left: 50%;
    width: 90%;
    transform: translateX(-50%);
    font-size: 12px;
  }
}

#site-footer a {
  color: #ffffff;
}

