* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

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

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 2.5rem;
}

header p {
  color: #7f8c8d;
  font-size: 1.1rem;
}

.controls {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.college-toggles h3,
.legend h3 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.toggle-switch {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.toggle-switch:hover {
  background-color: #f8f9fa;
}

.toggle-switch input {
  display: none;
}

.slider {
  width: 50px;
  height: 24px;
  background-color: #ccc;
  border-radius: 24px;
  position: relative;
  transition: background-color 0.3s;
  margin-right: 12px;
}

.slider:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: white;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}

.toggle-switch input:checked + .slider {
  background-color: var(--toggle-color, #4caf50);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(26px);
}

.college-name {
  font-weight: 500;
  color: #2c3e50;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-full-overlap {
  background: #4caf50;
  border: 2px solid #2e7d32;
}

.legend-partial-overlap {
  background: repeating-linear-gradient(45deg, #4caf50, #4caf50 3px, #ffffff 3px, #ffffff 6px),
    repeating-linear-gradient(-45deg, #4caf50, #4caf50 3px, #ffffff 3px, #ffffff 6px);
}

.calendar-container {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

#calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.month {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.month-header {
  background: #2c3e50;
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
}

.days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #ecf0f1;
}

.day-header {
  padding: 10px 5px;
  text-align: center;
  font-weight: bold;
  font-size: 0.9rem;
  color: #2c3e50;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.day {
  aspect-ratio: 1;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.day:hover {
  background-color: #f8f9fa;
  transform: scale(1.05);
  z-index: 10;
}

.day.other-month {
  color: #bdc3c7;
  background-color: #fafafa;
}

/* Removed .day.has-break bolding */

.day.full-overlap {
  background-color: #4caf50;
  color: white;
  border: 2px solid #2e7d32;
  font-weight: bold; /* Apply bolding directly here */
}

.day.partial-overlap {
  background: repeating-linear-gradient(45deg, #4caf50, #4caf50 3px, #ffffff 3px, #ffffff 6px),
    repeating-linear-gradient(-45deg, #4caf50, #4caf50 3px, #ffffff 3px, #ffffff 6px);
  color: #2e7d32;
  font-weight: bold; /* Apply bolding directly here */
}

.day-tooltip {
  position: fixed;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-width: 300px;
  font-size: 0.9rem;
}

.tooltip-date {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.tooltip-college {
  padding: 6px 0 6px 10px;
  margin: 4px 0;
  border-radius: 4px;
  background: #f8f9fa;
}

.tooltip-college strong {
  color: #2c3e50;
}

.overlap-info {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.overlap-info h3 {
  color: #2c3e50;
  margin-bottom: 15px;
}

#overlap-details {
  display: grid;
  gap: 15px;
}

.overlap-detail {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.overlap-detail h4 {
  color: #2c3e50;
  margin-bottom: 8px;
}

.overlap-detail p {
  color: #7f8c8d;
  margin-bottom: 5px;
}

.college-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.college-tag {
  background: #3498db;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.legend-full-overlap-solid {
  background: #4caf50;
}

@media (max-width: 768px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .toggle-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  #calendar-grid {
    grid-template-columns: 1fr;
  }

  header h1 {
    font-size: 2rem;
  }

  .day-tooltip {
    max-width: 250px;
    font-size: 0.8rem;
  }
}
