@import url('https://fonts.googleapis.com/css?family=Damion');

* {
  box-sizing: border-box;
  font-weight: normal;
}

body.cake-body {
  font-family: 'Damion', cursive;
  background: rgb(251, 239, 236);
  background: radial-gradient(ellipse at center, rgba(251, 239, 236, 1) 0%, rgba(218, 180, 180, 1) 100%);
  height: 100vh;
  overflow: hidden;
  margin: 0;
}

.birthday .add,
.birthday .sa {
  margin-top: 40px;
  clear: both;
  font-family: 'Damion', cursive;
  background: transparent;
  border: 2px solid #e77572;
  color: #e77572;
  font-size: 22px;
  padding: 14px 28px;
  border-radius: 40px;
  transition: all 0.23s;
  outline: none;
  cursor: pointer;
}

.birthday .add:hover,
.birthday .sa:hover {
  background: #e77572;
  color: white;
}

.birthday_inner__modal {
  width: 500px;
  max-width: 92vw;
  position: absolute;
  left: 0;
  right: 0;
  transition: all 0.4s;
  margin: auto;
  text-align: center;
  top: 50%;
  transform: translateY(-50%) scale(0);
  background: white;
  border-radius: 20px;
  z-index: 2;
  padding: 40px 40px 100px 40px;
  box-shadow: 0 3px 10px 0 #E5B4B2;
}

.birthday_inner__modal .modal_image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(-60%);
}

.birthday_inner__modal .modal_image img {
  width: 100px;
}

.birthday_inner__modal h1 {
  color: #e77572;
  margin: 0;
}

.birthday_inner__modal p {
  font-family: georgia, serif;
  font-size: 13px;
  color: #b9918e;
}

.birthday_inner__modal button {
  background: #e77572;
  color: white;
  outline: none;
  padding: 20px;
  border: none;
  width: 100%;
  font-size: 20px;
  font-family: 'Damion', cursive;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
  transition: all 0.2s;
}

.birthday_inner__modal button:hover {
  background: #df6a67;
}

.birthday_inner__stage {
  width: 500px;
  max-width: 92vw;
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  text-align: center;
  top: 50%;
  display: none;
  transform: translateY(-50%);
}

.birthday_inner__stage.stage1 {
  display: block;
}

.birthday_inner__stage h1 {
  color: #e77572;
  margin: 0;
}

.birthday_inner__stage h2 {
  font-family: georgia, serif;
  font-size: 12px;
  color: #b9918e;
  line-height: 18px;
  margin: 0;
}

.birthday_inner__stage .mix {
  margin: 80px auto 10px;
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
}

.birthday_inner__stage .mix_bowl img {
  display: block;
  margin: 0 auto;
}

.birthday_inner__stage .mix_spoon {
  position: absolute;
  top: -37px;
  left: 50%;
  margin-left: 42px;
}

.birthday_inner__stage .mix_spoon.move img {
  animation: mix 1s linear;
}

.birthday_inner__stage img.intro {
  width: 300px;
  max-width: 80vw;
  transform: scale(0);
  animation: bounce 0.6s 1s forwards, moveup 0.6s 2s forwards;
  position: relative;
  top: 0;
}

.birthday_inner__stage .oven {
  margin-top: 50px;
  margin-bottom: -40px;
}

.birthday_inner__stage .oven img {
  width: 290px;
  max-width: 80vw;
  position: relative;
  left: -10px;
}

.birthday_inner__stage .tin img {
  width: 90px;
  cursor: grab;
}

.birthday_inner__stage .candle {
  position: relative;
  opacity: 0;
  animation: candle 1s 1.3s forwards;
  top: 10px;
  display: block;
  width: fit-content;
  margin: 0 auto 6px;
  text-align: center;
}

.birthday_inner__stage .candle img {
  width: 10px;
  display: block;
  margin: 0 auto;
}

.birthday_inner__stage .startagain {
  position: absolute;
  right: 0;
  top: 350px;
  font-size: 24px;
  color: #e77572;
  cursor: pointer;
}

.birthday_inner__stage .cakemake {
  margin-top: 230px;
  clear: both;
  text-align: center;
}

.birthday_inner__stage .cakemake .base,
.birthday_inner__stage .cakemake .sponge {
  height: 40px;
  margin: 0 auto -10px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  position: relative;
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.2) 5px, rgba(255, 255, 255, 0.2) 10px);
}

.birthday_inner__stage .cakemake .filling {
  height: 10px;
  margin: 0 auto -1px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  position: relative;
  z-index: 1;
  top: 9px;
}

.birthday_inner__stage .cakemake .base { width: 200px; background-color: #ffd296; }
.birthday_inner__stage .cakemake .sponge { width: 200px; }
.birthday_inner__stage .cakemake .filling { width: 200px; }

.birthday_inner__stage .cakemake .sponge div:nth-of-type(1),
.birthday_inner__stage .cakemake .base div:nth-of-type(1) { left: 6px; }
.birthday_inner__stage .cakemake .sponge div:nth-of-type(2),
.birthday_inner__stage .cakemake .base div:nth-of-type(2) { left: 26%; }
.birthday_inner__stage .cakemake .sponge div:nth-of-type(3),
.birthday_inner__stage .cakemake .base div:nth-of-type(3) { left: 46%; }
.birthday_inner__stage .cakemake .sponge div:nth-of-type(4),
.birthday_inner__stage .cakemake .base div:nth-of-type(4) { left: 66%; }
.birthday_inner__stage .cakemake .sponge div:nth-of-type(5),
.birthday_inner__stage .cakemake .base div:nth-of-type(5) { left: 86%; }

.birthday_inner__stage .cakemake .sponge div,
.birthday_inner__stage .cakemake .base div {
  width: 10px;
  height: 10px;
  position: absolute;
  border-radius: 100px;
  top: -5px;
  z-index: 4;
}

.birthday_inner__stage .cakemake .filling div {
  display: block;
  width: 12.5%;
  float: left;
  height: 16px;
  border-radius: 100%;
}

.birthday_inner__stage .cakemake .sponge-vanilla { background-color: #ffd296; }
.birthday_inner__stage .cakemake .sponge-vanilla div { background: #CAA068; }
.birthday_inner__stage .cakemake .sponge-strawberry { background-color: #ff99a3; }
.birthday_inner__stage .cakemake .sponge-strawberry div { background: #E27983; }
.birthday_inner__stage .cakemake .sponge-fruit { background-color: #d5ccb2; }
.birthday_inner__stage .cakemake .sponge-fruit div { background: #A9A088; }
.birthday_inner__stage .cakemake .filling-jam { background: #e75656; }
.birthday_inner__stage .cakemake .filling-jam div { background: #e75656; }
.birthday_inner__stage .cakemake .filling-cream { background: #fff; }
.birthday_inner__stage .cakemake .filling-cream div { background: #fff; }
.birthday_inner__stage .cakemake .filling-choc { background: #9f3d28; }
.birthday_inner__stage .cakemake .filling-choc div { background: #9f3d28; }
.birthday_inner__stage .cakemake .filling-lemon { background: #e8e086; }
.birthday_inner__stage .cakemake .filling-lemon div { background: #e8e086; }

.birthday_inner__stage .options {
  position: relative;
  left: 12px;
}

.birthday_inner__stage .options .sponges { margin-right: 40px; }
.birthday_inner__stage .options .inactive { opacity: 0.6; pointer-events: none; }
.birthday_inner__stage .options .sponges,
.birthday_inner__stage .options .fillings {
  float: left;
  position: relative;
}

.birthday_inner__stage .options h3 {
  text-align: left;
  color: #a25a58;
  font-size: 20px;
}

.birthday_inner__stage .options h5 {
  float: right;
  margin: 0;
  color: #e77572;
  position: absolute;
  top: 20px;
  right: 14px;
  font-size: 20px;
}

.birthday_inner__stage .options .item {
  float: left;
  margin-right: 14px;
}

.birthday_inner__stage .options .item_inner {
  cursor: pointer;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 0, 0, 0.07);
  border-radius: 8px;
  margin-bottom: 5px;
  transition: all 0.12s;
}

.birthday_inner__stage .options .item_inner:hover {
  border: 3px solid white;
}

.birthday_inner__stage .options .vanilla { background: #ffd296; }
.birthday_inner__stage .options .strawberry { background: #ff99a3; }
.birthday_inner__stage .options .fruit { background: #d5ccb2; }
.birthday_inner__stage .options .jam { background: #e75656; }
.birthday_inner__stage .options .cream { background: #fff; }
.birthday_inner__stage .options .choc { background: #9f3d28; }
.birthday_inner__stage .options .lemon { background: #e8e086; }
.birthday_inner__stage .options h4 { margin: 0; color: #e77572; }

.birthday_inner__stage button.start,
.birthday_inner__stage button.mixer {
  display: block;
  margin-left: auto;
  margin-right: auto;
  clear: both;
  font-family: 'Damion', cursive;
  background: transparent;
  border: 2px solid #e77572;
  color: #e77572;
  font-size: 22px;
  padding: 14px 28px;
  border-radius: 40px;
  transition: all 0.23s;
  outline: none;
  cursor: pointer;
}

.birthday_inner__stage button.start:hover,
.birthday_inner__stage button.mixer:hover {
  background: #e77572;
  color: white;
}

.birthday_inner__stage .start {
  margin-top: 30px;
  animation: in 0.8s 2.9s forwards;
  position: relative;
  top: -20px;
  opacity: 0;
}

.birthday_inner__stage .add {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.sa {
  margin: 70px auto 0;
  display: none;
}
.svg { margin-bottom: 40px; }
svg.cake-svg { width: 390px; max-width: 90vw; height: 90px; margin-bottom: -20px; display: none; }

.cake-back {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #fbcfe8;
  color: #ec4899;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  font-family: system-ui, sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cake-editor-preview {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
  border-radius: 1rem;
  border: 2px solid #fbcfe8;
  background: rgb(251, 239, 236);
}

@keyframes bounce {
  0% { transform: scale(0); }
  25% { transform: scale(1.06); }
  50% { transform: scale(0.965); }
  75% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes in { from { opacity: 0; } to { opacity: 1; } }
@keyframes moveup { from { top: 0; } to { top: -30px; } }
@keyframes mix {
  0% { transform: translateX(0); }
  50% { transform: translateX(28px); }
  100% { transform: translateX(0); }
}
@keyframes candle { from { opacity: 0; } to { opacity: 1; } }

svg.text path {
  animation: dash_loader 4s 2s forwards;
}

@keyframes dash_loader { to { stroke-dasharray: 920; } }

.cake-svg path,
.cake-svg polyline,
.cake-svg line {
  stroke-dasharray: 718;
  stroke-dashoffset: 750;
  stroke-width: 1px;
  stroke-miterlimit: 40;
  stroke-linejoin: round;
  fill: none;
  stroke: #e77572;
  opacity: 1;
}

/* Balloon finale (from Assets/Ballon) */
.cake-balloons {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  height: 150px;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}

.cake-balloons.is-visible {
  opacity: 1;
  visibility: visible;
}

.cake-balloons .balloon {
  width: 100%;
  margin: 0 auto;
  padding-top: 10px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(2px, 1.2vw, 10px);
  flex-wrap: nowrap;
  min-height: 120px;
}

.cake-balloons[data-count="7"] .balloon > div,
.cake-balloons[data-count="8"] .balloon > div {
  width: 58px;
  height: 78px;
}

.cake-balloons[data-count="9"] .balloon > div,
.cake-balloons[data-count="10"] .balloon > div {
  width: 50px;
  height: 68px;
}

.cake-balloons[data-count="11"] .balloon > div,
.cake-balloons[data-count="12"] .balloon > div {
  width: 44px;
  height: 60px;
}

.cake-balloons .balloon > div {
  width: 72px;
  height: 96px;
  border-radius: 80%;
  flex: 0 0 auto;
  position: relative;
  padding: 6px;
  box-shadow: inset 12px 5px 8px rgba(0, 0, 0, 0.08);
  transform-origin: bottom center;
}

.cake-balloons .balloon > div span {
  font-size: 2.4em;
  color: white;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  padding: 8px 4px 14px;
  word-break: break-word;
}

.cake-balloons .balloon > div::before {
  position: absolute;
  bottom: -9px;
  left: 50%;
  margin-left: -6px;
  content: "▲";
  font-size: 0.85em;
}

.cake-balloons .balloon-c0 { background: rgba(182, 15, 97, 0.9); box-shadow: inset 8px 8px 8px rgba(135, 11, 72, 0.9); }
.cake-balloons .balloon-c0::before { color: rgba(182, 15, 97, 0.9); }
.cake-balloons .balloon-c1 { background: rgba(242, 112, 45, 0.9); box-shadow: inset 8px 8px 8px rgba(222, 85, 14, 0.9); }
.cake-balloons .balloon-c1::before { color: rgba(242, 112, 45, 0.9); }
.cake-balloons .balloon-c2 { background: rgba(45, 181, 167, 0.9); box-shadow: inset 8px 8px 8px rgba(35, 140, 129, 0.9); }
.cake-balloons .balloon-c2::before { color: rgba(45, 181, 167, 0.9); }
.cake-balloons .balloon-c3 { background: rgba(190, 61, 244, 0.9); box-shadow: inset 8px 8px 8px rgba(173, 14, 240, 0.9); }
.cake-balloons .balloon-c3::before { color: rgba(190, 61, 244, 0.9); }
.cake-balloons .balloon-c4 { background: rgba(180, 224, 67, 0.9); box-shadow: inset 8px 8px 8px rgba(158, 206, 34, 0.9); }
.cake-balloons .balloon-c4::before { color: rgba(180, 224, 67, 0.9); }
.cake-balloons .balloon-c5 { background: rgba(242, 194, 58, 0.9); box-shadow: inset 8px 8px 8px rgba(234, 177, 15, 0.9); }
.cake-balloons .balloon-c5::before { color: rgba(242, 194, 58, 0.9); }

.cake-balloons .balloon-a0 { animation: balloon1 6s ease-in-out infinite; }
.cake-balloons .balloon-a1 { animation: balloon2 6s ease-in-out infinite; }
.cake-balloons .balloon-a2 { animation: balloon3 5s ease-in-out infinite; }
.cake-balloons .balloon-a3 { animation: balloon4 6s ease-in-out infinite; }

.balloon-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.balloon-editor-row .balloon-editor-input {
  flex: 1;
}

.balloon-editor-remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #fecdd3;
  color: #f472b6;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.balloon-editor-remove:hover {
  background: #fff1f2;
}

@keyframes balloon1 {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

@keyframes balloon2 {
  0%, 100% { transform: translateY(0) rotate(6deg); }
  50% { transform: translateY(-24px) rotate(-8deg); }
}

@keyframes balloon3 {
  0%, 100% { transform: translate(0, -8px) rotate(6deg); }
  50% { transform: translate(-14px, 22px) rotate(-8deg); }
}

@keyframes balloon4 {
  0%, 100% { transform: translate(8px, -8px) rotate(-8deg); }
  50% { transform: translate(-12px, 14px) rotate(10deg); }
}
