/**
 * 語音讀經系統專屬樣式
 * Bible Reading System Styles v1.0
 *
 * 基於 design-system.css 擴展
 */

/* ===== 頁面專屬變數 ===== */
:root {
  --verse-card-bg: linear-gradient(135deg, var(--gold-300), var(--gold-400));
  --waveform-bar-color: var(--gold-400);
  --bottom-nav-height: 70px;
}

/* ===== 頁面基礎 ===== */
.page-bible-reading {
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
  background: var(--ivory-50);
}

/* ===== 頂部導航 ===== */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-100);
}

.nav-header .nav-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-header .nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.nav-header .nav-back:hover {
  background: var(--gold-50);
  color: var(--gold-500);
}

/* ===== 底部導航 (5 欄) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--gold-100);
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: var(--transition-fast);
  min-height: 56px;
}

.bottom-nav-item .icon {
  font-size: 20px;
  transition: var(--transition-fast);
}

.bottom-nav-item:hover {
  color: var(--gold-400);
}

.bottom-nav-item.active {
  color: var(--gold-500);
}

.bottom-nav-item.active .icon {
  transform: scale(1.1);
}

/* ===== 經節卡片 ===== */
.verse-card {
  background: var(--verse-card-bg);
  border-radius: var(--radius-xl);
  padding: 24px;
  color: white;
  box-shadow: 0 10px 30px rgba(185, 150, 11, 0.3);
  margin-bottom: 20px;
}

.verse-card .verse-label {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 13px;
  margin-bottom: 12px;
}

.verse-card .verse-ref {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.verse-card .verse-text {
  font-size: 16px;
  line-height: 1.8;
  opacity: 0.95;
}

.verse-card .verse-date {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 12px;
}

/* ===== 統計網格 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--gold-100);
  transition: var(--transition-normal);
}

.stat-card:hover {
  border-color: var(--gold-200);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-500);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }
.stat-card.info .stat-value { color: var(--info); }

/* ===== 錄音控制區 ===== */
.recording-controls {
  background: white;
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--gold-100);
  margin-bottom: 20px;
}

.recording-time {
  font-size: 48px;
  font-weight: 300;
  font-family: 'SF Mono', 'Monaco', monospace;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.recording-limit {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* 主錄音按鈕 */
.record-btn-main {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  font-size: 28px;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.record-btn-main:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.5);
}

.record-btn-main:active {
  transform: scale(0.98);
}

.record-btn-main.recording {
  animation: pulse-record 1.5s ease-in-out infinite;
}

@keyframes pulse-record {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
}

@media (min-width: 768px) {
  .record-btn-main {
    width: 100px;
    height: 100px;
    font-size: 36px;
  }
}

.recording-status {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.recording-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== 波形視覺化 ===== */
.waveform-container {
  background: var(--ivory-100);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.waveform-canvas {
  width: 100%;
  height: 80px;
  border-radius: var(--radius-md);
  background: white;
}

@media (min-width: 768px) {
  .waveform-canvas {
    height: 120px;
  }
}

.waveform-time {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'SF Mono', monospace;
}

/* 簡易 CSS 波形動畫 (備用) */
.audio-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 50px;
  margin: 16px 0;
}

.audio-wave span {
  width: 4px;
  background: linear-gradient(to top, var(--gold-300), var(--gold-400));
  border-radius: 2px;
  animation: wave-bar 0.5s ease-in-out infinite;
}

.audio-wave span:nth-child(1) { animation-delay: 0s; }
.audio-wave span:nth-child(2) { animation-delay: 0.1s; }
.audio-wave span:nth-child(3) { animation-delay: 0.2s; }
.audio-wave span:nth-child(4) { animation-delay: 0.3s; }
.audio-wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave-bar {
  0%, 100% { height: 12px; }
  50% { height: 40px; }
}

/* ===== 多段錄音編輯器 ===== */
.segments-editor {
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px;
  border: 1px solid var(--gold-100);
  margin-bottom: 20px;
}

.segments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.segments-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.segments-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.segment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--ivory-100);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}

.segment-item:hover {
  background: var(--gold-50);
}

.segment-item.selected {
  border-color: var(--gold-400);
  background: var(--gold-50);
}

.segment-item.empty {
  border: 2px dashed var(--gold-200);
  background: transparent;
  justify-content: center;
  color: var(--text-muted);
}

.segment-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-400);
  color: white;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.segment-info {
  flex: 1;
  min-width: 0;
}

.segment-info .segment-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.segment-info .segment-duration {
  font-size: 12px;
  color: var(--text-muted);
}

.segment-actions {
  display: flex;
  gap: 8px;
}

.segment-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== 經文導讀 ===== */
.verse-guide {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gold-100);
  margin-bottom: 20px;
  overflow: hidden;
}

.verse-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gold-100);
}

.verse-guide-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.verse-guide-body {
  padding: 20px;
}

.verse-content {
  font-size: 20px;
  line-height: 3.2;
  color: var(--text-primary);
  padding-top: 20px;
}

.verse-content ruby {
  ruby-position: over;
  ruby-align: center;
  display: inline-flex;
  flex-direction: column-reverse;
  align-items: center;
  vertical-align: bottom;
  margin: 0 1px;
}

.verse-content ruby rt {
  font-size: 11px;
  color: var(--gold-500);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
  display: block;
  text-align: center;
  margin-bottom: 2px;
}

/* 響應式注音大小 */
@media (min-width: 480px) {
  .verse-content {
    font-size: 22px;
    line-height: 3.4;
  }
  .verse-content ruby rt {
    font-size: 12px;
  }
}

@media (min-width: 768px) {
  .verse-content {
    font-size: 24px;
    line-height: 3.6;
  }
  .verse-content ruby rt {
    font-size: 13px;
  }
}

.verse-content .highlight-key {
  background: linear-gradient(to bottom, transparent 60%, var(--warning-light) 60%);
  padding: 0 2px;
}

.verse-content .highlight-pause {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: var(--gold-100);
  border-radius: 4px;
  font-size: 10px;
  vertical-align: middle;
  margin: 0 4px;
}

.verse-guide-footer {
  padding: 16px 20px;
  background: var(--ivory-100);
  border-top: 1px solid var(--gold-100);
}

/* ===== 錄音列表 ===== */
.recording-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recording-item {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--gold-100);
  transition: var(--transition-normal);
}

.recording-item:hover {
  border-color: var(--gold-200);
  box-shadow: var(--shadow-md);
}

.recording-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recording-item-info {
  flex: 1;
  min-width: 0;
}

.recording-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.recording-item-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.recording-item-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recording-item-actions .btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.recording-item-actions .btn-play {
  background: var(--gold-100);
  color: var(--gold-500);
}

.recording-item-actions .btn-play:hover {
  background: var(--gold-200);
}

.recording-item-actions .btn-delete {
  background: var(--danger-light);
  color: var(--danger);
}

.recording-item-actions .btn-delete:hover {
  background: #FCA5A5;
}

/* 狀態標籤 */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.pending {
  background: var(--warning-light);
  color: #92400E;
}

.status-badge.verified {
  background: var(--success-light);
  color: #065F46;
}

.status-badge.needs-rerecord {
  background: var(--danger-light);
  color: #991B1B;
}

/* ===== 排行榜 ===== */
.podium {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
}

@media (min-width: 480px) {
  .podium {
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
  }
}

.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: var(--radius-xl);
  border: 2px solid var(--gold-100);
  width: 100%;
  max-width: 160px;
  transition: var(--transition-normal);
}

@media (min-width: 480px) {
  .podium-item.first {
    order: 2;
    transform: scale(1.1);
    border-color: var(--gold-300);
    box-shadow: 0 8px 24px rgba(201, 169, 98, 0.3);
  }

  .podium-item.second {
    order: 1;
  }

  .podium-item.third {
    order: 3;
  }
}

.podium-rank {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.podium-item.first .podium-rank {
  background: linear-gradient(135deg, #FCD34D, #F59E0B);
  color: white;
}

.podium-item.second .podium-rank {
  background: linear-gradient(135deg, #E5E7EB, #9CA3AF);
  color: white;
}

.podium-item.third .podium-rank {
  background: linear-gradient(135deg, #FCD9A0, #D97706);
  color: white;
}

.podium-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gold-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
}

.podium-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  text-align: center;
}

.podium-score {
  font-size: 13px;
  color: var(--text-muted);
}

/* 排行列表 */
.rank-list {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gold-100);
  overflow: hidden;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gold-100);
  transition: var(--transition-fast);
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-item:hover {
  background: var(--gold-50);
}

.rank-item.highlight {
  background: var(--gold-50);
  border-left: 3px solid var(--gold-400);
}

.rank-number {
  width: 32px;
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
}

.rank-item:nth-child(1) .rank-number { color: #F59E0B; }
.rank-item:nth-child(2) .rank-number { color: #9CA3AF; }
.rank-item:nth-child(3) .rank-number { color: #D97706; }

.rank-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.rank-stats {
  font-size: 12px;
  color: var(--text-muted);
}

.rank-score {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-500);
}

/* ===== Toast 通知 ===== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 40px);
  max-width: min(400px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  background: white;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toast-in 0.3s ease-out;
  pointer-events: auto;
}

.toast.fade-out {
  animation: toast-out 0.3s ease-out forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast .toast-icon {
  font-size: 18px;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast .toast-message {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

/* ===== 確認對話框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  max-width: min(360px, calc(100vw - 32px));
  width: 100%;
  padding: 24px;
  animation: modal-in 0.3s ease;
  position: relative;
  z-index: 2001;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== 骨架屏 ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--ivory-200) 25%,
    var(--ivory-100) 50%,
    var(--ivory-200) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 120px;
  border-radius: var(--radius-lg);
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* ===== 篩選按鈕組 ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  background: var(--ivory-200);
  color: var(--text-secondary);
}

.filter-tab:hover {
  background: var(--gold-100);
}

.filter-tab.active {
  background: var(--gold-400);
  color: white;
}

/* ===== 空狀態 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state .empty-icon {
  font-size: 64px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.empty-state .empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state .empty-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== 提示卡片 ===== */
.tips-card {
  background: var(--info-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.tips-card .tips-title {
  font-size: 15px;
  font-weight: 600;
  color: #1E40AF;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tips-card ul {
  list-style: none;
  font-size: 14px;
  color: #1E3A8A;
}

.tips-card li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.tips-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3B82F6;
}

/* ===== 通用輔助類 ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

.hidden { display: none !important; }

/* ===== 安全區域適配 ===== */
@supports (padding: env(safe-area-inset-bottom)) {
  .safe-bottom {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ===== 觸摸優化 ===== */
@media (hover: none) and (pointer: coarse) {
  button, a, [onclick], .btn, .filter-tab, .segment-item, .recording-item {
    min-height: 44px;
  }

  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ===== 小螢幕適配 ===== */
@media (max-width: 375px) {
  .verse-card {
    padding: 20px 16px;
  }

  .verse-card .verse-ref {
    font-size: 18px;
  }

  .recording-controls {
    padding: 24px 16px;
  }

  .recording-time {
    font-size: 40px;
  }
}

/* ===== 書卷 Metadata 卡片 ===== */
.book-metadata-card {
  background: linear-gradient(135deg, var(--ivory-50), var(--gold-50));
  border: 1px solid var(--gold-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.book-metadata-card.hidden {
  display: none;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .metadata-grid {
    grid-template-columns: 1fr;
  }
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metadata-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.metadata-value {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}

.metadata-theme {
  padding-top: 12px;
  border-top: 1px solid var(--gold-100);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metadata-theme .metadata-value {
  font-size: 15px;
  line-height: 1.6;
  color: var(--gold-700);
  font-weight: 500;
}

/* ===== 經文行樣式 ===== */
.verse-line {
  margin-bottom: 12px;
  padding-left: 28px;
  text-indent: -28px;
}

.verse-num {
  display: inline-block;
  min-width: 24px;
  color: var(--gold-500);
  font-weight: 600;
  font-size: 14px;
}

.verse-text {
  line-height: 1.9;
}

/* ===== 註解上標樣式 ===== */
.verse-note {
  font-size: 0.7em;
  color: var(--gold-500);
  vertical-align: super;
  margin-left: 1px;
  cursor: pointer;
  font-weight: 600;
}

.verse-note:hover {
  color: var(--gold-600);
  text-decoration: underline;
}

/* ===== 穿插綱目樣式 ===== */
.outline-inline {
  background: var(--gold-50);
  border-left: 4px solid var(--gold-400);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  text-indent: 0;
  padding-left: 16px;
}

.outline-marker {
  font-weight: 700;
  color: var(--gold-600);
  margin-right: 8px;
  font-size: 16px;
}

.outline-title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 15px;
}

.outline-range {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 8px;
}

/* ===== 顯示綱目切換選項 ===== */
.display-options {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gold-100);
}

.display-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.display-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-500);
}

/* ========== 成功確認 Modal ========== */
.success-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.success-modal {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  max-width: min(320px, calc(100vw - 32px));
  width: 90%;
  animation: modalIn 0.3s ease-out;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.success-modal-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.success-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #16a34a;
}

.success-modal-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.success-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.success-modal-btn:active {
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ========== 語音辨識結果比對樣式 ========== */
.recognition-comparison {
  margin-top: 16px;
  padding: 16px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-100);
}

.comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold-100);
  flex-wrap: wrap;
  gap: 8px;
}

.comparison-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.comparison-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-dot.correct { background: var(--success); }
.legend-dot.wrong { background: var(--danger); }
.legend-dot.missing { background: var(--warning); }
.legend-dot.extra { background: #8B5CF6; }

.comparison-text {
  font-size: 1.125rem;
  line-height: 2.4;
  word-break: break-all;
}

.comparison-text .char-correct {
  color: var(--success);
  background: var(--success-light);
  padding: 2px 1px;
  border-radius: 2px;
}

.comparison-text .char-wrong {
  color: white;
  background: var(--danger);
  padding: 2px 4px;
  border-radius: 2px;
  position: relative;
}

.comparison-text .char-wrong::after {
  content: attr(data-expected);
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--danger);
  background: var(--danger-light);
  padding: 1px 4px;
  border-radius: 2px;
  white-space: nowrap;
}

.comparison-text .char-missing {
  color: var(--warning);
  background: var(--warning-light);
  padding: 2px 4px;
  border-radius: 2px;
  text-decoration: line-through;
  opacity: 0.8;
}

.comparison-text .char-extra {
  color: #8B5CF6;
  background: #EDE9FE;
  padding: 2px 4px;
  border-radius: 2px;
  font-style: italic;
}

.comparison-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gold-100);
}

.stat-item {
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--ivory-50);
}

.stat-item .stat-num {
  font-size: 1.25rem;
  font-weight: 700;
}

.stat-item .stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-item.correct .stat-num { color: var(--success); }
.stat-item.wrong .stat-num { color: var(--danger); }
.stat-item.missing .stat-num { color: var(--warning); }
.stat-item.extra .stat-num { color: #8B5CF6; }

/* 辨識問題提示 */
.recognition-issues {
  margin-top: 12px;
  padding: 12px;
  background: var(--danger-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--danger);
}

.recognition-issues .issue-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.recognition-issues ul {
  list-style: none;
  font-size: 13px;
  color: #991B1B;
}

.recognition-issues li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.recognition-issues li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--danger);
}

/* ========== 額外響應式設計 ========== */

/* 極小螢幕 */
@media (max-width: 320px) {
  .verse-content {
    font-size: 16px;
    line-height: 3;
  }

  .verse-content ruby rt {
    font-size: 9px;
  }

  .comparison-legend {
    display: none;
  }

  .comparison-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .recognition-issues li {
    font-size: 12px;
  }
}

/* 小螢幕 */
@media (max-width: 375px) {
  .comparison-legend {
    justify-content: center;
    width: 100%;
  }

  .comparison-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .comparison-text {
    font-size: 1rem;
    line-height: 2.2;
  }

  .comparison-text .char-wrong::after {
    font-size: 9px;
    top: -16px;
  }
}

/* 中等螢幕 */
@media (min-width: 480px) {
  .recognition-comparison {
    padding: 20px;
  }

  .comparison-text {
    font-size: 1.25rem;
    line-height: 2.6;
  }

  .stat-item .stat-num {
    font-size: 1.5rem;
  }

  .stat-item .stat-label {
    font-size: 11px;
  }
}

/* 大螢幕 */
@media (min-width: 768px) {
  .recognition-comparison {
    padding: 24px;
  }

  .comparison-header {
    flex-wrap: nowrap;
  }

  .comparison-text {
    font-size: 1.375rem;
    line-height: 2.8;
  }

  .comparison-stats {
    gap: 12px;
  }

  .stat-item {
    padding: 12px;
  }

  .stat-item .stat-num {
    font-size: 1.75rem;
  }

  .stat-item .stat-label {
    font-size: 12px;
  }
}

/* 觸控裝置優化 */
@media (hover: none) and (pointer: coarse) {
  .comparison-text .char-wrong::after {
    display: none;
  }

  .comparison-text .char-wrong {
    border-bottom: 2px dashed var(--danger);
  }
}

/* ========================================
 * 語音讀經系統深度UI/UX增強 v2.0
 * Enhanced UI/UX for Bible Reading System
 * ======================================== */

/* ===== 全局溢出防護 ===== */
html {
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 100%;
}
body {
  overflow-x: hidden;
  overflow-y: auto !important;
  max-width: 100%;
}

*,
*::before,
*::after {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

img,
video,
canvas,
audio {
  max-width: 100%;
  height: auto;
}

/* ===== 極小螢幕支持 (< 320px) ===== */
@media (max-width: 319px) {
  .page-bible-reading {
    padding-left: 8px;
    padding-right: 8px;
  }

  .nav-header {
    padding: 8px 10px;
  }

  .nav-header .nav-title {
    font-size: 15px;
  }

  .nav-header .nav-back {
    padding: 6px 8px;
    font-size: 13px;
  }

  .verse-card {
    padding: 16px 12px;
    border-radius: 12px;
  }

  .verse-card .verse-ref {
    font-size: 16px;
  }

  .verse-card .verse-text {
    font-size: 14px;
    line-height: 1.7;
  }

  .verse-card .verse-label {
    padding: 4px 10px;
    font-size: 11px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  .stat-card .stat-label {
    font-size: 10px;
  }

  .recording-controls {
    padding: 20px 12px;
  }

  .recording-time {
    font-size: 32px;
  }

  .record-btn-main {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }

  .bottom-nav {
    padding: 6px 4px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .bottom-nav-item {
    padding: 6px 2px;
    font-size: 9px;
    min-height: 48px;
  }

  .bottom-nav-item .icon {
    font-size: 18px;
  }

  .verse-content {
    font-size: 14px;
    line-height: 2.8;
  }

  .verse-content ruby rt {
    font-size: 8px;
  }
}

/* ===== 底部導航增強 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--gold-100);
  z-index: 1000;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 374px) {
  .bottom-nav {
    padding: 4px 2px;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }

  .bottom-nav-item {
    padding: 4px 2px;
    font-size: 9px;
    min-height: 50px;
    gap: 2px;
  }

  .bottom-nav-item .icon {
    font-size: 17px;
  }
}

@media (min-width: 768px) {
  .bottom-nav {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px 20px 0 0;
    border-left: 1px solid var(--gold-100);
    border-right: 1px solid var(--gold-100);
  }
}

@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }

  .page-bible-reading {
    padding-bottom: 40px;
  }

  /* 桌面版確保垂直捲動正常 */
  html {
    overflow-y: auto;
    overflow-x: hidden;
  }
  body {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
  }
}

/* ===== 模態框移動端優化 ===== */
@media (max-width: 767px) {
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0;
  }

  .modal-content {
    border-radius: 20px 20px 0 0 !important;
    max-height: 90vh;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    animation: slideUpModal 0.3s ease;
  }

  @keyframes slideUpModal {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .success-modal {
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: none;
  }
}

/* ===== 錄音控制區增強 ===== */
.recording-controls {
  position: relative;
}

@media (max-width: 374px) {
  .recording-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .recording-actions .btn {
    width: 100%;
  }
}

/* 錄音按鈕脈衝動畫增強 */
.record-btn-main.recording {
  animation: pulse-record 1.5s ease-in-out infinite;
}

@keyframes pulse-record {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5),
                0 8px 24px rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(239, 68, 68, 0),
                0 8px 24px rgba(239, 68, 68, 0.4);
  }
}

/* ===== 經文顯示增強 ===== */
.verse-guide-body {
  overflow-x: hidden;
}

.verse-content {
  word-break: break-word;
}

/* 極小螢幕經文行高調整 */
@media (max-width: 319px) {
  .verse-line {
    padding-left: 20px;
    text-indent: -20px;
    margin-bottom: 8px;
  }

  .verse-num {
    min-width: 18px;
    font-size: 12px;
  }
}

/* ===== 排行榜響應式增強 ===== */
@media (max-width: 374px) {
  .podium {
    padding: 12px;
    gap: 10px;
  }

  .podium-item {
    padding: 14px;
    max-width: 100%;
  }

  .podium-avatar {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }

  .podium-rank {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .podium-name {
    font-size: 13px;
  }

  .podium-score {
    font-size: 11px;
  }

  .rank-item {
    padding: 10px 12px;
    gap: 8px;
  }

  .rank-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .rank-number {
    width: 24px;
    font-size: 12px;
  }

  .rank-name {
    font-size: 13px;
  }

  .rank-score {
    font-size: 13px;
  }
}

/* ===== 錄音項目列表優化 ===== */
@media (max-width: 374px) {
  .recording-item {
    padding: 12px;
  }

  .recording-item-header {
    flex-direction: column;
    gap: 10px;
  }

  .recording-item-actions {
    flex-direction: row;
    width: 100%;
    justify-content: flex-end;
  }

  .recording-item-actions .btn-icon {
    width: 40px;
    height: 40px;
  }

  .recording-item-title {
    font-size: 14px;
  }

  .recording-item-meta {
    font-size: 12px;
  }
}

/* ===== 篩選標籤優化 ===== */
.filter-tabs {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

@media (max-width: 374px) {
  .filter-tab {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* ===== 提示卡片優化 ===== */
@media (max-width: 374px) {
  .tips-card {
    padding: 14px 16px;
  }

  .tips-card .tips-title {
    font-size: 14px;
  }

  .tips-card ul {
    font-size: 13px;
  }

  .tips-card li {
    padding-left: 14px;
  }

  .tips-card li::before {
    width: 5px;
    height: 5px;
    top: 10px;
  }
}

/* ===== 空狀態優化 ===== */
@media (max-width: 374px) {
  .empty-state {
    padding: 40px 16px;
  }

  .empty-state .empty-icon {
    font-size: 48px;
  }

  .empty-state .empty-title {
    font-size: 16px;
  }

  .empty-state .empty-desc {
    font-size: 13px;
  }
}

/* ===== 多段錄音編輯器優化 ===== */
@media (max-width: 374px) {
  .segments-editor {
    padding: 14px;
  }

  .segments-header h3 {
    font-size: 14px;
  }

  .segment-item {
    padding: 10px 12px;
    gap: 10px;
  }

  .segment-number {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .segment-info .segment-name {
    font-size: 13px;
  }

  .segment-info .segment-duration {
    font-size: 11px;
  }
}

/* ===== 波形容器優化 ===== */
@media (max-width: 374px) {
  .waveform-container {
    padding: 14px;
  }

  .waveform-canvas {
    height: 60px;
  }

  .waveform-time {
    font-size: 10px;
  }

  .audio-wave {
    height: 40px;
  }

  .audio-wave span {
    width: 3px;
  }
}

/* ===== 頂部導航優化 ===== */
@media (max-width: 374px) {
  .nav-header {
    padding: 10px 12px;
  }

  .nav-header .nav-title {
    font-size: 16px;
  }

  .nav-header .nav-back {
    padding: 6px 10px;
    gap: 4px;
    font-size: 13px;
  }
}

/* ===== Toast 通知優化 ===== */
@media (max-width: 374px) {
  .toast-container {
    width: calc(100% - 24px);
    top: 12px;
  }

  .toast {
    padding: 12px 16px;
    gap: 10px;
  }

  .toast .toast-icon {
    font-size: 16px;
  }

  .toast .toast-message {
    font-size: 13px;
  }
}

/* ===== 橫向模式優化 ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .page-bible-reading {
    padding-bottom: calc(50px + env(safe-area-inset-bottom));
  }

  .nav-header {
    padding: 8px 16px;
  }

  .verse-card {
    padding: 16px;
    margin-bottom: 12px;
  }

  .verse-card .verse-ref {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
  }

  .stat-card {
    padding: 10px;
  }

  .stat-card .stat-value {
    font-size: 20px;
  }

  .recording-controls {
    padding: 16px;
    margin-bottom: 12px;
  }

  .recording-time {
    font-size: 32px;
    margin-bottom: 4px;
  }

  .record-btn-main {
    width: 60px;
    height: 60px;
    font-size: 24px;
    margin-bottom: 12px;
  }

  .bottom-nav {
    padding: 4px 8px;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }

  .bottom-nav-item {
    padding: 4px;
    min-height: 44px;
    font-size: 9px;
  }

  .bottom-nav-item .icon {
    font-size: 16px;
  }
}

/* ===== 極端橫向模式 (< 400px 高度) ===== */
@media (max-height: 400px) and (orientation: landscape) {
  .verse-card .verse-text {
    font-size: 13px;
    line-height: 1.5;
  }

  .recording-time {
    font-size: 28px;
  }

  .record-btn-main {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}

/* ===== 安全區域完整支持 ===== */
@supports (padding: max(0px)) {
  .page-bible-reading {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .nav-header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .bottom-nav {
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}

/* ===== 高對比度模式 ===== */
@media (prefers-contrast: high) {
  .verse-card {
    border: 2px solid white;
  }

  .stat-card {
    border: 2px solid var(--text-primary);
  }

  .recording-controls {
    border: 2px solid var(--gold-400);
  }

  .bottom-nav {
    border-top: 2px solid var(--text-primary);
  }

  .bottom-nav-item.active {
    border: 2px solid var(--gold-500);
    border-radius: 8px;
  }

  .segment-item.selected {
    border: 3px solid var(--gold-500);
  }

  .btn, button {
    border: 2px solid currentColor;
  }
}

/* ===== 減少動畫模式 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .record-btn-main.recording {
    animation: none;
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.3);
  }

  .audio-wave span {
    animation: none;
    height: 25px;
  }
}

/* ===== 列印樣式 ===== */
@media print {
  .bottom-nav,
  .nav-header .nav-back,
  .recording-controls,
  .recording-actions,
  .record-btn-main {
    display: none !important;
  }

  .page-bible-reading {
    padding: 20px;
    background: white;
  }

  .verse-card {
    background: #f5f5f5;
    color: #333;
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .stat-card {
    border: 1px solid #ddd;
  }

  .stat-card .stat-value {
    color: #333;
  }
}

/* ===== 按鈕觸摸增強 ===== */
@media (hover: none) and (pointer: coarse) {
  button,
  a,
  [role="button"],
  .btn,
  .filter-tab,
  .segment-item,
  .recording-item,
  .bottom-nav-item,
  .rank-item {
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  .record-btn-main {
    min-width: 60px;
    min-height: 60px;
  }

  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
    min-height: 44px;
  }
}

/* ===== 書卷選擇器優化 ===== */
.book-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.book-selector-item {
  padding: 8px 14px;
  background: var(--ivory-100);
  border: 1px solid var(--gold-100);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.book-selector-item:hover {
  background: var(--gold-50);
  border-color: var(--gold-200);
}

.book-selector-item.active {
  background: var(--gold-400);
  color: white;
  border-color: var(--gold-400);
}

@media (max-width: 374px) {
  .book-selector-item {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* ===== 章節選擇網格 ===== */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
}

.chapter-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ivory-100);
  border: 1px solid var(--gold-100);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chapter-item:hover {
  background: var(--gold-50);
  border-color: var(--gold-200);
}

.chapter-item.active {
  background: var(--gold-400);
  color: white;
  border-color: var(--gold-400);
}

.chapter-item.completed {
  background: var(--success-light);
  border-color: var(--success);
}

@media (max-width: 374px) {
  .chapter-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 6px;
  }

  .chapter-item {
    font-size: 12px;
    border-radius: 6px;
  }
}

/* ===== 進度指示器 ===== */
.progress-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.progress-bar-container {
  flex: 1;
  height: 8px;
  background: var(--ivory-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-500));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-500);
  min-width: 45px;
  text-align: right;
}

@media (max-width: 374px) {
  .progress-indicator {
    gap: 8px;
  }

  .progress-bar-container {
    height: 6px;
  }

  .progress-text {
    font-size: 12px;
    min-width: 40px;
  }
}

/* ===== 日曆視圖 ===== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.calendar-header span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-day:hover {
  background: var(--gold-50);
}

.calendar-day.today {
  border: 2px solid var(--gold-400);
}

.calendar-day.completed {
  background: var(--gold-400);
  color: white;
}

.calendar-day.inactive {
  color: var(--text-muted);
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 374px) {
  .calendar-day {
    font-size: 11px;
    border-radius: 6px;
  }

  .calendar-header span {
    font-size: 10px;
  }
}

/* ===== 成就徽章 ===== */
.achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-700);
}

.achievement-badge .badge-icon {
  font-size: 16px;
}

/* ===== 連續天數顯示 ===== */
.streak-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  border-radius: var(--radius-xl);
  color: white;
  text-align: center;
}

.streak-number {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}

.streak-label {
  font-size: 14px;
  opacity: 0.9;
}

.streak-fire {
  font-size: 32px;
  margin-bottom: 8px;
}

@media (max-width: 374px) {
  .streak-display {
    padding: 16px;
  }

  .streak-number {
    font-size: 36px;
  }

  .streak-fire {
    font-size: 24px;
  }

  .streak-label {
    font-size: 12px;
  }
}

/* ===== 動態效果類 ===== */
.fade-in {
  animation: fadeIn 0.3s ease;
}

.slide-up {
  animation: slideUp 0.3s ease;
}

.scale-in {
  animation: scaleIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== 載入狀態 ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gold-100);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 滑動提示 ===== */
.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--ivory-100);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.swipe-hint .arrow {
  font-size: 16px;
}

/* ===== 錯誤/成功回饋 ===== */
.feedback-message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feedback-message.success {
  background: var(--success-light);
  color: #065F46;
  border-left: 4px solid var(--success);
}

.feedback-message.error {
  background: var(--danger-light);
  color: #991B1B;
  border-left: 4px solid var(--danger);
}

.feedback-message.warning {
  background: var(--warning-light);
  color: #92400E;
  border-left: 4px solid var(--warning);
}

.feedback-message.info {
  background: var(--info-light);
  color: #1E40AF;
  border-left: 4px solid var(--info);
}

.feedback-icon {
  font-size: 18px;
}

.feedback-text {
  flex: 1;
  font-size: 14px;
}

/* ========================================================
 * 語音讀經系統進階增強 v3.0
 * Advanced Enhancements for Bible Reading System
 * ======================================================== */

/* ==========================================================
 * 1. 粒子光效動畫 - Particle & Glow Effects
 * ========================================================== */

/* 背景粒子效果 */
.particle-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle-bg::before,
.particle-bg::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  opacity: 0.08;
  animation: particleFloat 20s ease-in-out infinite;
}

.particle-bg::before {
  background: radial-gradient(circle, var(--gold-400) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.particle-bg::after {
  background: radial-gradient(circle, var(--gold-300) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-delay: -10s;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(100px, 50px) scale(1.2);
  }
  50% {
    transform: translate(50px, 100px) scale(0.8);
  }
  75% {
    transform: translate(-50px, 50px) scale(1.1);
  }
}

/* 發光效果 */
.glow-effect {
  position: relative;
}

.glow-effect::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(
    45deg,
    rgba(201, 169, 98, 0.4),
    rgba(255, 215, 0, 0.2),
    rgba(201, 169, 98, 0.4)
  );
  filter: blur(12px);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.glow-effect:hover::after,
.glow-effect.active::after {
  opacity: 1;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; filter: blur(12px); }
  50% { opacity: 1; filter: blur(18px); }
}

/* 閃爍星星效果 */
.sparkle {
  position: relative;
  overflow: visible;
}

.sparkle::before,
.sparkle::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--gold-400);
  border-radius: 50%;
  opacity: 0;
  animation: sparkleAnim 2s ease-in-out infinite;
}

.sparkle::before {
  top: -4px;
  right: -4px;
  animation-delay: 0s;
}

.sparkle::after {
  bottom: -4px;
  left: -4px;
  animation-delay: 1s;
}

@keyframes sparkleAnim {
  0%, 100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
}

/* 多粒子星星容器 */
.sparkle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sparkle-field .spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold-300);
  border-radius: 50%;
  animation: sparkRise 3s ease-in infinite;
}

.sparkle-field .spark:nth-child(1) { left: 10%; animation-delay: 0s; }
.sparkle-field .spark:nth-child(2) { left: 25%; animation-delay: 0.5s; }
.sparkle-field .spark:nth-child(3) { left: 40%; animation-delay: 1s; }
.sparkle-field .spark:nth-child(4) { left: 55%; animation-delay: 1.5s; }
.sparkle-field .spark:nth-child(5) { left: 70%; animation-delay: 2s; }
.sparkle-field .spark:nth-child(6) { left: 85%; animation-delay: 2.5s; }

@keyframes sparkRise {
  0% {
    bottom: -10px;
    opacity: 0;
    transform: scale(0);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    bottom: 100%;
    opacity: 0;
    transform: scale(0) translateX(20px);
  }
}

/* ==========================================================
 * 2. 讀經火焰系統 - Flame Streak System
 * ========================================================== */

.flame-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 120px;
}

/* CSS 火焰動畫 */
.flame {
  position: relative;
  width: 40px;
  height: 60px;
  margin: 0 auto 16px;
}

.flame::before,
.flame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform: translateX(-50%);
  animation: flameFlicker 0.4s ease-in-out infinite alternate;
}

.flame::before {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    0deg,
    #ff6b35 0%,
    #ff8c42 30%,
    #ffd700 60%,
    #fff3b0 90%
  );
  filter: blur(1px);
}

.flame::after {
  width: 60%;
  height: 70%;
  background: linear-gradient(
    0deg,
    #ff4500 0%,
    #ff6b35 40%,
    #ffd700 80%
  );
  filter: blur(2px);
  animation-delay: 0.1s;
}

@keyframes flameFlicker {
  0% {
    transform: translateX(-50%) scaleX(1) scaleY(1) rotate(-2deg);
  }
  50% {
    transform: translateX(-50%) scaleX(0.9) scaleY(1.05) rotate(1deg);
  }
  100% {
    transform: translateX(-50%) scaleX(1.05) scaleY(0.95) rotate(-1deg);
  }
}

/* 火焰底部光暈 */
.flame-container::after {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(255, 107, 53, 0.3) 0%, transparent 70%);
  border-radius: 50%;
}

/* 連續天數徽章 */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #FF6B35, #FF8C42, #FFD700);
  border-radius: 30px;
  color: white;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
  position: relative;
  overflow: hidden;
}

.streak-badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  animation: streakShine 3s ease-in-out infinite;
}

@keyframes streakShine {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.streak-badge .streak-count {
  position: relative;
  z-index: 1;
}

.streak-badge .streak-icon {
  position: relative;
  z-index: 1;
  font-size: 20px;
}

/* 五級火焰大小 */
.flame-level-1 .flame { width: 24px; height: 36px; }
.flame-level-1 .flame::before { filter: blur(0.5px); }

.flame-level-2 .flame { width: 32px; height: 48px; }

.flame-level-3 .flame { width: 40px; height: 60px; }

.flame-level-4 .flame {
  width: 52px;
  height: 76px;
}
.flame-level-4 .flame::before {
  background: linear-gradient(
    0deg,
    #e63946 0%,
    #ff6b35 25%,
    #ff8c42 50%,
    #ffd700 75%,
    #fff3b0 95%
  );
}

.flame-level-5 .flame {
  width: 64px;
  height: 92px;
}
.flame-level-5 .flame::before {
  background: linear-gradient(
    0deg,
    #9b2335 0%,
    #e63946 20%,
    #ff6b35 40%,
    #ff8c42 60%,
    #ffd700 80%,
    #fff3b0 95%
  );
  filter: blur(1.5px);
}
.flame-level-5 .flame::after {
  animation-duration: 0.25s;
}
.flame-level-5 .flame-container::after {
  width: 120px;
  height: 30px;
  background: radial-gradient(ellipse, rgba(255, 69, 0, 0.4) 0%, transparent 70%);
}

/* ==========================================================
 * 3. 成就系統樣式 - Achievement System
 * ========================================================== */

.achievement-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

@media (min-width: 480px) {
  .achievement-wall {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (min-width: 768px) {
  .achievement-wall {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }
}

.achievement-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  background: white;
  border-radius: var(--radius-xl);
  border: 2px solid var(--ivory-200);
  text-align: center;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* 鎖定狀態 */
.achievement-card.locked {
  opacity: 0.55;
  filter: grayscale(80%);
}

.achievement-card.locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(0, 0, 0, 0.02) 8px,
    rgba(0, 0, 0, 0.02) 16px
  );
  pointer-events: none;
}

.achievement-card.locked .achievement-icon::after {
  content: '\1F512';
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 16px;
}

/* 解鎖狀態 */
.achievement-card.unlocked {
  border-color: var(--gold-300);
  box-shadow: 0 4px 20px rgba(201, 169, 98, 0.2);
  animation: achievementUnlock 0.6s ease-out;
}

.achievement-card.unlocked:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(201, 169, 98, 0.3);
}

@keyframes achievementUnlock {
  0% {
    opacity: 0;
    transform: scale(0.6) rotateY(90deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotateY(-10deg);
  }
  70% {
    transform: scale(0.95) rotateY(5deg);
  }
  100% {
    transform: scale(1) rotateY(0deg);
  }
}

/* 成就圖標帶光環 */
.achievement-icon {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-50), var(--gold-100));
}

.achievement-card.unlocked .achievement-icon {
  background: linear-gradient(135deg, var(--gold-200), var(--gold-300));
}

.achievement-card.unlocked .achievement-icon::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--gold-300);
  animation: iconHalo 2s ease-in-out infinite;
}

@keyframes iconHalo {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.achievement-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.achievement-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

/* 成就進度條 */
.achievement-progress {
  width: 100%;
  height: 6px;
  background: var(--ivory-200);
  border-radius: 3px;
  overflow: hidden;
  margin-top: auto;
}

.achievement-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-500));
  border-radius: 3px;
  transition: width 0.6s ease;
  position: relative;
}

.achievement-progress .progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
  animation: progressShimmer 1.5s ease-in-out infinite;
}

@keyframes progressShimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.achievement-progress-text {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 成就稀有度 */
.achievement-card[data-rarity="common"] { border-top: 3px solid #9CA3AF; }
.achievement-card[data-rarity="rare"] { border-top: 3px solid #3B82F6; }
.achievement-card[data-rarity="epic"] { border-top: 3px solid #8B5CF6; }
.achievement-card[data-rarity="legendary"] { border-top: 3px solid #F59E0B; }

/* ==========================================================
 * 4. 每日挑戰卡片 - Daily Challenge Card
 * ========================================================== */

.daily-challenge {
  position: relative;
  background: white;
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  overflow: hidden;
}

/* 漸層邊框 */
.daily-challenge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    135deg,
    var(--gold-400),
    #FF6B35,
    #E63946,
    var(--gold-400)
  );
  background-size: 300% 300%;
  animation: gradientBorder 4s ease infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@keyframes gradientBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.daily-challenge .challenge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.daily-challenge .challenge-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.daily-challenge .challenge-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.daily-challenge .challenge-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* 倒計時樣式 */
.challenge-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #92400E;
}

.challenge-timer .timer-icon {
  font-size: 16px;
  animation: timerTick 1s steps(1) infinite;
}

@keyframes timerTick {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.5; }
}

.challenge-timer .timer-value {
  font-family: 'SF Mono', 'Monaco', monospace;
  letter-spacing: 1px;
}

.challenge-timer.urgent {
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  color: #991B1B;
  animation: timerUrgent 0.8s ease-in-out infinite;
}

@keyframes timerUrgent {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* 獎勵預覽 */
.challenge-reward {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-700);
}

.challenge-reward .reward-icon {
  font-size: 20px;
}

.challenge-reward .reward-value {
  font-weight: 700;
  font-size: 15px;
  color: var(--gold-600);
}

.challenge-reward:hover {
  box-shadow: 0 2px 12px rgba(201, 169, 98, 0.3);
}

/* 挑戰完成狀態 */
.daily-challenge.completed {
  background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
}

.daily-challenge.completed::before {
  background: linear-gradient(135deg, #22C55E, #16A34A, #22C55E);
  background-size: 300% 300%;
}

.daily-challenge.completed .challenge-title::after {
  content: ' \2713';
  color: #16A34A;
}

/* ==========================================================
 * 5. 社群動態流 - Activity Feed
 * ========================================================== */

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 24px;
}

.activity-feed::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--gold-200),
    var(--gold-100),
    transparent
  );
}

.activity-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-100);
  margin-bottom: 12px;
  margin-left: 12px;
  transition: all 0.2s ease;
}

.activity-item:hover {
  border-color: var(--gold-200);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* 時間線節點 */
.activity-item::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 18px;
  width: 10px;
  height: 10px;
  background: white;
  border: 2px solid var(--gold-400);
  border-radius: 50%;
  z-index: 1;
}

.activity-item.highlight::before {
  background: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.2);
}

/* 動態頭像 */
.activity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-user {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.activity-action {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 2px;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 時間線樣式 */
.activity-timeline {
  position: relative;
  padding-left: 32px;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold-200);
}

.activity-timeline .timeline-node {
  position: absolute;
  left: 10px;
  width: 12px;
  height: 12px;
  background: var(--gold-400);
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold-200);
  z-index: 1;
}

.activity-timeline .timeline-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-600);
  padding: 8px 0 4px;
}

@media (max-width: 374px) {
  .activity-feed {
    padding-left: 20px;
  }

  .activity-item {
    padding: 10px 12px;
    margin-left: 8px;
  }

  .activity-avatar {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
}

/* ==========================================================
 * 6. 金句輪播 - Quote Carousel
 * ========================================================== */

.quote-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  padding: 32px 24px 48px;
  margin-bottom: 20px;
  min-height: 160px;
  color: white;
}

.quote-carousel::before {
  content: '\201C';
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 80px;
  font-family: Georgia, serif;
  opacity: 0.15;
  line-height: 1;
}

.quote-slides {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quote-slide {
  min-width: 100%;
  padding: 0 8px;
  flex-shrink: 0;
}

.quote-slide .quote-text {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.8;
  margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.quote-slide .quote-ref {
  font-size: 14px;
  opacity: 0.85;
  font-style: italic;
}

/* 指示點 */
.quote-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.quote-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.quote-dots .dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

.quote-dots .dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 374px) {
  .quote-carousel {
    padding: 24px 16px 40px;
    min-height: 140px;
  }

  .quote-slide .quote-text {
    font-size: 15px;
    line-height: 1.7;
  }

  .quote-slide .quote-ref {
    font-size: 12px;
  }
}

/* ==========================================================
 * 7. 環形進度條 - Ring Progress
 * ========================================================== */

.ring-progress {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ring-progress svg {
  transform: rotate(-90deg);
}

.ring-progress .ring-bg {
  fill: none;
  stroke: var(--ivory-200);
  stroke-width: 6;
}

.ring-progress .ring-fill {
  fill: none;
  stroke: var(--gold-400);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.ring-progress .ring-fill.success { stroke: var(--success); }
.ring-progress .ring-fill.warning { stroke: var(--warning); }
.ring-progress .ring-fill.danger { stroke: var(--danger); }

.ring-progress .ring-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-progress .ring-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.ring-progress .ring-text {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 週間環形網格 */
.weekly-ring-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 16px 0;
}

.weekly-ring-grid .day-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.weekly-ring-grid .day-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.weekly-ring-grid .day-ring.today .day-label {
  color: var(--gold-500);
  font-weight: 700;
}

@media (max-width: 480px) {
  .weekly-ring-grid {
    gap: 4px;
  }

  .weekly-ring-grid .day-label {
    font-size: 9px;
  }

  .ring-progress .ring-value {
    font-size: 12px;
  }

  .ring-progress .ring-text {
    font-size: 8px;
  }
}

@media (max-width: 374px) {
  .weekly-ring-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
}

/* ==========================================================
 * 8. 錄音體驗增強 - Recording Experience Enhancement
 * ========================================================== */

/* 錄音時脈衝波紋 */
.recording-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.recording-pulse .pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  margin: -40px 0 0 -40px;
  border: 2px solid rgba(239, 68, 68, 0.4);
  border-radius: 50%;
  animation: pulseExpand 2s ease-out infinite;
}

.recording-pulse .pulse-ring:nth-child(2) {
  animation-delay: 0.5s;
}

.recording-pulse .pulse-ring:nth-child(3) {
  animation-delay: 1s;
}

@keyframes pulseExpand {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* 動態聲波 */
.sound-wave-animated {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  padding: 0 16px;
}

.sound-wave-animated .wave-bar {
  width: 3px;
  background: linear-gradient(to top, var(--gold-400), #FF6B35);
  border-radius: 2px;
  animation: soundWave 0.6s ease-in-out infinite;
  transform-origin: bottom;
}

.sound-wave-animated .wave-bar:nth-child(1)  { animation-delay: 0.00s; height: 20%; }
.sound-wave-animated .wave-bar:nth-child(2)  { animation-delay: 0.05s; height: 35%; }
.sound-wave-animated .wave-bar:nth-child(3)  { animation-delay: 0.10s; height: 55%; }
.sound-wave-animated .wave-bar:nth-child(4)  { animation-delay: 0.15s; height: 75%; }
.sound-wave-animated .wave-bar:nth-child(5)  { animation-delay: 0.20s; height: 90%; }
.sound-wave-animated .wave-bar:nth-child(6)  { animation-delay: 0.25s; height: 100%; }
.sound-wave-animated .wave-bar:nth-child(7)  { animation-delay: 0.30s; height: 90%; }
.sound-wave-animated .wave-bar:nth-child(8)  { animation-delay: 0.35s; height: 75%; }
.sound-wave-animated .wave-bar:nth-child(9)  { animation-delay: 0.40s; height: 55%; }
.sound-wave-animated .wave-bar:nth-child(10) { animation-delay: 0.45s; height: 35%; }
.sound-wave-animated .wave-bar:nth-child(11) { animation-delay: 0.50s; height: 20%; }

@keyframes soundWave {
  0%, 100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}

/* 錄音按鈕光暈 */
.recording-glow {
  position: relative;
}

.recording-glow::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(239, 68, 68, 0.3) 0%,
    rgba(239, 68, 68, 0.1) 50%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.recording-glow.active::before {
  opacity: 1;
  animation: recordGlow 1.5s ease-in-out infinite;
}

@keyframes recordGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* 錄音音量指示器 */
.volume-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
}

.volume-indicator .vol-bar {
  width: 4px;
  background: var(--gold-300);
  border-radius: 2px;
  transition: height 0.1s ease;
}

.volume-indicator .vol-bar.active {
  background: linear-gradient(to top, var(--gold-400), #FF6B35);
}

.volume-indicator .vol-bar.peak {
  background: linear-gradient(to top, #FF6B35, #EF4444);
}

/* ==========================================================
 * 9. 互動微動畫 - Micro Animations
 * ========================================================== */

/* 彈跳入場 */
.bounce-in {
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 漂浮效果 */
.float-animation {
  animation: floatUpDown 3s ease-in-out infinite;
}

@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 震動效果 */
.shake-animation {
  animation: shakeIt 0.5s ease-in-out;
}

@keyframes shakeIt {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* 慶祝紙屑 */
.confetti-animation {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti-animation .confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confettiFall 3s ease-in forwards;
}

.confetti-animation .confetti-piece:nth-child(1)  { left:  5%; background: #FF6B35; animation-delay: 0.0s; animation-duration: 2.8s; }
.confetti-animation .confetti-piece:nth-child(2)  { left: 12%; background: #FFD700; animation-delay: 0.1s; animation-duration: 3.2s; border-radius: 50%; }
.confetti-animation .confetti-piece:nth-child(3)  { left: 20%; background: #E63946; animation-delay: 0.2s; animation-duration: 2.6s; }
.confetti-animation .confetti-piece:nth-child(4)  { left: 28%; background: #3B82F6; animation-delay: 0.3s; animation-duration: 3.0s; border-radius: 50%; }
.confetti-animation .confetti-piece:nth-child(5)  { left: 35%; background: #8B5CF6; animation-delay: 0.1s; animation-duration: 2.9s; }
.confetti-animation .confetti-piece:nth-child(6)  { left: 42%; background: #22C55E; animation-delay: 0.4s; animation-duration: 3.1s; border-radius: 50%; }
.confetti-animation .confetti-piece:nth-child(7)  { left: 50%; background: #FFD700; animation-delay: 0.0s; animation-duration: 2.7s; }
.confetti-animation .confetti-piece:nth-child(8)  { left: 58%; background: #FF6B35; animation-delay: 0.2s; animation-duration: 3.3s; border-radius: 50%; }
.confetti-animation .confetti-piece:nth-child(9)  { left: 65%; background: #E63946; animation-delay: 0.3s; animation-duration: 2.5s; }
.confetti-animation .confetti-piece:nth-child(10) { left: 72%; background: #3B82F6; animation-delay: 0.5s; animation-duration: 3.0s; border-radius: 50%; }
.confetti-animation .confetti-piece:nth-child(11) { left: 80%; background: #8B5CF6; animation-delay: 0.1s; animation-duration: 2.8s; }
.confetti-animation .confetti-piece:nth-child(12) { left: 88%; background: #22C55E; animation-delay: 0.4s; animation-duration: 3.2s; border-radius: 50%; }
.confetti-animation .confetti-piece:nth-child(13) { left: 95%; background: #FFD700; animation-delay: 0.2s; animation-duration: 2.6s; }

@keyframes confettiFall {
  0% {
    top: -20px;
    opacity: 1;
    transform: rotate(0deg) translateX(0);
  }
  25% {
    transform: rotate(90deg) translateX(30px);
  }
  50% {
    transform: rotate(180deg) translateX(-20px);
    opacity: 1;
  }
  75% {
    transform: rotate(270deg) translateX(15px);
  }
  100% {
    top: 105%;
    opacity: 0;
    transform: rotate(360deg) translateX(-10px);
  }
}

/* 漸入動畫系列 (帶延遲) */
.stagger-in > *:nth-child(1) { animation: fadeSlideUp 0.4s ease 0.0s both; }
.stagger-in > *:nth-child(2) { animation: fadeSlideUp 0.4s ease 0.08s both; }
.stagger-in > *:nth-child(3) { animation: fadeSlideUp 0.4s ease 0.16s both; }
.stagger-in > *:nth-child(4) { animation: fadeSlideUp 0.4s ease 0.24s both; }
.stagger-in > *:nth-child(5) { animation: fadeSlideUp 0.4s ease 0.32s both; }
.stagger-in > *:nth-child(6) { animation: fadeSlideUp 0.4s ease 0.40s both; }
.stagger-in > *:nth-child(7) { animation: fadeSlideUp 0.4s ease 0.48s both; }
.stagger-in > *:nth-child(8) { animation: fadeSlideUp 0.4s ease 0.56s both; }

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 脈衝吸引注意力 */
.pulse-attention {
  animation: pulseAttention 2s ease-in-out infinite;
}

@keyframes pulseAttention {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(201, 169, 98, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 8px rgba(201, 169, 98, 0);
  }
}

/* 翻轉效果 */
.flip-in {
  animation: flipIn 0.6s ease;
}

@keyframes flipIn {
  from {
    opacity: 0;
    transform: perspective(400px) rotateX(90deg);
  }
  40% {
    transform: perspective(400px) rotateX(-10deg);
  }
  70% {
    transform: perspective(400px) rotateX(5deg);
  }
  to {
    opacity: 1;
    transform: perspective(400px) rotateX(0);
  }
}

/* 打字機效果容器 */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--gold-500);
  white-space: nowrap;
  animation:
    typewrite 3s steps(30, end),
    blinkCursor 0.75s step-end infinite;
}

@keyframes typewrite {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blinkCursor {
  from, to { border-color: transparent; }
  50% { border-color: var(--gold-500); }
}

/* 數字跳動 */
.count-up {
  display: inline-block;
  animation: countPop 0.3s ease;
}

@keyframes countPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ==========================================================
 * 10. 暗色主題準備 - Dark Theme Support
 * ========================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --dark-bg: #1A1A2E;
    --dark-surface: #222240;
    --dark-surface-hover: #2A2A4A;
    --dark-border: #333358;
    --dark-text-primary: #E8E8F0;
    --dark-text-secondary: #A8A8C0;
    --dark-text-muted: #6B6B8A;
  }

  .page-bible-reading {
    background: var(--dark-bg);
    color: var(--dark-text-primary);
  }

  .nav-header {
    background: rgba(26, 26, 46, 0.95);
    border-bottom-color: var(--dark-border);
  }

  .nav-header .nav-title {
    color: var(--dark-text-primary);
  }

  .nav-header .nav-back {
    color: var(--dark-text-secondary);
  }

  .nav-header .nav-back:hover {
    background: var(--dark-surface);
    color: var(--gold-400);
  }

  .bottom-nav {
    background: rgba(26, 26, 46, 0.98);
    border-top-color: var(--dark-border);
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
  }

  .bottom-nav-item {
    color: var(--dark-text-muted);
  }

  .bottom-nav-item:hover {
    color: var(--gold-300);
  }

  .bottom-nav-item.active {
    color: var(--gold-400);
  }

  .verse-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }

  .stat-card {
    background: var(--dark-surface);
    border-color: var(--dark-border);
    color: var(--dark-text-primary);
  }

  .stat-card:hover {
    background: var(--dark-surface-hover);
    border-color: var(--gold-500);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .stat-card .stat-label {
    color: var(--dark-text-muted);
  }

  .recording-controls {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }

  .recording-time {
    color: var(--dark-text-primary);
  }

  .recording-limit {
    color: var(--dark-text-muted);
  }

  .recording-status {
    color: var(--dark-text-secondary);
  }

  .waveform-container {
    background: var(--dark-surface);
  }

  .waveform-canvas {
    background: var(--dark-bg);
  }

  .waveform-time {
    color: var(--dark-text-muted);
  }

  .segments-editor {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }

  .segments-header h3 {
    color: var(--dark-text-primary);
  }

  .segment-item {
    background: rgba(255, 255, 255, 0.05);
  }

  .segment-item:hover {
    background: rgba(201, 169, 98, 0.1);
  }

  .segment-item.selected {
    background: rgba(201, 169, 98, 0.15);
    border-color: var(--gold-400);
  }

  .segment-item.empty {
    border-color: var(--dark-border);
  }

  .segment-info .segment-name {
    color: var(--dark-text-primary);
  }

  .segment-info .segment-duration {
    color: var(--dark-text-muted);
  }

  .verse-guide {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }

  .verse-guide-header {
    border-bottom-color: var(--dark-border);
  }

  .verse-guide-header h3 {
    color: var(--dark-text-primary);
  }

  .verse-content {
    color: var(--dark-text-primary);
  }

  .verse-content ruby rt {
    color: var(--gold-400);
  }

  .verse-guide-footer {
    background: rgba(255, 255, 255, 0.03);
    border-top-color: var(--dark-border);
  }

  .recording-item {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }

  .recording-item:hover {
    border-color: var(--gold-500);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .recording-item-title {
    color: var(--dark-text-primary);
  }

  .recording-item-meta {
    color: var(--dark-text-muted);
  }

  .recording-item-actions .btn-play {
    background: rgba(201, 169, 98, 0.15);
    color: var(--gold-400);
  }

  .recording-item-actions .btn-play:hover {
    background: rgba(201, 169, 98, 0.25);
  }

  .recording-item-actions .btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
  }

  .recording-item-actions .btn-delete:hover {
    background: rgba(239, 68, 68, 0.25);
  }

  .rank-list {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }

  .rank-item {
    border-bottom-color: var(--dark-border);
  }

  .rank-item:hover {
    background: rgba(201, 169, 98, 0.08);
  }

  .rank-item.highlight {
    background: rgba(201, 169, 98, 0.12);
    border-left-color: var(--gold-400);
  }

  .rank-name {
    color: var(--dark-text-primary);
  }

  .rank-stats {
    color: var(--dark-text-muted);
  }

  .podium-item {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }

  .podium-name {
    color: var(--dark-text-primary);
  }

  .podium-score {
    color: var(--dark-text-muted);
  }

  .toast {
    background: var(--dark-surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  .toast .toast-message {
    color: var(--dark-text-primary);
  }

  .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
  }

  .modal-content {
    background: var(--dark-surface);
    color: var(--dark-text-primary);
  }

  .success-modal {
    background: var(--dark-surface);
  }

  .success-modal-title {
    color: #4ADE80;
  }

  .skeleton {
    background: linear-gradient(
      90deg,
      var(--dark-surface) 25%,
      var(--dark-surface-hover) 50%,
      var(--dark-surface) 75%
    );
    background-size: 200% 100%;
  }

  .filter-tab {
    background: var(--dark-surface);
    color: var(--dark-text-secondary);
  }

  .filter-tab:hover {
    background: var(--dark-surface-hover);
  }

  .filter-tab.active {
    background: var(--gold-500);
    color: white;
  }

  .empty-state .empty-title {
    color: var(--dark-text-secondary);
  }

  .empty-state .empty-desc {
    color: var(--dark-text-muted);
  }

  .tips-card {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
  }

  .tips-card .tips-title {
    color: #60A5FA;
  }

  .tips-card ul {
    color: #93C5FD;
  }

  .tips-card li::before {
    background: #60A5FA;
  }

  .book-metadata-card {
    background: linear-gradient(135deg, var(--dark-surface), var(--dark-surface-hover));
    border-color: var(--dark-border);
  }

  .metadata-label {
    color: var(--dark-text-muted);
  }

  .metadata-value {
    color: var(--dark-text-primary);
  }

  .metadata-theme {
    border-top-color: var(--dark-border);
  }

  .metadata-theme .metadata-value {
    color: var(--gold-400);
  }

  .verse-num {
    color: var(--gold-400);
  }

  .outline-inline {
    background: rgba(201, 169, 98, 0.08);
    border-left-color: var(--gold-500);
  }

  .outline-marker {
    color: var(--gold-400);
  }

  .outline-title {
    color: var(--dark-text-primary);
  }

  .outline-range {
    color: var(--dark-text-muted);
  }

  .display-options {
    border-bottom-color: var(--dark-border);
  }

  .display-option {
    color: var(--dark-text-secondary);
  }

  .recognition-comparison {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }

  .comparison-title {
    color: var(--dark-text-primary);
  }

  .comparison-stats .stat-item {
    background: rgba(255, 255, 255, 0.03);
  }

  .comparison-stats .stat-item .stat-label {
    color: var(--dark-text-muted);
  }

  .recognition-issues {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: #F87171;
  }

  .recognition-issues .issue-title {
    color: #F87171;
  }

  .recognition-issues ul {
    color: #FCA5A5;
  }

  /* 暗色主題 - 章節選擇 */
  .chapter-item {
    background: var(--dark-surface);
    border-color: var(--dark-border);
    color: var(--dark-text-primary);
  }

  .chapter-item:hover {
    background: var(--dark-surface-hover);
    border-color: var(--gold-500);
  }

  .chapter-item.active {
    background: var(--gold-500);
    color: white;
  }

  /* 暗色主題 - 書卷選擇 */
  .book-selector-item {
    background: var(--dark-surface);
    border-color: var(--dark-border);
    color: var(--dark-text-secondary);
  }

  .book-selector-item:hover {
    background: var(--dark-surface-hover);
    border-color: var(--gold-500);
  }

  .book-selector-item.active {
    background: var(--gold-500);
    color: white;
    border-color: var(--gold-500);
  }

  /* 暗色主題 - 日曆 */
  .calendar-day {
    color: var(--dark-text-primary);
  }

  .calendar-day:hover {
    background: var(--dark-surface-hover);
  }

  .calendar-day.today {
    border-color: var(--gold-400);
  }

  .calendar-day.completed {
    background: var(--gold-500);
    color: white;
  }

  .calendar-day.inactive {
    color: var(--dark-text-muted);
  }

  .calendar-header span {
    color: var(--dark-text-muted);
  }

  /* 暗色主題 - 進度條 */
  .progress-bar-container {
    background: var(--dark-surface);
  }

  .progress-text {
    color: var(--gold-400);
  }

  /* 暗色主題 - 成就系統 */
  .achievement-card {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }

  .achievement-card.unlocked {
    border-color: var(--gold-500);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }

  .achievement-name {
    color: var(--dark-text-primary);
  }

  .achievement-desc {
    color: var(--dark-text-muted);
  }

  .achievement-icon {
    background: linear-gradient(135deg, var(--dark-surface-hover), var(--dark-surface));
  }

  .achievement-card.unlocked .achievement-icon {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.2), rgba(201, 169, 98, 0.1));
  }

  .achievement-progress {
    background: var(--dark-surface-hover);
  }

  /* 暗色主題 - 每日挑戰 */
  .daily-challenge {
    background: var(--dark-surface);
  }

  .daily-challenge .challenge-title {
    color: var(--dark-text-primary);
  }

  .daily-challenge .challenge-desc {
    color: var(--dark-text-secondary);
  }

  .daily-challenge.completed {
    background: rgba(34, 197, 94, 0.08);
  }

  .challenge-timer {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.1));
    color: #FCD34D;
  }

  .challenge-reward {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.15), rgba(201, 169, 98, 0.1));
    color: var(--gold-400);
  }

  .challenge-reward .reward-value {
    color: var(--gold-300);
  }

  /* 暗色主題 - 社群動態 */
  .activity-feed::before {
    background: linear-gradient(
      to bottom,
      var(--dark-border),
      rgba(51, 51, 88, 0.3),
      transparent
    );
  }

  .activity-item {
    background: var(--dark-surface);
    border-color: var(--dark-border);
  }

  .activity-item:hover {
    border-color: var(--gold-500);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  }

  .activity-item::before {
    background: var(--dark-surface);
    border-color: var(--gold-500);
  }

  .activity-user {
    color: var(--dark-text-primary);
  }

  .activity-action {
    color: var(--dark-text-secondary);
  }

  .activity-time {
    color: var(--dark-text-muted);
  }

  .activity-avatar {
    background: linear-gradient(135deg, var(--dark-surface-hover), var(--dark-surface));
  }

  /* 暗色主題 - 金句輪播 */
  .quote-carousel {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  /* 暗色主題 - 環形進度 */
  .ring-progress .ring-bg {
    stroke: var(--dark-surface-hover);
  }

  .ring-progress .ring-value {
    color: var(--dark-text-primary);
  }

  .ring-progress .ring-text {
    color: var(--dark-text-muted);
  }

  .weekly-ring-grid .day-label {
    color: var(--dark-text-muted);
  }

  /* 暗色主題 - 回饋訊息 */
  .feedback-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ADE80;
    border-left-color: #22C55E;
  }

  .feedback-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #F87171;
    border-left-color: #EF4444;
  }

  .feedback-message.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #FBBF24;
    border-left-color: #F59E0B;
  }

  .feedback-message.info {
    background: rgba(59, 130, 246, 0.1);
    color: #60A5FA;
    border-left-color: #3B82F6;
  }

  /* 暗色主題 - 載入 */
  .loading-overlay {
    background: rgba(26, 26, 46, 0.9);
  }

  .loading-spinner {
    border-color: var(--dark-border);
    border-top-color: var(--gold-400);
  }

  /* 暗色主題 - 滑動提示 */
  .swipe-hint {
    background: var(--dark-surface);
    color: var(--dark-text-muted);
  }

  /* 暗色主題 - 粒子效果 */
  .particle-bg::before {
    opacity: 0.04;
  }

  .particle-bg::after {
    opacity: 0.04;
  }
}

/* ==========================================================
 * 暗色主題中的減少動畫
 * ========================================================== */
@media (prefers-color-scheme: dark) and (prefers-reduced-motion: reduce) {
  .flame::before,
  .flame::after {
    animation: none;
  }

  .streak-badge::before {
    animation: none;
  }

  .achievement-card.unlocked .achievement-icon::before {
    animation: none;
  }

  .glow-effect:hover::after,
  .glow-effect.active::after {
    animation: none;
    opacity: 0.5;
  }

  .recording-glow.active::before {
    animation: none;
    opacity: 0.5;
  }

  .confetti-animation {
    display: none;
  }
}

/* ==========================================================
 * 額外工具類 - Utility Additions
 * ========================================================== */

/* 玻璃擬態效果 */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (prefers-color-scheme: dark) {
  .glass {
    background: rgba(34, 34, 64, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* 漸層文字 */
.gradient-text {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 模糊背景蒙版 */
.backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 文字截斷 */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* 可滾動容器 (隱藏滾動條) */
.scroll-hidden {
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-hidden::-webkit-scrollbar {
  display: none;
}

/* 觸控反饋 */
.tap-highlight {
  -webkit-tap-highlight-color: rgba(201, 169, 98, 0.15);
  cursor: pointer;
}

.tap-highlight:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

/* ========================================
 * 首頁視覺大升級 v4.0
 * Homepage Visual Enhancement - Index Page
 * ======================================== */

/* ===== 1. 金句輪播區（首頁專用覆蓋） ===== */
.page-bible-reading .quote-carousel {
  background: linear-gradient(135deg, #FFF8E7, #FEF3C7, #FDE68A40);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gold-100);
  box-shadow: 0 2px 12px rgba(201, 169, 98, 0.1);
  min-height: auto;
  color: inherit;
}

.page-bible-reading .quote-carousel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
  animation: quoteShimmer 8s ease-in-out infinite;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  opacity: 1;
}

@keyframes quoteShimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}

.quote-carousel-track {
  position: relative;
  min-height: 28px;
}

.quote-carousel-slide {
  display: none;
  align-items: center;
  gap: 10px;
  animation: quoteFadeIn 0.5s ease;
}

.quote-carousel-slide.active {
  display: flex;
}

@keyframes quoteFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.quote-slide-icon {
  color: var(--gold-500);
  font-size: 16px;
  flex-shrink: 0;
}

.quote-slide-text {
  font-size: 13px;
  color: #78350F;
  line-height: 1.6;
  font-weight: 500;
}

.quote-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.quote-carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-200);
  cursor: pointer;
  transition: all 0.3s ease;
}

.quote-carousel-dots .dot.active {
  width: 18px;
  border-radius: 3px;
  background: var(--gold-500);
}

/* ===== 2. 今日經節 - 動態靈感卡片 ===== */
.verse-card-enhanced {
  position: relative;
  background: linear-gradient(135deg, #D4A017, #E8B930, #C9A962, #D4A017) !important;
  background-size: 300% 300% !important;
  animation: verseGradientFlow 8s ease infinite;
  border-radius: 20px;
  padding: 28px 24px;
  overflow: hidden;
  box-shadow:
    0 10px 40px rgba(185, 150, 11, 0.35),
    0 4px 12px rgba(185, 150, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

@keyframes verseGradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.verse-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  animation: verseGlow 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes verseGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 5%) scale(1.1); }
}

.verse-card-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.verse-card-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: verseParticleFloat 6s linear infinite;
}

.verse-card-particles span:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.verse-card-particles span:nth-child(2) { left: 30%; animation-delay: 1.5s; animation-duration: 5s; }
.verse-card-particles span:nth-child(3) { left: 50%; animation-delay: 3s; animation-duration: 8s; }
.verse-card-particles span:nth-child(4) { left: 70%; animation-delay: 0.5s; animation-duration: 6s; }
.verse-card-particles span:nth-child(5) { left: 90%; animation-delay: 2s; animation-duration: 7.5s; }

@keyframes verseParticleFloat {
  0% { bottom: -10px; opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { bottom: 110%; opacity: 0; }
}

.verse-card-inner {
  position: relative;
  z-index: 1;
}

.verse-card-enhanced .verse-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  font-size: 13px;
  color: white;
  font-weight: 500;
}

.verse-label-icon {
  font-size: 14px;
  animation: sunPulse 3s ease-in-out infinite;
}

@keyframes sunPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.verse-ref-calligraphy {
  font-family: 'Noto Sans TC', sans-serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: white;
  margin-bottom: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 1px;
}

.verse-text-elegant {
  font-family: 'Noto Sans TC', sans-serif !important;
  font-size: 17px !important;
  line-height: 2 !important;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
}

/* ===== 3. 讀經火焰連續天數 ===== */
.flame-streak-card {
  background: linear-gradient(135deg, #1F1005 0%, #3D240B 40%, #5C3310 100%);
  border-radius: 20px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(92, 51, 16, 0.4),
    inset 0 1px 0 rgba(255, 200, 100, 0.1);
}

.flame-streak-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 120, 0, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.flame-streak-main {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.flame-icon-wrap {
  width: 64px;
  height: 64px;
  position: relative;
  flex-shrink: 0;
}

.flame-animation {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flame-core {
  width: 24px;
  height: 36px;
  background: linear-gradient(to top, #FF6B00, #FFAA00, #FFD700);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flameBurnCore 0.8s ease-in-out infinite alternate;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.6);
}

.flame-outer {
  position: absolute;
  width: 36px;
  height: 48px;
  background: linear-gradient(to top, #FF4500, #FF6B00, transparent);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flameBurnCore 0.6s ease-in-out infinite alternate-reverse;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  z-index: 1;
  opacity: 0.7;
}

.flame-glow {
  position: absolute;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255, 170, 0, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: flameGlowPulse 2s ease-in-out infinite;
}

@keyframes flameBurnCore {
  0% { transform: scaleY(1) scaleX(1); }
  100% { transform: scaleY(1.15) scaleX(0.9); }
}

@keyframes flameGlowPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
}

.flame-animation.flame-dormant .flame-core,
.flame-animation.flame-dormant .flame-outer {
  opacity: 0.3;
  animation: none;
}

.flame-animation.flame-dormant .flame-glow {
  opacity: 0.1;
}

.flame-animation.flame-medium .flame-core {
  width: 28px;
  height: 42px;
  box-shadow: 0 0 28px rgba(255, 170, 0, 0.8);
}

.flame-animation.flame-medium .flame-outer {
  width: 42px;
  height: 54px;
}

.flame-animation.flame-intense .flame-core {
  width: 32px;
  height: 48px;
  background: linear-gradient(to top, #FF4500, #FFD700, #FFFFFF);
  box-shadow: 0 0 36px rgba(255, 200, 0, 1);
}

.flame-animation.flame-intense .flame-outer {
  width: 48px;
  height: 60px;
  opacity: 0.9;
}

.flame-info {
  flex: 1;
}

.flame-days {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.flame-number {
  font-size: 42px;
  font-weight: 900;
  color: #FFD700;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(255, 215, 0, 0.5);
}

.flame-unit {
  font-size: 18px;
  font-weight: 600;
  color: #FFAA00;
}

.flame-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.flame-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.flame-mini-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FF8C00);
  color: #5C3310;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.flame-milestone-bar {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: visible;
  z-index: 1;
}

.flame-milestone-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6B00, #FFD700);
  border-radius: 3px;
  transition: width 1s ease;
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

.flame-milestone-markers {
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.milestone-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.milestone-dot.reached {
  background: linear-gradient(135deg, #FFD700, #FF8C00);
  color: #3D240B;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}

/* ===== 4. 互動式本週環形進度 ===== */
.week-progress-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.week-progress-summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-500);
  background: var(--gold-50);
  padding: 4px 12px;
  border-radius: 12px;
}

.week-ring-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.week-ring-center {
  position: relative;
  width: 120px;
  height: 120px;
}

.week-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.week-ring-bg {
  fill: none;
  stroke: var(--ivory-200);
  stroke-width: 8;
}

.week-ring-fill {
  fill: none;
  stroke: var(--gold-400);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.week-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.week-ring-percent {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-500);
  line-height: 1;
}

.week-ring-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.week-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.week-day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.week-day-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.week-day-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ivory-100);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.week-day-status {
  font-size: 14px;
  color: var(--text-muted);
}

.week-day-item.completed .week-day-circle {
  background: linear-gradient(135deg, var(--success), #059669);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  animation: dayCompleteAnim 0.5s ease;
}

.week-day-item.completed .week-day-status {
  color: white;
  font-size: 14px;
}

.week-day-item.completed .week-day-label {
  color: var(--success);
  font-weight: 600;
}

.week-day-item.today .week-day-circle {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.2);
}

.week-day-item.today .week-day-label {
  color: var(--gold-500);
  font-weight: 600;
}

@keyframes dayCompleteAnim {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ===== 5. 快速操作卡片升級 ===== */
.quick-action-card {
  transition: all 0.3s ease !important;
  border: 1px solid var(--gold-100) !important;
  overflow: hidden;
  position: relative;
}

.quick-action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(201, 169, 98, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quick-action-card:hover::before,
.quick-action-card:active::before {
  opacity: 1;
}

.quick-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}

.quick-action-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
  transition: transform 0.3s ease;
}

.quick-action-card:hover .quick-action-icon {
  transform: scale(1.1);
}

.quick-action-record {
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  color: var(--danger);
}

.quick-action-book {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: var(--gold-500);
}

.quick-action-verify {
  background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
  color: var(--info);
}

.quick-action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.quick-action-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== 6. 每日挑戰區塊 ===== */
.daily-challenge-card {
  background: linear-gradient(135deg, #4F46E5, #7C3AED, #9333EA);
  border-radius: 20px;
  padding: 20px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
}

.daily-challenge-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.daily-challenge-card .challenge-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.challenge-icon-wrap {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  animation: challengePulseAnim 2s ease-in-out infinite;
}

@keyframes challengePulseAnim {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.challenge-title-area {
  display: flex;
  align-items: center;
  gap: 0;
  flex-direction: column;
  align-items: flex-start;
}

.daily-challenge-card .challenge-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: white;
}

.challenge-refresh {
  font-size: 11px;
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 8px;
  margin-top: 4px;
}

.challenge-content {
  position: relative;
  z-index: 1;
}

.challenge-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 14px 16px;
}

.challenge-item-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.challenge-item-info {
  flex: 1;
  min-width: 0;
}

.challenge-item-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.challenge-item-reward {
  font-size: 11px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.challenge-item-reward i {
  color: #FFD700;
}

.challenge-go-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: white;
  color: #7C3AED;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.challenge-go-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== 7. 成就牆（首頁專用） ===== */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.achievement-wall-card .achievement-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px;
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border-radius: 16px;
  border: 2px solid var(--gold-200);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-wall-card .achievement-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 215, 0, 0.15) 100%);
  pointer-events: none;
}

.achievement-wall-card .achievement-item.locked {
  background: var(--ivory-100);
  border-color: var(--ivory-200);
  opacity: 0.55;
  filter: grayscale(0.7);
}

.achievement-wall-card .achievement-item.locked::after {
  display: none;
}

.achievement-wall-card .achievement-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(201, 169, 98, 0.3);
}

.achievement-wall-card .achievement-item.locked .achievement-icon-wrap {
  background: var(--ivory-200);
  color: var(--text-muted);
  box-shadow: none;
}

.achievement-wall-card .achievement-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.achievement-wall-card .achievement-item.locked .achievement-name {
  color: var(--text-muted);
}

.achievement-wall-card .achievement-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-bottom: 0;
}

/* ===== 8. 統計卡片升級 ===== */
.stat-card-enhanced {
  position: relative;
  overflow: hidden;
}

.stat-card-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
  border-radius: 3px 3px 0 0;
}

.stat-card-enhanced.success::before {
  background: linear-gradient(90deg, #34D399, #10B981);
}

.stat-card-enhanced.info::before {
  background: linear-gradient(90deg, #60A5FA, #3B82F6);
}

.stat-card-enhanced.warning::before {
  background: linear-gradient(90deg, #FBBF24, #F59E0B);
}

.stat-icon-mini {
  font-size: 14px;
  color: var(--gold-300);
  margin-bottom: 8px;
}

.stat-card-enhanced.success .stat-icon-mini { color: #34D399; }
.stat-card-enhanced.info .stat-icon-mini { color: #60A5FA; }
.stat-card-enhanced.warning .stat-icon-mini { color: #FBBF24; }

/* ===== 9. 社群互動區 ===== */
.community-card {
  overflow: hidden;
}

.community-live-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
}

.live-pulse {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: livePulseAnim 2s ease-in-out infinite;
}

@keyframes livePulseAnim {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.community-feed {
  padding: 8px 16px;
}

.community-feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ivory-100);
  animation: feedItemSlideIn 0.4s ease both;
}

.community-feed-item:last-child {
  border-bottom: none;
}

@keyframes feedItemSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.community-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.community-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.community-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.community-action {
  font-size: 12px;
  color: var(--text-muted);
}

.community-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.community-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.community-empty i {
  font-size: 18px;
  opacity: 0.5;
}

/* ===== 10. 整體微動畫與過渡增強 ===== */
.page-bible-reading main > * {
  animation: homeSectionFadeIn 0.6s ease both;
}

.page-bible-reading main > *:nth-child(1) { animation-delay: 0s; }
.page-bible-reading main > *:nth-child(2) { animation-delay: 0.05s; }
.page-bible-reading main > *:nth-child(3) { animation-delay: 0.1s; }
.page-bible-reading main > *:nth-child(4) { animation-delay: 0.15s; }
.page-bible-reading main > *:nth-child(5) { animation-delay: 0.2s; }
.page-bible-reading main > *:nth-child(6) { animation-delay: 0.25s; }
.page-bible-reading main > *:nth-child(7) { animation-delay: 0.3s; }
.page-bible-reading main > *:nth-child(8) { animation-delay: 0.35s; }
.page-bible-reading main > *:nth-child(9) { animation-delay: 0.4s; }
.page-bible-reading main > *:nth-child(10) { animation-delay: 0.45s; }
.page-bible-reading main > *:nth-child(11) { animation-delay: 0.5s; }
.page-bible-reading main > *:nth-child(12) { animation-delay: 0.55s; }
.page-bible-reading main > *:nth-child(13) { animation-delay: 0.6s; }

@keyframes homeSectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 首頁響應式增強 ===== */

@media (max-width: 375px) {
  .verse-card-enhanced {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .verse-ref-calligraphy {
    font-size: 18px !important;
  }

  .verse-text-elegant {
    font-size: 15px !important;
    line-height: 1.8 !important;
  }

  .flame-streak-card {
    padding: 18px 16px;
  }

  .flame-number {
    font-size: 32px;
  }

  .flame-icon-wrap {
    width: 52px;
    height: 52px;
  }

  .achievement-grid {
    gap: 8px;
  }

  .achievement-wall-card .achievement-item {
    padding: 12px 6px;
  }

  .achievement-wall-card .achievement-icon-wrap {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .achievement-wall-card .achievement-name {
    font-size: 11px;
  }

  .achievement-wall-card .achievement-desc {
    font-size: 9px;
  }

  .daily-challenge-card {
    padding: 16px;
  }

  .challenge-item {
    padding: 12px;
    gap: 10px;
  }

  .challenge-item-text {
    font-size: 13px;
  }

  .challenge-go-btn {
    width: 40px;
    height: 40px;
    font-size: 12px;
  }

  .week-day-circle {
    width: 32px;
    height: 32px;
  }

  .week-ring-center {
    width: 100px;
    height: 100px;
  }

  .week-ring-percent {
    font-size: 20px;
  }

  .page-bible-reading .quote-carousel {
    padding: 12px 14px;
  }

  .quote-slide-text {
    font-size: 12px;
  }
}

@media (max-width: 319px) {
  .achievement-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .flame-streak-main {
    flex-wrap: wrap;
  }

  .flame-badges {
    width: 100%;
    margin-top: 8px;
  }

  .milestone-dot {
    width: 18px;
    height: 18px;
    font-size: 7px;
  }

  .challenge-item-icon {
    display: none;
  }
}

@media (min-width: 480px) {
  .achievement-grid {
    gap: 16px;
  }

  .achievement-wall-card .achievement-item {
    padding: 20px 12px;
  }

  .achievement-wall-card .achievement-icon-wrap {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .week-ring-center {
    width: 130px;
    height: 130px;
  }

  .week-ring-percent {
    font-size: 28px;
  }

  .week-day-circle {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 768px) {
  .achievement-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .flame-number {
    font-size: 48px;
  }

  .verse-ref-calligraphy {
    font-size: 26px !important;
  }

  .verse-text-elegant {
    font-size: 19px !important;
  }
}

/* 首頁減少動畫模式 */
@media (prefers-reduced-motion: reduce) {
  .verse-card-enhanced {
    animation: none !important;
  }

  .verse-card-glow,
  .verse-card-particles span,
  .flame-core,
  .flame-outer,
  .flame-glow {
    animation: none !important;
  }

  .quote-carousel-slide.active {
    animation: none !important;
  }

  .page-bible-reading main > * {
    animation: none !important;
  }

  .community-feed-item {
    animation: none !important;
  }

  .week-day-item.completed .week-day-circle {
    animation: none !important;
  }

  .challenge-icon-wrap {
    animation: none !important;
  }

  .verse-label-icon {
    animation: none !important;
  }
}

/* 首頁暗色主題 */
@media (prefers-color-scheme: dark) {
  .page-bible-reading .quote-carousel {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.12), rgba(201, 169, 98, 0.06));
    border-color: var(--dark-border);
  }

  .quote-slide-text {
    color: var(--dark-text-primary);
  }

  .quote-slide-icon {
    color: var(--gold-400);
  }

  .week-progress-summary {
    background: rgba(201, 169, 98, 0.15);
    color: var(--gold-400);
  }

  .week-ring-bg {
    stroke: var(--dark-surface-hover, #2A2A4A);
  }

  .week-ring-percent {
    color: var(--gold-400);
  }

  .week-ring-label {
    color: var(--dark-text-muted);
  }

  .week-day-label {
    color: var(--dark-text-muted);
  }

  .week-day-circle {
    background: var(--dark-surface, #222240);
  }

  .week-day-status {
    color: var(--dark-text-muted);
  }

  .community-feed-item {
    border-bottom-color: var(--dark-border);
  }

  .community-name {
    color: var(--dark-text-primary);
  }

  .community-action,
  .community-time {
    color: var(--dark-text-muted);
  }

  .community-empty {
    color: var(--dark-text-muted);
  }

  .achievement-wall-card .achievement-item {
    background: var(--dark-surface, #222240);
    border-color: var(--dark-border);
  }

  .achievement-wall-card .achievement-item.locked {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
  }

  .achievement-wall-card .achievement-name {
    color: var(--dark-text-primary);
  }

  .achievement-wall-card .achievement-desc {
    color: var(--dark-text-muted);
  }

  .quick-action-title {
    color: var(--dark-text-primary);
  }

  .quick-action-desc {
    color: var(--dark-text-muted);
  }

  .stat-icon-mini {
    color: var(--gold-400);
  }
}

/* ========== 512px 折疊機展開斷點 ========== */
@media (min-width: 512px) {
  .comparison-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .verse-content {
    font-size: 21px;
  }

  .stat-card {
    padding: 18px;
  }

  .verse-card {
    padding: 24px 20px;
  }

  .segments-editor {
    padding: 24px;
  }

  .recording-item {
    padding: 14px 18px;
  }

  .podium-item {
    max-width: 180px;
  }
}

/* ========== 1280px 筆電斷點 ========== */
@media (min-width: 1280px) {
  .page-bible-reading {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }

  .verse-content {
    font-size: 26px;
    line-height: 1.8;
  }

  .verse-card {
    padding: 32px 28px;
  }

  .stat-value {
    font-size: 32px;
  }

  .modal-content {
    max-width: 480px;
  }

  .success-modal {
    max-width: 400px;
  }

  .bottom-nav {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
  }

  .recording-time {
    font-size: 56px;
  }

  .record-btn-main {
    width: 100px;
    height: 100px;
    font-size: 36px;
  }

  .nav-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
  }

  .comparison-stats {
    gap: 12px;
  }

  .stat-item {
    padding: 12px;
  }

  .podium-item {
    max-width: 200px;
  }

  .achievement-wall-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* ========== 1920px 大螢幕投射斷點 ========== */
@media (min-width: 1920px) {
  .page-bible-reading {
    max-width: 1400px;
  }

  .verse-content {
    font-size: 30px;
    line-height: 2;
  }

  .verse-card {
    padding: 40px 36px;
  }

  .verse-ref {
    font-size: 24px;
  }

  .stat-value {
    font-size: 36px;
  }

  .recording-time {
    font-size: 64px;
  }

  .nav-header {
    max-width: 1400px;
    font-size: 20px;
  }

  .nav-title {
    font-size: 22px;
  }

  .bottom-nav {
    max-width: 700px;
  }

  .bottom-nav-item {
    font-size: 13px;
    min-height: 64px;
  }

  .modal-content {
    max-width: 560px;
    padding: 32px;
  }

  .record-btn-main {
    width: 120px;
    height: 120px;
    font-size: 42px;
  }

  .waveform-canvas {
    height: 150px;
  }

  .comparison-stats {
    gap: 16px;
  }

  .stat-item {
    padding: 16px;
  }

  .achievement-wall-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
