/* =======================================
   BODY & UMUM
======================================= */
body {
  font-family: Arial, sans-serif;
  text-align: center;
  background: #fff0f6;
  margin: 0;
  padding: 0;
}

h1, h2 {
  color: #ff6fb5;
  margin-top: 20px;
}

button {
  cursor: pointer;
}

/* =======================================
   CARD UTAMA
======================================= */
.card {
  background: white;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.1);
  text-align: center;
  width: 340px;
  margin: 30px auto;
  position: relative;
  overflow: hidden;
}

/* =======================================
   VIDEO & CANVAS
======================================= */
video {
  width: 100%;
  border-radius: 15px;
  margin-top: 10px;
}

canvas {
  display: none;
}

/* =======================================
   TOMBOL
======================================= */
#forYouBtn, #takePhotoBtn {
  margin-top: 15px;
  padding: 12px 24px;
  font-size: 16px;
  background: #ff6fb5;
  color: white;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.3s;
}

#forYouBtn:hover, #takePhotoBtn:hover {
  background: #ff85c1;
}

/* =======================================
   HASIL FOTO + DOWNLOAD
======================================= */
#resultWrapper {
  margin-top: 15px;
  position: relative;
}

#resultWrapper img {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #ff6fb5;
  position: relative;
  z-index: 1;
}

#downloadBtn {
  display: inline-block;
  margin-top: 10px;
  background: #fff;
  border: 1px solid #ff6fb5;
  color: #ff6fb5;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

#downloadBtn:hover {
  background: #ff6fb5;
  color: #fff;
}

/* =======================================
   BINGKAI BUNGA MELINGKAR (SVG)
======================================= */
#flower-frame {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 230px;
  height: 230px;
  pointer-events: none;
  z-index: 2;
}

/* =======================================
   KELOPAK BUNGA JATUH
======================================= */
#petal-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.petal {
  position: absolute;
  top: -20px;
  width: 16px;
  height: 16px;
  background: pink;
  border-radius: 50% 0 50% 50%;
  opacity: 0.8;
  animation: fall 5s linear infinite;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(400px) rotate(360deg);
    opacity: 0;
  }
}

/* =======================================
   STATUS
======================================= */
#status {
  margin-top: 10px;
  color: #ff6fb5;
  font-weight: 600;
}

/* =======================================
   MEDIA QUERIES MOBILE
======================================= */
@media screen and (max-width: 400px) {
  .card {
    width: 90%;
    padding: 16px;
  }

  #resultWrapper img {
    width: 180px;
    height: 180px;
  }

  #flower-frame {
    width: 180px;
    height: 180px;
  }
}
