.harm-pie-container {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.harm-pie-container:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.harm-pie-container:focus {
  outline: 2px solid var(--primary-color, #2563eb);
  outline-offset: 2px;
}

.harm-pie-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  letter-spacing: -0.3px;
}

.harm-pie-subtitle {
  margin: 0 0 0.5rem 0;
  font-size: 0.8125rem;
  color: var(--text-secondary, #64748b);
}

.harm-pie-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.harm-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #666);
}

.harm-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Night mode: white text for title, subtitle, and legend */
.night-mode .harm-pie-title {
  color: rgba(255, 255, 255, 0.98);
}

.night-mode .harm-pie-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.night-mode .harm-legend-item {
  color: rgba(255, 255, 255, 0.9);
}

.night-mode .harm-pie-container .recharts-legend-wrapper .recharts-default-legend {
  color: rgba(255, 255, 255, 0.9);
}

.night-mode .harm-pie-container .recharts-text {
  fill: rgba(255, 255, 255, 0.9) !important;
}

@media (max-width: 768px) {
  .harm-pie-container {
    min-height: 280px;
    padding: 1rem;
  }
  .harm-pie-title {
    font-size: 1rem;
  }
  .harm-legend-item {
    font-size: 0.75rem;
    margin-right: 0.75rem;
  }
}
