#historyContainer {
  background: #fff;
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  max-height: 350px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;

  /* Center container on page */
  width: fit-content;
  margin: 40px auto; /* top/bottom margin + center horizontally */

  /* Add a border */
  border: 3px solid #2980b9; /* nice blue border */
}

/* Graph container with horizontal scroll */
.graph {
  display: flex;
  align-items: flex-end;
  gap: 15px;
  height: 180px;
  position: relative;
  padding-left: 40px; /* space for y-axis labels */
  border-left: 3px solid #555;
  border-bottom: 3px solid #555;
  scroll-behavior: smooth;
  min-width: 300px; /* minimal width for small data */
}

/* Y-axis labels container */
.y-axis-labels {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  padding-right: 8px;
}

/* Each bar */
.graph-bar {
  width: 40px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  position: relative;
  cursor: pointer;
  transform: translateY(100%);
  animation: riseUp 0.7s forwards ease-out;
  transition: filter 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* Bar hover effect */
.graph-bar:hover {
  filter: brightness(1.2);
  z-index: 10;
}

/* Tooltip label above bar */
.graph-bar span {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  user-select: none;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
}

.graph-bar:hover span {
  opacity: 1;
}

/* Animate bars rising up */
@keyframes riseUp {
  to {
    transform: translateY(0);
  }
}

/* Color by genre */
.graph-bar.airport {
  background: linear-gradient(145deg, #2ecc71, #27ae60);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.7);
}

.graph-bar.stand {
  background: linear-gradient(145deg, #f39c12, #d35400);
  box-shadow: 0 4px 12px rgba(211, 84, 0, 0.7);
}

.graph-bar.book {
  background: linear-gradient(145deg, #9b59b6, #8e44ad);
  box-shadow: 0 4px 12px rgba(142, 68, 173, 0.7);
}

/* X-axis labels below bars */
.graph-bar::after {
  content: attr(data-round);
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #555;
  user-select: none;
  white-space: nowrap;
}
