body {
    background-color: #1A1A1A;
    color: #F0F0F0; /* text color */
    font-family: "Ranade";
    margin: 0;
 } 

.header-section {
    text-align: center;
    background-color: #252525;
    padding: 1.5rem;
}

h2 {
    font-size: 35px;
    font-family: "Playfair Display";
    color: rgb(217, 166, 64);
}

h4, p {
    font-size: 18px;
    font-family: "Ranade";
    margin: 0;
}

#guess-section {
    text-align: center;
    background-color: #212020;
    padding: 0.5rem;
    padding: 1.5rem 0 2rem; 
}

#guess-result {
    margin-top:0.5rem;
    font-size: 18px;
    font-family: "Ranade";
    font-style: italic;
}

#gender-answer {
    opacity: 0;
    transition: opacity 3s ease;
    text-align: center;
    margin-top: 1.5rem;
}

#gender-answer.visible {
  opacity: 1;
  text-align: center;
}

#viz-container {
  opacity: 0;
  transition: opacity 4s ease;
  max-width: 1200px;
  margin: 0 auto;
}

#viz-container.visible {
  opacity: 1;
}

#legend {
  margin: 10px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;

  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

#legend.fade{
    opacity: 0;
}

.legend-title {
  font-weight: 600;
  margin-right: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #ccc;
}

#tooltip {
  position: absolute;
  pointer-events: none;  /* don't block mouse events on circles */
  background: #3d3b3b;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  visibility: hidden;   /* start hidden */
  white-space: pre-line; /* allow new lines */
}

.song-dot {
  transition: transform 150ms ease-out;
  transform-origin: center;
  transform-box: fill-box; 
}

.song-dot:hover {
    transform: scale(2);
    cursor: pointer;
}

.filtering-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.filter-card {
  padding: 0.4rem;
}

.other-views {
    margin-left: 9rem;
}

.happiness-axis, .dance-axis, .year-axis, .x-axis {
    opacity: 0;
    transition: opacity 0.4s ease;
    font-size: 14px;
}

.happiness-axis.visible, .dance-axis.visible, .year-axis.visible, .x-axis {
    opacity: 1;
}

.happiness-label, .dance-label {
  font-size: 0.85rem;
  fill: #F0F0F0;
  font-size: 14px;
}

#dict-and-stats {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 0.5rem;
    margin-bottom: 3rem;
}

.data-dictionary {
    flex: 2;
}

.summary-panel {
    flex: 1;
}

h3 {
    margin-bottom: 0.75rem;
}

.dict-item {
  border: 1px solid #444;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.dict-item p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.dict-item summary {
  cursor: pointer;
  font-weight: 600;
  color: rgb(194, 110, 156);
}

.chart-root {
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

.chart-root.fade {
    opacity: 0;
}

.sources p {
    font-size: 12px;
    font-style: italic;
}

.bar-chart {
    margin-bottom: 3rem;
}

/* Unvisited link */
a:link {
      color: pink;
    }

/* Visited link */
a:visited {
    color: pink;
}