@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");

body {
  margin: 0;
  padding: 0;
  background-color: #34586e;
  overflow: hidden;
  height: 100vh;
  font-family: "Roboto", sans-serif;
}

.zoom-controls {
  position: fixed;
  bottom: 20px;
  right: 80px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  background: rgba(51, 50, 46, 0.8);
  padding: 10px;
  border-radius: 8px;
}

.zoom-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: #f9f3e5;
  color: #33322e;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.zoom-level {
  color: #f9f3e5;
  font-weight: bold;
  min-width: 40px;
  text-align: center;
}

.new-note-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 150px;
  height: 150px;
  background-color: #f9f3e5;
  border: 4px solid #33322e;
  border-radius: 15px;
  cursor: pointer;
  z-index: 1000;
  font-family: "Roboto", sans-serif;
  font-weight: bold;
  color: #33322e;
  box-shadow: 5px 5px 0px #33322e;
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
}

.new-note-btn:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 7px 7px 0px #33322e;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

.new-note-header {
  padding: 10px;
  font-size: 14px;
  border-bottom: 2px solid #33322e;
  text-align: center;
}

.plus-icon {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border: 3px solid #33322e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background-color: #f9f3e5;
  transition: all 0.3s ease;
  animation: spin 3s linear infinite;
}

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

.canvas {
  width: 100%;
  height: 100vh;
  position: relative;
  transform-origin: 0 0;
  transition: transform 0.2s ease;
  z-index: 1;
}

.sticky-note {
  width: 300px;
  height: 300px;
  background-color: #f9f3e5;
  border: 4px solid #33322e;
  border-radius: 15px;
  font-family: "Roboto", sans-serif;
  font-weight: bold;
  color: #33322e;
  position: absolute;
  top: 50px;
  left: 50px;
  cursor: move;
  user-select: none;
  box-shadow: 5px 5px 0px #33322e;
  transition: all 0.3s ease;
  animation: fadeInScale 0.5s ease-out;
  z-index: 10;
}

.sticky-note:hover {
  transform: scale(1.02) rotate(1deg);
  box-shadow: 7px 7px 0px #33322e;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.sticky-note.dragging {
  z-index: 999;
  transform: rotate(5deg) scale(1.05);
  box-shadow: 10px 10px 0px #33322e;
  transition: none;
}

.header {
  padding: 15px 20px;
  font-size: 24px;
  border-bottom: 2px solid #33322e;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delete-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: #33322e;
  cursor: pointer;
  padding: 5px;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  transform: scale(1.2) rotate(10deg);
  color: #d32f2f;
}

.delete-btn:hover {
  color: #d32f2f;
}

.content {
  padding: 20px;
  height: calc(100% - 80px);
  position: relative;
}

.lines {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  pointer-events: none;
}

.line {
  height: 30px;
  border-bottom: 2px dotted #33322e;
  margin-bottom: 5px;
}

.name-input {
  background: none;
  border: none;
  font-family: "Roboto", sans-serif;
  font-weight: bold;
  font-size: 24px;
  color: #33322e;
  width: 200px;
  outline: none;
}

.name-input::placeholder {
  color: #33322e;
  opacity: 0.7;
}

.note-textarea {
  width: 100%;
  height: calc(100% - 10px);
  background: transparent;
  border: none;
  font-family: "Edu QLD Hand", cursive;
  font-weight: 500;
  color: #33322e;
  resize: none;
  outline: none;
  font-size: 16px;
  line-height: 35px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.note-textarea::placeholder {
  color: #33322e;
  opacity: 0.5;
}

/* Custom Scrollbar */
.note-textarea::-webkit-scrollbar {
  width: 8px;
}

.note-textarea::-webkit-scrollbar-track {
  background: #f4d799;
  border-radius: 4px;
}

.note-textarea::-webkit-scrollbar-thumb {
  background: #33322e;
  border-radius: 4px;
}

.note-textarea::-webkit-scrollbar-thumb:hover {
  background: #2a2926;
}

@media (max-width: 768px) {
  .canvas {
    width: 100vw;
    height: 100vh;
    overflow: visible;
    touch-action: none;
    position: absolute;
    top: 0;
    left: 0;
  }
  
  body {
    touch-action: none;
    overflow: hidden;
  }

  .zoom-controls {
    bottom: 10px;
    right: 10px;
    padding: 8px;
    gap: 8px;
  }

  .zoom-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
    touch-action: manipulation;
  }

  .zoom-level {
    font-size: 14px;
    min-width: 35px;
  }

  .new-note-btn {
    width: 120px;
    height: 120px;
    top: 15px;
    left: 15px;
  }

  .new-note-header {
    font-size: 12px;
    padding: 8px;
  }

  .plus-icon {
    width: 35px;
    height: 35px;
    font-size: 20px;
    bottom: 10px;
    right: 10px;
  }

  .sticky-note {
    width: 280px;
    height: 280px;
    position: absolute;
    touch-action: none;
    cursor: grab;
  }
  
  .sticky-note.dragging {
    cursor: grabbing;
  }

  .header {
    padding: 12px 15px;
    font-size: 20px;
  }

  .name-input {
    font-size: 20px;
    width: 60%;
  }

  .note-textarea {
    font-size: 14px;
    line-height: 30px;
    min-height: 180px;
  }
}

@media (max-width: 480px) {
  body {
    overflow: hidden;
    touch-action: none;
  }

  .canvas {
    width: 100vw;
    height: 100vh;
    overflow: visible;
    touch-action: none;
    position: absolute;
    top: 0;
    left: 0;
  }

  .zoom-controls {
    bottom: 70px;
    right: 5px;
    padding: 6px;
    gap: 5px;
  }

  .zoom-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
    touch-action: manipulation;
  }

  .zoom-level {
    font-size: 12px;
    min-width: 30px;
  }

  .new-note-btn {
    width: 100px;
    height: 100px;
    top: 10px;
    left: 10px;
  }

  .new-note-header {
    font-size: 10px;
    padding: 6px;
  }

  .plus-icon {
    width: 30px;
    height: 30px;
    font-size: 18px;
    bottom: 8px;
    right: 8px;
    border: 2px solid #33322e;
  }

  .sticky-note {
    width: 250px;
    height: 250px;
    position: absolute;
    touch-action: none;
    cursor: grab;
  }
  
  .sticky-note.dragging {
    cursor: grabbing;
  }

  .header {
    padding: 10px 12px;
    font-size: 16px;
  }

  .name-input {
    font-size: 16px;
    width: 55%;
  }

  .delete-btn {
    font-size: 14px;
  }

  .note-textarea {
    font-size: 12px;
    line-height: 25px;
    min-height: 160px;
  }

  .line {
    height: 25px;
  }
}
