#container {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

#entity-selectors {
  margin-bottom: 10px;
}

#entity-select1, #entity-select2 {
  margin-right: 10px;
  padding: 5px;
  width: 200px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: 1px solid #ccc;
}

optgroup {
  font-weight: bold;
  font-style: italic;
}

#similarity-score {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 20px;
}

#charts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start; /* important */
  align-items: flex-start;
  overflow-x: hidden; /* prevent horizontal scroll */
}

#radar-section {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  min-height: 0 !important;
  flex: 1 !important;
  min-width: 450px !important;
  max-width: 100%;
  width: 100% !important;
  padding: 0;
  box-sizing: border-box;
  position: relative !important;
  overflow: visible !important;
}

#radar-section h3 {
  margin-bottom: 2px;
}

#radar-section #entity-labels {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
  font-size: 20px;
  font-weight: bold;
  width: 100%;
  text-align: center;
}

#radar-section #entity-labels span {
  display: inline-block;
  text-align: left;
}

#radar-section #chart {
  overflow: visible !important;
  width: 450px !important;
  margin: 0 auto !important;
  position: relative !important;
  flex: 1 !important;
  min-width: 0 !important;
  clip-path: none !important;
}

#bar-section {
  flex: 1;
  min-width: 450px;
  width: 100%;
  height: auto;
}

#deselect-all {
  margin-bottom: 10px;
}

svg {
  width: 450px !important;
  height: 400px !important;
  overflow: visible !important;
  clip-path: none !important;
}

.axislabel {
  font-size: 10px !important;
  white-space: normal !important;
}

canvas {
  max-width: 100%;
}

#bar-chart {
  height: 100%;
  min-height: 400px;
  min-width: 450px;
  display: block;
}

@media (max-width: 1024px) {
  #charts {
    flex-direction: column;
  }
  #entity-select1, #entity-select2 {
    width: 100%;
    margin-bottom: 10px;
    margin-right: 0;
  }
  #chart svg {
    width: 100%;
    height: auto;
  }
  #bar-section {
    width: 100%;
    margin-top: 10px;
  }
  #bar-chart {
    height: auto;
    min-height: 200px;
  }
}
#entity-details {
  display: flex;
  gap: 40px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.entity-block {
  flex: 1;
  min-width: 300px;
  padding: 10px;
  background-color: #f8f8f8;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.entity-name {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 4px;
}

.entity-type {
  font-style: italic;
  margin-bottom: 10px;
}

.entity-description,
.entity-source-notes {
  margin-bottom: 10px;
  font-size: 0.95em;
}
#entity-score-overview {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 30px;
  padding: 10px 0;
}

.score-overview-block {
  background-color: #f8f8f8;
  border-left: 4px solid #ccc;
  padding: 10px 15px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  flex: 1;
  min-width: 300px;
}

.score-overview-title {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 5px;
}

.score-overview-content {
  font-size: 0.95em;
  line-height: 1.4em;
}
