/* === VARIABLES === */
:root {
  --blue: #1f77b4;
  --red: #d62728;
  --green: #2ca02c;
  --gray: #eeeeee;
  --font: 'Segoe UI', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font);
  background: white;
  color: #222;
}

.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}

h1 {
  font-size: 24px;
  text-align: left;
  margin-bottom: 10px;
}

.intro-text {
  font-size: 16px;
  text-align: left;
  line-height: 1.5;
  margin-bottom: 30px;
}

.chart-wrapper {
  width: 100%;
  aspect-ratio: 2 / 1.1;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0px 10px 0px 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* === HEADER === */
header {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-name {
  font-size: 20px;
  font-weight: bold;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  color: #000;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: #d90c1a;
}

/* === BUTTONS === */
.keyword-container {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-container button {
  background: white;
  border: 1px solid #ccc;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.keyword-container button:hover,
.keyword-container button.active {
  background-color: #1f77b4;
  color: white;
  border-color: #1f77b4;
}

/* === FOOTER === */
footer {
  background-color: #fff;
  color: #444;
  font-size: 13px;
  text-align: center;
  padding: 50px 0 10px 0;
  border-top: 1px solid #eee;
  margin-top: 40px;
}

.legend {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 20px;
  font-size: 14px;
}

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

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}


/* === TOOLTIP === */
.tooltip {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  font-size: 13px;
  padding: 12px;
  pointer-events: none;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 320px;
  line-height: 1.5;
}

.tooltip-header {
  font-size: 12px;
  font-weight: bold;
  color: #000;
  margin-bottom: 6px;
}

.tooltip-sub {
  color: #555;
  margin-bottom: 4px;
}

.tooltip-value {
  font-weight: bold;
  color: #000;
  font-size: 14px;
}

.tooltip-note-label {
  font-size: 12px;
  color: #777;
  margin-top: 10px;
}

.tooltip-note {
  font-size: 12px;
  color: #333;
}

/* === TOTAL COUNT BOX === */
.total-box {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  margin: 0px auto 8px auto; /* top right bottom left */
  max-width: 300px;
}
