@import url('https://fonts.googleapis.com/css2?family=Comic+Relief:wght@400;700&display=swap');

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

html {
  overflow: hidden;
  overflow: clip;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
}

body {
  overflow: hidden;
  overflow: clip;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: whitesmoke;
  font-family: "Comic Relief", system-ui;
  touch-action: manipulation;
}

#gif {
  height: 100%;
  width: 100%;
  cursor: zoom-in;
}

#gif:active {
  transform: scale3d(1.3, 1.3, 1.3);
}

h2 {
  text-align: center;
  font-size: 1.5em;
  color: #e94d58;
  margin: 15px 0;
}

#btn-group {
  width: 100%;
  height: 120px;
  display: flex;
  justify-content: center;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

button {
  position: absolute;
  width: 150px;
  height: 50px;
  color: white;
  font-size: 1.2em;
  border-radius: 30px;
  outline: none;
  cursor: pointer;
  box-shadow: 0 2px 4px gray;
  border: 2px solid #e94d58;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px gray;
}

button:nth-child(1) {
  margin-left: -200px;
  background: #e94d58;
}

button:nth-child(2) {
  margin-right: -200px;
  background: white;
  color: #e94d58;
}

/* 3rd Button: My Message */
#message-btn {
  margin-left: 0;
  margin-top: 65px;
  background: #e94d58;
  color: white;
  width: 170px;
}

#no-btn {
  cursor: pointer;
  transition: left 0.25s cubic-bezier(0.25, 1, 0.5, 1), top 0.25s cubic-bezier(0.25, 1, 0.5, 1), transform 0.2s ease, box-shadow 0.2s ease;
}

/* ====================================
   Ancient Scroll Modal Styling
   ==================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scroll-wrapper {
  position: relative;
  width: 90%;
  max-width: 460px;
  transform: scale(1);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hidden .scroll-wrapper {
  transform: scale(0.75);
}

.close-btn {
  position: absolute;
  top: -14px;
  right: -10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e94d58;
  color: white;
  border: 2px solid white;
  font-size: 1.4em;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.close-btn:hover {
  transform: scale(1.15) rotate(90deg);
  background-color: #c83742;
}

/* Scroll Rollers */
.scroll-roller {
  display: flex;
  align-items: center;
  height: 24px;
  position: relative;
  z-index: 5;
}

.roller-bar {
  flex: 1;
  height: 16px;
  background: linear-gradient(to bottom, #3e200b, #7a4a21 40%, #523115 70%, #261306);
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

.handle {
  width: 24px;
  height: 24px;
  background: radial-gradient(circle at 30% 30%, #fff176 10%, #d4af37 50%, #7f600d 100%);
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

/* Parchment Scroll Body */
.scroll-body {
  background: linear-gradient(to right, #d8a463, #f5e4c3 8%, #fcf5e5 50%, #f5e4c3 92%, #d8a463);
  border-left: 3px solid #b8860b;
  border-right: 3px solid #b8860b;
  box-shadow: inset 0 0 35px rgba(90, 50, 20, 0.35), 0 12px 30px rgba(0, 0, 0, 0.45);
  padding: 30px 28px 25px 28px;
  margin: -4px 12px;
  border-radius: 2px;
  text-align: center;
  position: relative;
}

.scroll-header {
  margin-bottom: 15px;
}

.scroll-ornament {
  font-size: 2em;
  display: block;
  margin-bottom: 5px;
}

.scroll-title {
  font-family: 'Cinzel', serif;
  font-size: 1.7em;
  color: #4a240e;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
}

.scroll-divider {
  font-size: 0.9em;
  color: #8b4513;
  margin-top: 6px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(139, 69, 19, 0.35);
}

.scroll-text {
  font-family: 'Great Vibes', cursive;
  font-size: 1.7em;
  color: #3b1b08;
  line-height: 1.5;
  text-shadow: 0.5px 0.5px 0px rgba(255, 255, 255, 0.5);
}

.scroll-text p {
  margin-bottom: 12px;
}

.scroll-text .signature {
  font-size: 1.85em;
  color: #b71c1c;
  margin-top: 18px;
  margin-bottom: 5px;
}

/* Wax Seal Badge */
.wax-seal {
  width: 50px;
  height: 50px;
  margin: 15px auto 0 auto;
  background: radial-gradient(circle at 35% 35%, #ef5350, #b71c1c 60%, #5f0909 100%);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.35);
  border: 2px solid #8e0000;
}

.seal-inner {
  font-size: 1.3em;
}

/* ====================================
   Yes Modal Card & Rose SVG Styling
   ==================================== */

.yes-modal-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #fff0f3 100%);
  border: 3px solid #ff4d6d;
  border-radius: 28px;
  padding: 35px 30px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(255, 77, 109, 0.35), inset 0 0 15px rgba(255, 182, 193, 0.4);
  transform: scale(1);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.hidden .yes-modal-card {
  transform: scale(0.75);
}

.rose-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.rose-svg {
  filter: drop-shadow(0 8px 16px rgba(255, 77, 109, 0.4));
  animation: rosePulse 2.5s infinite ease-in-out;
}

@keyframes rosePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

.yes-message {
  font-family: 'Great Vibes', cursive;
  font-size: 2.3em;
  color: #c9184a;
  margin: 15px 0 10px 0;
  text-shadow: 1px 1px 2px rgba(255, 182, 193, 0.6);
  line-height: 1.2;
}

.sparkles-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 1.6em;
  margin-top: 10px;
}

.sparkle {
  animation: floatSparkle 2s infinite ease-in-out alternate;
}

.sparkle:nth-child(2) {
  animation-delay: 0.4s;
}

.sparkle:nth-child(3) {
  animation-delay: 0.8s;
}

@keyframes floatSparkle {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-8px) scale(1.2);
  }
}

/* ====================================
   Mobile Screen Responsiveness
   ==================================== */

#wrapper {
  max-width: 480px;
  width: 92%;
  margin: 0 auto;
  text-align: center;
  padding: 15px;
  overflow: hidden;
}

@media (max-width: 600px) {
  #wrapper {
    width: 96%;
    padding: 10px;
  }

  h2 {
    font-size: 1.3em;
    margin: 10px 0;
  }

  #gif {
    max-width: 250px;
    max-height: 250px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
  }

  #btn-group {
    height: 120px;
    margin-top: 30px;
  }

  button {
    width: 125px;
    height: 46px;
    font-size: 1.05em;
    touch-action: manipulation;
  }

  button:nth-child(1) {
    margin-left: -135px;
  }

  button:nth-child(2) {
    margin-right: -135px;
  }

  #message-btn {
    width: 145px;
    margin-left: 0;
    margin-top: 60px;
  }

  /* Ancient Scroll Modal on Mobile */
  .scroll-wrapper {
    width: 95%;
    max-width: 370px;
  }

  .scroll-body {
    padding: 22px 18px 18px 18px;
    margin: -4px 6px;
    max-height: 75vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .scroll-title {
    font-size: 1.4em;
  }

  .scroll-text {
    font-size: 1.35em;
    line-height: 1.45;
  }

  .scroll-text .signature {
    font-size: 1.5em;
    margin-top: 14px;
  }

  .close-btn {
    width: 34px;
    height: 34px;
    font-size: 1.2em;
    top: -10px;
    right: -6px;
  }

  /* Yes Modal Card on Mobile */
  .yes-modal-card {
    padding: 25px 18px;
    width: 92%;
  }

  .rose-svg {
    width: 120px;
    height: 144px;
  }

  .yes-message {
    font-size: 1.85em;
  }
}