/* ==========================================
   CineAHO Bio-Medical Paper Trends Analyzer
   CSS Style System
   ========================================== */

/* Theme Variables Reference (Inherits Portal Theme) */
:root {
  --bg-color: #060913;
  --panel-bg: rgba(14, 20, 38, 0.55);
  --panel-border: rgba(255, 255, 255, 0.05);
  --panel-hover-border: rgba(99, 102, 241, 0.25);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  
  --grad-purple: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  --grad-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  --grad-green: linear-gradient(135deg, #10b981 0%, #047857 100%);
  --grad-pink: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
  --grad-orange: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
  
  --font-main: 'Noto Sans KR', 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* Page Layout Container */
.bio-page-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

/* Glassmorphism Panel Helper */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}
.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

/* Hero Section */
.bio-hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-radius: 20px;
}
.hero-left-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.badge-capsule {
  display: inline-flex;
  align-items: center;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #818cf8;
  width: fit-content;
}
.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-dot-anim 1.6s infinite;
}
@keyframes pulse-dot-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.hero-bio-title {
  font-family: var(--font-display), var(--font-main);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-left-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Tabs switcher styling */
.bio-tabs-wrapper {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
}
.bio-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}
.bio-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.03);
}
.bio-tab-btn.active {
  color: #fff;
  background: var(--grad-purple);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* KPI Dashboards grid */
.bio-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.kpi-card {
  padding: 1.25rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}
.kpi-icon.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.kpi-icon.icon-red { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }
.kpi-icon.icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.kpi-icon.icon-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.kpi-data {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}
.kpi-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.25px;
}

/* Tab Panels Content Switcher */
.bio-tab-panel {
  display: none;
  animation: tabFadeIn 0.5s ease;
}
.bio-tab-panel.active {
  display: block;
}
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tab 1: Dashboard Grid layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.chart-card {
  padding: 1.5rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: rgba(14, 20, 38, 0.4);
}
.chart-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
}
.chart-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-header span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
}

/* Keywords Word Cloud tags */
.keywords-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-content: center;
  justify-content: center;
  padding: 1.5rem 0.5rem;
  min-height: 250px;
}
.kw-tag {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.kw-tag:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
  transform: translateY(-2px);
}
.kw-tag.size-xxl { font-size: 1.15rem; color: #f43f5e; font-weight: 800; border-color: rgba(244, 63, 94, 0.2); }
.kw-tag.size-xl { font-size: 1.05rem; color: #a855f7; font-weight: 700; border-color: rgba(168, 85, 247, 0.2); }
.kw-tag.size-lg { font-size: 0.95rem; color: #3b82f6; font-weight: 600; }
.kw-tag.size-md { font-size: 0.82rem; color: #06b6d4; }
.kw-tag.size-sm { font-size: 0.72rem; color: var(--text-muted); }

/* Tab 2: Explorer Toolbar */
.explorer-toolbar {
  padding: 1.25rem;
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  background: rgba(14, 20, 38, 0.4);
}
.search-box-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding-left: 0.75rem;
  border-radius: 8px;
  flex: 1;
  min-width: 280px;
  transition: var(--transition-smooth);
}
.search-box-wrapper:focus-within {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
}
.search-box-wrapper i {
  color: var(--text-muted);
}
.search-box-wrapper input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.85rem;
  padding: 0.6rem 0.5rem;
  width: 100%;
}
.select-filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.bio-select {
  background: rgba(14, 20, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  padding: 0.6rem 1.25rem 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  min-width: 130px;
  transition: var(--transition-smooth);
}
.bio-select:focus {
  border-color: rgba(168, 85, 247, 0.4);
}
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-reset-filters {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #f43f5e;
}
.btn-reset-filters:hover {
  background: rgba(244, 63, 94, 0.15);
}

/* Papers Table Layout */
.papers-table-wrapper {
  padding: 1.5rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.table-scroll-container {
  overflow-x: auto;
}
.papers-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.papers-table th {
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
}
.papers-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.papers-table th.sortable:hover {
  color: var(--text-main);
}
.papers-table td {
  padding: 1rem;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}
.papers-table tbody tr {
  transition: var(--transition-smooth);
}
.papers-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.paper-title-col {
  font-weight: 700;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-detail-view {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #c084fc;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}
.btn-detail-view:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
}
.papers-table-footer {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.papers-table-footer strong {
  color: var(--text-main);
}

/* Tab 3: Simulator Layout */
.simulator-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
}
.simulator-controls-panel {
  padding: 1.5rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.panel-header {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 1rem;
}
.panel-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.3rem;
}
.panel-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}
.slider-value {
  color: #ec4899;
  font-weight: 700;
}
.slider-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Custom styled slider ranges */
.bio-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  outline: none;
  margin: 6px 0;
}
.bio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ec4899;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
  transition: transform 0.1s ease;
}
.bio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.btn-reset-simulator {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-reset-simulator:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.simulator-chart-panel {
  padding: 1.5rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}
.simulator-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
}

/* Detailed Paper modal styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 9, 19, 0.6);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  width: 100%;
  max-width: 600px;
  padding: 2.25rem;
  border-radius: 24px;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.06);
}
.modal-overlay.open .modal-box {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text-main);
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 1rem;
}
.journal-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  width: fit-content;
}
.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-main);
}
.modal-authors {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.modal-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
.spec-item {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.spec-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
}
.spec-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}
.spec-val.text-blue { color: #60a5fa; }
.spec-val.text-orange { color: #f97316; }
.spec-val.text-purple { color: #c084fc; }

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.modal-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}
.modal-section p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.modal-keywords-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.modal-kw-tag {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .simulator-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .bio-hero-section {
    flex-direction: column;
    gap: 1.25rem;
    align-items: stretch;
  }
  .hero-right-action {
    display: flex;
    justify-content: center;
  }
  .bio-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .bio-kpi-grid {
    grid-template-columns: 1fr;
  }
  .explorer-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .select-filters-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  .bio-select {
    min-width: 0;
  }
  .bio-tabs-wrapper {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --- Light Theme Variables & Styles for Bio-Medical Trends --- */
[data-theme="light"] {
  --bg-color: #f8fafc;
  --panel-bg: rgba(255, 255, 255, 0.7);
  --panel-border: rgba(15, 23, 42, 0.06);
  --panel-hover-border: rgba(59, 130, 246, 0.3);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --shadow-card: 0 12px 40px 0 rgba(15, 23, 42, 0.08);
}

/* Light Theme overrides for sub-components */
[data-theme="light"] body {
  background-color: var(--bg-color);
  color: var(--text-main);
}

[data-theme="light"] .hero-bio-title {
  background: linear-gradient(135deg, #0f172a 30%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .bio-tab-btn {
  color: var(--text-muted);
}
[data-theme="light"] .bio-tab-btn:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .bio-tab-btn.active {
  color: #ffffff;
  background: var(--grad-purple);
}

[data-theme="light"] .kpi-icon.icon-purple { background: rgba(168, 85, 247, 0.1); color: #7e22ce; }
[data-theme="light"] .kpi-icon.icon-red { background: rgba(244, 63, 94, 0.1); color: #be123c; }
[data-theme="light"] .kpi-icon.icon-blue { background: rgba(59, 130, 246, 0.1); color: #1d4ed8; }
[data-theme="light"] .kpi-icon.icon-green { background: rgba(16, 185, 129, 0.1); color: #047857; }

[data-theme="light"] .chart-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--panel-border);
}
[data-theme="light"] .chart-header {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .kw-tag {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.05);
  color: var(--text-muted);
}
[data-theme="light"] .kw-tag:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: #7e22ce;
}
[data-theme="light"] .kw-tag.size-xxl { color: #be123c; border-color: rgba(244, 63, 94, 0.15); }
[data-theme="light"] .kw-tag.size-xl { color: #7e22ce; border-color: rgba(168, 85, 247, 0.15); }
[data-theme="light"] .kw-tag.size-lg { color: #1d4ed8; }
[data-theme="light"] .kw-tag.size-md { color: #0891b2; }

[data-theme="light"] .explorer-toolbar {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--panel-border);
}
[data-theme="light"] .search-box-wrapper {
  background: rgba(15, 23, 42, 0.01);
  border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .search-box-wrapper input {
  color: var(--text-main);
}
[data-theme="light"] .bio-select {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--text-main);
}
[data-theme="light"] .papers-table th {
  color: var(--text-muted);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .papers-table td {
  color: var(--text-main);
  border-bottom-color: rgba(15, 23, 42, 0.05);
}
[data-theme="light"] .papers-table tbody tr:hover td {
  background: rgba(15, 23, 42, 0.01);
}

[data-theme="light"] .bio-slider {
  background: rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .simulator-controls-panel {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--panel-border);
}
[data-theme="light"] .simulator-chart-panel {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--panel-border);
}
[data-theme="light"] .panel-header {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

/* Modal and Overlays */
[data-theme="light"] .modal-overlay {
  background: rgba(248, 250, 252, 0.7);
}
[data-theme="light"] .modal-box {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}
[data-theme="light"] .modal-header {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .spec-item {
  background: rgba(15, 23, 42, 0.01);
  border-color: rgba(15, 23, 42, 0.03);
}
[data-theme="light"] .modal-kw-tag {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.05);
}

/* Theme Toggle Button Styling */
.btn-theme {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  transition: var(--transition-smooth);
}
.btn-theme:hover {
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .btn-theme {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.08);
}

/* Rich Footer Styles copied for bio-medical subdirectory */
.rich-footer {
  background-color: #050b14;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4rem 3rem 2rem 3rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 3rem;
}

[data-theme="light"] .rich-footer {
  background-color: #f8fafc;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  color: #64748b;
}

.footer-top-grid {
  max-width: 1300px;
  margin: 0 auto 3rem auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
  text-align: left;
}

.footer-left-brand {
  flex: 1 1 500px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cdb-badge {
  background-color: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  font-family: var(--font-display);
}

.brand-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-main);
}

.brand-links {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
}

.divider-dot {
  color: var(--text-muted);
  font-weight: bold;
}

.visitor-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.stat-group h4 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.stat-group p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stat-group p span {
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.stats-link {
  font-size: 0.85rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  margin-top: 4px;
  display: inline-block;
  transition: opacity 0.2s;
}

.stats-link:hover {
  opacity: 0.8;
}

.footer-right-columns {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}

.footer-col {
  min-width: 100px;
}

.footer-col h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  font-family: var(--font-main);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text-main);
}

.footer-bottom-bar {
  max-width: 1300px;
  margin: 0 auto;
  border-top: 1px solid var(--panel-border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copyright {
  font-weight: 400;
}

.footer-built-with {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.tool-visits-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  margin-left: 0.5rem;
}

.tool-visits-count i {
  color: #3b82f6; /* Blue eye icon */
}

/* Data Sources & Schedule styling */
.data-sources-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  padding: 0.5rem 0;
}
.schedule-block, .sources-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.schedule-block h4, .sources-block h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.schedule-block p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.schedule-block p strong {
  color: var(--text-main);
}
.update-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  width: fit-content;
  margin-top: 0.25rem;
}
.update-badge .pulse-dot {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-dot-green-anim 1.6s infinite;
}
@keyframes pulse-dot-green-anim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.sources-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.source-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.76rem;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.source-link i {
  font-size: 9px;
  opacity: 0.8;
}
.source-link:hover {
  color: var(--text-main);
  transform: translateX(2px);
}
@media (max-width: 768px) {
  .data-sources-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

