/* ------------------------------
   Global stage system
-------------------------------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.stage {
  min-height: 100vh;
  width: 100%;
  display: none;
}

.stage.active {
  display: block;
}

.stage-center {
  display: none;
  place-items: center;
  padding: 48px 16px;
}

.stage-center.active {
  display: grid;
}

.stage-btn {
  border: 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  margin-top: 24px;
}

.stage-header {
  text-align: center;
  margin-bottom: 18px;
}

.stage-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: center;
  z-index: 50;
}

/* ------------------------------
   Password lock screen
-------------------------------- */
.lockscreen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #b9e3ff, #1b2b5b);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 24px;
}

.lockscreen.hidden {
  display: none;
}

.lock-card {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.lock-title {
  margin: 0 0 8px 0;
  font-size: 26px;
  color: #0f1a3a;
}

.lock-subtitle {
  margin: 0 0 14px 0;
  color: #4a4a4a;
}

.lock-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 16px;
  outline: none;
}

.lock-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 0;
  background: #0f3d91;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.lock-error {
  margin: 10px 0 0 0;
  color: #b00020;
  min-height: 20px;
}

.lock-hint {
  margin: 12px 0 0 0;
  color: #666;
  font-size: 14px;
}

/* Mobile Warning  */
/* Mobile Warning Styles */
.mobile-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.mobile-warning.hidden {
    display: none;
}

.mobile-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-card h1 {
    font-size: 3rem;
    margin: 0 0 20px 0;
}

.mobile-card h2 {
    color: #667eea;
    margin: 0 0 15px 0;
    font-size: 1.8rem;
}

.mobile-card p {
    color: #666;
    font-size: 1.1rem;
    margin: 10px 0;
    line-height: 1.6;
}

.mobile-continue-btn {
    margin-top: 25px;
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-continue-btn:hover {
    background: #764ba2;
    transform: scale(1.05);
}
/* ------------------------------
   Stage 1 Intro (GSAP) CSS
-------------------------------- */
#stage-intro {
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #0b1020;
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#stage-intro .container {
  visibility: hidden;
  position: relative;
  height: 100vh;
  width: 100%;
}

#stage-intro .one,
#stage-intro .three,
#stage-intro .four,
#stage-intro .five,
#stage-intro .six,
#stage-intro .seven,
#stage-intro .eight,
#stage-intro .nine {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
}

#stage-intro h1,
#stage-intro h3,
#stage-intro p {
  margin: 10px 0;
}

#stage-intro .one h1 {
  font-size: clamp(28px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: 0.5px;
}

#stage-intro #name {
  padding-top: 30px;
  color: #7fcef8;
}

#stage-intro .two {
  font-size: clamp(16px, 2.4vw, 22px);
  opacity: 0.95;
}

#stage-intro .three p {
  font-size: clamp(22px, 4vw, 44px);
  font-weight: 800;
}

#stage-intro .text-box {
  width: min(620px, 92vw);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

#stage-intro .hbd-chatbox {
  margin: 0;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.35;
}

#stage-intro .hbd-chatbox span {
  visibility: hidden;
}

#stage-intro .fake-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  width: fit-content;
  font-weight: 700;
  user-select: none;
}

#stage-intro .five p {
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 700;
}

#stage-intro .idea-3 strong {
  padding: 0 8px;
  border-radius: 10px;
}

#stage-intro .idea-6 {
  display: flex;
  gap: 14px;
  font-size: clamp(46px, 7vw, 88px);
  font-weight: 900;
  letter-spacing: 6px;
}

#stage-intro .six {
  gap: 18px;
}

#stage-intro .girl-dp {
  width: min(300px, 60vw);
  max-width: 300px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  object-fit: cover;
}

#stage-intro .wish-hbd {
  font-size: clamp(22px, 4vw, 44px);
  margin: 0;
  font-weight: 900;
}

#stage-intro .wish h5 {
  font-size: clamp(14px, 2.2vw, 18px);
  margin: 10px 0 0 0;
  opacity: 0.95;
}

#stage-intro .seven {
  pointer-events: none;
}

#stage-intro .baloons {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

#stage-intro .baloons img {
  width: 70px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.95;
}

#stage-intro .baloons img:nth-child(3n + 1) {
  left: 22%;
}

#stage-intro .baloons img:nth-child(3n + 2) {
  left: 50%;
}

#stage-intro .baloons img:nth-child(3n + 3) {
  left: 78%;
}

#stage-intro .eight svg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  fill: #7fcef8;
  visibility: hidden;
  opacity: 0.7;
}

#stage-intro .nine {
  justify-content: flex-end;
  padding-bottom: 40px;
  gap: 10px;
}

#stage-intro #replay {
  text-decoration: underline;
  cursor: pointer;
}

/* ------------------------------
   Stage 2 Card CSS
-------------------------------- */
@import url("https://fonts.googleapis.com/css?family=Poiret+One");

#stage-card {
  background-color: #ddd;
  font-family: "Poiret One", "Segoe UI Light", cursive;
}

.card-wrap {
  position: relative;
}

#card {
  position: relative;
  width: 460px;
  height: 260px;
  left: 50%;
  margin-left: -230px;
}

@media (max-width: 520px) {
  #card {
    width: 320px;
    margin-left: -160px;
    transform: scale(0.85);
    transform-origin: top center;
  }
}

.heart {
  width: 260px;
  height: 260px;
  float: left;
}

.heart #circle {
  height: 130px;
  width: 130px;
  border-radius: 50%;
  background-color: #d32f2f;
}

.heart #rec {
  margin-top: -60px;
  width: 130px;
  height: 130px;
  background-color: #d32f2f;
  border-radius: 35% 0 0 0;
}

.heart #half2 {
  transform: rotate(-90deg);
  margin-top: -330px;
  margin-left: -200px;
}

#heart2 {
  margin-top: -60px;
  margin-left: -130px;
}

#heart2 #circle,
#heart2 #rec {
  background-color: #fff;
}

#heart2 #half2 #rec {
  border-bottom: 1px solid #eee;
  margin-top: -61px;
}

#message {
  float: left;
  width: 200px;
  height: 200px;
  margin-left: -130px;
  background-color: #333;
  border-radius: 35% 0 35% 0;
  text-align: center;
}

#message h2 {
  font-size: 20px;
  color: #fff;
  width: 160px;
  margin-top: 20px;
  margin-left: 16px;
}

#heart1 {
  transform: rotate(180deg);
  animation: closeLeft 2s ease-in-out forwards;
}

#heart2 {
  animation: closeRight 2s ease-in-out forwards;
}

#card:hover #heart1 {
  animation: openLeft 2s ease-in-out forwards;
}

#card:hover #heart2 {
  animation: openRight 2s ease-in-out forwards;
}

.card-wrap.open #heart1 {
  animation: openLeft 2s ease-in-out forwards;
}

.card-wrap.open #heart2 {
  animation: openRight 2s ease-in-out forwards;
}

@keyframes closeLeft {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(180deg);
  }
}

@keyframes openLeft {
  from {
    transform: rotateY(180deg);
  }
  to {
    transform: rotateY(0deg);
  }
}

@keyframes openRight {
  0% {
    transform: rotateX(180deg);
  }
  100% {
    transform: rotateX(0deg) rotateZ(180deg);
  }
}

@keyframes closeRight {
  from {
    transform: rotateX(0deg) rotate(180deg);
  }
  to {
    transform: rotateX(180deg);
  }
}

/* ------------------------------
   Stage 3 Penguin CSS + Photos
-------------------------------- */
:root {
  --penguin-face: white;
  --penguin-picorna: orange;
  --penguin-skin: gray;
}

#stage-penguin {
  background: linear-gradient(45deg, rgb(118, 201, 255), rgb(247, 255, 222));
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.left-mountain {
  width: 300px;
  height: 300px;
  background: linear-gradient(rgb(203, 241, 228), rgb(80, 183, 255));
  position: absolute;
  transform: skew(0deg, 44deg);
  z-index: 2;
  margin-top: 100px;
}

.back-mountain {
  width: 300px;
  height: 300px;
  background: linear-gradient(rgb(203, 241, 228), rgb(47, 170, 255));
  position: absolute;
  z-index: 1;
  transform: rotate(45deg);
  left: 110px;
  top: 225px;
}

.sun {
  width: 200px;
  height: 200px;
  background-color: yellow;
  position: absolute;
  border-radius: 50%;
  top: -75px;
  right: -75px;
}

.penguin {
  width: 300px;
  height: 300px;
  margin: auto;
  margin-top: 75px;
  z-index: 4;
  position: relative;
  transition: transform 1s ease-in-out 0ms;
}

.penguin * {
  position: absolute;
}

.penguin:active {
  transform: scale(1.5);
  cursor: not-allowed;
}

.penguin-head {
  width: 50%;
  height: 45%;
  background: linear-gradient(45deg, var(--penguin-skin), rgb(239, 240, 228));
  border-radius: 70% 70% 65% 65%;
  top: 10%;
  left: 25%;
  z-index: 1;
}

.face {
  width: 60%;
  height: 70%;
  background-color: var(--penguin-face);
  border-radius: 70% 70% 60% 60%;
  top: 15%;
}

.face.left {
  left: 5%;
}

.face.right {
  right: 5%;
}

.chin {
  width: 90%;
  height: 70%;
  background-color: var(--penguin-face);
  top: 25%;
  left: 5%;
  border-radius: 70% 70% 100% 100%;
}

.eye {
  width: 15%;
  height: 17%;
  background-color: black;
  top: 45%;
  border-radius: 50%;
}

.eye.left {
  left: 25%;
}

.eye.right {
  right: 25%;
}

.eye-lid {
  width: 150%;
  height: 100%;
  background-color: var(--penguin-face);
  top: 25%;
  left: -23%;
  border-radius: 50%;
}

.blush {
  width: 15%;
  height: 10%;
  background-color: pink;
  top: 65%;
  border-radius: 50%;
}

.blush.left {
  left: 15%;
}

.blush.right {
  right: 15%;
}

.beak {
  height: 10%;
  background-color: var(--penguin-picorna);
  border-radius: 50%;
}

.beak.top {
  width: 20%;
  top: 60%;
  left: 40%;
}

.beak.bottom {
  width: 16%;
  top: 65%;
  left: 42%;
}

.shirt {
  font: bold 22px Helvetica, sans-serif;
  top: 180px;
  left: 118px;
  z-index: 1;
  color: #6a6969;
}

.shirt div {
  font-weight: initial;
  /* top: 10px; */
  left: 20px;
}

.penguin-body {
  width: 53%;
  height: 45%;
  background: linear-gradient(
    45deg,
    rgb(134, 133, 133) 0%,
    rgb(234, 231, 231) 25%,
    white 67%
  );
  border-radius: 80% 80% 100% 100%;
  top: 40%;
  left: 23.5%;
}

.penguin-body::before {
  content: "";
  position: absolute;
  width: 50%;
  height: 45%;
  background-color: var(--penguin-skin);
  top: 10%;
  left: 25%;
  border-radius: 0% 0% 100% 100%;
  opacity: 70%;
}

.arm {
  width: 30%;
  height: 60%;
  background: linear-gradient(90deg, var(--penguin-skin), rgb(209, 210, 199));
  border-radius: 30% 30% 30% 120%;
  z-index: -1;
}

.arm.left {
  top: 35%;
  left: 5%;
  transform-origin: top left;
  transform: rotate(130deg) scaleX(-1);
  animation: 3s linear infinite wave;
}

.arm.right {
  top: 10%;
  right: -10%;
  transform: rotate(-45deg);
}

@keyframes wave {
  10% {
    transform: rotate(110deg) scaleX(-1);
  }
  20% {
    transform: rotate(130deg) scaleX(-1);
  }
  30% {
    transform: rotate(110deg) scaleX(-1);
  }
  40% {
    transform: rotate(130deg) scaleX(-1);
  }
}

.foot {
  width: 15%;
  height: 30%;
  background-color: var(--penguin-picorna);
  top: 85%;
  border-radius: 50%;
  z-index: -1;
}

.foot.left {
  left: 25%;
  transform: rotate(80deg);
}

.foot.right {
  right: 25%;
  transform: rotate(-80deg);
}

.ground {
  width: 100vw;
  background: linear-gradient(90deg, rgb(88, 175, 236), rgb(182, 255, 255));
  z-index: 3;
  position: absolute;
  margin-top: -58px;
  height: calc(100vh - 300px);
}

/* Photos below penguin */
#stage-penguin .penguin-photos {
  position: absolute;
  left: 50%;
  /* bottom: 22px; */
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

#stage-penguin .penguin-photos img {
  width: min(180px, 26vw);
  height: 300px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.7);
}

@media (max-width: 700px) {
  #stage-penguin .penguin-photos {
    gap: 8px;
    padding: 8px;
  }

  #stage-penguin .penguin-photos img {
    height: 90px;
  }
}

/* ------------------------------
   Stage 4 Heart CSS
-------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Bellota:ital@1&display=swap");

#stage-heart.active {
  display: flex;
}

.stage-heart {
  height: 100vh;
  background-color: #fa9e8c;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  overflow: hidden;
}

.wish-container {
  position: relative;
  height: 1.15em;
  width: 100%;
  font-size: 4rem;
  cursor: pointer;
}

.wish-container:hover .upper-text {
  top: -34px;
}

.wish-container:hover .lower-text {
  bottom: -25px;
}

.wish-container:hover .inside-text {
  color: #b31b1b;
  font-size: 2rem;
  text-shadow: 2.3px 2.3px 2.3px #8a070780;
}

.wish-container div {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  font-family: "Bellota", system-ui;
  text-align: center;
  transition: all 1s ease;
}

.upper-text {
  top: 0;
  height: 50%;
  background-color: #fa9e8c;
  color: #fbceb1;
  text-transform: uppercase;
  z-index: 3;
  overflow: hidden;
}

.lower-text {
  bottom: 0;
  height: 100%;
  background: linear-gradient(180deg, #fa9e8c 50%, #fbceb1 50%);
  color: transparent;
  background-clip: text;
  text-transform: uppercase;
  z-index: 1;
}

.inside-text {
  top: 40%;
  transform: translateY(-40%);
  color: #fa9e8c;
  font-size: 0.1rem;
  text-transform: capitalize;
  z-index: 2;
}

.heart-container {
  position: relative;
  display: table;
}

.box {
  height: 25px;
  width: 25px;
  transform: translate(0, 0);
  background: #ff0000;
  border-radius: 3px;
  float: left;
  margin: 0 2px 2px 0;
  opacity: 0;
}

.clear {
  clear: left;
}

.transparent-bg {
  background: none;
}

.box:not(.transparent-bg) {
  animation: heartAnim 6s ease infinite;
  transition: all 1s ease;
}

@keyframes heartAnim {
  0% {
    background: #ff0000;
    transform: translate(0, -24vh);
    opacity: 0;
  }

  24%,
  76% {
    background: #8a0707;
    transform: translate(0, 0);
    opacity: 1;
  }

  100% {
    background: #ff0000;
    transform: translate(0, 24vh);
    opacity: 0;
  }
}

.delay-1 {
  animation-delay: 0.5s !important;
}

.delay-2 {
  animation-delay: 0.6s !important;
}

.delay-3 {
  animation-delay: 0.7s !important;
}

.delay-4 {
  animation-delay: 0.8s !important;
}

.delay-5 {
  animation-delay: 0.9s !important;
}

.delay-6 {
  animation-delay: 1s !important;
}

.delay-7 {
  animation-delay: 1.1s !important;
}

.delay-8 {
  animation-delay: 1.2s !important;
}

.delay-9 {
  animation-delay: 1.3s !important;
}

.delay-10 {
  animation-delay: 1.4s !important;
}

/* ------------------------------
   Stage 5 Final message CSS
-------------------------------- */
#stage-final.active {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#stage-final {
  display: none;
  min-height: 100vh;
  position: relative;
  padding: 72px 16px 24px;
  font-family: "Dancing Script", cursive;
}

.top-right-decoration {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
  max-width: 100%;
  height: auto;
}

.top-left-decoration {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .top-right-decoration,
  .top-left-decoration {
    max-width: 30%;
  }
}

.final-container {
  width: min(920px, 100%);
}

.title h1 {
  font-weight: bold;
  font-style: normal;
  font-size: 42px;
  margin: 32px 0;
  color: #0f3d91;
  text-align: center;
}

.title h2 {
  font-style: normal;
  margin: 18px 0;
  padding: 0;
  font-size: 24px;
  color: #2a2a2a;
  line-height: 1.25;
}

.sender {
  color: #0f3d91;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin: 24px 0 0;
}