/* ═══════════════════════════════════════════════════════════════════════════
   SNH48 演艺信息站 - Main Stylesheet
   ═══════════════════════════════════════════════════════════════════════════*/

:root {
  --primary: #ff6b9d;
  --primary-dark: #e0558a;
  --accent: #c084fc;
  --text: #f0f0f0;
  --text-dim: rgba(255, 255, 255, 0.6);
  --bg-dark: #0a0a1a;
  --card-bg: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --nav-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════*/

.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10,10,26,0.95) 60%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--glass);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
  position: relative;
  transition: opacity 0.25s ease;
}

/* When circular menu is open, hide the toggle button so the ring's
   center close icon visually replaces it. */
.nav-toggle.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE CIRCULAR MENU
   ═══════════════════════════════════════════════════════════════════════════*/

/* The ring container - positioned at the toggle button */
.circular-menu {
  position: fixed;
  pointer-events: none;
  z-index: 1050;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Ensure blur/glass effect renders smoothly throughout the expand animation.
     Placing backdrop-filter on the parent container (not just child ring)
     prevents mobile browsers from dropping the filter during opacity transition. */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  will-change: transform, opacity;
  border-radius: 50%;
  overflow: hidden;
}

.circular-menu.open {
  pointer-events: auto;
  opacity: 1;
  transform: scale(1);
}

/* The semi-transparent ring - also clickable to close */
.circular-menu-ring {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(255, 107, 157, 0.03) 0%,
    rgba(255, 107, 157, 0.08) 40%,
    rgba(192, 132, 252, 0.12) 70%,
    rgba(192, 132, 252, 0.06) 100%);
  border: 1.5px solid rgba(255, 107, 157, 0.25);
  box-shadow:
    0 0 40px rgba(255, 107, 157, 0.15),
    inset 0 0 40px rgba(192, 132, 252, 0.05);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.circular-menu.open .circular-menu-ring {
  border-color: rgba(255, 107, 157, 0.4);
  box-shadow:
    0 0 60px rgba(255, 107, 157, 0.2),
    inset 0 0 60px rgba(192, 132, 252, 0.08);
}

/* Center close icon */
.circular-menu-close {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  z-index: 2;
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.3);
}

.circular-menu.open .circular-menu-close {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.2s;
}

.circular-menu-close:hover {
  background: rgba(255, 107, 157, 0.2);
  border-color: var(--primary);
  color: var(--text);
}

/* Menu items positioned around the ring */
.circular-menu-item {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.7rem;
  gap: 2px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(0.3);
  z-index: 3;
}

.circular-menu.open .circular-menu-item {
  opacity: 1;
  transform: scale(1);
}

.circular-menu-item i {
  font-size: 1.15rem;
  transition: transform 0.3s;
}

.circular-menu-item:hover,
.circular-menu-item.active {
  background: rgba(255, 107, 157, 0.15);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 20px rgba(255, 107, 157, 0.2);
}

.circular-menu-item:hover i {
  transform: scale(1.15);
}

/* Staggered animation delays for each item */
.circular-menu-item:nth-child(1) { transition-delay: 0.05s; }
.circular-menu-item:nth-child(2) { transition-delay: 0.1s; }
.circular-menu-item:nth-child(3) { transition-delay: 0.15s; }

/* ── Three items: 6:10 / 7:30 / 8:50, spread closer to ring edge ── */

/* 时光轴 at 6:10 (95°, near bottom) */
.circular-menu-item.item-timeline {
  bottom: 15px;
  left: 102px;
  transform: scale(0.3);
}
.circular-menu.open .circular-menu-item.item-timeline {
  transform: scale(1);
}

/* AI 问答 at 7:30 (135°, center of diagonal) */
.circular-menu-item.item-qa {
  bottom: 43px;
  left: 43px;
  transform: scale(0.3);
}
.circular-menu.open .circular-menu-item.item-qa {
  transform: scale(1);
}

/* 关于 at 8:50 (175°, near left) */
.circular-menu-item.item-about {
  bottom: 102px;
  left: 15px;
  transform: scale(0.3);
}
.circular-menu.open .circular-menu-item.item-about {
  transform: scale(1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO / LANDING PAGE
   ═══════════════════════════════════════════════════════════════════════════*/

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 157, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(192, 132, 252, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(100, 200, 255, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a0a1a 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.015) 2px,
    rgba(255,255,255,0.015) 4px
  );
}

.hero-content {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 100px 24px 80px;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  letter-spacing: 4px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-footer {
  display: flex;
  gap: 32px;
  margin-top: 60px;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  justify-content: center;
}

.hero-footer span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 107, 157, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--glass-border);
}

.btn-outline:hover {
  background: var(--glass);
  border-color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════════════════════════════════════*/

.page-content {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 60px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 157, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(192, 132, 252, 0.08) 0%, transparent 50%),
    var(--bg-dark);
}

.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-container h1 {
  font-size: 2.2rem;
  margin-bottom: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-section {
  margin-bottom: 36px;
}

.about-section h2 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-section p {
  color: var(--text-dim);
  line-height: 1.8;
}

.about-service-status {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  backdrop-filter: blur(8px);
}



.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.tech-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform 0.2s;
}

.tech-card:hover { transform: translateY(-4px); }

.tech-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.tech-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.tech-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 8px 0;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-list li i {
  color: #4ade80;
}

.status-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--card-bg);
  border-radius: 10px;
}

.status-label {
  flex: 1;
  font-size: 0.95rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.done { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.status-dot.pending { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }

/* ═══════════════════════════════════════════════════════════════════════════
   HIGHLIGHT "陈嘉仪"
   ═══════════════════════════════════════════════════════════════════════════*/

.highlight-cjy {
  color: #fbbfbb;
  background: linear-gradient(180deg, transparent 55%, rgba(255, 107, 157, 0.18) 55%);
  font-weight: 500;
  padding: 0 3px;
  border-radius: 3px;
  text-shadow: 0 0 14px rgba(255, 107, 157, 0.25);
  transition: text-shadow 0.3s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════*/

.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--glass-bg);
  margin-top: 40px;
}

.site-footer a {
  transition: opacity 0.2s;
}

.site-footer a:hover {
  opacity: 1;
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Q&A PAGE
   ═══════════════════════════════════════════════════════════════════════════*/

.qa-page {
  padding-top: calc(var(--nav-height) + 20px);
  padding-bottom: 80px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 157, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(192, 132, 252, 0.08) 0%, transparent 50%),
    var(--bg-dark);
}

.qa-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.qa-header {
  text-align: center;
  margin-bottom: 32px;
}

.qa-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.qa-header p {
  color: var(--text-dim);
}

/* ── Input area ───────────────────────────────────────────────────────── */
.qa-input-area {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.qa-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1.5px solid var(--glass-border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.qa-input:focus {
  border-color: var(--primary);
}

.qa-input::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

.qa-submit {
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.qa-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.3);
}

.qa-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── AI生成内容标识（办法第十二条） ─────────────────────────── */
.qa-answer-disclaimer {
  background: rgba(192, 132, 252, 0.06);
  border: 1px solid rgba(192, 132, 252, 0.12);
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.qa-answer-disclaimer i {
  color: var(--accent);
  font-size: 0.9rem;
}

/* ── Compliance notice (生成式AI服务合规标识) ───────────────── */
.qa-compliance-notice {
  margin-top: 12px;
  padding: 8px 16px;
  background: rgba(192, 132, 252, 0.08);
  border: 1px solid rgba(192, 132, 252, 0.15);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.qa-compliance-notice i {
  color: var(--accent);
  font-size: 0.85rem;
}

/* ── Character count ────────────────────────────────────────────── */
.qa-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.qa-char-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.6;
  pointer-events: none;
  transition: color 0.2s, opacity 0.2s;
}

.qa-char-count.warn {
  color: #fbbf24;
  opacity: 1;
}

.qa-char-count.limit {
  color: #ef4444;
  opacity: 1;
  font-weight: 600;
}

/* ── KB status ─────────────────────────────────────────────────────────── */
.qa-status {
  text-align: center;
  margin-bottom: 24px;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.qa-status.ready {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.qa-status.not-ready {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.qa-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* CHANGED: DeepSeek API 余额状态指示灯 */
.api-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.api-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.3s;
}

.api-status-dot.green {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}

.api-status-dot.yellow {
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
}

.api-status-dot.red {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.api-status-dot.gray {
  background: #6b7280;
  box-shadow: 0 0 6px rgba(107, 114, 128, 0.4);
}

/* ── Result area ───────────────────────────────────────────────────────── */
.qa-result {
  margin-top: 24px;
}

.qa-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-dim);
}

.qa-loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Timer ──────────────────────────────────────────────────────────── */
.qa-timer {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: color 0.5s;
}
.qa-timer.warn {
  color: #fbbf24;
  animation: pulse 1s ease-in-out infinite;
}
.qa-timer.timeout {
  color: #ef4444;
  animation: pulse 0.6s ease-in-out infinite;
}

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

/* ── Timeout Card ────────────────────────────────────────────────────── */
.qa-timeout-card {
  background: var(--card-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-top: 24px;
}
.qa-timeout-icon {
  font-size: 3rem;
  color: #fbbf24;
  margin-bottom: 12px;
}
.qa-timeout-card h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--text);
}
.qa-timeout-card p {
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 8px;
}
.qa-email-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}
.qa-email-section label {
  display: block;
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 500;
}
.qa-email-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Mobile: email row should stack vertically to prevent overflow */
@media (max-width: 768px) {
  .qa-email-row {
    flex-direction: column;
    gap: 8px;
  }
  .qa-email-row .qa-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .qa-email-row .qa-submit {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}
.qa-email-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 8px;
}

.qa-answer {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.qa-answer h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.qa-citations {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.qa-citations h3 {
  color: var(--accent);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.citation-item {
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--primary);
}

.citation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.citation-header-video {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: auto;
}


.citation-item .citation-id {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.citation-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(192, 132, 252, 0.15);
  color: var(--accent);
  border: 1px solid rgba(192, 132, 252, 0.25);
  white-space: nowrap;
}

.citation-reason {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  line-height: 1.5;
}

.citation-item .citation-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.citation-item .citation-text {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.citation-segments {
  margin: 6px 0 4px 0;
  border-left: 2px solid rgba(255, 107, 157, 0.15);
  padding-left: 10px;
}

.citation-segment {
  padding: 3px 0;
}

.citation-segment + .citation-segment {
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  margin-top: 2px;
  padding-top: 4px;
}


.segment-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 0.78rem;
}

.segment-anchor {
  display: inline-block;
  font-weight: 600;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
}

.segment-type {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.segment-offset {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.segment-video {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: inline;
}
.segment-video-date {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
}



.segment-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}

.citation-back {
  margin-top: 8px;
  text-align: right;
}

.citation-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 2px 8px;
  border-radius: 4px;
}

.citation-back-link:hover {
  opacity: 1;
  background: rgba(192, 132, 252, 0.1);
}

/* ── Citation ref highlight animation (in answer text) ───────────── */
.citation-ref--highlight {
  animation: citationHighlight 2s ease-out;
}

@keyframes citationHighlight {
  0% {
    background: rgba(255, 107, 157, 0.5);
    box-shadow: 0 0 12px rgba(255, 107, 157, 0.6);
    border-radius: 3px;
    padding: 0 4px;
  }
  100% {
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
}

/* ── Citation item highlight animation (in citation list) ────────── */
.citation-item--highlight {
  animation: citationItemHighlight 2s ease-out;
}

@keyframes citationItemHighlight {
  0% {
    background: rgba(255, 107, 157, 0.25);
    border-left-color: #ff6b9d;
    box-shadow: 0 0 16px rgba(255, 107, 157, 0.3);
  }
  100% {
    background: rgba(255,255,255,0.03);
    border-left-color: var(--primary);
    box-shadow: none;
  }
}




/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════*/

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-footer {
    gap: 16px;
    font-size: 0.75rem;
  }

  .qa-input-area {
    flex-direction: column;
  }

  .qa-submit {
    justify-content: center;
  }
}

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

  .circular-menu {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Password Login Overlay
   ═══════════════════════════════════════════════════════════════════════════*/
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-modal {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 40px;
  width: 90%;
  max-width: 400px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-modal-header i {
  font-size: 1.5rem;
  color: var(--primary);
}

.login-modal-header h2 {
  font-size: 1.3rem;
  font-weight: 500;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.login-input:focus {
  border-color: var(--primary);
}

.login-error {
  color: #ff4444;
}
.login-error.login-error--warn {
  color: #fcd34d;
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 1.2em;
}

.login-submit {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.login-submit:hover {
  background: var(--primary-dark);
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPREHENSIVENESS BANNER
   ═══════════════════════════════════════════════════════════════════════════*/
.qa-comp-banner {
  background: var(--card-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  text-align: center;
}
.qa-comp-banner--high {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.08);
}
.qa-comp-banner--medium {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.05);
}
.qa-comp-banner--low {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(96, 165, 250, 0.05);
}
.qa-comp-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.qa-comp-banner--high .qa-comp-header {
  color: #fbbf24;
}
.qa-comp-banner--medium .qa-comp-header {
  color: #fbbf24;
}
.qa-comp-banner--low .qa-comp-header {
  color: #60a5fa;
}
.qa-comp-header i {
  font-size: 1.2rem;
}
.qa-comp-body {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 4px;
}
.qa-comp-body p {
  margin-bottom: 4px;
}
.qa-comp-banner .qa-email-section {
  margin-top: 16px;
  padding-top: 16px;
}
.qa-comp-banner .qa-email-section label {
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHARE / SAVE AS IMAGE BUTTON
   ═══════════════════════════════════════════════════════════════════════════*/
.qa-share-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 8px;
}
.qa-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 50px;
  border: 1.5px solid var(--glass-border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}
.qa-share-btn:hover {
  background: rgba(255, 107, 157, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 107, 157, 0.2);
}
.qa-share-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.qa-share-btn i {
  font-size: 1.1rem;
}
