.crowd-calendar-enhanced {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  color: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  box-sizing: border-box;
  position: relative;
}

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

.calendar-title {
  font-size: 2.5rem;
  margin: 0 0 10px 0;
  font-weight: 700;
}

.park-icon {
  margin-right: 10px;
}

.calendar-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0;
}

.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.control-group label {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 5px;
}

.park-selector {
  background: rgba(255,255,255,0.2);
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.park-selector:hover {
  background: rgba(255,255,255,0.3);
}

.park-selector option {
  background: #333;
  color: white;
}

.view-toggle {
  display: flex;
  gap: 10px;
}

.toggle-buttons {
  display: flex;
  gap: 10px;
}

.toggle-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.toggle-btn.active {
  background: rgba(255,255,255,0.4);
  font-weight: 600;
}

.toggle-btn:hover {
  background: rgba(255,255,255,0.3);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 30px;
  width: 100%;
}

.calendar-day {
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  min-width: 160px;
  width: 100%;
}

.calendar-day:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.calendar-day.today {
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255,215,0,0.3);
}

.calendar-day.past {
  opacity: 0.6;
}

.day-header {
  margin-bottom: 15px;
}

.day-name {
  font-size: 0.8rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.day-number {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 5px 0;
}

.month-name {
  font-size: 0.8rem;
  opacity: 0.8;
}

.crowd-info {
  margin-bottom: 15px;
}

.crowd-level {
  margin-bottom: 10px;
}

.level-number {
  font-size: 2rem;
  font-weight: 700;
  display: block;
}

.level-label {
  font-size: 0.8rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Crowd Level Colors */
.calendar-day.ghost-town { background: linear-gradient(135deg, #4ade80, #22c55e) !important; }
.calendar-day.light { background: linear-gradient(135deg, #facc15, #eab308) !important; }
.calendar-day.moderate { background: linear-gradient(135deg, #fb923c, #ea580c) !important; }
.calendar-day.busy { background: linear-gradient(135deg, #f87171, #ef4444) !important; }
.calendar-day.packed { background: linear-gradient(135deg, #dc2626, #991b1b) !important; }

.park-hours {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 8px;
}

.weather-info {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 8px;
}

.special-indicators {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.indicator {
  background: rgba(255,255,255,0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.current-wait-times {
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
}

.current-wait-times h3 {
  margin: 0 0 15px 0;
  font-size: 1.3rem;
}

.wait-times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.wait-time-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.1);
  padding: 10px 15px;
  border-radius: 10px;
}

.ride-name {
  font-weight: 500;
  flex: 1;
}

.wait-time {
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.short-wait { background: rgba(40,167,69,0.3); }
.medium-wait { background: rgba(255,193,7,0.3); }
.long-wait { background: rgba(253,126,20,0.3); }
.very-long-wait { background: rgba(220,53,69,0.3); }

.crowd-legend {
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 20px;
}

.crowd-legend h4 {
  margin: 0 0 15px 0;
  font-size: 1.2rem;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

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

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

.crowd-calendar-loading {
  text-align: center;
  padding: 40px;
  color: rgba(255,255,255,0.8);
}

.loading-spinner {
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.crowd-calendar-error {
  text-align: center;
  padding: 40px;
  color: rgba(255,255,255,0.8);
}

.crowd-calendar-error h3 {
  color: #ff6b6b;
  margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .crowd-calendar-enhanced {
    padding: 15px;
    margin: 10px;
  }
  
  .calendar-title {
    font-size: 2rem;
  }
  
  .calendar-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .calendar-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  
  .calendar-day {
    padding: 15px;
  }
  
  .toggle-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .wait-times-grid {
    grid-template-columns: 1fr;
  }
  
  .legend-items {
    justify-content: center;
    align-items: flex-start;
  }
}
