/* ==================== 主題切換按鈕 ==================== */
.theme-btn > .fa-lightbulb {
  display: inline-block;
}
.theme-btn > .fa-moon {
  display: none;
}
.theme-btn.light > .fa-lightbulb {
  display: none;
}
.theme-btn.light > .fa-moon {
  display: inline-block;
}

/* ==================== Footer 樣式 ==================== */
.footer {
  margin-top: 3rem;
  background-color: var(--bs-tertiary-bg);
  border-top: 1px solid var(--bs-border-color);
}

.footer h5,
.footer h6 {
  color: var(--bs-emphasis-color);
  font-weight: 600;
}

.footer a {
  color: var(--bs-body-color);
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--bs-primary);
}

.footer .small {
  font-size: 0.875rem;
}

.footer hr {
  opacity: 0.3;
}

/* Dark mode 優化 */
[data-bs-theme="dark"] .footer {
  background-color: #1a1a1a;
  border-top-color: #3a3a3a;
}

/* ==================== 回到頂部按鈕 ==================== */
.btn-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  cursor: pointer;
  border: none;
}

.btn-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-back-to-top:active {
  transform: translateY(-2px);
}

/* 響應式調整 */
@media (max-width: 768px) {
  .btn-back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}

/* Dark mode */
[data-bs-theme="dark"] .btn-back-to-top {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .btn-back-to-top:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

/* ==================== 404 頁面樣式 ==================== */
.not-found-container {
  min-height: calc(100vh - 360px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.not-found-content {
  max-width: 600px;
  width: 100%;
  padding: 0 1rem;
}

.not-found-code h1 {
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.not-found-message h2 {
  font-weight: 600;
}

.not-found-reasons .card {
  transition: transform 0.2s ease;
}

.not-found-reasons .card:hover {
  transform: translateY(-2px);
}

.not-found-actions .btn {
  min-width: 150px;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .not-found-code h1 {
    font-size: 5rem;
  }

  .not-found-actions .btn {
    min-width: 100%;
  }

  .not-found-actions .d-flex {
    flex-direction: column;
  }
}

.cursor-pointer {
  cursor: pointer;
}

/* ====== 後台 ====== */
.question-text p {
  margin: 0.5rem 0;
}
.question-text pre {
  margin: 0.5rem 0;
}