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

body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #6e8efb, #a777e3);
  padding: 20px;
}

.calendar {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  width: 90vw;
  max-width: 1000px;
  overflow: hidden;
}

.calendar-header {
  background-color: #4a4a4a;
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-header button {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.calendar-body {
  padding: 20px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.calendar-day:hover {
  background-color: #f0f0f0;
}

.calendar-day.selected {
  background-color: #4a4a4a;
  color: white;
}

.calendar-day.has-event::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #4a4a4a;
}

.calendar-weekday {
  font-weight: bold;
  text-align: center;
  padding: 10px 0;
}

.event-form {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  padding: 0 20px;
}

.event-form input[type="text"] {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.event-form input[type="color"] {
  padding: 0;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  cursor: pointer;
}

.event-form button {
  padding: 10px 20px;
  background-color: #4a4a4a;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.event-form button:hover {
  background-color: #333;
}

.events-list {
  margin-top: 20px;
  padding: 0 20px 20px;
  max-height: 200px;
  overflow-y: auto;
}

.event-item {
  background-color: #f0f0f0;
  padding: 10px;
  margin-bottom: 5px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.event-item button {
  background-color: #ff4d4d;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}

.weather-widget {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .calendar {
    width: 100%;
  }

  .calendar-day {
    font-size: 14px;
  }

  .event-form {
    flex-direction: column;
  }

  .event-form input[type="color"] {
    width: 100%;
    height: 40px;
  }

  .weather-widget {
    position: static;
    margin-top: 20px;
    text-align: center;
  }
}
