/* mass-phylogeny/index.css */
:root {
  --surface1-color: #121215;
  --surface2-color: #1e1f22;
  --surface3-color: #2d2f35;
  --text-primary: #e0e0e0;
  --text-secondary: #bdc1c6;
  --text-muted: #80868b;
  --border-color: #3c4043;
  --border-color-light: #5f6368;
  --link-color: #58a6a6;
  --link-hover-color: #79c4c4;
  --accent-success: #7fc192;
  --failure-color: var(--text-muted);
  --tooltip-bg: rgba(32, 33, 36, 0.97);
  --tooltip-text: var(--text-secondary);
  --shadow-dark: rgba(0, 0, 0, 0.7);
  --border-radius-md: 8px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --branch-color-soil: #783f04;
  --branch-color-necro: #e3963e;
  --branch-color-0-base-eukaryote: #40a798;
  --branch-color-1-fungi: #b07d62;
  --branch-color-2-plants: #4f7942;
  --branch-color-3-early-animals: #40a798;
  --branch-color-4-arthropods: #6a0dad;
  --branch-color-5-molluscs-worms: #d87093;
  --branch-color-6-echinoderms: #ffd700;
  --branch-color-7-fish: #0077be;
  --branch-color-8-lobe-finned-tetrapods: #20b2aa;
  --branch-color-9-amphibians: #9acd32;
  --branch-color-10-reptiles-birds: #b22222;
  --branch-color-11-mammals: #d2b48c;
  --branch-color-12-hominins: #c17f8a;
  --branch-color-0-base-technosphere: #999;
  --branch-color-1-infrastructure: #999;
  --branch-color-2-metals: #999;
  --branch-color-3-polymers: #999;
}
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
}
main.tree-of-life-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  flex-grow: 1;
  width: 100%;
  min-height: 0;
}
.tree-wrapper {
  width: 100%;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-color);
}
#tree-of-life-svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}
.tree-node-group:hover .tree-node-background-circle {
  filter: brightness(1.3);
}
.tree-branch {
  stroke-opacity: 1;
  stroke: #000;
}
.tree-node-background-circle {
  fill: currentColor;
  stroke: #000;
  fill-opacity: 1;
}
.tree-node-emoji {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
}
.tree-node-group:hover .tree-node-emoji {
  filter: grayscale(0);
}
.interactive-svg-element {
  cursor: pointer;
}
.popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 145;
  pointer-events: none;
}
.popup-container > .clickable-tooltip {
  pointer-events: auto;
}
.clickable-tooltip {
  position: fixed;
  z-index: 160;
  width: auto;
  max-width: 250px;
  padding: var(--spacing-sm);
  background-color: var(--tooltip-bg, rgba(40, 42, 48, 0.95));
  color: var(--tooltip-text, #eee);
  border: 1px solid var(--border-color, #555);
  border-radius: var(--border-radius-md, 6px);
  box-shadow: 0 4px 12px var(--shadow-dark, rgba(0, 0, 0, 0.3));
  font-size: 0.9em;
  line-height: 1.4;
  white-space: normal;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
}
.clickable-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.clickable-tooltip strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--spacing-xs);
}
.clickable-tooltip .tooltip-age {
  color: var(--text-muted);
  font-size: 0.9em;
}
.clickable-tooltip .wiki-link-indicator {
  margin-left: var(--spacing-xs);
  color: var(--link-color);
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  vertical-align: baseline;
}
.clickable-tooltip .wiki-link-indicator:hover {
  color: var(--link-hover-color);
}
.geosphere-shape {
  fill: #999;
  stroke: #000;
  fill-opacity: 0.25;
}
.geosphere-connector {
  stroke: #000;
  z-index: 200;
}
.hydrosphere-shape {
  fill: #05f;
  fill-opacity: 0.25;
  stroke: #000;
}
.hydrosphere-connector {
  stroke: #05f;
  z-index: 200;
}
.atmosphere-shape {
  fill: #fff;
  fill-opacity: 0.3;
  stroke: #000;
}
.sphere-emoji {
  opacity: 0.7;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  text-anchor: middle;
  dominant-baseline: central;
}
.view-controls {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background-color: var(--surface2-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-xs);
  display: flex;
  gap: var(--spacing-xs);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow-dark);
}
.view-controls button {
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  background-color: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  font-weight: 500;
}
.view-controls button.active {
  background-color: var(--surface3-color);
  color: var(--text-primary);
}
.view-controls button:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.08);
}
.chemical-view-group {
  pointer-events: all;
  cursor: pointer;
}
.tree-node-group:hover .chemical-view-group {
  filter: brightness(1.3);
}
.pie-chart-slice {
  stroke: var(--surface1-color);
  fill-opacity: 0.5;
}
.pie-chart-slice:hover {
  filter: brightness(1.25);
}
.chemical-tooltip-content .element-symbol {
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text-primary);
}
.chemical-tooltip-content .element-percentage {
  font-size: 0.9em;
  color: var(--text-secondary);
}
.chemical-tooltip-content .wiki-link-indicator {
  margin-left: 4px;
}
.inter-tree-connector {
  stroke: #000;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  fill: none;
  z-index: 200;
}
