@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;
}

.container {
  display: flex;
  gap: 60px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  min-height: calc(100vh - 40px);
}

.sticky-note {
  width: 380px;
  height: 450px;
  border-radius: 15px;
  border: 4px solid #33322e;
  position: relative;
  /* box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); */
  box-shadow: 5px 5px 0 #33322e;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease forwards;
}

.sticky-note:hover {
  transform: translateY(-5px);
  box-shadow: 8px 8px 0 #33322e;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sticky-note.yellow {
  background-color: #f9f3e5;
}

.sticky-note.peach {
  background-color: #fff0ee;
}

.sticky-note h2 {
  background-color: #f4d799;
  color: #33322e;
  text-align: center;
  padding: 15px;
  margin: 0;
  border-radius: 11px 11px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 24px;
  border-bottom: 2px solid #33322e;
}

.peach h2 {
  background-color: #f6a89e;
}

.date-display {
  text-align: center;
  padding: 10px;
  font-size: 14px;
  color: #33322e;
  font-weight: bold;
  border-bottom: 1px solid #33322e;
  margin-bottom: 10px;
}

.task-list,
.schedule-list {
  padding: 20px;
  height: 350px;
  overflow-y: auto;
  flex: 1;
}

.task-list::-webkit-scrollbar,
.schedule-list::-webkit-scrollbar {
  width: 8px;
}

.task-list::-webkit-scrollbar-track,
.schedule-list::-webkit-scrollbar-track {
  background: #f4d799;
  border-radius: 4px;
}

.task-list::-webkit-scrollbar-thumb,
.schedule-list::-webkit-scrollbar-thumb {
  background: #33322e;
  border-radius: 4px;
}

.task-list::-webkit-scrollbar-thumb:hover,
.schedule-list::-webkit-scrollbar-thumb:hover {
  background: #2a2926;
}

.add-task-form {
  margin-bottom: 15px;
}

.task {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 16px;
  color: #33322e;
  padding: 6px 8px;
  border-radius: 6px;
  background-color: #f9f3e5;
  border: 1px solid #f4d799;
  transition: all 0.2s ease;
  animation: slideIn 0.3s ease;
}

.task:hover {
  background-color: #fff0ee;
  transform: translateX(3px);
}

.task.completed {
  background-color: #d0f4f0;
  border-color: #8cd4cb;
}

.task.completed:hover {
  background-color: #c4f0ec;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.task-checkbox {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border: 2px solid #33322e;
  border-radius: 3px;
  cursor: pointer;
  appearance: none;
  position: relative;
  background-color: #f9f3e5;
  transition: all 0.2s ease;
}

.task-checkbox:hover {
  transform: scale(1.1);
}

.task-checkbox:checked {
  background-color: #8cd4cb;
  animation: checkPulse 0.3s ease;
}

@keyframes checkPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.task.incomplete .task-checkbox {
  background-color: #f6a89e;
}

.task-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: -2px;
  left: 2px;
  color: #33322e;
  font-size: 14px;
  font-weight: bold;
}

.task-text {
  flex: 1;
  font-size: 16px;
  font-style: italic;
  outline: none;
  background: transparent;
  border: none;
  padding: 2px;
}

.task-text {
  transition: all 0.2s ease;
}

.task-text:focus {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  transform: scale(1.02);
}

.task-actions {
  display: flex;
  gap: 5px;
}

.edit-btn,
.delete-btn {
  background: none;
  border: 2px solid #33322e;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  color: #33322e;
  font-weight: bold;
  transition: all 0.2s ease;
}

.edit-btn {
  background-color: #f9f3e5;
}

.edit-btn:hover {
  background-color: #f4d799;
  transform: scale(1.1);
}

.delete-btn {
  background-color: #f6a89e;
}

.delete-btn:hover {
  background-color: #d32f2f;
  color: white;
  transform: scale(1.1);
}

.task.completed .task-text {
  text-decoration: line-through;
  opacity: 0.6;
}

.schedule-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 16px;
  color: #33322e;
  padding: 6px 8px;
  border-radius: 6px;
  background-color: #fff0ee;
  border: 1px solid #f6a89e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.schedule-item:hover {
  background-color: #f9f3e5;
  transform: translateX(3px);
}

.schedule-item.completed {
  background-color: #d0f4f0;
  border-color: #8cd4cb;
}

.schedule-item.completed:hover {
  background-color: #c4f0ec;
}

.time-slot {
  color: #f6a89e;
  font-weight: 600;
  width: 100px;
  margin-right: 15px;
  font-style: normal;
  flex-shrink: 0;
  font-size: 14px;
  padding: 4px 8px;
  background-color: #f9f3e5;
  border-radius: 4px;
  text-align: center;
  border: 1px solid #f4d799;
}

.schedule-item.completed .time-slot {
  background-color: #8cd4cb;
  color: #33322e;
  border-color: #6bb6ad;
}

.schedule-text {
  flex: 1;
  font-style: italic;
  font-size: 16px;
  color: #33322e;
  outline: none;
  border: none;
  background: transparent;
}

.schedule-item.completed .schedule-text {
  text-decoration: line-through;
  opacity: 0.6;
}

.schedule-actions {
  display: flex;
  gap: 5px;
}

.schedule-actions .edit-btn,
.schedule-actions .delete-btn {
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 4px;
}

.schedule-actions .edit-btn {
  background-color: #f9f3e5;
}

.schedule-actions .delete-btn {
  background-color: #f6a89e;
}

.add-btn,
.add-schedule-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: #8cd4cb;
  border: 2px solid #33322e;
  font-size: 20px;
  font-weight: bold;
  color: #33322e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
}

.add-btn:hover,
.add-schedule-btn:hover {
  background-color: #d0f4f0;
  transform: rotate(90deg) scale(1.1);
}

.add-btn:active,
.add-schedule-btn:active {
  transform: rotate(90deg) scale(0.95);
}

.schedule-form {
  margin-bottom: 15px;
  padding: 10px;
  border: 2px solid #f6a89e;
  border-radius: 8px;
  background-color: #fff0ee;
}

.schedule-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.time-input,
.task-input {
  padding: 5px;
  border: 2px solid #33322e;
  border-radius: 3px;
  font-family: "Edu QLD Hand", cursive;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.time-input:focus,
.task-input:focus {
  transform: scale(1.02);
  box-shadow: 0 0 5px rgba(51, 50, 46, 0.3);
}

.time-input {
  width: 100px;
  background-color: #f6a89e;
  position: relative;
  font-size: 12px;
}

.task-input {
  flex: 1;
  background-color: #fff0ee;
  max-width: 190px;
}

.time-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 140px;
  max-height: 150px;
  overflow-y: auto;
  background: #fff0ee;
  border: 2px solid #33322e;
  border-radius: 4px;
  z-index: 100;
}

.time-option {
  padding: 5px 8px;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 1px solid #f6a89e;
}

.time-option:hover {
  background-color: #f6a89e;
}

.time-dropdown::-webkit-scrollbar {
  width: 6px;
}

.time-dropdown::-webkit-scrollbar-track {
  background: #f6a89e;
}

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

.task-input {
  flex: 1;
  background: linear-gradient(135deg, #fff0ee 0%, #f9f3e5 100%);
  border-radius: 8px;
  font-weight: 500;
}

.task-input:focus {
  background: linear-gradient(135deg, #ffffff 0%, #f9f3e5 100%);
}

.add-task-input {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 2px solid #33322e;
  border-radius: 5px;
  background-color: #f9f3e5;
  font-family: "Edu QLD Hand", cursive;
  font-size: 16px;
  outline: none;
}

.add-task-input {
  transition: all 0.2s ease;
}

.add-task-input:focus {
  background-color: #fff;
  transform: scale(1.02);
}

.input-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.save-btn,
.cancel-btn {
  padding: 5px 10px;
  border: 2px solid #33322e;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Edu QLD Hand", cursive;
  font-size: 14px;
  transition: all 0.2s ease;
}

.save-btn:hover,
.cancel-btn:hover {
  transform: scale(1.05);
}

.save-btn {
  background-color: #8cd4cb;
  color: #33322e;
}

.cancel-btn {
  background-color: #f6a89e;
  color: #33322e;
}

.hidden {
  display: none;
}

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

  .container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    overflow-x: hidden;
  }

  .sticky-note {
    width: calc(100vw - 40px);
    max-width: 380px;
    min-width: 280px;
    height: auto;
    min-height: 350px;
    margin: 0 auto;
  }

  .sticky-note h2 {
    font-size: 20px;
    padding: 12px;
  }

  .date-display {
    font-size: 12px;
    padding: 8px;
  }

  .task-list,
  .schedule-list {
    padding: 15px;
    height: 250px;
  }

  .task {
    font-size: 14px;
    padding-right: 55px;
  }

  .task-checkbox {
    width: 16px;
    height: 16px;
  }

  .task-text {
    font-size: 14px;
  }

  .edit-btn,
  .delete-btn {
    font-size: 11px;
    padding: 3px 5px;
  }

  .schedule-item {
    font-size: 14px;
  }

  .time-slot {
    width: 80px;
    font-size: 12px;
    margin-right: 10px;
  }

  .schedule-text {
    font-size: 14px;
  }

  .add-btn,
  .add-schedule-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .schedule-inputs {
    flex-direction: column;
    gap: 8px;
  }

  .time-input {
    width: 100%;
  }

  .add-task-input {
    font-size: 14px;
  }
}

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

  .container {
    gap: 15px;
    width: 100%;
    overflow-x: hidden;
  }

  .sticky-note {
    width: calc(100vw - 20px);
    max-width: 340px;
    min-width: 260px;
    min-height: 320px;
    margin: 0 auto;
  }

  .sticky-note h2 {
    font-size: 18px;
    padding: 10px;
  }

  .date-display {
    font-size: 11px;
    padding: 6px;
  }

  .task-list,
  .schedule-list {
    padding: 12px;
    height: 220px;
  }

  .task {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .task-checkbox {
    width: 15px;
    height: 15px;
    margin-right: 10px;
  }

  .task-text {
    font-size: 13px;
  }

  .edit-btn,
  .delete-btn {
    font-size: 10px;
    padding: 3px 4px;
  }

  .schedule-item {
    font-size: 13px;
  }

  .time-slot {
    width: 70px;
    font-size: 11px;
    margin-right: 8px;
  }

  .schedule-text {
    font-size: 13px;
  }

  .add-btn,
  .add-schedule-btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
    bottom: 12px;
    right: 12px;
  }

  .schedule-form {
    padding: 8px;
  }

  .time-input,
  .task-input {
    font-size: 12px;
    padding: 4px;
  }

  .add-task-input {
    font-size: 13px;
    padding: 6px;
  }

  .save-btn,
  .cancel-btn {
    font-size: 12px;
    padding: 4px 8px;
  }
}
