/* HBD v2 - modern glass + smooth motion */
.hbd-body, .hbd-stage {
  min-height: 100vh;
  margin: 0;
  color: #fff;
}

.hbd-body{
  background: linear-gradient(135deg, #feca57, #ff6b6b);
  font-family: 'Prompt', sans-serif;
}

.hbd-card{
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.9);
}

.hbd-card-head{
  padding: 22px 22px;
  color: #fff;
  background: linear-gradient(135deg, #ff9f43, #ee5253);
}

.hbd-btn{
  background: linear-gradient(135deg, #ff6b6b, #ee5253);
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hbd-btn:hover{ transform: translateY(-1px); box-shadow: 0 14px 35px rgba(0,0,0,.22); }

.hbd-preview{
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(14px);
  height: 100%;
}
.hbd-preview-top{
  padding: 18px 20px;
  background: rgba(0,0,0,.25);
  color: #fff;
}
.hbd-preview-body{
  padding: 18px 20px 22px;
  color: #fff;
}
.hbd-preview-name{ font-size: 1.7rem; font-weight: 700; margin-top: 10px; }
.hbd-preview-msg{ white-space: pre-wrap; opacity: .95; margin-top: 10px; line-height: 1.55; }
.hbd-preview-from{ margin-top: 14px; opacity: .8; }

/* Show page */
.hbd-main{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 12px;
  position: relative;
  overflow: hidden;
}

.hbd-title{
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  text-shadow: 0 8px 40px rgba(0,0,0,.35);
  margin-bottom: .25rem;
}
.hbd-name{
  font-size: clamp(2.2rem, 5.2vw, 3.8rem);
  font-weight: 800;
  color: #ffd166;
  text-shadow: 0 8px 40px rgba(0,0,0,.35);
  margin-bottom: 12px;
}

.hbd-glass{
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(14px);
  border-radius: 22px;
  padding: 20px 18px;
  width: min(680px, 92vw);
  box-shadow: 0 20px 70px rgba(0,0,0,.25);
}

.hbd-overlay{
  position: fixed;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(10px);
  z-index: 9999;
  cursor: pointer;
}
.hbd-badge{
  width: 86px; height: 86px;
  margin: 0 auto;
  display:flex; align-items:center; justify-content:center;
  border-radius: 24px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 2rem;
  color: #ffd166;
}

/* Toast */
.hbd-toast{
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  width: min(720px, 92vw);
}
.hbd-toast-inner{
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(14px);
}
.hbd-sharebar{
  display:flex;
  gap: 8px;
  align-items:center;
}
.hbd-sharebar input{
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.25) !important;
  color: #fff !important;
}

/* Cake */
.hbd-cake-wrap{ display:flex; justify-content:center; margin-top: 18px; }
.hbd-cake{
  position: relative;
  width: 260px;
  height: 210px;
  transform: scale(.92);
  transition: transform .2s ease;
}
.hbd-cake:hover{ transform: scale(.95); }

.layer{
  position:absolute;
  width: 260px;
  height: 105px;
  border-radius: 50%;
  background: var(--cake-color);
  box-shadow: 0 4px 0 rgba(0,0,0,.18), 0 30px 50px rgba(0,0,0,.35);
}
.layer-top{ top: 0; }
.layer-middle{ top: 34px; }
.layer-bottom{ top: 68px; }

.icing{
  position:absolute;
  top: 4px; left: 8px;
  width: 244px; height: 90px;
  background: var(--icing-color);
  border-radius: 50%;
  z-index: 2;
  opacity: .95;
}

.candle{
  position:absolute;
  top: -18px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 52px;
  background: #ff4757;
  border-radius: 9px;
  z-index: 5;
}

.flame{
  position:absolute;
  top: -52px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 36px;
  border-radius: 50% 50% 20% 20%;
  background: orange;
  box-shadow: 0 0 16px orange, 0 0 28px yellow;
  z-index: 6;
  animation: hbd-flicker 1s infinite alternate;
  transition: opacity .25s ease, transform .25s ease;
}
.flame.off{
  opacity: 0;
  transform: translateX(-50%) scale(.1);
}
@keyframes hbd-flicker{
  from{ transform: translateX(-50%) scale(1); }
  to{ transform: translateX(-50%) scale(1.12); }
}

.hbd-mic-btn{
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.38);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
}
.hbd-mic-btn.active{
  background: #ff4757;
  border-color: #ff4757;
  animation: hbd-pulse 1s infinite;
}
@keyframes hbd-pulse{
  0%{ box-shadow: 0 0 0 0 rgba(255,71,87,.7); }
  70%{ box-shadow: 0 0 0 16px rgba(255,71,87,0); }
  100%{ box-shadow: 0 0 0 0 rgba(255,71,87,0); }
}
