@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Klee+One:wght@600&family=Noto+Serif+TC:wght@600&display=swap');

html {
  height: 100%;
  overflow: hidden;
  font-size: 14px;
}

body {
  height: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  font-family: 'Noto Serif TC', cursive;
  font-weight: 600;
  background: #1b2148;
  background-image: url(/bg.jpg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

button {
  font-family: 'Noto Serif TC', cursive;
}

.card {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  padding: 20px;
  height: 100%;
  color: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  /* z-index: 99; */
  /* border: 1px solid black; */
}

@keyframes pulse {

  0%,
  100% {
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 50px rgba(255, 255, 255, 0.6), 0 0 75px rgba(204, 169, 221, 0.6);
    transform: scale(1);
  }

  50% {
    text-shadow: 0 0 50px rgba(255, 255, 255, 0.75), 0 0 100px rgba(255, 255, 255, 0.75), 0 0 150px rgba(204, 169, 221, 0.75);
    transform: scale(1.05);
  }
}

.card h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 3rem;
  line-height: 3rem;
  text-align: center;
  animation: pulse 2s infinite ease-in-out;
  /* color: ; */
}

.card .content {
  padding: 20px;
  line-height: 160%;
  font-size: 1.2rem;
  border-radius: 25px;
  -webkit-backdrop-filter: blur(5px) brightness(80%);
  backdrop-filter: blur(5px) brightness(80%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  /* margin-bottom: 0px; */
}

.card .content p {
  margin: 0.5rem 0;
}

.card .gift-btn {
  background-color: #ff0080;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  margin: 20px 0;
  transition: background-color 0.3s ease;
  cursor: pointer;
  border-radius: 4px;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

.card .gift-btn:hover {
  background-color: #b6005b;
}

canvas {
  position: absolute;
  overflow-y: hidden;
  overflow-x: hidden;
  width: 100%;
  margin: 0;
}

.envelope {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 500px;
  max-width: 500px;
  height: 100%;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.flap {
  width: 200%;
  aspect-ratio: 1 / 1;
  position: absolute;
  background: #483477;
  border-radius: 50px;
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.flap-top {
  top: -50%;
  left: -100%;
  transform-origin: bottom center;
}

.flap-bottom {
  bottom: -50%;
  right: -100%;
  transform-origin: top center;
}

button.open {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%);
  width: 150px;
  aspect-ratio: 1 / 1;
  border-radius: 100%;
  background: #fff672;
  font-size: 2.5rem;
  border: none;
  color: #000;
}

button.open:hover {
  background: #d1c73c;
}

.open-top {
  transition: transform 1s, top 1s;
  transform: rotate(-45deg);
  top: -200%;
}

.open-btm {
  transition: transform 1s, bottom 1s;
  transform: rotate(-45deg);
  bottom: -200%;
}

button.close-open-btn {
  transition: transform 1s, top 1s;
  transform: rotate(-45deg);
  top: 100vh;
}

.gift{
  position: absolute;
  /* top: 50%; */
  left: 50%;
  width: 90%; 
  max-width: 500px;
  transform: translate(-50%);
}

.gift .content{
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  color: #fff;
  background: #483477;
  z-index: 99;
  border-radius: 25px;
  text-align: center;
}

.gift::before {
  content: "";
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  position: fixed;
  display: block;
  z-index: 50;
  -webkit-backdrop-filter: blur(5px) brightness(60%);
  backdrop-filter: blur(5px) brightness(60%);
}

.gift a{
  color: #fff;
}

.gift.hidden{
  display: none;
}

#close{
  position: absolute;
  z-index: 101;
  top: 10px;
  right: 10px;
  background: transparent;
  border: #fff 1px solid;
  border-radius: 100%;
  width: 25px;
  aspect-ratio: 1 / 1;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}