a {
  color: #00FFFF;
  text-decoration: underline;
  transition: color 0.2s;
}

a:visited {
  color: #00b3b3;
}

a:hover, a:focus {
  color: #00b3b3;
}

a:active {
  color: #009999;
}

body {
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #e9ecef;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.prev {
  left: 1rem;
}

.next {
  right: 1rem;
}

.filter-container {
  margin-bottom: 1rem;
}

.filter-group {
  display: inline-block;
  margin-right: 1.5rem;
}

.filter-group label {
  margin-right: 0.5rem;
  cursor: pointer;
}

.tooltip {
  position: absolute;
  text-align: left;
  padding: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 4px;
  pointer-events: none;
  font-size: 0.875rem;
}

svg {
  background: white;
  margin: 0 auto;
  display: block;
}

.layer rect {
  stroke: white;
  stroke-width: 1px;
}

.x-axis path,
.y-axis path,
.x-axis line,
.y-axis line {
  stroke: #888;
}

.filters-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.filter-dropdown {
  position: relative;
  display: inline-block;
}

.filter-btn {
  background-color: #f8f9fa;
  color: #212529;
  padding: 10px 20px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  min-width: 180px;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
}

.filter-btn:hover {
  background-color: #e9ecef;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 180px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.filter-dropdown.active .dropdown-content {
  display: block;
}

.dropdown-content label {
  display: block;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 0;
}

.dropdown-content label:hover {
  background-color: #f8f9fa;
}

.dropdown-content input[type="checkbox"] {
  margin-right: 8px;
}

.tooltip {
  position: absolute;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  z-index: 1000;
}

header {
  background-color: #2c3e50;
  color: white;
  padding: 10px;
  text-align: center;
}

footer {
  background-color: #2c3e50;
  color: white;
  padding: 20px;
  width: 100%;
  text-align: center;
  margin-top: auto;
}

.filter-dropdown {
  border-collapse: collapse;
  border: 1px solid black;
  border-radius: 5px;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .main-content-area {
    padding: 1.5rem;
  }
  
  .chart-description {
    padding: 0 1rem;
  }
  
  .chart-description h2 {
    font-size: 1.6rem;
  }
  
  .chart-description h3 {
    font-size: 1.2rem;
  }
  
  .filters-container {
    gap: 15px;
    margin: 15px 0;
  }
  
  .filter-btn {
    min-width: 160px;
    font-size: 13px;
    padding: 9px 18px;
  }
  
  .main-nav a {
    font-size: 13px;
    min-width: 110px;
    padding: 9px 18px;
  }
  
  #chart1 > div {
    flex-direction: column !important;
    align-items: center;
    width: 100% !important;
  }
  
  #chart1 > div > div {
    margin-bottom: 2rem;
  }
  
  #chart1 h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }
}

@media (max-width: 768px) {
  .filter-group {
    display: block;
    margin-bottom: 1rem;
  }
  .filters-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .filter-btn {
    width: 100%;
    font-size: 13px;
    padding: 8px 16px;
  }
  .dropdown-content {
    min-width: 100%;
  }

  header,
  footer {
    padding: 20px;
    text-align: center;
  }
  svg {
    width: 100%;
    max-width: 100%;
  }
  
  .main-content-area {
    padding: 1rem;
  }
  
  .chart-description {
    padding: 0 0.5rem;
  }
  
  .chart-description h2 {
    font-size: 1.4rem;
  }
  
  .chart-description h3 {
    font-size: 1.1rem;
  }
  
  .main-nav {
    gap: 10px;
  }
  
  .main-nav a {
    font-size: 12px;
    min-width: 100px;
    padding: 8px 15px;
  }
  
  #chart1 > div {
    flex-direction: column !important;
    align-items: center;
    width: 100% !important;
  }
  
  #chart1 > div > div {
    margin-bottom: 1.5rem;
  }
  
  /* Heat Map responsive styles */
  #chart2 svg {
    width: 100%;
    height: auto;
  }
  
  /* Bubble Chart responsive styles */
  #chart3 svg {
    width: 100%;
    height: auto;
  }
  
  #chart3 .legend {
    transform: translate(10px, 350px) !important;
  }
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.main-nav a {
  display: inline-block;
  padding: 10px 20px;
  background-color: #34495e;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid #4a5f7a;
  transition: all 0.3s ease;
  font-size: 14px;
  min-width: 120px;
  text-align: center;
}

.main-nav a:hover {
  background-color: #4a5f7a;
  border-color: #5d6d7e;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.main-nav a:active {
  transform: translateY(0);
}

.main-nav a.active {
  background-color: #2980b9;
  color: #fff;
  border-color: #21618c;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(41, 128, 185, 0.2);
  cursor: default;
}

.reset-filters-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid #2980b9;
  min-width: 120px;
}

.reset-filters-btn:hover {
  background-color: #2980b9;
  border-color: #21618c;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.reset-filters-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.reset-filters-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.main-content-area {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  line-height: 1.6;
}

.main-content-area h2 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.main-content-area p {
  margin-bottom: 1rem;
  color: #34495e;
}

.main-content-area h3 {
  color: #2c3e50;
  margin: 1.5rem 0 1rem;
}

.main-content-area ul {
  list-style-type: none;
  padding-left: 0;
}

.main-content-area li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.main-content-area li:before {
  content: "•";
  color: #3498db;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.chart-description {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.chart-description h2 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.chart-description h3 {
  color: #2c3e50;
  margin: 1.5rem 0 1rem;
  font-size: 1.4rem;
}

.chart-description p {
  color: #34495e;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.chart-description ul {
  list-style-type: none;
  padding-left: 0;
  margin: 1rem 0;
}

.chart-description li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
  color: #34495e;
}

.chart-description li:before {
  content: "•";
  color: #3498db;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.chart-description strong {
  color: #2c3e50;
}

.chart-legend-container {
  background: #fff;
  margin: 0 auto 32px auto;
  width: 100%;
  max-width: 800px;
  display: flex;
  justify-content: center;
}

.chart-container {
  width: 100%;
  overflow-x: auto;
}

.chart-container h2 {
  text-align: center;
  margin-bottom: 20px;
}

.chart-container svg {
  max-width: 100%;
  height: auto;
}

.bar-legend {
  display: flex;
  gap: 24px;
  align-items: center;
  margin: 16px 0 8px 0;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color-box {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid #333;
}

.camera-color {
  background: rgb(7, 57, 137);
}

.police-color {
  background: rgba(28, 187, 255, 0.6);
}
