* {
  box-sizing: border-box;
}

:root {
  --bg: #140815;
  --card: rgba(255, 255, 255, 0.11);
  --card-border: rgba(255, 255, 255, 0.18);
  --text: #fff7fb;
  --muted: rgba(255, 247, 251, 0.72);
  --pink: #ff8ab3;
  --deep-pink: #ff5c9b;
  --gold: #ffd08a;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 92, 155, 0.45), transparent 35%),
    radial-gradient(circle at bottom right, rgba(255, 208, 138, 0.35), transparent 35%),
    linear-gradient(135deg, #140815, #2b1026 55%, #100611);
  overflow-x: hidden;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 20% 70%, rgba(255, 138, 179, 0.12), transparent 25%);
}

.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.heart {
  position: absolute;
  bottom: -40px;
  color: rgba(255, 255, 255, 0.55);
  animation: rise linear forwards;
}

@keyframes rise {
  to {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

.app {
  position: relative;
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.card {
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: 28px;
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.hero {
  padding: 44px 28px;
  text-align: center;
  margin-bottom: 20px;
}

.tag {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 64px);
  letter-spacing: -1px;
}

.subtitle {
  max-width: 680px;
  margin: 16px auto 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--gold);
  font-size: 15px;
}

.line {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hint {
  margin: 20px 0 0;
  color: var(--muted);
}

.player {
  position: relative;
  overflow: hidden;
  padding: 30px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 26px;
  align-items: center;
}

.cover {
  display: flex;
  justify-content: center;
}

.disc {
  width: 178px;
  height: 178px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at center, #1b0914 0 12%, transparent 13%),
    radial-gradient(circle, rgba(255, 255, 255, 0.16) 0 24%, transparent 25%),
    conic-gradient(from 20deg, #ff8ab3, #ffd08a, #ffffff, #ff5c9b, #ff8ab3);
  box-shadow: 0 0 48px rgba(255, 92, 155, 0.42);
}

.disc.playing {
  animation: spin 5s linear infinite;
}

.disc-core {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff7fb;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.small {
  margin: 0;
  font-size: 13px;
  color: var(--gold);
}

h2 {
  margin: 8px 0 10px;
  font-size: 28px;
}

#trackDesc {
  min-height: 52px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.progress-wrap {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--pink);
}

.controls {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 4px;
}

.controls button {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  font-size: 20px;
}

.controls .play {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, var(--deep-pink), var(--gold));
  box-shadow: 0 14px 34px rgba(255, 92, 155, 0.35);
}

.playlist,
.upload,
.wish {
  padding: 24px;
  margin-bottom: 20px;
}

.playlist {
  position: relative;
  overflow: hidden;
  min-height: 360px;
}

/* .renovation-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 208, 138, 0.26), transparent 32%),
    rgba(20, 8, 21, 0.62);
  backdrop-filter: blur(10px);
  pointer-events: auto;
} */
 .renovation-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: inherit;
  background: linear-gradient(135deg, #3a2638, #2b1b2d);
  pointer-events: auto;
}

.renovation-panel {
  width: min(300px, 82%);
  padding: 22px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 24px;
  background: rgba(255, 247, 251, 0.14);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.renovation-panel img {
  width: min(190px, 100%);
  display: block;
  margin: 0 auto 12px;
  filter: drop-shadow(0 18px 30px rgba(255, 92, 155, 0.28));
}

.renovation-panel p {
  margin: 0;
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 0 18px rgba(255, 208, 138, 0.32);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}

.section-title h3,
.upload h3 {
  margin: 0;
  font-size: 22px;
}

.section-title button,
.wish button {
  padding: 10px 16px;
  border-radius: 999px;
  color: #4a182e;
  background: var(--gold);
  font-size: 14px;
  font-weight: 700;
}

.track {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 12px;
  border-radius: 18px;
  color: var(--muted);
}

.track.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.13);
}

.track-index {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: var(--gold);
  font-size: 13px;
}

.track-main {
  flex: 1;
}

.track-title {
  margin: 0;
  font-size: 16px;
}

.track-desc {
  margin: 4px 0 0;
  font-size: 13px;
}

.upload p {
  margin: 8px 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

code {
  color: var(--gold);
}

.upload-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}

.upload-row span {
  color: var(--gold);
  font-size: 14px;
}

.upload-row input {
  color: var(--muted);
}

.wish {
  text-align: center;
}

.wish p {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
}

.wish h3 {
  margin: 10px 0 16px;
  font-size: 24px;
  line-height: 1.6;
}

.surprise {
  margin-top: 14px !important;
  min-height: 24px;
  color: var(--text) !important;
  line-height: 1.8;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  padding: 18px;
  align-items: center;
  justify-content: center;
  background: rgba(10, 3, 8, 0.72);
  z-index: 10;
}

.modal.show {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(680px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  padding: 34px;
  border-radius: 28px;
  background: #fff7fb;
  color: #4a182e;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.modal-card h2 {
  margin-top: 0;
}

.modal-card p {
  line-height: 1.9;
}

.close {
  position: absolute;
  right: 18px;
  top: 14px;
  color: #4a182e;
  background: transparent;
  font-size: 32px;
}

.sign {
  font-weight: 800;
}

@media (max-width: 720px) {
  .app {
    width: min(100% - 24px, 960px);
    padding: 24px 0;
  }

  .player {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .route {
    gap: 8px;
  }

  .line {
    width: 76px;
  }

  .upload-row {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .renovation-overlay {
    padding: 18px;
  }

  .renovation-panel {
    width: min(260px, 92%);
    padding: 18px 16px 16px;
  }

  .renovation-panel p {
    font-size: 18px;
  }
}


.photo-wall,
.love-envelope {
  padding: 24px;
  margin-bottom: 20px;
}

.photo-intro {
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.photo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 48px rgba(255, 92, 155, 0.20);
}

.photo-card img {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
}

.photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 16px 16px;
  background: linear-gradient(transparent, rgba(20, 8, 21, 0.88));
}

.photo-caption h4 {
  margin: 0;
  font-size: 17px;
}

.photo-caption p {
  margin: 5px 0 0;
  color: rgba(255, 247, 251, 0.78);
  font-size: 13px;
  line-height: 1.5;
}

.photo-modal-card {
  width: min(760px, 100%);
  padding: 22px;
}

.photo-modal-card img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 22px;
  background: #2b1026;
}

.photo-modal-card h2 {
  margin: 18px 0 8px;
}

.photo-modal-card p {
  margin-bottom: 0;
}

.love-envelope {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: center;
}

.envelope-left h3 {
  margin: 8px 0 10px;
  font-size: 28px;
}

.envelope-left p:not(.small) {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.envelope-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.envelope-card {
  position: relative;
  min-height: 168px;
  padding: 22px 18px;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 208, 138, 0.98), rgba(255, 138, 179, 0.96));
  color: #4a182e;
  box-shadow: 0 20px 48px rgba(255, 92, 155, 0.22);
  cursor: pointer;
  transition: transform 0.25s ease;
}

.envelope-card:hover {
  transform: rotate(-1deg) translateY(-5px);
}

.envelope-card::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -48px;
  height: 116px;
  background: rgba(255, 255, 255, 0.28);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.envelope-card::after {
  content: "♥";
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: rgba(74, 24, 46, 0.35);
  font-size: 30px;
}

.envelope-card h4 {
  position: relative;
  margin: 0 0 8px;
  font-size: 19px;
  z-index: 1;
}

.envelope-card p {
  position: relative;
  margin: 0;
  color: rgba(74, 24, 46, 0.72);
  font-size: 13px;
  line-height: 1.6;
  z-index: 1;
}

.letter-tag {
  margin: 0 0 8px !important;
  color: #ff5c9b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.envelope-modal-card {
  background:
    radial-gradient(circle at top left, rgba(255, 138, 179, 0.22), transparent 35%),
    #fff7fb;
}

#envelopeBody p {
  line-height: 1.95;
  margin: 12px 0;
}

@media (max-width: 860px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .love-envelope {
    grid-template-columns: 1fr;
  }

  .envelope-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .photo-card,
  .photo-card img {
    min-height: 240px;
    height: 240px;
  }
}


.wall-upload-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
}

.wall-upload-panel input {
  display: none;
}

.wall-upload-btn,
#clearLocalMediaBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #4a182e;
  background: var(--gold);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

#clearLocalMediaBtn {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

.photo-card video {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
}

.video-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at center, transparent 40%, rgba(20, 8, 21, 0.18));
  pointer-events: none;
}

.video-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 8, 21, 0.62);
  color: #fff7fb;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.photo-modal-media {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 22px;
  background: #2b1026;
}

@media (max-width: 520px) {
  .photo-card video {
    min-height: 240px;
    height: 240px;
  }

  .wall-upload-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .wall-upload-btn,
  #clearLocalMediaBtn {
    width: 100%;
  }
}



/* 手指触碰弹出大爱心和提示词 */
.touch-love-pop {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  animation: touchLoveFloat 1.35s ease-out forwards;
}

.touch-love-heart {
  font-size: 72px;
  line-height: 1;
  color: #ff8ab3;
  text-shadow:
    0 0 18px rgba(255, 138, 179, 0.75),
    0 0 38px rgba(255, 92, 155, 0.45);
}

.touch-love-text {
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #4a182e;
  background: rgba(255, 247, 251, 0.92);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 32px rgba(255, 92, 155, 0.28);
}

@keyframes touchLoveFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.12);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -145%) scale(1.35);
  }
}

@media (max-width: 520px) {
  .touch-love-heart {
    font-size: 62px;
  }

  .touch-love-text {
    font-size: 14px;
  }
}

.photo-intro,
.wall-upload-panel,
#photoTipBtn {
  display: none;
}

.upload {
  display: none;
}

/* 生日网页密码锁 */
body.locked {
  overflow: hidden;
}

.password-lock {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(255, 92, 155, 0.52), transparent 35%),
    radial-gradient(circle at bottom right, rgba(255, 208, 138, 0.35), transparent 35%),
    rgba(20, 8, 21, 0.92);
  backdrop-filter: blur(18px);
}

.password-card {
  width: min(420px, 100%);
  padding: 34px 26px;
  border-radius: 28px;
  text-align: center;
  color: #fff7fb;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.password-card h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.password-card p {
  margin: 0 0 20px;
  color: rgba(255, 247, 251, 0.75);
  line-height: 1.7;
}

.password-card input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: none;
  outline: none;
  border-radius: 999px;
  font-size: 16px;
  text-align: center;
  color: #4a182e;
  background: rgba(255, 247, 251, 0.95);
}

.password-card button {
  width: 100%;
  height: 46px;
  margin-top: 14px;
  border-radius: 999px;
  color: #4a182e;
  background: linear-gradient(135deg, #ff8ab3, #ffd08a);
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 14px 32px rgba(255, 92, 155, 0.35);
}

.password-error {
  min-height: 24px;
  margin-top: 12px !important;
  color: #ffd08a !important;
  font-size: 14px;
}

.password-heart {
  font-size: 48px;
  margin-bottom: 10px;
}

.love-box-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 3, 8, 0.76);
  backdrop-filter: blur(14px);
}

.love-box-modal.show {
  display: flex;
}

.love-box-card {
  position: relative;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 34px 26px 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(255, 138, 179, 0.30), transparent 36%),
    linear-gradient(135deg, #4a2f46, #281628);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  text-align: center;
}

.love-box-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 2;
  color: #fff7fb;
  background: transparent;
  font-size: 34px;
  line-height: 1;
}

.love-box-closed {
  display: grid;
  min-height: 330px;
  place-items: center;
}

.love-heart-box {
  position: relative;
  width: 190px;
  height: 170px;
  border: none;
  background: transparent;
  cursor: pointer;
  animation: loveHeartbeat 1.15s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(255, 92, 155, 0.45));
}

.heart-lock {
  display: block;
  color: #ff6fa8;
  font-size: 150px;
  line-height: 1;
  text-shadow:
    0 0 18px rgba(255, 138, 179, 0.78),
    0 0 46px rgba(255, 92, 155, 0.42);
}

.lock-dot {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 247, 251, 0.94);
  font-size: 28px;
  box-shadow: 0 12px 28px rgba(74, 24, 46, 0.22);
}

@keyframes loveHeartbeat {
  0%,
  100% {
    transform: scale(1);
  }

  18% {
    transform: scale(1.12);
  }

  34% {
    transform: scale(0.96);
  }

  52% {
    transform: scale(1.08);
  }

  70% {
    transform: scale(1);
  }
}

.love-box-closed h2 {
  margin: 18px 0 6px;
  color: #fff7fb;
  font-size: 30px;
}

.love-box-closed p,
.love-box-opened p {
  margin: 0;
  color: rgba(255, 247, 251, 0.76);
  line-height: 1.7;
}

.love-box-opened {
  display: none;
}

.love-box-opened img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  display: block;
  border-radius: 22px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
}

.love-box-opened p {
  margin-top: 16px;
}

.love-box-modal.opened .love-box-closed {
  display: none;
}

.love-box-modal.opened .love-box-opened {
  display: block;
}

@media (max-width: 560px) {
  .love-box-card {
    padding: 30px 18px 24px;
  }

  .heart-lock {
    font-size: 128px;
  }

  .love-heart-box {
    width: 164px;
    height: 146px;
  }
}

.floating-cake-button {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 80;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #4a182e;
  background: linear-gradient(135deg, #ff8ab3, #ffd08a);
  box-shadow:
    0 18px 38px rgba(255, 92, 155, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
  isolation: isolate;
}

.floating-cake-icon {
  position: relative;
  z-index: 1;
  font-size: 34px;
  line-height: 1;
  animation: floatingCakeBeat 1.45s ease-in-out infinite;
}

.floating-cake-pulse {
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: rgba(255, 138, 179, 0.28);
  animation: floatingCakePulse 1.8s ease-out infinite;
  z-index: -1;
}

@keyframes floatingCakeBeat {
  0%,
  100% {
    transform: scale(1);
  }

  28% {
    transform: scale(1.12);
  }

  44% {
    transform: scale(0.96);
  }

  62% {
    transform: scale(1.08);
  }
}

@keyframes floatingCakePulse {
  0% {
    opacity: 0.78;
    transform: scale(0.82);
  }

  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

.birthday-cake-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(255, 92, 155, 0.42), transparent 36%),
    radial-gradient(circle at bottom right, rgba(255, 208, 138, 0.28), transparent 34%),
    rgba(10, 3, 8, 0.86);
  backdrop-filter: blur(16px);
}

.birthday-cake-modal.show {
  display: flex;
}

.birthday-cake-shell {
  position: relative;
  width: min(760px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px 26px 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 247, 251, 0.13), transparent 30%),
    linear-gradient(135deg, #4a2f46, #261426);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
  text-align: center;
}

.birthday-cake-close {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff7fb;
  background: rgba(255, 255, 255, 0.12);
  font-size: 30px;
  line-height: 1;
}

.birthday-cake-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.birthday-cake-shell h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
}

.birthday-cake-tip {
  margin: 10px auto 18px;
  max-width: 560px;
  color: rgba(255, 247, 251, 0.76);
  line-height: 1.7;
}

.birthday-cake-music {
  margin: 8px 0 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.birthday-cake-stage {
  position: relative;
  width: min(560px, 100%);
  min-height: 430px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 32px 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 138, 179, 0.22), transparent 34%),
    radial-gradient(circle at 72% 28%, rgba(255, 208, 138, 0.18), transparent 30%),
    rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.love-cake {
  position: relative;
  width: min(390px, 80vw);
  height: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  filter: drop-shadow(0 28px 48px rgba(255, 92, 155, 0.25));
  animation: loveCakeFloat 2.8s ease-in-out infinite;
}

@keyframes loveCakeFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.love-cake-candles {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 5;
  display: flex;
  gap: 22px;
  align-items: flex-end;
  transform: translateX(-50%);
}

.love-candle {
  position: relative;
  width: 18px;
  height: 78px;
  border-radius: 999px 999px 5px 5px;
  background:
    repeating-linear-gradient(
      135deg,
      #fff7fb 0 9px,
      #ff8ab3 9px 15px
    );
  box-shadow: inset 0 -8px 0 rgba(74, 24, 46, 0.08);
}

.number-candle {
  width: 50px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 247, 251, 0.98), rgba(255, 208, 138, 0.94));
  border: 2px solid rgba(255, 138, 179, 0.86);
  box-shadow:
    0 12px 28px rgba(255, 92, 155, 0.22),
    inset 0 -10px 0 rgba(255, 138, 179, 0.18);
}

.candle-number {
  color: #ff5c9b;
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(74, 24, 46, 0.10);
}

.cake-age-label {
  margin: 0 0 8px -8px;
  color: var(--gold);
  font-size: 30px;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(255, 208, 138, 0.45);
}

.love-flame {
  position: absolute;
  left: 50%;
  top: -30px;
  width: 24px;
  height: 34px;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 70%, #fff7c2 0 24%, #ffd08a 36%, #ff8a55 76%);
  box-shadow:
    0 0 16px rgba(255, 208, 138, 0.9),
    0 0 36px rgba(255, 92, 155, 0.34);
  transform: translateX(-50%) rotate(8deg);
  transform-origin: 50% 100%;
  animation: loveFlameFlicker 0.82s ease-in-out infinite alternate;
}

.love-smoke {
  position: absolute;
  left: 50%;
  top: -26px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 247, 251, 0.72);
  opacity: 0;
  transform: translateX(-50%);
}

@keyframes loveFlameFlicker {
  from {
    transform: translateX(-50%) rotate(-7deg) scale(0.92);
  }

  to {
    transform: translateX(-50%) rotate(8deg) scale(1.08);
  }
}

.love-cake-layer {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 30px 30px 18px 18px;
  box-shadow:
    inset 0 10px 0 rgba(255, 255, 255, 0.22),
    inset 0 -12px 0 rgba(74, 24, 46, 0.08);
}

.love-cake-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 8%, rgba(255, 255, 255, 0.28) 36%, transparent 64%);
  transform: translateX(-110%);
  animation: cakeLayerShimmer 3s ease-in-out infinite;
}

.love-cake-layer-middle::after {
  animation-delay: 0.45s;
}

.love-cake-layer-bottom::after {
  animation-delay: 0.9s;
}

@keyframes cakeLayerShimmer {
  0%,
  42% {
    transform: translateX(-110%);
  }

  72%,
  100% {
    transform: translateX(110%);
  }
}

.love-cake-layer-top {
  width: 66%;
  height: 78px;
  background: linear-gradient(135deg, #fff7fb, #ffd8e8 54%, #ff8ab3);
  z-index: 3;
}

.love-cake-layer-middle {
  width: 84%;
  height: 86px;
  margin-top: -8px;
  background: linear-gradient(135deg, #ff6fa8, #ff9abf 55%, #ffd08a);
  z-index: 2;
}

.love-cake-layer-bottom {
  width: 100%;
  height: 94px;
  margin-top: -8px;
  background: linear-gradient(135deg, #ffd08a, #ff9abf 50%, #ff6fa8);
  z-index: 1;
}

.love-cake-plate {
  display: block;
  width: 112%;
  height: 24px;
  margin-top: -8px;
  border-radius: 999px;
  background: rgba(255, 247, 251, 0.9);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.cake-heart {
  position: absolute;
  color: rgba(255, 247, 251, 0.86);
  font-size: 20px;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.28);
  z-index: 2;
  animation: cakeHeartBeat 1.7s ease-in-out infinite;
}

@keyframes cakeHeartBeat {
  0%,
  100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.18);
  }
}

.cake-heart-one {
  left: 18%;
  top: 28%;
}

.cake-heart-two {
  right: 18%;
  top: 36%;
}

.cake-heart-three {
  left: 24%;
  top: 34%;
}

.cake-heart-four {
  right: 25%;
  top: 30%;
}

.cake-heart-five {
  left: 18%;
  top: 38%;
}

.cake-heart-six {
  right: 18%;
  top: 34%;
}

.cake-shine {
  position: absolute;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 208, 138, 0.5);
  animation: cakeShineTwinkle 1.6s ease-in-out infinite alternate;
}

.cake-shine-one {
  left: 16%;
  top: 18%;
  font-size: 36px;
}

.cake-shine-two {
  right: 16%;
  top: 24%;
  color: var(--pink);
  font-size: 30px;
  animation-delay: 0.35s;
}

.cake-shine-three {
  right: 22%;
  bottom: 20%;
  font-size: 30px;
  animation-delay: 0.65s;
}

@keyframes cakeShineTwinkle {
  from {
    opacity: 0.46;
    transform: scale(0.86) rotate(-8deg);
  }

  to {
    opacity: 1;
    transform: scale(1.08) rotate(8deg);
  }
}

.birthday-cake-stage.blown .love-flame {
  opacity: 0;
  transform: translateX(-50%) translateY(10px) scale(0.2);
  animation: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.birthday-cake-stage.blown .love-smoke {
  animation: loveSmokeRise 1.8s ease-out forwards;
}

.birthday-cake-stage.blown .love-candle:nth-child(2) .love-smoke {
  animation-delay: 0.12s;
}

.birthday-cake-stage.blown .love-candle:nth-child(3) .love-smoke {
  animation-delay: 0.24s;
}

@keyframes loveSmokeRise {
  0% {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.6);
  }

  28% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -72px) scale(2.8);
  }
}

.birthday-cake-progress {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  max-width: 430px;
  margin: 18px auto 0;
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
}

.birthday-cake-progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

#birthdayCakeProgressFill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8ab3, #ffd08a);
  transition: width 0.2s ease;
}

.birthday-cake-wish {
  min-height: 28px;
  margin: 16px auto 0;
  max-width: 560px;
  color: rgba(255, 247, 251, 0.84);
  line-height: 1.8;
}

.birthday-cake-carousel {
  display: none;
  margin: 20px auto 0;
  max-width: 560px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.birthday-cake-carousel.show {
  display: block;
  animation: carouselReveal 0.45s ease-out both;
}

@keyframes carouselReveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.carousel-title {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
}

.carousel-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  background: rgba(20, 8, 21, 0.46);
}

.carousel-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08) translateX(16px);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

.carousel-photo.active {
  opacity: 1;
  transform: scale(1) translateX(0);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 247, 251, 0.34);
  transition: width 0.22s ease, background 0.22s ease;
}

.carousel-dot.active {
  width: 24px;
  background: linear-gradient(90deg, #ff8ab3, #ffd08a);
}

@media (max-width: 560px) {
  .floating-cake-button {
    width: 58px;
    height: 58px;
  }

  .floating-cake-icon {
    font-size: 30px;
  }

  .birthday-cake-shell {
    padding: 30px 16px 22px;
  }

  .birthday-cake-stage {
    min-height: 360px;
    padding-inline: 10px;
  }

  .love-cake {
    animation: loveCakeFloatMobile 2.8s ease-in-out infinite;
  }
}

@keyframes loveCakeFloatMobile {
  0%,
  100% {
    transform: translateY(0) scale(0.82);
  }

  50% {
    transform: translateY(-10px) scale(0.82);
  }
}
.final-postcard {
  position: relative;
  overflow: hidden;
  padding: 30px 24px;
  margin-bottom: 20px;
  text-align: center;
}

.final-postcard::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(255, 208, 138, 0.38);
  border-radius: 22px;
  pointer-events: none;
}

.final-postcard h3 {
  position: relative;
  margin: 8px 0 10px;
  font-size: 28px;
}

.final-postcard p {
  position: relative;
  color: var(--muted);
  line-height: 1.8;
}

.final-postcard button {
  position: relative;
  margin-top: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  color: #4a182e;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(255, 92, 155, 0.24);
}

.final-postcard-modal-card {
  background:
    radial-gradient(circle at top left, rgba(255, 208, 138, 0.34), transparent 34%),
    linear-gradient(135deg, #fff7fb, #ffe4ef);
  border: 8px solid rgba(255, 208, 138, 0.48);
}

.final-postcard-body {
  margin-top: 16px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
}

.final-postcard-body p {
  margin: 0 0 14px;
  color: #4a182e;
  font-size: 17px;
  line-height: 2;
}

.final-postcard-body p:last-child {
  margin-bottom: 0;
  font-weight: 900;
}