/* ==========================================================================
   PROTOCOL: NEXUS-PSYCHE // CYBER-PSYCHIATRY CLINICAL CSS
   設計風格：科幻賽博龐克精神特診室 (Cyber-Psychiatry / Neural HUD / Glassmorphism)
   完全適配：手機直向 RWD 優先，兼顧平板與桌機寬螢幕
   ========================================================================== */

/* --- 變數與主題色彩系統 --- */
:root {
  --bg-core: #05070e;
  --bg-surface: rgba(12, 17, 30, 0.82);
  --bg-card: rgba(18, 25, 44, 0.7);
  --bg-card-hover: rgba(28, 38, 66, 0.9);

  --neon-cyan: #00f3ff;
  --neon-cyan-glow: rgba(0, 243, 255, 0.35);
  --neon-magenta: #ff0055;
  --neon-magenta-glow: rgba(255, 0, 85, 0.35);
  --neon-purple: #9d4edd;
  --neon-purple-glow: rgba(157, 78, 221, 0.35);
  --neon-amber: #ffb700;
  --neon-green: #00ff88;
  --neon-green-glow: rgba(0, 255, 136, 0.35);

  --text-main: #e2e8f0;
  --text-muted: #8b9bb4;
  --text-dim: #4a5568;

  --border-subtle: rgba(0, 243, 255, 0.15);
  --border-bright: rgba(0, 243, 255, 0.5);

  --font-sans: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-hud: 'Orbitron', 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  
  --safe-bottom: env(safe-area-inset-bottom, 20px);
}

/* --- 重置與基礎設定 --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-core);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 15px;
}

/* --- 科技背景層：網格、CRT掃描線與環境微光 --- */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  background-size: 100% 3px, 6px 100%;
  pointer-events: none;
  z-index: 99;
  opacity: 0.7;
}

.ambient-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.cyan-glow {
  top: -60px;
  right: -60px;
  background: var(--neon-cyan);
}

.magenta-glow {
  bottom: -60px;
  left: -60px;
  background: var(--neon-magenta);
}

/* --- 主容器排版（專為手機 RWD 縮放） --- */
.app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px var(--safe-bottom) 16px;
  display: flex;
  flex-direction: column;
}

/* --- 字型工具類別 --- */
.mono {
  font-family: var(--font-mono);
}

/* --- 頂部 HUD 狀態列 --- */
.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  margin-bottom: 16px;
}

.hud-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator.live {
  width: 8px;
  height: 8px;
  background-color: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulse-live 2s infinite ease-in-out;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.status-text {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--neon-cyan);
}

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

.hud-btn {
  background: rgba(0, 243, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.hud-btn:hover, .hud-btn:active {
  background: rgba(0, 243, 255, 0.2);
  border-color: var(--neon-cyan);
  color: #fff;
  transform: translateY(-1px);
}

/* --- 畫面切換邏輯 (Screens) --- */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  flex: 1;
}

.screen.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0);
}

/* --- 階段一：啟動終端 (Intro) --- */
.cyber-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 12px;
  background: rgba(0, 243, 255, 0.12);
  border: 1px solid rgba(0, 243, 255, 0.3);
  border-radius: 20px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  margin-bottom: 10px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--neon-cyan);
  border-radius: 50%;
  animation: pulse-live 1.5s infinite;
}

.glitch-title {
  font-family: var(--font-hud);
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 1.5px;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.glitch-title .accent-text {
  color: var(--neon-cyan);
  display: inline-block;
  text-shadow: 0 0 15px var(--neon-cyan);
}

/* 心理醫生身分證照卡片 */
.doctor-badge-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(16, 24, 44, 0.9), rgba(10, 15, 30, 0.95));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 243, 255, 0.1);
}

.doctor-avatar {
  font-size: 26px;
  width: 44px;
  height: 44px;
  background: rgba(0, 243, 255, 0.12);
  border: 1px solid var(--neon-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--neon-cyan-glow);
}

.doctor-info {
  flex: 1;
}

.doctor-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.doctor-title {
  font-size: 11px;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

/* 終端卡片 */
.terminal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  backdrop-filter: blur(12px);
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
  background: rgba(8, 12, 22, 0.9);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  letter-spacing: 0.5px;
}

.terminal-body {
  padding: 16px 14px;
}

.ai-dialogue {
  font-size: 14.5px;
  color: #f1f5f9;
  line-height: 1.7;
  margin-bottom: 14px;
  font-weight: 400;
  border-left: 3px solid var(--neon-cyan);
  padding-left: 12px;
}

.warning-box {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: rgba(0, 243, 255, 0.06);
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.55;
}

.warning-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.warning-content strong {
  color: var(--neon-cyan);
  display: block;
  margin-bottom: 3px;
}

.meta-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
}

/* 霓虹賽博按鈕 */
.cyber-button {
  width: 100%;
  min-height: 52px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px 20px;
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-btn {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.85), rgba(157, 78, 221, 0.9));
  box-shadow: 0 0 24px var(--neon-cyan-glow);
  color: #05070e;
  font-weight: 800;
}

.primary-btn:active {
  transform: scale(0.98);
  box-shadow: 0 0 12px var(--neon-cyan-glow);
}

.pulse-anim {
  animation: cyber-pulse 2.2s infinite ease-in-out;
}

@keyframes cyber-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--neon-cyan-glow); }
  50% { box-shadow: 0 0 35px rgba(0, 243, 255, 0.7); }
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-bright);
  color: var(--neon-cyan);
}

.secondary-btn:hover, .secondary-btn:active {
  background: rgba(0, 243, 255, 0.15);
  box-shadow: 0 0 16px var(--neon-cyan-glow);
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- 階段二：臨床問診進行畫面 (Quiz) --- */
.quiz-hud {
  margin-bottom: 14px;
}

.hud-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--neon-cyan);
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--neon-cyan);
}

/* 心理醫生臨場發問卡片 */
.probe-card.doctor-consult-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.doctor-hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.doctor-badge-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #fff;
  font-weight: 700;
}

.doctor-icon-mini {
  font-size: 15px;
}

.stage-tag {
  font-size: 10.5px;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

/* 醫生的臨場動作（斜體筆記） */
.doctor-action-text {
  font-size: 12.5px;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--neon-amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* 醫生口述問題 */
.doctor-speech {
  font-size: clamp(14.5px, 4.2vw, 16px);
  line-height: 1.65;
  color: #ffffff;
  font-weight: 500;
}

/* 選項清單 */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 24px;
}

.option-btn {
  width: 100%;
  min-height: 60px;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.option-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 243, 255, 0.15);
}

.option-btn:active {
  transform: scale(0.98);
  border-color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.12);
}

.option-marker {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 13px;
  color: var(--neon-cyan);
  padding: 2px 7px;
  background: rgba(0, 243, 255, 0.1);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}

.option-text {
  flex: 1;
}

/* --- 階段三：運算過場畫面 (Analyzing) --- */
#screenAnalyzing {
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.loading-wrapper {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scanner-circle {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.ring.outer {
  width: 100%;
  height: 100%;
  border-top-color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
  animation: spin 3s linear infinite;
}

.ring.middle {
  width: 80%;
  height: 80%;
  border-left-color: var(--neon-magenta);
  border-right-color: var(--neon-magenta);
  animation: spin 2s linear infinite reverse;
}

.ring.inner {
  width: 60%;
  height: 60%;
  border: 1px dashed var(--neon-purple);
  animation: spin 5s linear infinite;
}

.core-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 10px var(--neon-cyan);
}

.loading-title {
  font-size: 12.5px;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  margin-bottom: 8px;
}

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

/* --- 階段四：診斷結果畫面 (Result) --- */
.result-header-card {
  background: linear-gradient(135deg, rgba(20, 28, 48, 0.85), rgba(12, 17, 30, 0.95));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 243, 255, 0.15);
}

.result-header-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-amber));
}

.report-badge {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.subject-id {
  font-size: 12px;
  color: var(--neon-cyan);
  margin-bottom: 10px;
}

.profile-type-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(0, 243, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 8px;
}

.profile-name {
  font-family: var(--font-hud);
  font-size: clamp(19px, 5.8vw, 23px);
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.profile-summary {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.6;
}

/* 分區標題條 */
.section-title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.title-code {
  font-size: 11px;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}

.title-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

/* 圖表區域 */
.chart-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
}

.radar-box {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.radar-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

/* 能量條 */
.spectrum-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.spectrum-item .bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 4px;
}

.spectrum-item.deification .bar-label { color: #facc15; }
.spectrum-item.romantic .bar-label { color: #f43f5e; }
.spectrum-item.ghost .bar-label { color: #a855f7; }
.spectrum-item.lucid .bar-label { color: #10b981; }

.bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.spectrum-item.deification .bar-fill { background: linear-gradient(90deg, #ca8a04, #facc15); box-shadow: 0 0 8px #facc15; }
.spectrum-item.romantic .bar-fill { background: linear-gradient(90deg, #e11d48, #f43f5e); box-shadow: 0 0 8px #f43f5e; }
.spectrum-item.ghost .bar-fill { background: linear-gradient(90deg, #9333ea, #a855f7); box-shadow: 0 0 8px #a855f7; }
.spectrum-item.lucid .bar-fill { background: linear-gradient(90deg, #059669, #10b981); box-shadow: 0 0 8px #10b981; }

/* 生活受損警告 */
.impairment-alert {
  display: flex;
  gap: 10px;
  background: rgba(255, 0, 85, 0.1);
  border: 1px solid rgba(255, 0, 85, 0.35);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 14px;
}

.alert-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.alert-text {
  font-size: 12.5px;
  color: #fecdd3;
  line-height: 1.5;
}

.alert-text strong {
  color: #fff;
  display: block;
  margin-bottom: 2px;
}

/* 醫師面談筆記與特徵清單 */
.diagnosis-detail-card, .clinical-case-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}

.ai-whisper {
  font-size: 14px;
  line-height: 1.7;
  color: #e2e8f0;
  border-left: 3px solid var(--neon-cyan);
  padding-left: 12px;
  margin-bottom: 14px;
}

.symptom-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.symptom-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.symptom-bullet {
  color: var(--neon-cyan);
  font-size: 12px;
  margin-top: 2px;
}

/* 臨床案例內容卡 */
.case-content {
  font-size: 13px;
  line-height: 1.65;
  color: #cbd5e1;
}

.case-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255, 183, 0, 0.15);
  border: 1px solid var(--neon-amber);
  color: var(--neon-amber);
  border-radius: 3px;
  margin-bottom: 6px;
}

.case-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.case-desc {
  margin-bottom: 10px;
}

.case-source-link {
  font-size: 11px;
  color: var(--neon-cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.case-source-link:hover {
  text-decoration: underline;
}

/* 嚴正免責聲明與援助卡片 */
.medical-disclaimer-card {
  background: rgba(30, 20, 10, 0.7);
  border: 1px solid rgba(255, 183, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 22px;
}

.disclaimer-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.disclaimer-icon {
  font-size: 20px;
}

.disclaimer-header h3 {
  font-size: 14px;
  color: var(--neon-amber);
  font-weight: 700;
}

.disclaimer-body {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.6;
}

.help-box {
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.help-box h4 {
  font-size: 13px;
  color: #fff;
  margin-bottom: 6px;
}

.hotline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

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

.hotline-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.hotline-name {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.hotline-num {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--neon-green);
  margin: 2px 0;
}

.hotline-note {
  font-size: 10px;
  color: #94a3b8;
}

/* 結果操作按鈕區 */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 440px) {
  .result-actions {
    flex-direction: row;
  }
  .result-actions .cyber-button {
    flex: 1;
  }
}

.app-footer {
  text-align: center;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: auto;
  padding-top: 18px;
}

/* --- 文獻 Modal 視窗 --- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: #0d1222;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 243, 255, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 12px;
  color: var(--neon-cyan);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: #cbd5e1;
}

.modal-body h4 {
  color: #fff;
  margin-bottom: 12px;
}

.ref-entry {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.ref-tag {
  font-size: 10px;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.ref-entry h5 {
  font-size: 13.5px;
  color: #fff;
  margin-bottom: 4px;
}

.ref-entry ul {
  padding-left: 18px;
  margin-top: 6px;
}

.ref-entry li {
  margin-bottom: 6px;
}

.ref-entry.note {
  border-color: rgba(255, 183, 0, 0.3);
  background: rgba(255, 183, 0, 0.05);
}

/* Toast 提示 */
.cyber-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 243, 255, 0.9);
  color: #05070e;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 15px var(--neon-cyan);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
}

.cyber-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
