/* birthday-candy（糖果生日）样式 */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: #5a4a6e;
  /* 马卡龙渐变背景：奶粉 → 薄荷 → 淡黄 */
  background: linear-gradient(160deg, #ffe3ef 0%, #d8f6ee 48%, #fff3c9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.card {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 28px;
  margin: 0 20px;
  max-width: 520px;
  width: 100%;
  border-radius: 24px;
  background: #fffdfb;
  /* 彩色波点边框 */
  border: 4px solid transparent;
  background-image: linear-gradient(#fffdfb, #fffdfb),
    repeating-linear-gradient(90deg,
      #ff9ec3 0 14px, #ffd166 14px 28px, #8adfd0 28px 42px,
      #c3aef7 42px 56px, #ffb29e 56px 70px, #7dc4ff 70px 84px);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 12px 40px rgba(90, 74, 110, 0.18);
  animation: card-in 1s ease both;
}

.cupcake { font-size: 46px; margin-bottom: 6px; }

.title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ff7eb0;
  text-shadow: 1px 2px 0 #ffe3ef;
  margin-bottom: 14px;
}

.to {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #7a5fd0;
}

.age {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff9ec3, #ffb29e);
  border-radius: 999px;
  padding: 4px 16px;
  margin-bottom: 14px;
  box-shadow: 0 3px 10px rgba(255, 158, 195, 0.4);
}

.msg {
  white-space: pre-wrap;
  font-size: 17px;
  line-height: 1.9;
  min-height: 1.9em;
}

.from { margin-top: 24px; font-size: 15px; color: #8b7a9e; }
.date { margin-top: 8px; font-size: 13px; color: #b3a5c4; letter-spacing: 1px; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
