/* ══════════════════════════════════════════════
   BASE
══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
}

body {
  background: radial-gradient(ellipse at center top,
    hsl(350 30% 96%),
    hsl(350 20% 92%) 60%,
    hsl(340 15% 88%)
  );
  font-family: 'Cormorant Garamond', serif;
  /* subtle dot pattern */
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.02;
  background-image: radial-gradient(circle, hsl(350 40% 50%) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ══════════════════════════════════════════════
   PAGE LAYOUT
══════════════════════════════════════════════ */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px 40px;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.header {
  text-align: center;
  margin-bottom: 16px;
}

.eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: hsl(350 35% 60%);
  margin-bottom: 6px;
}

.headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  /* gradient text */
  background: linear-gradient(180deg, hsl(350 30% 35%), hsl(350 25% 50%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 8px;
}

.couple-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: hsl(350 30% 45%);
}

.amp {
  font-size: 1.1rem;
  color: hsl(350 40% 65%);
}

/* ══════════════════════════════════════════════
   SLOT WRAPPER
   352×484 matches the original exactly
══════════════════════════════════════════════ */
.slot-wrapper {
  position: relative;
  width: 352px;
  height: 484px;
  margin-bottom: 16px;
}

/* The shell image sits on top (z-10) but pointer-events: none */
.machine-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 10;
  user-select: none;
}

/* ══════════════════════════════════════════════
   REELS OVERLAY
   Positioned to match the window in the shell image.
   From the source: top:31.5%, left:30%, width:133.5px, height:73px
══════════════════════════════════════════════ */
.reels-overlay {
  position: absolute;
  z-index: 20;
  top: 31.5%;
  left: 30%;
  width: 133.5px;
  height: 73px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, hsl(350 30% 97%), hsl(20 40% 96%));
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  gap: 1px;
}

/* Individual reel column */
.reel {
  flex: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: linear-gradient(
    180deg,
    hsl(350 25% 92%) 0%,
    hsl(350 15% 97%) 20%,
    hsl(0 0% 100%) 50%,
    hsl(350 15% 97%) 80%,
    hsl(350 25% 92%) 100%
  );
  border-radius: 4px;
}

.reel-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  transition: none;
}

/* Each row in the reel (prev/center/next) */
.reel-item {
  flex-shrink: 0;
  height: 33.333%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  transition: color 0.3s, transform 0.3s;
}

.reel-prev,
.reel-next {
  opacity: 0.2;
  font-size: 0.6rem;
  color: hsl(350 10% 70%);
}

.reel-center {
  font-size: 0.75rem;
  color: hsl(350 20% 30%);
}

/* When revealed, center item gets a boost */
.reel-center.revealed {
  color: hsl(350 40% 40%);
  transform: scale(1.1);
  text-shadow: 0 1px 3px hsla(350, 40%, 40%, 0.2);
}

/* Question mark idle state — bigger & bolder */
.reel-center.is-question {
  font-size: 1.6rem;
  font-weight: 800;
  color: hsl(350 40% 45%);
  letter-spacing: 0;
  font-family: 'Cormorant Garamond', serif;
}

/* Heart symbol uses different font/size */
.reel-center.is-heart,
.reel-prev.is-heart,
.reel-next.is-heart {
  font-family: Arial, sans-serif;
  font-size: 0.875rem;
  color: hsl(350 45% 70%);
  -webkit-text-stroke: 2px hsl(350 45% 70%);
}

/* Thin divider between reels */
.reel-divider {
  width: 2px;
  height: 100%;
  background: hsl(350 40% 80% / 0.4);
  border-radius: 9999px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   LEVER — exact CSS from the original source
══════════════════════════════════════════════ */
#slot-trigger {
  cursor: pointer;
  height: 94px;
  right: 26px;
  top: 231px;
  position: absolute;
  width: 41px;
  z-index: 30;
}

#slot-trigger div {
  position: absolute;
  top: 0;
}

/* Ring 1 — the mount bracket at the side of the machine */
#slot-trigger .ring1 {
  background: #9e6b6d;
  background: linear-gradient(to bottom, #9e6b6d, #c8999b 14%, #ddabae 37%, #d4a2a5 49%, #c8999b 67%, #9e6b6d);
  border-radius: 0 2px 2px 0;
  box-shadow: inset 0 2px 3px #000c;
  height: 70%;
  left: 0;
  width: 9px;
  z-index: 2;
}

#slot-trigger .ring1 .shadow {
  background: linear-gradient(to bottom, #95959533, #0d0d0d2e 46%, #0101012e 50%, #0a0a0a2e 53%, #4e4e4e2b 76%, #38383829 87%, #1b1b1b26);
  border-radius: 0 2px 2px 0;
  height: 50%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 11px;
  z-index: 1;
  transition: top 0.4s ease-out, opacity 0.4s ease-out;
}

/* Ring 2 — secondary mount ring */
#slot-trigger .ring2 {
  background: #9e6b6d;
  background: linear-gradient(to bottom, #9e6b6d, #c8999b 14%, #ddabae 37%, #d4a2a5 49%, #c8999b 67%, #9e6b6d);
  border-radius: 0 2px 2px 0;
  box-shadow: inset 0 2px 3px #000c;
  height: 50%;
  left: 9px;
  overflow: hidden;
  top: 10%;
  width: 11px;
  z-index: 1;
}

#slot-trigger .ring2 .shadow {
  background: linear-gradient(to bottom, #95959526, #0d0d0d26 46%, #01010126 50%, #0a0a0a26 53%, #4e4e4e26 76%, #38383826 87%, #1b1b1b26);
  border-radius: 0 2px 2px 0;
  height: 50%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 11px;
  z-index: 1;
  transition: top 0.4s ease-out, opacity 0.4s ease-out;
}

/* Arm — the lever shaft */
#slot-trigger .arm {
  background: #0d0d0d;
  background: linear-gradient(to right, #0d0d0d, #4e4e4e 47%, #383838 87%, #1b1b1b);
  border-radius: 0 0 4px 4px;
  box-shadow: inset 0 2px 5px #000c;
  height: 80%;
  left: 11px;
  top: -55px;
  width: 7px;
  z-index: 3;
  overflow: visible !important;
  transition: top 0.4s ease-out, height 0.4s ease-out;
}

/* Knob — the red ball on top */
#slot-trigger .arm .knob {
  background: #ff6363;
  background: radial-gradient(ellipse at center, #ff6363, #cf0404);
  border-radius: 11px;
  box-shadow: 0 1px 1px #0006;
  height: 18px;
  left: -8px;
  top: -16px;
  width: 22px;
  z-index: 4;
  transition: top 0.4s ease-out, height 0.4s ease-out;
}

/* Arm shadow */
#slot-trigger .arm-shadow {
  background: #000;
  border-radius: 11px;
  box-shadow: 0 1px 1px #0006;
  height: 7px;
  left: 10px;
  top: 17px;
  width: 9px;
  z-index: 2;
  transition: top 0.38s ease-out;
}

/* ── PULLED STATE ── */
#slot-trigger.pulled .arm {
  top: 50px;
  height: 2%;
}

#slot-trigger.pulled .arm .knob {
  top: -22px;
  height: 22px;
}

#slot-trigger.pulled .arm-shadow {
  top: 44px;
}

#slot-trigger.pulled .ring1 .shadow,
#slot-trigger.pulled .ring2 .shadow {
  top: 50%;
  opacity: 1;
}

/* ══════════════════════════════════════════════
   HINT TEXT
══════════════════════════════════════════════ */
.hint {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(350 20% 55%);
  margin-bottom: 16px;
  animation: fade-pulse 2s ease-in-out infinite;
}

.hint.hidden {
  display: none;
}

@keyframes fade-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ══════════════════════════════════════════════
   REVEAL ACTIONS
══════════════════════════════════════════════ */
.reveal-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fade-in 0.5s ease-out forwards;
  margin-bottom: 16px;
}

/* Calendar button — exact from source */
.calendar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  padding: 3px;
  border-radius: 14px;
  background: linear-gradient(145deg, #e8c4a8, #dfa88c, #c8918a);
  box-shadow: 0 4px 12px rgba(200, 145, 138, 0.35), 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  animation: vibrate 0.5s ease-in-out 0.3s 3;
}

.calendar-btn:hover {
  transform: scale(1.05);
}

.calendar-btn-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 28px;
  border-radius: 11px;
  background: linear-gradient(180deg, #d4a0a8 0%, #c8919a 40%, #b8808a 100%);
  color: #fff;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25), inset 0 -1px 2px rgba(0, 0, 0, 0.1);
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.footer-note {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: hsl(350 20% 60%);
  margin-top: 8px;
}

/* ══════════════════════════════════════════════
   ANIMATIONS — exact keyframes from source
══════════════════════════════════════════════ */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vibrate {
  0%, 100% { transform: translate(0); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-2px); }
  20%, 40%, 60%, 80% { transform: translate(2px); }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 400px) {
  .slot-wrapper {
    width: 300px;
    height: 412px;
  }

  /* Scale reel overlay proportionally */
  .reels-overlay {
    width: 114px;
    height: 62px;
  }

  /* Lever proportional positions */
  #slot-trigger {
    right: 22px;
    top: 197px;
    width: 35px;
    height: 80px;
  }

  #slot-trigger .arm {
    top: -47px;
  }
}
