:root {
  --steelblue: steelblue;
  --lightcoral: #ffbdb7;
  --coral: #f88379;
  --axes-text: #000000;
}

html,
body {
  font: 100%/1.5 system-ui;
  max-width: 60em;
  margin-inline: auto;
  padding: 1em;
  background-color: #f8f8f8;
  color: var(--axes-text);
}

nav {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: solid 1px #ccc;
  border-radius: 0.5rem;
  width: 100%;
  a {
    display: contents;
    font-size: 20px;
  }
}

/* Header */
header {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--coral);
}

h2 {
  font: 1.2rem;
  margin-bottom: 0.5rem;
}
/* Slider and Dropdown */
label,
select {
  color: var(--axes-text);
  display: block;
  margin: 0.5rem 0 1rem 0;
}

input[type="range"],
select {
  width: 96%;
  padding: 0.5em;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  accent-color: var(--lightcoral);
}

.map-container {
  position: relative;
  margin: 2rem auto;
  width: 800px;
  height: 500px;
  background: #fff;
  border: 1px solid #ccc;
  display: flex;
}

#mapCanvas {
  display: block;
  position: relative;
  z-index: 1;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10;
}

.pixel-line-graph-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-left: 1rem;
}

#pixelGraph {
  display: block;
  margin: 0 auto;
}

.temperature-line {
  stroke: var(--lightcoral);
  stroke-width: 2;
  fill: none;
}

.temp-point {
  fill: #ff4444;
  stroke: #fff;
  stroke-width: 1;
  transition: all 0.2s ease;
}

.temp-point:hover {
  stroke-width: 2;
}

/* Tooltip */
.tooltip {
  position: absolute;
  background: #fff;
  color: #333;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  display: none;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.heatmap-and-graph {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Responsive */
@media (max-width: 850px) {
  .map-container,
  .pixel-line-graph-container {
    width: 95%;
    flex-direction: column;
  }

  #mapCanvas,
  #overlay,
  #pixelGraph {
    width: 100%;
    height: auto;
  }

  .legend-container {
    flex-direction: row;
    margin-bottom: 1rem;
  }
}
