@charset "UTF-8";
*, *::before, *::after { box-sizing: border-box; }
html { margin: 0; padding: 0; }
body { margin: 0; padding: 0; background: #1a1a1a; font-family: Arial, Helvetica, sans-serif; color: #fff; }
a { color: #8cc; }

/* Fixed header */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: #0e0e0e;
  padding: 8px 20px;
  border-bottom: 2px solid #333;
  display: flex;
  align-items: center;
  gap: 16px;
}
#header h1 { margin: 0; font-size: 16px; color: #ccc; }

/* Fixed footer */
#footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: #0e0e0e;
  padding: 8px 20px;
  border-top: 2px solid #333;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 10px;
}
#footer p { margin: 0; }

/* Legend */
.legend-swatch {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  margin: 2px;
  font-size: 10px;
  white-space: nowrap;
  color: #fff;
}

/* Tree container - offset for fixed header and footer */
#tree {
  position: relative;
  min-width: 2752px;
  min-height: 5260px;
  margin-top: 50px;
  margin-bottom: 50px;
}

/* Tech card */
.tech {
  position: absolute;
  z-index: 1;
  width: 60px;
  border-radius: 4px;
  border: 2px solid #555;
  color: #aaa;
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  line-height: 1px;
  padding-bottom: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
.L0 { background: #3a3a3a; border-color: #555; }
.L1 { background: #7a3238; border-color: #c4585a; }
.L2 { background: #3a6130; border-color: #68b458; }
.L3 { background: #3a4a58; border-color: #5888a8; }
.L4 { background: #3a6a74; border-color: #58a8b8; }
.L5 { background: #5a3578; border-color: #a868c4; }
.L6 { background: #746830; border-color: #c4a848; }
.L7 { background: #986028; border-color: #e8944c; }
.L8 { background: #5a6a2e; border-color: #98b448; }
.L9 { background: #3868a0; border-color: #68a8e0; }
.L10 { background: #388888; border-color: #68d4d4; }
.L11 { background: #881840; border-color: #d84888; }

.pic {
  width: 48px;
  height: 48px;
  padding: 3px;
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
}
.items {
  text-align: center;
  margin: 0 1px;
  line-height: 0;
}

/* Connection paths */
.path {
  position: absolute;
  background-color: rgba(170,170,170,0.4);
  height: 2px;
  transform-origin: 0 0;
}
.dark { opacity: 0; }
.blurred { opacity: 0.25; }
.blurred2 { opacity: 0; }
.path.selected2 {
  background-color: #fff;
  z-index: 2;
  height: 2px;
  box-shadow: 0 0 4px rgba(255,255,255,0.5);
}

/* Items & bonuses */
.item, .bonus {
  margin: 1px;
  width: 24px;
  height: 24px;
  padding: 1px;
  background-clip: content-box;
  background-origin: content-box;
  background-size: auto 100%;
  background-repeat: no-repeat;
  display: inline-block;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 1px 2px rgba(0,0,0,0.3);
}
.bonus { background-image: url(graphics/icons/bonus-icon.png); }

/* Selection */
.selected {
  box-shadow: 0 0 10px 4px rgba(255,255,255,0.6);
  z-index: 4;
  border-color: #fff !important;
}
.selected2 {
  z-index: 3;
  opacity: 1 !important;
}
.item.selected {
  background-color: white;
  padding: 0;
  border: 1px solid white;
  border-radius: 2px;
}
.trigger {
  border-style: dashed;
}
.infinite::after {
  content: "E";
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1;
}

/* Tooltips */
#tooltip {
  z-index: 5;
  position: fixed;
  display: none;
  white-space: nowrap;
  background: #2a2a2af0;
  padding: 8px;
  font-size: 14px;
  pointer-events: none;
  border-radius: 4px;
  border: 1px solid #444;
  max-height: 90vh;
  overflow-y: auto;
}
#tooltip2 {
  z-index: 5;
  position: fixed;
  display: none;
  width: 220px;
  pointer-events: none;
}
#tooltip2 > div {
  background: #2a2a2af0;
  padding: 8px;
  font-size: 14px;
  display: inline-block;
  border-radius: 4px;
  border: 1px solid #444;
}
.tiplist, .tip5 { height: 32px; line-height: 32px; }
.tiptitle {
  padding-bottom: 4px;
  font-weight: bold;
  color: #222;
  background: #c8b080;
  margin: -8px -8px 6px -8px;
  padding: 5px 8px;
  box-shadow: inset 0 0 3px;
  border-radius: 3px 3px 0 0;
}
.tipheading { font-weight: bold; color: #f0c878; }
.hoveritem {
  vertical-align: middle;
  font-size: 13px;
  font-weight: bold;
  line-height: 40px;
  text-shadow: -1px -1px 0 #000, 1px 1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  margin-right: 4px;
  width: 24px;
  height: 24px;
  padding: 1px;
  background-clip: content-box;
  background-origin: content-box;
  background-size: auto 100%;
  background-repeat: no-repeat;
  display: inline-block;
  border-radius: 2px;
}

/* Search */
#searchBox { position: relative; display: inline-block; }
#searchInput {
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  width: 220px;
}
#searchInput:focus { outline: none; border-color: #68a8e0; }
#searchResults {
  position: absolute;
  top: 100%;
  left: 0;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 0 0 4px 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 20;
  display: none;
  min-width: 240px;
}
.search-item {
  display: block;
  padding: 5px 8px;
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.search-item:hover { background: #2a2a2a; color: #fff; }
.search-item.L1 { border-left: 3px solid #c4585a; }
.search-item.L2 { border-left: 3px solid #68b458; }
.search-item.L3 { border-left: 3px solid #5888a8; }
.search-item.L4 { border-left: 3px solid #58a8b8; }
.search-item.L5 { border-left: 3px solid #a868c4; }
.search-item.L6 { border-left: 3px solid #c4a848; }
.search-item.L7 { border-left: 3px solid #e8944c; }
.search-item.L8 { border-left: 3px solid #98b448; }
.search-item.L9 { border-left: 3px solid #68a8e0; }
.search-item.L10 { border-left: 3px solid #68d4d4; }
.search-item.L11 { border-left: 3px solid #d84888; }
.search-empty { padding: 8px; color: #666; font-size: 12px; text-align: center; }
kbd { background: #2a2a2a; padding: 1px 5px; border-radius: 3px; font-size: 11px; border: 1px solid #444; color: #aaa; }
