:root{
  --primary:#d63384;
  --accent:#ff8fab;
  --bg1:#fff0f6;
  --bg2:#ffe3ec;
  --glass:rgba(255,255,255,0.55);
  --text:#2b2b2b;
}

/* RESET */
*{margin:0;padding:0;box-sizing:border-box}
body{
  font-family:'Inter',sans-serif;
  color:var(--text);
  background:linear-gradient(-45deg,var(--bg1),var(--bg2),#ffd6e0,#ffe9f3);
  background-size:400% 400%;
  animation:bgShift 15s ease infinite;
  overflow-x:hidden;
}

@keyframes bgShift{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

/* GRAIN OVERLAY */
.grain{
  position:fixed;
  inset:0;
  background:url("data:image/svg+xml;base64,..."); /* lightweight noise */
  opacity:0.04;
  pointer-events:none;
  z-index:999;
}

/* TYPOGRAPHY */
h1,h2,h3{
  font-family:'Cormorant Garamond',serif;
}

.section{
  padding:120px 8%;
  text-align:center;
}

.section-title{
  font-size:3rem;
  margin-bottom:60px;
}

/* HERO */
.hero{
  height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  position:relative;
}

.hero h1{
  font-size:5rem;
}

.subtitle{
  font-size:1.6rem;
  margin:20px 0 40px;
}

.primary-btn{
  background:linear-gradient(135deg,var(--primary),var(--accent));
  color:white;
  padding:14px 40px;
  border:none;
  border-radius:50px;
  cursor:pointer;
  font-weight:500;
  transition:all .3s ease;
}

.primary-btn:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 25px rgba(214,51,132,.4);
}

.small{
  padding:8px 25px;
  font-size:.9rem;
}

/* GLASS EFFECT */
.glass{
  backdrop-filter:blur(15px);
  background:var(--glass);
  border-radius:25px;
  padding:50px;
  box-shadow:0 20px 50px rgba(0,0,0,.1);
}

/* WORD SEARCH */
.wordsearch-container{
  display:flex;
  gap:60px;
  justify-content:center;
  flex-wrap:wrap;
}

.grid{
  display:grid;
  grid-template-columns:repeat(12,40px);
  gap:8px;
  user-select:none;
}

.cell{
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:white;
  cursor:pointer;
  transition:.2s;
  font-weight:600;
}

.cell:hover{
  background:var(--accent);
  color:white;
}

.cell.found{
  background:var(--primary);
  color:white;
  box-shadow:0 0 12px rgba(214,51,132,.45);
}

.cell.selected{
  background:var(--accent);
  color:white;
  outline:2px solid rgba(214,51,132,.35);
}

.progress-bar{
  width:200px;
  height:8px;
  background:#ddd;
  border-radius:10px;
  margin:15px auto;
}

#progressFill{
  height:100%;
  width:0%;
  background:var(--primary);
  border-radius:10px;
  transition:.3s;
}

.hint-text{
  margin-top:14px;
  opacity:.7;
  font-size:.95rem;
}

/* FACT OR CAP */
.game-progress{
  height:6px;
  background:#ddd;
  border-radius:10px;
  margin-bottom:30px;
  overflow:hidden;
}

#gameProgressFill{
  height:100%;
  width:0%;
  background:var(--primary);
  transition:.3s;
}

.game-btn{
  padding:12px 35px;
  border-radius:40px;
  border:2px solid var(--primary);
  background:transparent;
  margin:10px;
  cursor:pointer;
  transition:.3s;
}

.game-btn:hover{
  background:var(--primary);
  color:white;
}

/* CAROUSEL */
.carousel{
  max-width:650px;
  margin:auto;
  overflow:hidden;
}

.carousel-track{
  display:flex;
  transition:transform .6s cubic-bezier(.77,0,.18,1);
}

.note-card{
  min-width:100%;
  padding:60px;
  background:white;
  border-radius:30px;
  box-shadow:0 15px 40px rgba(0,0,0,.1);
}

.dots{
  margin-top:30px;
}

.dot{
  width:12px;
  height:12px;
  border-radius:50%;
  background:#ccc;
  display:inline-block;
  margin:6px;
  cursor:pointer;
}

.dot.active{
  background:var(--primary);
}

/* REVEAL ANIMATION */
.reveal{
  opacity:0;
  transform:translateY(40px);
  transition:all .8s ease;
}
.reveal.visible{
  opacity:1;
  transform:none;
}

.hidden{display:none}

/* RESPONSIVE */
@media(max-width:768px){
  .hero h1{font-size:3rem}
  .section-title{font-size:2rem}
  .grid{ grid-template-columns:repeat(12,32px); gap:7px; }
  .cell{ width:32px; height:32px; border-radius:9px; }
}

/* INTRO SCREEN */
#introScreen{
  position:fixed;
  inset:0;
  background:black;
  color:white;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-direction:column;
  z-index:2000;
  transition:opacity 1.5s ease;
}

#introScreen.fade-out{
  opacity:0;
  pointer-events:none;
}

.intro-content{
  text-align:center;
  animation:fadeIn 2s ease forwards;
}

@keyframes fadeIn{
  from{opacity:0; transform:translateY(20px)}
  to{opacity:1; transform:none}
}

body{
  cursor:none;
}

.cursor{
  position:fixed;
  width:20px;
  height:20px;
  border-radius:50%;
  background:rgba(214,51,132,.8);
  pointer-events:none;
  transform:translate(-50%, -50%);
  box-shadow:0 0 20px rgba(214,51,132,.8),
             0 0 40px rgba(214,51,132,.4);
  transition:transform .08s linear;
  z-index:3000;
}

.section{
  opacity:0;
  transform:translateY(60px);
  transition:all 1s cubic-bezier(.77,0,.18,1);
}

.section.visible{
  opacity:1;
  transform:none;
}

/* LOVE CANVAS */
#loveCanvas{
  width:100%;
  max-width:500px;
  height:400px;
  border-radius:20px;
  background:white;
  box-shadow:0 15px 40px rgba(0,0,0,.1);
  cursor:crosshair;
  touch-action:none;
}

/* PARALLAX */
.parallax-container{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  overflow:hidden;
  z-index:-1;
}

.parallax{
  position:absolute;
  width:200%;
  height:200%;
  background-repeat:no-repeat;
  background-size:cover;
  opacity:0.15;
}

.layer-back{
  background:radial-gradient(circle at 30% 30%, #ffd6e7, transparent 60%);
}

.layer-mid{
  background:radial-gradient(circle at 70% 60%, #ff8ecb, transparent 60%);
}

.layer-front{
  background:radial-gradient(circle at 50% 80%, #d63384, transparent 60%);
}

/* PARTICLES CANVAS */
#particles{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index:-2;
}

/* FLOATING HEART ANIMATION KEYFRAMES injected in JS */

/* WORD FOUND BURST */
.burst{
  position:fixed;
  width:6px;
  height:6px;
  border-radius:50%;
  pointer-events:none;
  background:var(--primary);
  animation:explode .8s ease-out forwards;
}

@keyframes explode{
  to{
    transform:translate(var(--dx), var(--dy));
    opacity:0;
  }
}

/* =========================
   (6) CINEMATIC INTRO TEXT
========================= */
#introScreen h1 span.char{
  display:inline-block;
  opacity:0;
  transform:translateY(16px);
  filter:blur(6px);
  animation:charIn .7s cubic-bezier(.2,.9,.2,1) forwards;
}

@keyframes charIn{
  to{ opacity:1; transform:none; filter:blur(0); }
}

/* soft pulse for the enter button */
#enterBtn{
  position:relative;
}
#enterBtn::after{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.25);
  opacity:0;
  animation:pulseRing 2.2s ease infinite;
}
@keyframes pulseRing{
  0%{ transform:scale(.9); opacity:.0; }
  35%{ opacity:.35; }
  100%{ transform:scale(1.2); opacity:0; }
}

/* =========================
   (7) MUSIC CONTROL PILL
========================= */
.music-pill{
  position:fixed;
  top:18px;
  right:18px;
  z-index:3500;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.55);
  backdrop-filter:blur(16px);
  box-shadow:0 18px 45px rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.35);
}

.pill-btn{
  width:38px;
  height:38px;
  border-radius:999px;
  border:none;
  cursor:pointer;
  font-weight:700;
  background:linear-gradient(135deg,var(--primary),var(--accent));
  color:#fff;
  box-shadow:0 10px 25px rgba(214,51,132,.28);
  transition:transform .15s ease;
}
.pill-btn:active{ transform:scale(.95); }

.pill-slider{
  width:110px;
  accent-color: var(--primary);
}

/* =========================
   (8) LOVE LETTER MODAL
========================= */
.modal.hidden{ display:none; }

.modal{
  position:fixed;
  inset:0;
  z-index:4000;
  display:grid;
  place-items:center;
  padding:24px;
}

.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(6px);
}

.modal-card{
  position:relative;
  width:min(680px, 92vw);
  border-radius:26px;
  padding:26px 24px;
  background:rgba(255,255,255,.85);
  backdrop-filter:blur(18px);
  box-shadow:0 35px 90px rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.45);
  animation:modalPop .35s cubic-bezier(.2,.9,.2,1);
}

@keyframes modalPop{
  from{ transform:translateY(16px) scale(.98); opacity:0; }
  to{ transform:none; opacity:1; }
}

.modal-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.modal-close{
  width:38px;
  height:38px;
  border-radius:999px;
  border:none;
  cursor:pointer;
  background:rgba(214,51,132,.12);
  color:var(--primary);
  font-weight:900;
}

.modal-text{
  font-size:1.05rem;
  line-height:1.7;
  margin:14px 0 18px;
}