/* CSS Document */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  color: #333;
}

header {
  text-align: center;
  padding: 1rem;
  background: #222;
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 1px;
}
header a {
  display: block;
  font-size: 0.9rem;
  font-weight: normal;
  color: #bbb;
  text-decoration: none;
  margin-top: 0.3rem;
}
header a:hover {
  color: #fff;
  text-decoration: underline;
}

.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}

.search-box {
  margin-bottom: 1rem;
  text-align: center;
}

select {
  width: 100%;
  max-width: 500px;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* Ad section */
.ad-box {
  margin: 1rem 0;
  text-align: center;
}

/* Chart styling */
.chart {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none; /* disable clicks when hidden */
}

.chart.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.chart h2 {
  text-align: center;
  margin-bottom: 1rem;
}

/* Relative breed cards */
.relative-card {
  margin: 0.5rem 0;
  padding: 1rem;
  border-radius: 12px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.relative-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Category colors */
.High { background: #e63946; }
.Medium { background: #457b9d; }
.Low { background: #2a9d8f; }

/* Legend */
.legend {
  margin-top: 2rem;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.legend h3 { margin-top: 0; }

/* Spinner */
.spinner {
  display: none;
  margin: 1rem auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #333;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
}
.spinner.active {
  display: block;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
