@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Edu+QLD+Hand:wght@400..700&display=swap");

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

body {
  background-color: #34586e;
  font-family: "Edu QLD Hand", cursive;
  padding: 20px;
  min-height: 100vh;
  padding-top: 80px;
}

.page-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
}

.container {
  max-width: 1600px;
  margin: 0 auto;
}

.date-header {
  text-align: center;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #f9f3e5;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(4, 280px);
  grid-template-rows: repeat(3, 250px);
  gap: 20px;
  justify-content: center;
}

.month-card {
  background: #f9f3e5;
  border: 4px solid #33322e;
  border-radius: 15px;
  padding: 15px;
  width: 280px;
  height: 250px;
  position: relative;
  box-shadow: 5px 5px 0px #33322e;
  transition: all 0.3s ease;
}

.month-card:hover {
  transform: translateY(-3px);
  box-shadow: 8px 8px 0px #33322e;
}

.month-card[data-month="1"],
.month-card[data-month="5"],
.month-card[data-month="9"] {
  background: #f4d799;
}

.month-card[data-month="2"],
.month-card[data-month="6"],
.month-card[data-month="10"] {
  background: #fff0ee;
}

.month-card[data-month="3"],
.month-card[data-month="7"],
.month-card[data-month="11"] {
  background: #f6a89e;
}

.month-card[data-month="8"] {
  background: #d0f4f0;
}

.month-card h3 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  color: #33322e;
  text-align: center;
  margin-bottom: 15px;
  font-size: 18px;
}

.tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 40px;
  height: 120px;
  overflow-y: scroll;
  padding-right: 5px;
}

.tasks::-webkit-scrollbar {
  width: 6px;
}

.tasks::-webkit-scrollbar-track {
  background: transparent;
}

.tasks::-webkit-scrollbar-thumb {
  background: #33322e;
  border-radius: 3px;
}

.task {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #33322e;
  position: relative;
  padding-right: 20px;
  transition: all 0.2s ease;
}

.task:hover {
  transform: translateX(3px);
}

.task-actions {
  position: absolute;
  right: 0;
  opacity: 0;
  display: flex;
  gap: 2px;
  transition: opacity 0.2s ease;
}

.task:hover .task-actions {
  opacity: 1;
}

.edit-btn,
.delete-btn {
  width: 16px;
  height: 16px;
  border: 1px solid #33322e;
  background: transparent;
  border-radius: 2px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.edit-btn:hover,
.delete-btn:hover {
  background: #33322e;
  color: white;
  transform: scale(1.1);
}

.task input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid #33322e;
  border-radius: 50%;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.task input[type="checkbox"]:checked {
  background: #33322e;
}

.task input[type="checkbox"]:hover {
  transform: scale(1.1);
}

.task input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: -1px;
  left: 3px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.task input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
  margin-right: 25px;
}

.task input[type="text"]:focus {
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 4px;
  border-radius: 3px;
  transform: scale(1.02);
}

.task.completed input[type="text"] {
  text-decoration: line-through;
  opacity: 0.6;
}

.task.editing input[type="text"] {
  background: rgba(255, 255, 255, 0.5);
  padding: 2px 4px;
  border-radius: 3px;
  border: 1px solid #33322e;
}

.add-task {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  border: 2px solid #33322e;
  background: transparent;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  color: #33322e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.add-task:hover {
  background: #33322e;
  color: white;
  transform: rotate(90deg) scale(1.1);
}

@media (max-width: 1200px) {
  .months-grid {
    grid-template-columns: repeat(3, 260px);
    gap: 15px;
  }

  .month-card {
    width: 260px;
  }
}

@media (max-width: 900px) {
  .months-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }

  .month-card {
    width: calc(100vw - 40px);
    max-width: 380px;
    justify-self: center;
    margin: 0 auto;
  }

  .date-header {
    font-size: 24px;
    margin-bottom: 15px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 15px 10px;
    padding-top: 60px;
    overflow-x: hidden;
  }
  
  .page-wrapper {
    min-height: calc(100vh - 60px);
  }

  .date-header {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .months-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .month-card {
    width: calc(100vw - 40px);
    max-width: 380px;
    height: auto;
    min-height: 240px;
    margin: 0 auto;
  }

  .month-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .tasks {
    height: 120px;
    gap: 6px;
    margin-bottom: 35px;
  }

  .task {
    font-size: 13px;
    gap: 6px;
  }

  .task input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }

  .task input[type="text"] {
    font-size: 13px;
  }

  .edit-btn,
  .delete-btn {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }

  .add-task {
    width: 28px;
    height: 28px;
    font-size: 16px;
    bottom: 12px;
    right: 12px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px 8px;
    overflow-x: hidden;
  }

  .date-header {
    font-size: 18px;
  }

  .months-grid {
    gap: 12px;
  }

  .month-card {
    width: calc(100vw - 20px);
    max-width: 340px;
    padding: 12px;
    min-height: 220px;
    margin: 0 auto;
  }

  .month-card h3 {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .tasks {
    height: 110px;
    gap: 5px;
  }

  .task {
    font-size: 12px;
  }

  .task input[type="checkbox"] {
    width: 15px;
    height: 15px;
  }

  .task input[type="text"] {
    font-size: 12px;
  }

  .add-task {
    width: 26px;
    height: 26px;
    font-size: 15px;
    bottom: 10px;
    right: 10px;
  }
}
