@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(to right, #e3f2fd, #ffffff);
  color: #333;
  margin: 0;
  padding: 0;
}

header {
  background: linear-gradient(to right, #0d47a1, #1976d2);
  color: white;
  padding: 1.8rem 1rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.3rem;
}

header p {
  font-size: 1.1rem;
  margin: 0.2rem;
}

#clock {
  font-size: 1rem;
  font-weight: bold;
  margin-top: 0.5rem;
}

.dashboard {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: auto;
}

.intersection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.direction {
  background: white;
  border-radius: 18px;
  padding: 1.2rem;
  border-left: 6px solid #42a5f5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.direction h2 {
  color: #1565c0;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.direction h2::before {
  content: '🚗';
  font-size: 1.4rem;
}

.direction p {
  margin: 0.4rem 0;
  font-size: 1rem;
  line-height: 1.5;
}

.direction.active {
  background: #e8f5e9;
  border-left-color: #66bb6a;
  transform: scale(1.03);
}

.controls {
  text-align: center;
  margin-top: 1rem;
}

button {
  margin: 0.6rem;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(to right, #42a5f5, #1e88e5);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
  transition: all 0.3s;
}

button:hover {
  background: linear-gradient(to right, #1e88e5, #0d47a1);
  transform: translateY(-2px);
}

label {
  display: inline-block;
  margin-left: 1rem;
  font-size: 1rem;
  color: #1565c0;
}

.insights, .pedestrian-status {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 14px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  margin-top: 1rem;
  border-left: 6px solid #42a5f5;
}

.insights h2, .pedestrian-status h2 {
  color: #1976d2;
  margin-bottom: 1rem;
}

.pedestrian-status h2::before {
  content: '🚶';
  margin-right: 0.4rem;
}

.insights p, .pedestrian-status p {
  font-size: 1rem;
  margin: 0.5rem 0;
}

#pedestrianStatus {
  font-weight: bold;
  color: #2e7d32;
}

.chart-section {
  margin: 2rem auto;
  max-width: 800px;
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  border-left: 6px solid #42a5f5;
  text-align: center;
}

.chart-section h2 {
  margin-bottom: 1rem;
  color: #1976d2;
  font-size: 1.4rem;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.6rem;
  }

  header p {
    font-size: 1rem;
  }

  button {
    width: 100%;
    margin: 0.4rem 0;
  }
}
