/* =========================
   GLOBAL RESET + NO SCROLL
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", system-ui, Arial, sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden; /* IMPORTANT: no page scroll */
}

/* Same background for ALL screens */
body {
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
}

/* =========================
   APP + SCREEN SYSTEM
   ========================= */
/*
  .screen = full screen section.
  Only the one with .active is visible.
*/
.app {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(1.01);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* =========================
   HERO SCREEN
   ========================= */
#screen-hero {
  text-align: center;
  color: #111;
}

/* Hearts layer */
.hearts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* A single heart shape (CSS heart) */
.heart {
  position: absolute;
  width: 15px;
  height: 15px;
  background: rgba(255, 255, 255, 0.8);
  transform: rotate(45deg);
  opacity: 0.7;
  animation: float 6s linear infinite;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

.heart::before { top: -7px; left: 0; }
.heart::after  { left: -7px; top: 0; }

/* Floating movement */
@keyframes float {
  0%   { transform: translateY(110vh) rotate(45deg); opacity: 0; }
  50%  { opacity: 0.8; }
  100% { transform: translateY(-15vh) rotate(45deg); opacity: 0; }
}

.hero-content {
  z-index: 1;
  max-width: 700px;
  padding: 20px;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 18px;
  color: #111;
}

.typing {
  font-size: 1.2rem;
  min-height: 42px;
  margin-bottom: 34px;
  color: #111;
}

/* =========================
   HERO BUTTON + ANIMATIONS
   ========================= */
.start-btn {
  background: #ffffff;
  color: #ff5e7e;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 300px;
}

.start-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 35px rgba(0,0,0,0.12);
}

/* Fade effect when text changes */
.fade {
  animation: fadeAnim 0.28s ease;
}
@keyframes fadeAnim {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Pulse effect for "magic click" */
.pulse {
  animation: pulseAnim 0.65s ease;
}
@keyframes pulseAnim {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* =========================
   SCREEN 2 (WHY)
   ========================= */
.wrap {
  width: min(1000px, 95vw);
  text-align: center;
  padding: 0 12px;
}

.title {
  font-size: 2.3rem;
  margin-bottom: 8px;
  color: #ffffff;
  text-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.subtitle {
  margin-bottom: 26px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;

  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 55px rgba(0,0,0,0.12);
}

.polaroid {
  background: rgba(255,255,255,0.95);
  border-radius: 18px;
  padding: 14px 14px 18px;
  transform: rotate(-1.2deg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.polaroid img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: #fff;
}

.caption {
  margin-top: 10px;
  color: #ff5e7e;
  font-weight: 900;
  font-size: 0.98rem;
}

.cardText {
  text-align: left;
  padding: 6px 6px;
}

.line {
  font-size: 1.35rem;
  line-height: 1.5;
  font-weight: 900;
  color: #ffffff;
  min-height: 92px;
  margin-bottom: 16px;
  text-shadow: 0 12px 40px rgba(0,0,0,0.10);
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.progress {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.22);
}

.bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  transition: width 0.35s ease;
}

.count {
  font-weight: 900;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.btn {
  background: #ffffff;
  color: #ff5e7e;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.btn.secondary {
  background: rgba(255,255,255,0.28);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.35);
}

.continue {
  display: none; /* only shown on last card */
  margin-top: 20px;
  background: rgba(255,255,255,0.95);
  color: #ff5e7e;
  border: none;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.continue:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0,0,0,0.14);
}

/* Little pop animation when card updates */
.pop {
  animation: popAnim 0.35s ease;
}
@keyframes popAnim {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsive layout */
@media (max-width: 860px) {
  .hero-content h1 { font-size: 2.3rem; }
  .typing { font-size: 1.05rem; }
  .card { grid-template-columns: 1fr; }
  .polaroid img { height: 260px; }
  .cardText { text-align: center; }
  .actions { justify-content: center; }
}

/* =========================
   SCREEN 3: MEMORIES
   ========================= */
.mem-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 10px;
}

.mem-item{
  background: rgba(255,255,255,0.95);
  border-radius: 18px;
  padding: 12px 12px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform: rotate(calc(var(--r, 0) * 1deg));
}

.mem-item:hover{
  transform: translateY(-3px) scale(1.02) rotate(calc(var(--r, 0) * 1deg));
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

.mem-item img{
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: #fff;
}

.mem-item .caption{
  margin-top: 10px;
  color: #ff5e7e;
  font-weight: 900;
  font-size: 0.95rem;
  text-align: center;
}

.mem-actions{
  display:flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

/* -------- Modal -------- */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal.show{
  display:flex;
}

.modal-card{
  width: min(760px, 95vw);
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 70px rgba(0,0,0,0.22);
  padding: 18px;
  position: relative;
  color: #fff;
  animation: popAnim 0.35s ease;
}

.modal-close{
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: rgba(255,255,255,0.25);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.modal-polaroid{
  background: rgba(255,255,255,0.95);
  border-radius: 18px;
  padding: 12px 12px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.modal-polaroid img{
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 14px;
  display:block;
  background:#fff;
}

.modal-caption{
  margin-top: 10px;
  color: #ff5e7e;
  font-weight: 900;
  text-align:center;
}

.modal-text{
  margin: 14px 6px 0;
  font-size: 1.15rem;
  line-height: 1.55;
  font-weight: 800;
  text-shadow: 0 12px 40px rgba(0,0,0,0.10);
}

/* Responsive */
@media (max-width: 860px){
  .mem-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px){
  .mem-grid{
    grid-template-columns: 1fr;
  }
  .mem-item img{
    height: 220px;
  }
  .modal-polaroid img{
    height: 260px;
  }
}

