body {
  min-height: 100vh;
  font-family: 'Tajawal', sans-serif;
  background: #FFF0F3;
  background-image: radial-gradient(circle at 18% 14%, rgba(196, 30, 58, .13) 0%, transparent 48%), radial-gradient(circle at 82% 88%, rgba(201, 151, 58, .11) 0%, transparent 48%);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 20px;
  position: relative;
}

body.success-mode {
  overflow-y: auto;
  align-items: flex-start;
}

/* On short screens, allow scrolling so buttons don't get pushed off-screen */
@media (max-height: 740px) {
  body {
    overflow-y: auto;
    align-items: flex-start;
  }
}

canvas#bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transform: translate3d(0,0,0); /* Force GPU */
}

#hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 999;
}

.hp {
  position: absolute;
  bottom: -50px;
  animation: rise linear forwards;
  will-change: transform, opacity;
}

@keyframes rise {
  to {
    transform: translate3d(0, -115vh, 0) rotate(720deg) scale(0);
    opacity: 0;
  }
}

.snd-btn {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  font-size: 17px;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .2s, opacity .2s;
}

.snd-btn:hover {
  transform: scale(1.1);
}

#blur-ov {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: backdrop-filter .8s, -webkit-backdrop-filter .8s;
  pointer-events: none;
  z-index: 5;
  will-change: backdrop-filter, -webkit-backdrop-filter;
}

#blur-ov.on {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (max-width: 768px) {
  #blur-ov.on {
    backdrop-filter: blur(6px); /* Reduced blur for mobile */
    -webkit-backdrop-filter: blur(6px);
  }
}
