body {
  font-family: 'CircularXXWeb', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fcf7f6;
}

#root {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #f3ded9;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  color: #7421f0;
}

h2 {
  text-align: center;
  color: #7421f0;
}

#calendar {
  margin-bottom: 20px;
}

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

.day {
  background-color: #fcf7f6;
  padding: 15px;
  border-radius: 4px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
}

.day:hover {
  background-color: #f3ded9;
}

.today {
  background-color: #fcf7f6;
}

.selected {
  border: 2px solid #e1796b;
  background-color: #fcf7f6;
}

.past {
  background-color: #d1d0dd;
  text-decoration: line-through;
  color: #999;
}

.note-count-indicator {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: #e1796b;
  color: #fcf7f6;
  border-radius: 50%;
  padding: 3px 6px;
  font-size: 0.8rem;
}

#day-detail {
  margin-top: 20px;
  padding: 15px;
  background: #fcf7f6;
  border-radius: 5px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.on-this-day {
  margin-bottom: 15px;
}

.notes {
  margin-top: 10px;
}

.notes ul {
  list-style: none;
  padding: 0;
}

.notes li {
  padding: 10px;
  background: #f3ded9;
  border: 1px solid #f3ded9;
  border-radius: 4px;
  margin-bottom: 8px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notes li.completed {
  text-decoration: line-through;
  color: #999;
  background-color: #fcf7f6;
  border-color: #fcf7f6;
}

.add-note {
  display: flex;
  margin-top: 10px;
}

.add-note input[type='text'] {
  flex: 1;
  padding: 8px;
  border: 1px solid #fcf7f6;
  border-radius: 4px;
  margin-right: 5px;
}

.add-note button {
  padding: 8px 12px;
  background-color: #37d299;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
}

.add-note button:hover {
  background-color: #3a31a0;
  transform: scale(1.05);
}

.add-note button:active {
  transform: scale(0.95);
}

#today {
  display: block;
  margin: 20px auto;
  padding: 10px 15px;
  background-color: #3a31a0;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
}

#today:hover {
  background-color: #3a31a0;
  transform: scale(1.05);
}

#today:active {
  transform: scale(0.95);
}

#fetch-on-this-day {
  padding: 10px 15px;
  background-color: #e1796b;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
  margin-top: 10px;
}

#fetch-on-this-day:hover {
  background-color: #e1796b;
  transform: scale(1.05);
}

#fetch-on-this-day:active {
  transform: scale(0.95);
}

.notes li button {
  margin-left: 10px;
  padding: 4px 8px;
  background-color: #e1796b;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
  height: 100%;
}

.notes li button:hover {
  background-color: #e1796b;
  transform: scale(1.05);
}

.notes li button:active {
  transform: scale(0.95);
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left: 4px solid #37d299;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

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

@media (max-width: 600px) {
  .calendar-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .day {
    padding: 10px;
  }

  .add-note {
    flex-direction: column;
  }

  .add-note input[type='text'] {
    margin-bottom: 5px;
  }
}
