body {
  margin: 0;
  padding: 0;
  background: linear-gradient(to top, #ffe0f0, #dff6ff);
  font-family: 'Quicksand', sans-serif;
  overflow-x: hidden;
}

body.admin-mode {
  box-shadow: inset 0 0 20px #f10505;
  background: linear-gradient(to top, #4d0404, #b83838);
}


.container {
  text-align: center;
  padding: 50px 20px;
}

h1 {
  font-family: 'Pacifico', cursive;
  font-size: 2.5rem;
  color: #d63384;
}

body.romantic-mode {
  background: linear-gradient(to bottom, #1a1a1a, #3a3a3a);
  color: #ffe0f0;
}

body.romantic-mode .note,
body.romantic-mode .noteFrom,
body.romantic-mode textarea,
body.romantic-mode .popup,
body.romantic-mode .love-notes,
body.romantic-mode .reasons {
  background-color: #2e2e2e !important;
  color: #ffe0f0 !important;
  border-color: #ff9ebc;
}

body.romantic-mode .carousel-btn {
  background-color: #333;
  color: #ffe0f0;
}

.heartbeat-wrapper {
  text-align: center;
  margin: 60px 0;
  position: relative;
}

.floating-heart-container {
  position: fixed;
  pointer-events: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}

.floating-heart {
  position: absolute;
  font-size: 1.5rem;
  color: #ff99c8;
  animation: floatHeart 4s ease-in forwards;
}

@keyframes floatHeart {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-150px) scale(1.5);
    opacity: 0;
  }
}


#heartbeatBtn {
  background-color: #ffb3c6;
  color: white;
  font-size: 1.3rem;
  padding: 12px 24px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-family: 'Pacifico', cursive;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 2;
  touch-action: manipulation;
  user-select: none;         /* Prevent text selection */
  -webkit-user-select: none; /* For Safari/Chrome on mobile */
  -ms-user-select: none;     /* For IE/Edge (legacy) */
  -moz-user-select: none;    /* For Firefox */
  -webkit-tap-highlight-color: transparent; /* Remove blue highlight */
}

#heartbeatPulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background-color: rgba(255, 179, 198, 0.3);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.pulse-active {
  animation: pulse 1s infinite;
  opacity: 1 !important;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0.4;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0.4;
  }
}

.heartbeat-msg {
  margin-top: 20px;
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: #c9184a;
  transition: opacity 0.3s;
}


.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


.memory-upload {
  margin: 20px 0;
  text-align: center;
}

.custom-file-label {
  display: inline-block;
  background-color: #ffb3c6;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Pacifico', cursive;
  font-size: 1rem;
  transition: background 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.custom-file-label:hover {
  background-color: #ff8fab;
}

input[type="file"]#memoryImage {
  display: none;
}


.tulip {
  font-size: 3rem;
  margin: 20px;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 10px;
  border-radius: 50%;
  background-color: #ffeef5;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.reactions {
  margin-top: 8px;
  font-size: 1.2rem;
  user-select: none;
  position: relative;
}

.reactions .emoji {
  cursor: pointer;
  margin: 0 4px;
  transition: transform 0.2s ease;
}

.reactions .emoji:hover {
  transform: scale(1.3);
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-30px) scale(1.5); opacity: 0; }
}

.anniversary-btn {
  display: inline-block;
  font-family: 'Pacifico', cursive;
  background: linear-gradient(135deg, #ffb3c6, #ffc2d1, #ffe5ec);
  color: #c9184a;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(255, 158, 188, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 10px;
  animation: pulseGlow 2s infinite;
}

.anniversary-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(255, 158, 188, 0.5);
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 8px rgba(255, 179, 198, 0.6); }
  50% { box-shadow: 0 0 20px rgba(255, 179, 198, 1); }
  100% { box-shadow: 0 0 8px rgba(255, 179, 198, 0.6); }
}

.anniversary-celebration {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInSlide 1.5s ease-out 0.3s forwards;
}

@keyframes fadeInSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-heart {
  position: fixed;
  bottom: 0;
  font-size: 2rem;
  animation: rise 4s linear forwards;
  pointer-events: none;
  z-index: 9999;
}

@keyframes rise {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-100vh); opacity: 0; }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-image {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  max-width: 90%;
  max-height: 80%;
  animation: fadeInScale 0.4s ease;
}

.popup-image img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
}

@keyframes fadeInScale {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}


.floating-hearts {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  animation: floatHearts 3s ease-in-out infinite alternate;
  pointer-events: none;
  color: #ff69b4;
  white-space: nowrap;
}

@keyframes floatHearts {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-20px) scale(1.2);
    opacity: 0.7;
  }
}



.tulip:hover {
  transform: scale(1.2) rotate(5deg);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.tulip.blooming {
  animation: tulipBloom 0.6s ease-in-out;
}

@keyframes tulipBloom {
  0% {
    transform: scale(1) rotate(0deg);
  }
  30% {
    transform: scale(1.4) rotate(10deg);
  }
  60% {
    transform: scale(1.2) rotate(-8deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}


.popup {
  background: white;
  border: 2px solid #ff9ebc;
  border-radius: 12px;
  padding: 15px;
  max-width: 300px;
  margin: 20px auto;
  display: none;
  color: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.popup.show {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}


.popup.show {
  display: block;
  opacity: 1;
}


.reasons {
  margin-top: 50px;
  background: #fff6fa;
  padding: 30px;
  border-top: 4px dashed #ffa9d6;
  border-radius: 20px 20px 0 0;
}

.reasons h2 {
  font-family: 'Pacifico';
  color: #ff5eaa;
}

.reason {
  font-size: 1.1rem;
  margin: 10px 0;
  color: #444;
}

.music-control {
  position: fixed;
  top: 10px;
  right: 10px;
  background: #fff0f8;
  padding: 10px 15px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  color: #c9184a;
}

.card-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 40px 20px;
  background-color: #fff0f6;
}

.book {
  position: relative;
  border-radius: 10px;
  width: 220px;
  height: 300px;
  background-color: whitesmoke;
  -webkit-box-shadow: 1px 1px 12px #000;
  box-shadow: 1px 1px 12px #000;
  -webkit-transform: preserve-3d;
  -ms-transform: preserve-3d;
  transform: preserve-3d;
  -webkit-perspective: 2000px;
  perspective: 2000px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
}

.cover {
  top: 0;
  position: absolute;
  background-color: rgb(209, 129, 153);
  width: 100%;
  height: 100%;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.5s;
  transform-origin: 0;
  box-shadow: 1px 1px 12px #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book:hover .cover {
  transition: all 0.5s;
  transform: rotatey(-80deg);
}

.cover p {
  font-size: 20px;
  font-weight: bolder;
}

.book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.love-letter {
  background-color: #fff0f6;
  padding: 30px;
  border-radius: 20px;
  margin: 40px auto;
  max-width: 600px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-size: 1.3rem;
  color: #444;
  font-family: 'Caveat', cursive;
  position: relative;
  overflow: hidden;
}

.letter-title {
  font-size: 2.2rem;
  color: #d63384;
  text-align: center;
  margin-bottom: 20px;
}

.floating-hearts {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 1.5rem;
  animation: floatHearts 3s ease-in-out infinite alternate;
}

@keyframes floatHearts {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: translateY(-20px) rotate(10deg);
    opacity: 0.7;
  }

  100% {
    transform: translateY(0) rotate(-10deg);
    opacity: 1;
  }
}

/* Library of Us */
.library {
  background: #f9fdf5;
  padding: 60px 20px;
  text-align: center;
}

.library h2 {
  font-family: 'Caveat', cursive;
  font-size: 3rem;
  color: #328E6E;
  margin-bottom: 30px;
}

.bookshelf {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.book-spine {
  width: 60px;
  height: 180px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 1rem;
  font-family: 'Caveat', cursive;
}

.book-spine:hover {
  transform: scale(1.1);
}

.quote-box {
  background-color: #e1eebc;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
  margin: 0 auto;
  font-style: italic;
  color: #328e6e;
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
}

.carousel-track img {
  width: 100%;
  max-width: 150px;
  /* or adjust to your preference */
  height: auto;
  margin: 0 5px;
  border-radius: 10px;
  object-fit: cover;
}

.goodnight-btn {
  background: linear-gradient(135deg, #c9184a, #ffb3c6);
  color: white;
  font-size: 1.2rem;
  padding: 12px 26px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-family: 'Pacifico', cursive;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  margin-top: 15px;
}

.goodnight-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}


/* Responsive tweak for smaller screens */
@media (max-width: 600px) {
  .carousel-track img {
    max-width: 100px;
  }
}


.magic-bookmark {
  position: fixed;
  top: 70px;
  right: 10px;
  background-color: #d383bf;
  padding: 10px 12px;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  z-index: 998;
  font-family: 'Caveat', cursive;
}

.top-buttons {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  display: flex;
  gap: 10px;
}

.magic-bookmark {
  top: 10px;
  right: 10px;
  left: auto;
}


.btn {
  height: 4em;
  width: 12em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0px solid black;
  cursor: pointer;
}

.wrapper {
  height: 2em;
  width: 8em;
  position: relative;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}

.text {
  font-size: 17px;
  z-index: 1;
  color: #000;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  transition: all 0.5s ease;
}

.flower {
  display: grid;
  grid-template-columns: 1em 1em;
  position: absolute;
  transition: grid-template-columns 0.8s ease;
}

.flower1 {
  top: -12px;
  left: -13px;
  transform: rotate(5deg);
}

.flower2 {
  bottom: -5px;
  left: 8px;
  transform: rotate(35deg);
}

.flower3 {
  bottom: -15px;
  transform: rotate(0deg);
}

.flower4 {
  top: -14px;
  transform: rotate(15deg);
}

.flower5 {
  right: 11px;
  top: -3px;
  transform: rotate(25deg);
}

.flower6 {
  right: -15px;
  bottom: -15px;
  transform: rotate(30deg);
}

.petal {
  height: 1em;
  width: 1em;
  border-radius: 40% 70% / 7% 90%;
  background: linear-gradient(#922571, #c76ac2);
  border: 0.5px solid #d492c4;
  z-index: 0;
  transition: width 0.8s ease, height 0.8s ease;
}

.two {
  transform: rotate(90deg);
}

.three {
  transform: rotate(270deg);
}

.four {
  transform: rotate(180deg);
}

.btn:hover .petal {
  background: linear-gradient(#55203b, #ee93cb);
  border: 0.5px solid #ec96cf;
}

.btn:hover .flower {
  grid-template-columns: 1.5em 1.5em;
}

.btn:hover .flower .petal {
  width: 1.5em;
  height: 1.5em;
}

.btn:hover .text {
  background: rgba(255, 255, 255, 0.4);
}

.btn:hover div.flower1 {
  animation: 15s linear 0s normal none infinite running flower1;
}

@keyframes flower1 {
  0% {
    transform: rotate(5deg);
  }

  100% {
    transform: rotate(365deg);
  }
}

.btn:hover div.flower2 {
  animation: 13s linear 1s normal none infinite running flower2;
}

@keyframes flower2 {
  0% {
    transform: rotate(35deg);
  }

  100% {
    transform: rotate(-325deg);
  }
}

.btn:hover div.flower3 {
  animation: 16s linear 1s normal none infinite running flower3;
}

@keyframes flower3 {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.btn:hover div.flower4 {
  animation: 17s linear 1s normal none infinite running flower4;
}

@keyframes flower4 {
  0% {
    transform: rotate(15deg);
  }

  100% {
    transform: rotate(375deg);
  }
}

.btn:hover div.flower5 {
  animation: 20s linear 1s normal none infinite running flower5;
}

@keyframes flower5 {
  0% {
    transform: rotate(25deg);
  }

  100% {
    transform: rotate(-335deg);
  }
}

.btn:hover div.flower6 {
  animation: 15s linear 1s normal none infinite running flower6;
}

@keyframes flower6 {
  0% {
    transform: rotate(30deg);
  }

  100% {
    transform: rotate(390deg);
  }
}

.carousel-container {
  text-align: center;
  padding: 40px 20px;
  background-color: #fff6fa;
}

.carousel-title {
  font-family: 'Pacifico', cursive;
  color: #d63384;
  font-size: 2rem;
  margin-bottom: 20px;
}

.carousel {
  position: relative;
  max-width: 90%;
  margin: 0 auto;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
  scroll-behavior: smooth;
  overflow-x: auto;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track img {
  height: 250px;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #ffeef5;
  border: none;
  font-size: 2rem;
  padding: 10px;
  cursor: pointer;
  z-index: 1;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  color: #d63384;
  transition: background 0.3s;
}

.carousel-btn:hover {
  background-color: #ffd2e3;
}

.carousel-btn.left {
  left: 10px;
}

.carousel-btn.right {
  right: 10px;
}

.love-notes {
  background-color: #fff6fa;
  padding: 40px 20px;
  text-align: center;
  border-top: 4px dashed #ffa9d6;
  font-family: 'Caveat', cursive;
}

.love-notes h2 {
  font-size: 2rem;
  color: #d63384;
  margin-bottom: 20px;
}

textarea#noteInput {
  width: 80%;
  max-width: 500px;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid #ffd2e3;
  font-size: 1.2rem;
  font-family: 'Quicksand', sans-serif;
  resize: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.noteFrom {
  width: 80%;
  max-width: 400px;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 2px solid #ffd2e3;
  border-radius: 10px;
  font-size: 1.1rem;
  font-family: 'Quicksand', sans-serif;
  background-color: #fff6fa;
  color: #444;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.noteFrom:focus {
  outline: none;
  border-color: #ff9ebc;
  box-shadow: 0 0 8px rgba(255, 158, 188, 0.5);
}

.note.archived {
  opacity: 0.7;
  background-color: #f4e5fa;
  border-left: 4px solid #c48bd1;
  margin-top: 10px;
}

.archive-checkbox {
  display: none;
}

body.admin-mode .archive-checkbox {
  display: inline-block;
  transform: scale(1.3);
  margin-right: 10px;
}

#adminSection {
  display: none;
}


#futureMessages .note {
  background-color: #fff0f6;
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 20px;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

#futureMessages .note.locked {
  opacity: 0.6;               /* Still visibly "locked" */
  pointer-events: auto;       /* ✅ Allow clicks (like checkbox) */
  filter: blur(0);            /* ✅ Don't blur the entire box */
}

.note.locked .message-text {
  filter: blur(6px);          /* ✅ Only blur the actual message content */
}


.note .lock-icon {
  font-size: 1.4rem;
  position: absolute;
  top: 10px;
  right: 15px;
  color: #d63384;
}

.unlock-date {
  font-size: 0.95rem;
  color: #c9184a;
  margin-top: 10px;
  font-style: italic;
}

.countdown {
  font-size: 0.85rem;
  color: #888;
  margin-top: 5px;
}



.note-btn {
  background-color: #ffb3c6;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-family: 'Pacifico', cursive;
  cursor: pointer;
  transition: background-color 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.note-btn:hover {
  background-color: #ff8fab;
}

#notesDisplay {
  margin-top: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.note {
  background-color: #ffe0f0;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  font-size: 1.1rem;
  color: #444;
  position: relative;
}

.notification {
  background-color: #ff9ebc;
  color: white;
  padding: 10px 20px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.2rem;
  text-align: center;
  border-radius: 8px;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.notification.show {
  opacity: 1;
}