* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-image: url("../images/onenote.avif");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  font-family: 'Segoe UI', sans-serif;
  padding: 20px;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  text-align: center;
}

h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

#board {
  position: relative; /* Enables absolute note positioning */
  min-height: 100vh;
}

/* NOTE STYLE */
.note {
  position: absolute;
  min-height: 140px;
  min-width: 200px;
  max-width: 280px;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 12px #0003;
  font-size: 16px;
  font-weight: 500;
  background: #ffeb3b;
  white-space: pre-wrap;
  word-wrap: break-word;
  animation: drop 0.4s ease;
  cursor: move;
  z-index: 5;
  transition: box-shadow 0.3s;
}

.note:active {
  box-shadow: 0 8px 20px #0005;
}

.note .time {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 10px;
  color: #3338;
}

.note .actions {
  position: absolute;
  top: 8px;
  right: 10px;
  display: flex;
  gap: 5px;
  z-index: 10;
}

.note button {
  background: #fff8;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 5px;
}

@keyframes drop {
  0% {
    transform: translateY(-100px) rotate(-3deg);
    opacity: 0;
  }
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
}

/* ADD BUTTON */
#addBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  color: white;
  font-size: 30px;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  box-shadow: 0 4px 12px #0004;
  z-index: 20;
  transition: transform 0.2s;
  background-color: #00b3ff;
}

#addBtn:hover {
  transform: scale(1.1);
}

/* POPUP STYLES */
#popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 30px #0005;
  z-index: 30;
  display: none;
  width: 90%;
  max-width: 350px;
}

#popup h3 {
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}

#popup textarea {
  width: 100%;
  height: 100px;
  padding: 10px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: none;
}

#popup input[type="color"] {
  margin-top: 10px;
}

#popup button {
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  background: #00b3ff;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  float: right;
}

#heading{
  background-color: #33333352;
  padding: 20px;
  align-items: center;
}

/* OVERLAY BEHIND POPUP */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 25;
  display: none;
}

/* RESPONSIVE NOTE SIZE FOR MOBILE */
@media (max-width: 600px) {
  .note {
    min-width: 160px;
    font-size: 14px;
  }

  #popup {
    padding: 20px;
  }

  #popup textarea {
    font-size: 14px;
  }
}
