:root{
  --text: rgba(255,255,255,0.94);
  --muted: rgba(255,255,255,0.74);
  --card: rgba(255,255,255,0.10);
  --stroke: rgba(255,255,255,0.18);

  --accent: #ff3b7a;
  --accent2:#ff9bc5;

  --shadow: 0 24px 80px rgba(0,0,0,0.45);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  min-height:100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  
  overflow-x: hidden;
  overflow-y: auto;

  /* better valentine background */
  background:
    radial-gradient(1100px 700px at 20% 10%, rgba(255, 59, 122, 0.35), transparent 60%),
    radial-gradient(900px 600px at 80% 20%, rgba(255, 155, 197, 0.28), transparent 60%),
    radial-gradient(900px 700px at 50% 90%, rgba(140, 80, 255, 0.25), transparent 65%),
    linear-gradient(180deg, #090a18 0%, #120b22 55%, #070713 100%);
}

/* heart bokeh layer */
.bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  overflow:hidden;
}
.bokeh{
  position:absolute;
  width: 190px;
  height: 190px;
  opacity: 0.20;
  filter: blur(1px);
  transform: rotate(15deg);
  animation: floatUp linear infinite;
  border-radius: 32px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.65), rgba(255,255,255,0.0) 60%);
  mask-image: radial-gradient(circle at 30% 30%, #000 0 40%, transparent 70%);
}

/* Make bokeh feel like hearts using CSS clip-path */
.bokeh::before{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(circle at 35% 35%, rgba(255,59,122,0.75), rgba(255,59,122,0) 65%);
  clip-path: path("M96 166 C-10 110 16 36 62 34 C84 33 96 52 96 52 C96 52 108 33 130 34 C176 36 202 110 96 166 Z");
  opacity: 0.9;
}

.h1{ left: 6%;  top: 110%; animation-duration: 18s; transform: scale(0.9) rotate(8deg); }
.h2{ left: 22%; top: 120%; animation-duration: 22s; transform: scale(0.7) rotate(-8deg); }
.h3{ left: 38%; top: 105%; animation-duration: 20s; transform: scale(1.1) rotate(12deg); }
.h4{ left: 56%; top: 125%; animation-duration: 24s; transform: scale(0.8) rotate(-10deg); }
.h5{ left: 72%; top: 112%; animation-duration: 19s; transform: scale(1.0) rotate(6deg); }
.h6{ left: 86%; top: 130%; animation-duration: 26s; transform: scale(0.75) rotate(-12deg); }
.h7{ left: 12%; top: 135%; animation-duration: 28s; transform: scale(0.6) rotate(4deg); }
.h8{ left: 64%; top: 140%; animation-duration: 30s; transform: scale(0.55) rotate(-6deg); }

@keyframes floatUp{
  0%{ transform: translateY(0) scale(1) rotate(8deg); opacity:0.0; }
  10%{ opacity:0.22; }
  100%{ transform: translateY(-170vh) scale(1.05) rotate(8deg); opacity:0.0; }
}

/* background stars canvas */
#stars{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:1;
}

/* views */
.view{
  position:relative;
  z-index:2;
  min-height:100vh;
  display:none;
  place-items:center;
  padding: 28px 14px;
}
.view.active{ display:grid; }

.cardShell{
  width:min(680px, 92vw);
  background: var(--card);
  border:1px solid var(--stroke);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 26px;
  text-align:center;
}
.cardShell.wide{
  width:min(1000px, 96vw);
  padding: 24px 18px;
}

.bigTitle{
  margin:0 0 12px;
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  line-height: 1.15;
}
.softLine{
  margin:0 0 18px;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.actions{
  display:flex;
  justify-content:center;
  gap:12px;
  margin-top: 10px;
}

button{
  border:0;
  padding: 12px 18px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:800;
  font-size:1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:white;
  transition: transform .12s ease, filter .12s ease;
}
button:hover{ transform: translateY(-1px) scale(1.02); filter: brightness(1.08); }
button:active{ transform: translateY(0) scale(0.98); }

.fadeOut{ animation: fadeOut .65s ease forwards; }
@keyframes fadeOut{ to { opacity: 0; transform: translateY(8px); } }

.sectionTitle{
  margin:0 0 8px;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
}
.sectionSub{
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
  font-size: clamp(0.98rem, 2.3vw, 1.05rem);
}

.grid{
  display:grid;
  gap: 14px;
  justify-content: center;
  justify-items: center;
  /* grid-template-columns: repeat(1, minmax(0, 1fr)); */
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  margin-top: 14px;
}
@media (min-width: 640px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px){
  .grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.chapterCard{
  position:relative;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  overflow:hidden;
  background: rgba(255,255,255,0.08);
  min-height: 140px;
  padding: 16px;
  text-align:left;
  cursor:pointer;
  transition: transform .12s ease, filter .12s ease;
}
.chapterCard:hover{
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.cardTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.badge{
  font-weight:900;
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
}
.status{ font-size: 0.95rem; color: var(--muted); }

.cardArt{
  margin-top: 12px;
  display:grid;
  place-items:center;
  height: 74px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px dashed rgba(255,255,255,0.18);
}
.emojiArt{ font-size: 2.2rem; }

.cardLine{
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.chapterCard.locked{
  cursor:not-allowed;
  filter: saturate(0.7);
}
.chapterCard.locked:hover{ transform:none; }

.lockOverlay{
  position:absolute;
  inset:0;
  background: rgba(10,12,22,0.65);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap: 8px;
  text-align:center;
  padding: 14px;
}
.lockIcon{ font-size: 1.6rem; }
.lockText{ font-weight:800; font-size: 0.95rem; }
.lockSub{ color: rgba(255,255,255,0.70); font-size: 0.9rem; }

.hint{
  margin: 14px 0 0;
  color: rgba(255,255,255,0.70);
  font-size: 0.95rem;
}

.slideIn{ animation: slideIn .55s ease both; }
@keyframes slideIn{
  from{ opacity:0; transform: translateY(16px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ---------- MODAL ---------- */
.modalOverlay{
  position: fixed;
  inset: 0;
  z-index: 50;
  display:grid;
  place-items:center;
  padding: 18px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  overflow: auto;
  align-items: start;
}


.modalCard{
  width: min(720px, 94vw);
  border-radius: 22px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow: var(--shadow);
  padding: 18px 16px 16px;
  text-align:center;
  margin: 24px 0;
}
.modalTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.modalTitle{
  margin: 0;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  text-align:left;
}
.iconBtn{
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.20);
  color: rgba(255,255,255,0.9);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  padding:0;
  font-weight: 900;
}
.iconBtn:hover{ filter: brightness(1.1); transform: translateY(-1px); }

.modalSub{
  margin: 10px 0 14px;
  color: var(--muted);
  text-align:left;
}

.roseRow{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}
@media (max-width: 420px){
  .roseRow{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.roseCircle{
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  display:grid;
  place-items:center;
  padding: 0;
  transition: transform .12s ease, filter .12s ease;
}
.roseCircle span{ font-size: 2rem; }
.roseCircle:hover{ transform: translateY(-2px) scale(1.02); filter: brightness(1.08); }

.roseMessageBox{
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px;
  padding: 12px 12px;
  text-align:left;
}
.roseMsg{
  margin: 0;
  line-height: 1.45;
  color: rgba(255,255,255,0.88);
}

.modalActions{
  margin-top: 14px;
  display:flex;
  justify-content:flex-end;
}
.primaryBtn{
  padding: 12px 18px;
  border-radius: 999px;
}

/* IMPORTANT: make sure hidden attribute actually hides the modal */
.modalOverlay[hidden] { display: none !important; }
/* (or you can use: [hidden]{ display:none !important; } ) */

#closeModal { display: none; }

/* ===== Landing Page Doctor Card Typography ===== */
.bigTitle{
  margin: 0 0 14px;
  text-align: center;
  line-height: 1.15;
  letter-spacing: 0.2px;
  font-weight: 900;
}

.bigTitle .hello{
  display:block;
  font-size: clamp(1.6rem, 4.8vw, 2.8rem);
  font-weight: 1000;
  margin-bottom: 12px;

  background: linear-gradient(135deg, rgba(255,59,122,1), rgba(255,155,197,1), rgba(140,80,255,0.9));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  text-shadow:
    0 22px 70px rgba(0,0,0,0.45),
    0 0 30px rgba(255,155,197,0.22);
}

.bigTitle .hello .icon{
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.35));
}

.bigTitle .rxLine{
  display:block;
  width: min(560px, 92%);
  margin: 10px auto 0;
  padding: 10px 12px;
  border-radius: 14px;

  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 18px 60px rgba(0,0,0,0.22);

  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  line-height: 1.25;
}

.bigTitle .label{
  font-weight: 1000;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.95);
}

/* subtle “scanline” shimmer on each rx line */
.bigTitle .rxLine{
  position: relative;
  overflow: hidden;
}
.bigTitle .rxLine::after{
  content:"";
  position:absolute;
  inset:-40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateX(-60%);
  animation: rxShine 3.8s ease-in-out infinite;
}
@keyframes rxShine{
  0%{ transform: translateX(-70%); }
  55%{ transform: translateX(60%); }
  100%{ transform: translateX(140%); }
}



/* ✅ Mobile: make all chapter cards same width */
@media (max-width: 520px){
  .grid{
    grid-template-columns: 1fr !important;
    justify-items: stretch;
  }

  .chapterCard{
    width: 100%;
  }
}

/* Permanent corner signature */
.signature{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 5;

  padding: 10px 12px;
  border-radius: 14px;

  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);

  color: rgba(255,255,255,0.82);
  text-align: right;

  max-width: min(340px, 70vw);
  pointer-events: none; /* doesn’t block clicks */
}

.signature .sigLine{
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.signature .sigName{
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 900;

  background: linear-gradient(135deg, rgba(255,59,122,1), rgba(255,155,197,1), rgba(140,80,255,0.9));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Smaller on mobile */
@media (max-width: 520px){
  .signature{
    right: 10px;
    bottom: 10px;
    padding: 8px 10px;
    max-width: 78vw;
  }
  .signature .sigLine,
  .signature .sigName{
    font-size: 0.82rem;
  }
}

/* =========================
   THANK YOU / FINAL SCREEN
   ========================= */

.thankCard{
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.18);
  background:
    radial-gradient(900px 520px at 15% 15%, rgba(255, 59, 122, 0.35), transparent 60%),
    radial-gradient(800px 520px at 85% 20%, rgba(77, 214, 255, 0.18), transparent 65%),
    radial-gradient(900px 620px at 55% 110%, rgba(140, 80, 255, 0.22), transparent 65%),
    linear-gradient(180deg, rgba(14, 12, 28, 0.92), rgba(20, 12, 36, 0.88));
  box-shadow: 0 30px 110px rgba(0,0,0,0.55);
}

/* soft sparkle dust */
.thankCard::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: radial-gradient(rgba(255,255,255,0.18) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.22;
  pointer-events:none;
  animation: dustFloat 7s ease-in-out infinite alternate;
}
@keyframes dustFloat{
  from{ transform: translateY(0); }
  to{ transform: translateY(10px); }
}

.yesBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 1000;
  letter-spacing: 0.4px;
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,155,197,0.25);
  box-shadow: 0 20px 70px rgba(0,0,0,0.25);
  margin: 0 auto 12px;
}

.thankTitle{
  margin: 0 0 10px;
  text-align:center;
  font-size: clamp(1.8rem, 5.2vw, 2.8rem);
  font-weight: 1000;
  line-height: 1.1;
  text-shadow: 0 22px 70px rgba(0,0,0,0.45);
}

.nameGlow{
  background: linear-gradient(135deg, rgba(255,59,122,1), rgba(255,155,197,1), rgba(140,80,255,0.9));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.thankSub{
  margin: 0 auto 16px;
  text-align:center;
  color: rgba(255,255,255,0.86);
  line-height: 1.5;
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  width: min(700px, 92%);
}

.finalNote{
  width: min(720px, 92%);
  margin: 14px auto 0;
  padding: 16px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 18px 70px rgba(0,0,0,0.22);
  text-align:center;
}

.finalLine{
  font-weight: 900;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
}

.finalSign{
  margin-top: 8px;
  font-weight: 1000;
  opacity: 0.92;
  background: linear-gradient(135deg, rgba(255,59,122,1), rgba(255,155,197,1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.finalActions{
  margin-top: 18px;
  display:flex;
  justify-content:center;
  gap: 12px;
  flex-wrap: wrap;
}

.softBtn{
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}
.softBtn:hover{ filter: brightness(1.08); transform: translateY(-1px); }

/* Celebration layer (falling emojis) */
.celebrate{
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Each falling piece */
.confetti{
  position:absolute;
  top: -12%;
  animation-name: confFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,0.35));
  opacity: 0.9;
  will-change: transform;
}
@keyframes confFall{
  0%{ transform: translate3d(0,-30px,0) rotate(0deg); opacity: 0.0; }
  10%{ opacity: 0.95; }
  100%{ transform: translate3d(0,880px,0) rotate(240deg); opacity: 0.0; }
}

/* Ensure content sits above celebration */
#thankyou .cardShell{ position: relative; z-index: 2; }
