/* 
   THEME: COQUETTE & Y2K CUTE-ALISM 
   Vibe: Lana Del Rey Vinyl x Hello Kitty x Windows 98
*/

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
  font-family: 'Playfair Display', serif;
  overflow-x: hidden;
  overflow-y: auto;

  /* BACKGROUND: Creamy pink with subtle grid/dot pattern */
  background-color: #ffeef2;
  background-image:
    radial-gradient(#ffb7b2 1.5px, transparent 1.5px),
    radial-gradient(#ffb7b2 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  animation: bgScroll 20s linear infinite;
}

@keyframes bgScroll {
  0% {
    background-position: 0 0, 10px 10px;
  }

  100% {
    background-position: 20px 20px, 30px 30px;
  }
}

/* THE "SCRAPBOOK" CONTAINER */
.container {
  text-align: center;
  background: #fff;
  padding: 2.5rem;
  border-radius: 2px;
  /* Brutalist/Retro corner */

  /* Double Border Effect (Lace-like) */
  border: 3px solid #ff4d6d;
  outline: 6px dashed #ffb3c1;
  outline-offset: 8px;

  box-shadow:
    15px 15px 0px rgba(255, 179, 193, 0.4),
    /* Retro block shadow */
    5px 5px 0px rgba(0, 0, 0, 0.1);

  width: fit-content;
  max-width: 90vw;
  /* Keeps it within the viewport side-to-side */
  min-width: 320px;
  position: relative;
  z-index: 10;
  transform: rotate(-1deg);
  /* Imperfect rotation */
}

/* DECORATIVE RIBBON (CSS) */
.container::before {
  content: "🎀";
  font-size: 3rem;
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.1));
  z-index: 20;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 3.2em;
  color: #590d22;
  margin-bottom: 30px;
  line-height: 1.1;
  text-shadow: 2px 2px 0px #ffccd5;
  letter-spacing: -1px;
  animation: floatTitle 3s ease-in-out infinite, glowText 2s ease-in-out infinite;
}

@keyframes floatTitle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glowText {
  0%, 100% {
    text-shadow: 2px 2px 0px #ffccd5;
  }
  50% {
    text-shadow: 0 0 15px #ff4d6d, 2px 2px 0px #ffccd5;
  }
}

.header_text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 3.5em;
  color: #590d22;
  margin-bottom: 25px;
  text-shadow: 3px 3px 0px #ffccd5;
  letter-spacing: -1px;
  line-height: 1.1;
  animation: floatTitle 3s ease-in-out infinite;
}

.container.success {
  transform: rotate(1deg);
  /* Slight rotation shift for success state */
}

.container.success::before {
  content: "💖";
}



#countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
  background: #fff0f3;
  padding: 15px;
  border: 2px solid #ffb3c1;
  border-radius: 8px;
  box-shadow: 4px 4px 0px #ffccd5;
}

.countdown-item {
  text-align: center;
  min-width: 60px;
}

.countdown-item span {
  display: block;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: #ff4d6d;
  margin-bottom: 5px;
  text-shadow: 2px 2px 0px #ffccd5;
}

.countdown-item p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.8rem;
  color: #590d22;
  margin: 0;
  font-weight: 700;
}

.buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  /* Prevent No button from stretching height */
  gap: 25px;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Y2K / RETRO BUTTONS */
button {
  font-family: 'Press Start 2P', cursive;
  /* PIXEL FONT */
  font-size: 0.8rem;
  /* Smaller size for pixel font legibility */
  padding: 15px 25px;
  border: 2px solid #590d22;
  cursor: pointer;
  text-transform: uppercase;
  position: relative;
  transition: all 0.1s;
  box-shadow: 4px 4px 0px #590d22;
  /* Hard shadow */
}

.yes-button {
  background-color: #ff4d6d;
  color: #fff;
}

.yes-button:hover {
  background-color: #ff758f;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #590d22;
}

.no-button {
  background-color: #fff;
  color: #590d22;
  /* Ensure size stays fixed */
  font-size: 0.6rem !important;
  padding: 12px 20px !important;
  align-self: center;
}

.no-button:hover {
  background-color: #ffeef2;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #590d22;
}

.gif_container img {
  max-width: 100%;
  margin-top: 15px;
  border-radius: 10px;
  /* Slight rounding for softness */
}

/* SPARKLE ANIMATION CLASS */
.sparkle {
  position: absolute;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23FFE600" d="M50 0L60 40L100 50L60 60L50 100L40 60L0 50L40 40z" /%3E%3C/svg%3E');
  background-size: contain;
  width: 20px;
  height: 20px;
  animation: fadeOut 1s linear forwards;
  z-index: 100;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0);
  }
}

/* FLOATING HEARTS/STARS ANIMATION */
.floating-element {
  position: fixed;
  top: -50px;
  /* Start slightly above viewport */
  pointer-events: none;
  z-index: 1;
  /* Behind container */
  animation: fallDown linear forwards;
}

@keyframes fallDown {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0.5;
  }
}

/* SHAKE ANIMATION */
@keyframes shake {
  0% {
    transform: translateX(0) rotate(-1deg);
  }

  25% {
    transform: translateX(-10px) rotate(-2deg);
  }

  50% {
    transform: translateX(10px) rotate(0deg);
  }

  75% {
    transform: translateX(-10px) rotate(-2deg);
  }

  100% {
    transform: translateX(0) rotate(-1deg);
  }
}

.shake {
  animation: shake 0.3s ease-in-out;
}


/* MUSIC CONTROLS STYLES */
.music-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  padding: 10px 15px;
  border-radius: 12px;
  border: 2px solid #ffb3c1;
  text-align: center;
  z-index: 11000;
  box-shadow: 5px 5px 0px rgba(255, 179, 193, 0.3);
}

.music-controls p {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.4rem;
  color: #590d22;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

#music-toggle {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  padding: 8px 12px;
  background-color: #ff4d6d;
  color: white;
  border: 2px solid #590d22;
  cursor: pointer;
  box-shadow: 2px 2px 0px #590d22;
  transition: all 0.1s;
}

#music-toggle:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #590d22;
}

#music-toggle:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #590d22;
}

/* MOBILE RESPONSIVENESS */
@media screen and (max-width: 600px) {
  .container {
    padding: 1.5rem;
    min-width: 280px;
    max-width: 95%;
  }

  h1 {
    font-size: 2.2em;
    /* Smaller title */
    margin-bottom: 20px;
  }

  .header_text {
    font-size: 2.5em;
    /* Smaller success text */
  }

  .container::before {
    font-size: 2.5rem;
    /* Smaller ribbon */
    top: -30px;
  }

  .buttons {
    gap: 15px;
  }

  button {
    padding: 12px 20px;
    font-size: 0.6rem;
    /* Smaller pixel font */
  }

  #countdown {
    gap: 8px;
    padding: 10px;
  }

  .countdown-item {
    min-width: 45px;
  }

  .countdown-item span {
    font-size: 0.8rem;
  }

  .countdown-item p {
    font-size: 0.6rem;
  }

  .gif_container img {
    max-width: 100%;
    width: 280px;
    /* Force image to be smaller on tiny screens */
  }

  /* Adjust music controls for mobile so they don't block buttons */
  .music-controls {
    bottom: 10px;
    right: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.85);
    /* More solid for visibility */
  }

  .music-controls p {
    font-size: 0.35rem;
  }

  #music-toggle {
    font-size: 0.5rem;
    padding: 6px 10px;
  }
}

/* LOCKED SCREEN STYLES */
#locked-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffeef2;
  background-image:
    radial-gradient(#ffb7b2 1.5px, transparent 1.5px),
    radial-gradient(#ffb7b2 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  text-align: center;
}

.locked-container {
  background: white;
  padding: 3rem;
  border: 3px solid #ff4d6d;
  outline: 6px dashed #ffb3c1;
  outline-offset: 8px;
  box-shadow: 15px 15px 0px rgba(255, 179, 193, 0.4);
  transform: rotate(-1deg);
  max-width: 90vw;
}

.locked-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 2rem;
  color: #590d22;
  margin-bottom: 30px;
}

.locked-note {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #ff4d6d;
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

#countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
  background: #fff0f3;
  padding: 15px;
  border: 2px solid #ffb3c1;
  border-radius: 8px;
  box-shadow: 4px 4px 0px #ffccd5;
}

.countdown-item {
  text-align: center;
  min-width: 60px;
}

.countdown-item span {
  display: block;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: #ff4d6d;
  margin-bottom: 5px;
  text-shadow: 2px 2px 0px #ffccd5;
}

.countdown-item p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.8rem;
  color: #590d22;
  margin: 0;
  font-weight: 700;
}

@media screen and (max-width: 600px) {
  .locked-container {
    padding: 1.5rem;
  }

  .locked-title {
    font-size: 1.5rem;
  }

  #countdown {
    gap: 8px;
    padding: 10px;
  }

  .countdown-item {
    min-width: 45px;
  }

  .countdown-item span {
    font-size: 0.8rem;
  }
}

/* WATERMARK STYLE */
.watermark {
  position: fixed;
  bottom: 20px;
  left: 20px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
  color: #590d22;
  opacity: 0.5;
  z-index: 11000;
  pointer-events: none;
  text-decoration: none;
  transition: opacity 0.3s;
}

.watermark:hover {
  opacity: 1;
}

@media screen and (max-width: 600px) {
  .watermark {
    bottom: 10px;
    left: 10px;
    font-size: 0.4rem;
  }
}