.page-container {
  display: flex;
  min-height: 100vh;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  color: #333;
}

/* Sidebar Styles */
.sidebar {
  width: 320px;
  background-color: #ffffff;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding: 15px;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-section h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-container {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
  outline: none;
}

.character-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px;
  background-color: #f9fafb;
}

.character-item {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.character-item:hover {
  background-color: #edf2f7;
}

.sidebar-buttons {
  display: flex;
  gap: 10px;
  margin: 16px 0 12px 0;
  justify-content: center;
}

.sidebar-buttons button {
  flex: 1 1 0;
  padding: 8px 0;
  border: none;
  border-radius: 6px;
  background: #f57c00;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.sidebar-buttons button:hover {
  background: #ff9800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.track-button {
  margin-right: 10px;
  padding: 4px 8px;
  border-radius: 12px;
  background-color: #d4aa73;
  border: none;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
}

.track-button:hover {
  background-color: #c0945f;
}

.track-button.active {
  background-color: #f57c00;
}

.character-details {
  margin-top: 15px;
  padding: 15px;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.character-details .placeholder-text {
  color: #6b7280;
  text-align: center;
  padding: 20px 0;
}

.details-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 10px;
  object-fit: cover;
  border: 2px solid #f57c00;
}

.character-name {
  margin: 0 0 10px 0;
  font-size: 18px;
  text-align: center;
  color: #111;
}

.character-description {
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.content-section {
  background-color: #ffffff;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 20px;
}

.description-section {
  background-color: #ffffff;
}

.description-section h2 {
  margin-top: 0;
  font-size: 24px;
}

/* Plot Container Styles */
.char-plot-container {
  width: 100%;
  position: relative;
}

#char-plot {
  display: block;
  margin: 0 auto;
}

/* Image Container Styles */
.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  height: fit-content;
  width: fit-content;
  position: relative;
}

.cooccurrence-matrix-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.map-image {
  width: 1080;
  height: 603;
}

.pin-wrapper {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
}


.pin-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  z-index: 2;
}

.pin-body {
  width: 42px;
  background-color: #f57c00;
  position: absolute;
  z-index: 1;
  border-radius: 21px;
}

.pin-avatar {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  margin: 2px;
  border: 2px solid white;
  box-sizing: border-box;
}

.pin-tail {
  position: relative;
  width: 52px;
  height: 60px;
  background-image: url('./imgs/pin.svg');
  background-size: cover;
  background-repeat: no-repeat;
  margin-top: -5px;
  margin-left: -5px;
}

.map-image-section {
  display: flex;
  justify-content: center
}

.image-container {
  position: relative;
}

.extra-image {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.marker {
  position: absolute;
  width: 40px;
  height: 40px;
  background-image: url('./imgs/pointer.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: translate(-50%, -100%);
  pointer-events: none;
}

/* Cooccurrence Matrix Styles */
.cooccurrence-matrix-container {
  overflow: visible;
  margin-left: 90px;
}

#cooccurrence-matrix {
  width: 100%;
  height: 900px;
  width: 900px;
}

text.active {
  fill: red;
}

.matrix-tooltip {
  position: absolute;
  text-align: left;
  width: 300px;
  max-height: 400px;
  padding: 10px;
  font: 12px sans-serif;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  pointer-events: auto;
  /* Allow scrolling and clicks */
  overflow-y: auto;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.3);
}

#tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  /* ensures it's hidden */
  display: none;
  /* prevents layout space */
  background-color: #fff;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.3);
  font-size: 12px;
  z-index: 999;
  /* make sure it's above other elements */
}


/* Utility Classes */
.naruto-orange {
  color: #f57c00;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.chakra-blue {
  color: #2196f3;
  text-shadow: 0 0 4px #64b5f6;
  font-weight: bold;
}

.highlight {
  font-weight: bold;
  color: #007acc;
}

.note {
  font-size: 13px;
  color: #555;
  font-style: italic;
}

.controls-description {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

.controls-description p {
  margin-bottom: 10px;
}

.controls-description em {
  font-style: italic;
  color: #005b96;
}

/* Pill Checkbox Styles (for Encyclopedia filters) */
.pill-checkbox {
  position: relative;
}

.pill-checkbox input[type="checkbox"] {
  display: none;
}

#encyclopedia-container {
  display: flex;
  justify-content: space-evenly;
  /* or space-between for edge-to-edge */
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 8px 0 12px 0;
}

#encyclopedia-container button,
#encyclopedia-container label {
  flex: 1 1 0;
  text-align: center;
  min-width: 0;
}

.pill-checkbox label {
  display: inline-block;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 16px;
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
  font-size: 13px;
  transition: all 0.2s;
}

.pill-checkbox input[type="checkbox"]:checked+label {
  background-color: #f57c00;
  color: white;
  border-color: #f57c00;
}

.pill-checkbox label:hover {
  background-color: #e0e0e0;
}

/* D3 Plot styles */
.axis-group path,
.axis-group line {
  stroke: rgba(128, 128, 128, 0.4);
  stroke-width: 3px;
  fill: none;
  shape-rendering: crispEdges;
}

.axis-group .tick line {
  stroke: none;
}

.axis-group .tick::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: #666;
  border-radius: 50%;
  position: absolute;
  transform: translate(-3px, -3px);
}

.axis-label {
  font-size: 14px;
  text-anchor: middle;
  fill: black;
  opacity: 1;
}

.line {
  fill: none;
}

.line.foreground-line {
  stroke-width: 8px;
  stroke-opacity: 0.7;
}

/* Responsive styles */
@media (max-width: 1200px) {
  .page-container {
    flex-direction: column;
  }

  .full-page {
    flex-direction: row;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    max-height: 300px;
  }

  .character-list {
    max-height: 200px;
  }

}

.banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  padding: 5px 5px;
  box-sizing: border-box;
  background-color: #f57c00;
}

/* Three sections */
.banner-left,
.banner-right {
  display: flex;
  align-items: flex-end;
  gap: 30px;
}

.banner-left {
  padding-left: 40px;
  /* space from the left screen edge */
}

.banner-right {
  padding-right: 20px;
  /* space from the right screen edge */
}

.banner-center {
  position: relative;
  /* required for top/left to work */
  margin-left: 0px;
  /* horizontal shift */
  top: -40px;
  /* vertical shift (up) */
  height: 160px;
}

.banner-center img {
  height: 100%;
  object-fit: contain;
  background-color: transparent;
}

.kakashi {
  height: 245px;
}

.naruto {
  height: 250px;
}

.sakura {
  height: 240px;
}

.sasuke {
  height: 250px;
}

.center {
  height: 160px;
}

.jiraya {
  height: 250px;
}

.tsunade {
  height: 245px;
}

.banner-img.sasuke {
  margin-right: -20px;
  /* pull her closer to Sasuke */
}

.banner-img.sakura {
  margin-left: -10px;
  /* (optional) reduce the space from his side too */
}


.tracked-cell {
  stroke: #ff9900;
  stroke-width: 1.5px;
}

.tracked-label {
  fill: #ff9900;
  /* font-weight: bold; */
}