:root{
  --ink:#1f1f1f;
  --muted:rgba(0,0,0,.55);
  --card:#ffffffcc;
  --border:rgba(60,20,60,.15);
  --accent:#c2185b;
  --accent2:#7a1d44;
  --btn-bg:rgba(206, 64, 133, .12);

  /* Shared background image for all pages (served from this project folder). */
  --shared-bg-image: url("assets/bg.png");
  --bg-overlay-dark: linear-gradient(180deg, rgba(0,0,0,.68) 0%, rgba(0,0,0,.32) 100%);
}

/* Layout helpers */
body{
  margin:0;
  min-height:100vh;
  font-family: Arial, Helvetica, sans-serif;
}
.hidden{ display:none; }

/* Back button */
.back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background 0.2s ease;
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* QR scan */
.scan-bg{
  background-image: var(--bg-overlay-dark), var(--shared-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display:grid;
  place-items:center;
}

.login-bg{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:22px;
  background-image: var(--bg-overlay-dark), var(--shared-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.login-card{
  width:min(560px, 92vw);
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.22);
  border-radius:14px;
  padding:20px 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  color:#eaf0ff;
  text-align:center;
}

.login-title{
  margin: 6px 0 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing:.2px;
}

.login-subtitle{
  margin: 0 0 16px;
  color: rgba(235,243,255,.75);
  font-size: 13px;
}

.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 800;
  color: rgba(255,255,255,.95);
}

.login-label{
  display:block;
  text-align:left;
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(235,243,255,.85);
}

.login-input{
  width:100%;
  box-sizing:border-box;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.18);
  color: #fff;
  outline: none;
  font-size: 16px;
  font-weight: 800;
}

.login-input::placeholder{
  color: rgba(235,243,255,.55);
  font-weight: 700;
}

.login-error{
  min-height: 18px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #ffb6c7;
}

.login-btn{
  margin-top: 14px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(180deg, #bf2a6b 0%, #9b1f58 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(194,24,91,.25);
}

.card{
  width:min(560px, 92vw);
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.22);
  border-radius:14px;
  padding:18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  color:#eaf0ff;
}

.card-title{
  margin:6px 0 14px;
  font-size:20px;
  letter-spacing:.2px;
}

video{
  width:100%;
  height:280px;
  object-fit:cover;
  border-radius:10px;
  background:#000;
  border:1px solid rgba(255,255,255,.15);
  display:block;
}

.video-wrap{
  position:relative;
  width:100%;
}

.scan-frame{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width:66%;
  height:48%;
  border-radius:14px;
  border:3px solid rgba(255,255,255,.85);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.06);
  pointer-events:none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.scan-frame::before,
.scan-frame::after{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  border:3px solid rgba(0,229,255,.95);
  border-radius:6px;
  opacity:.9;
}

/* corners */
.scan-frame::before{ left:10px; top:10px; border-right:none; border-bottom:none; }
.scan-frame::after{ right:10px; top:10px; border-left:none; border-bottom:none; }

.scan-success .scan-frame{
  border-color: rgba(0,229,255,.95);
  transform: translate(-50%, -50%) scale(1.02);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.04), 0 0 32px rgba(0,229,255,.35);
}

.hint{
  margin:6px 0 0;
  font-size:13px;
  color: rgba(235,243,255,.7);
}

.row{
  display:flex;
  gap:10px;
  margin-top:12px;
}

.btn{
  flex:1;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color:#eaf0ff;
  cursor:pointer;
}

.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.muted{
  color:rgba(235,243,255,.75);
}

.result{
  margin:8px 0 0;
  padding:10px;
  background: rgba(0,0,0,.2);
  border:1px solid rgba(255,255,255,.15);
  border-radius:10px;
  white-space:pre-wrap;
  word-break:break-word;
  font-size:13px;
  min-height:40px;
}

/* Gift page (like screenshot) */
.gift-bg{
  background-image: var(--bg-overlay-dark), var(--shared-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display:grid;
  place-items:center;
  padding:20px;
}

.slide-card{
  width:min(520px, 92vw);
  background: rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.7);
  border-radius:18px;
  padding:26px 18px 18px;
  box-shadow: 0 18px 55px rgba(0,0,0,.15);
  text-align:center;
}

.rabbit-wrap{
  height:120px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:8px;
}

/* Two simple bunny shapes */
.bunny{
  position:relative;
  width:88px;
  height:74px;
  margin:0 6px;
}
.bunny-right{
  transform: translateX(-8px);
}
.ear{
  position:absolute;
  top:-10px;
  width:22px;
  height:30px;
  background:#f2f2f2;
  border:2px solid rgba(0,0,0,.08);
  border-bottom:none;
  border-radius:14px 14px 8px 8px;
}
.ear-l{ left:10px; transform: rotate(-8deg); }
.ear-r{ right:10px; transform: rotate(8deg); }
.face{
  position:absolute;
  left:18px;
  top:18px;
  width:52px;
  height:46px;
  background:#f2f2f2;
  border-radius:26px;
  border:2px solid rgba(0,0,0,.06);
}
.eye{
  position:absolute;
  top:34px;
  width:7px;
  height:7px;
  background:#3a3a3a;
  border-radius:50%;
}
.eye{ left:34px; }
.eye-r{ left:auto; right:34px; }
.nose{
  position:absolute;
  top:44px;
  left:41px;
  width:10px;
  height:7px;
  background:#ff9aa5;
  border-radius: 50% 50% 50% 50%;
}
.heart{
  position:absolute;
  top:22px;
  left:58px;
  width:14px;
  height:14px;
  transform: rotate(-18deg);
  background: transparent;
}
.heart::before,
.heart::after{
  content:"";
  position:absolute;
  left:6px;
  top:2px;
  width:6px;
  height:10px;
  background:#ff5c7a;
  border-radius: 6px 6px 0 0;
}
.heart::after{
  left:0px;
  transform: rotate(90deg);
}
.heart-red::before,
.heart-red::after{
  background:#e91e63;
}

.slide-title{
  margin:10px 0 18px;
  font-size:20px;
  font-weight:800;
  color:#222;
}

.dots{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:18px 0 14px;
}
.dot{
  width:12px;
  height:12px;
  border-radius:999px;
  background: rgba(0,0,0,.18);
}
.dot.active{
  background: rgba(194, 24, 91, .6);
}

.next-btn{
  width:70%;
  border:0;
  background: linear-gradient(180deg, #bf2a6b 0%, #9b1f58 100%);
  color:#fff;
  padding:14px 16px;
  border-radius:999px;
  font-size:16px;
  font-weight:800;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(194,24,91,.25);
}

/* Countdown page (reuses same dots style) */
.countdown-bg{
  background-image: var(--bg-overlay-dark), var(--shared-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display:grid;
  place-items:center;
  padding:20px;
}

.countdown-card{
  width:min(560px, 92vw);
  background: rgba(255,255,255,.75);
  border:1px solid rgba(255,255,255,.65);
  border-radius:18px;
  padding:26px 18px 18px;
  text-align:center;
  box-shadow: 0 18px 55px rgba(0,0,0,.12);
}

.countdown-heading{
  margin:6px 0 18px;
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.15;
  color:#1f1f1f;
  font-weight:900;
}

.timer{
  display:flex;
  justify-content:center;
  gap:12px;
  margin:12px 0 18px;
}

.time-block{
  width:104px;
  padding:12px 6px 10px;
  border-radius:12px;
  background: rgba(255,255,255,.65);
  border:1px solid rgba(194,24,91,.18);
}

.time-value{
  font-size:34px;
  font-weight:900;
  color:#c2185b;
}

.time-label{
  margin-top:4px;
  font-size:12px;
  font-weight:800;
  letter-spacing:1px;
  color: rgba(0,0,0,.35);
}

/* Page 4: Special screen */
.special-bg{
  min-height:100vh;
  margin:0;
  background-image: var(--bg-overlay-dark), var(--shared-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display:grid;
  place-items:center;
  padding:24px;
}

.special-card{
  width:min(560px, 92vw);
  border-radius:18px;
  padding:30px 18px;
  text-align:center;
}

.special-heading{
  margin:0 0 26px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight:900;
  color: rgba(255,255,255,.92);
  display:flex;
  justify-content:center;
  gap:22px;
  flex-wrap:wrap;
  letter-spacing: 1px;
}

.decorate-btn-inline{
  width:min(520px, 100%);
  display:block;
  margin: 14px auto 0;
  border:0;
  border-radius:999px;
  background: linear-gradient(180deg, #e0648c 0%, #b51f60 100%);
  color:#fff;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(0,0,0,.25);
  cursor:pointer;
}

.decorate-btn{
  margin: 0 auto;
  border:0;
  border-radius:999px;
  background: linear-gradient(180deg, #e0648c 0%, #b51f60 100%);
  color:#fff;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 900;
  width:min(520px, 100%);
  box-shadow: 0 16px 30px rgba(0,0,0,.25);
  cursor:pointer;
}

/* Page 5: Opening letter */
.letter-bg{
  min-height:100vh;
  margin:0;
  background-image: var(--bg-overlay-dark), var(--shared-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display:grid;
  place-items:center;
  padding:22px;
}

.letter-wrap{
  width:min(560px, 92vw);
  text-align:center;
}

.letter-scene{
  display:grid;
  place-items:center;
  padding:20px 0 6px;
}

.envelope{
  position:relative;
  width:min(360px, 80vw);
  height:220px;
}

.envelope-front{
  position:absolute;
  left:50%;
  top:40%;
  transform:translate(-50%,-50%);
  width:100%;
  height:160px;
  background: rgba(255,255,255,.98);
  border:3px solid rgba(200,155,64,.65);
  border-radius:16px;
  box-shadow: 0 22px 50px rgba(0,0,0,.25);
  overflow:hidden;
}

/* The two diagonal sides on the front */
.envelope-front::before,
.envelope-front::after{
  content:"";
  position:absolute;
  top:0;
  width:0;
  height:0;
  border-style:solid;
}

.envelope-front::before{
  left:0;
  border-width:0 0 80px 180px;
  border-color:transparent transparent rgba(235,199,123,.45) transparent;
  transform: translateX(-2px);
}

.envelope-front::after{
  right:0;
  border-width:80px 180px 0 0;
  border-color: rgba(235,199,123,.45) transparent transparent transparent;
  transform: translateX(2px);
}

.envelope-flap{
  position:absolute;
  left:50%;
  top:37%;
  transform:translate(-50%,-50%);
  width:100%;
  height:170px;
  background: transparent;
  /* triangle via borders */
  border-left: calc(50%) solid transparent;
  border-right: calc(50%) solid transparent;
  border-top: 120px solid rgba(230,190,90,.62);
  transform-origin: 50% 0%;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.18));
  transition: transform 1.1s ease;
}

.envelope-seal{
  position:absolute;
  left:50%;
  top:26%;
  transform:translate(-50%,-50%);
  width:64px;
  height:64px;
  background: rgba(235,190,90,.85);
  border:3px solid rgba(200,155,64,.6);
  border-radius:14px;
  transform: translate(-50%,-50%) rotate(45deg);
  box-shadow: 0 12px 22px rgba(0,0,0,.2);
}

.flap-open{
  transform: translate(-50%,-50%) rotateX(180deg);
}

.opening-text{
  margin-top:10px;
  color: rgba(255,255,255,.92);
  font-weight:800;
  letter-spacing:.4px;
  font-size:16px;
}

/* Page 6: Opened letter */
.letterPage-bg{
  min-height:100vh;
  margin:0;
  background-image: var(--bg-overlay-dark), var(--shared-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display:grid;
  place-items:center;
  padding:22px;
}

.letterPage-wrap{
  width:min(760px, 94vw);
}

.letterCard{
  background: #f6efe4;
  border-radius: 14px;
  border: 2px solid rgba(0,0,0,.08);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  overflow:hidden;
}

.letterCard-inner{
  padding:22px 20px 18px;
  color:#2b2b2b;
  font-family: Georgia, "Times New Roman", Times, serif;
}

.letter-greeting{
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 10px;
}

.letterCard-inner p{
  font-size: 16px;
  line-height: 1.6;
  margin: 10px 0;
  color: rgba(20,20,20,.9);
}

.letter-sign{
  margin-top: 18px !important;
  font-weight: 700;
}

.letter-closing{
  margin-top: 18px !important;
}

.letter-bottom-bunnies{
  margin-top: 18px;
  display:flex;
  justify-content:center;
  gap:10px;
  font-size: 34px;
}

/* Page 7: Cake + blow candles */
.candle-bg{
  min-height:100vh;
  margin:0;
  background-image: var(--bg-overlay-dark), var(--shared-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display:grid;
  place-items:center;
  padding:24px;
}

.candle-wrap{
  width:min(720px, 96vw);
  text-align:center;
}

.neon-title{
  font-size: clamp(22px, 6vw, 42px);
  letter-spacing: 6px;
  font-weight: 900;
  margin: 12px 0 18px;
  color: #ffeef9;
  text-transform: uppercase;
  text-shadow:
    0 0 6px rgba(255,60,170,.9),
    0 0 18px rgba(60,170,255,.8),
    0 0 28px rgba(255,230,120,.45);
  filter: saturate(1.2);
}

.cake-stage{
  display:grid;
  place-items:center;
  height: 300px;
}

.cake{
  position: relative;
  width: 320px;
  height: 210px;
}

.cake-top{
  position:absolute;
  left:50%;
  top: 46px;
  transform: translateX(-50%);
  width: 260px;
  height: 72px;
  background: #f7dfe4;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0,0,0,.25) inset;
}

.cake-body{
  position:absolute;
  left:50%;
  top: 106px;
  transform: translateX(-50%);
  width: 260px;
  height: 110px;
  background: #efe0c8;
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
}

.cake-body::before{
  content:"";
  position:absolute;
  left:0;
  top:-10px;
  width:100%;
  height:36px;
  background: rgba(255,255,255,.25);
  border-radius: 20px;
}

.candle-row{
  position:absolute;
  left:50%;
  top: 22px;
  transform: translateX(-50%);
  display:flex;
  gap: 18px;
  justify-content:center;
}

.candle{
  position:relative;
  width: 18px;
  height: 92px;
}

.candle::before{
  content:"";
  position:absolute;
  left:50%;
  top:12px;
  transform: translateX(-50%);
  width: 14px;
  height: 75px;
  border-radius: 8px;
  background: linear-gradient(180deg, #d61f4a 0%, #f06a8e 60%, #c4143f 100%);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

.candle.c2::before{ background: linear-gradient(180deg, #d61f4a 0%, #f2a6bf 60%, #bf0f3c 100%); }
.candle.c3::before{ background: linear-gradient(180deg, #b4143b 0%, #f2a6bf 60%, #7f0b27 100%); }
.candle.c4::before{ background: linear-gradient(180deg, #c4143f 0%, #f7b4cd 60%, #a50d33 100%); }
.candle.c5::before{ background: linear-gradient(180deg, #d61f4a 0%, #f2a6bf 60%, #bf0f3c 100%); }

.wick{
  position:absolute;
  left:50%;
  top: 7px;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #5a2b1a;
  border-radius: 2px;
  opacity:.9;
}

.flame{
  position:absolute;
  left:50%;
  top: 0px;
  transform: translateX(-50%);
  width: 16px;
  height: 26px;
  background: radial-gradient(circle at 50% 30%, #fff7a3 0%, #ffd24d 35%, #ff5a7a 70%, rgba(255,90,122,0) 72%);
  border-radius: 50% 50% 50% 50%;
  filter: drop-shadow(0 10px 16px rgba(255,90,122,.25));
  animation: flicker 1.2s infinite ease-in-out;
}

@keyframes flicker{
  0%, 100%{ transform: translateX(-50%) scale(1); opacity:1; }
  50%{ transform: translateX(-50%) scale(.92); opacity:.9; }
}

.flame-out{
  animation: none;
  opacity:0;
  transform: translateX(-50%) scale(.7);
  transition: opacity .35s ease, transform .35s ease;
}

.blow-btn{
  margin-top: 20px;
  width: min(560px, 100%);
  border:0;
  border-radius: 999px;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 900;
  background: linear-gradient(180deg, #e0648c 0%, #b51f60 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(0,0,0,.25);
  cursor:pointer;
}

.blow-btn:disabled{
  opacity:.7;
  cursor:not-allowed;
}

/* Page 8: Final page */
.final-bg{
  min-height:100vh;
  margin:0;
  background-image: var(--bg-overlay-dark), var(--shared-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display:grid;
  place-items:center;
  padding:22px;
}

.final-wrap{
  width:min(760px, 94vw);
}

.final-card{
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  border-radius:18px;
  overflow:hidden;
  box-shadow: 0 22px 70px rgba(0,0,0,.45);
  text-align:center;
}

.final-title{
  margin:0;
  padding:18px 16px 12px;
  color: rgba(255,255,255,.95);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(22px, 4.5vw, 34px);
}

.final-image{
  width:100%;
  height: min(520px, 60vh);
  object-fit: cover;
  display:block;
}

