/* ============================================================
   Date Surprise Website — Elegant Cream & Gold Theme
   ============================================================ */

:root {
  --bg-outer: #F3EDE0;
  --bg-cream: #FAF6EE;
  --card-white: #FFFCF7;
  --gold: #C9A96E;
  --gold-deep: #B59254;
  --gold-light: #E5D4B3;
  --text-main: #2A2017;
  --text-muted: #6F6253;
  --error-rose: #B45A52;
  --font-Display: "Cormorant Garamond", Georgia, serif;
  --font-Body: "Lora", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
  background-color: var(--bg-outer);
  color: var(--text-main);
  font-family: var(--font-Body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  transition: opacity 0.32s ease;
}

body.page-fade-out {
  opacity: 0;
}

/* Hide home page content briefly until session check finishes */
body[data-page="home"] .phone-frame {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body[data-page="home"].auth-ready .phone-frame {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Phone Frame Card (Matches Wireframe 1 & 2)
   ============================================================ */
.phone-frame {
  width: 100%;
  max-width: 380px;
  min-height: min(690px, 90vh);
  background: var(--bg-cream);
  border: 1.2px solid var(--gold);
  border-radius: 34px;
  padding: 44px 30px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-shadow:
    0 22px 50px rgba(68, 52, 32, 0.08),
    0 4px 14px rgba(68, 52, 32, 0.04);
  position: relative;
}

/* ============================================================
   Login Page
   ============================================================ */
.monogram-emblem {
  margin-top: 8px;
  margin-bottom: 12px;
}

.login-heading {
  font-family: var(--font-Display);
  font-weight: 500;
  font-size: 2.35rem;
  line-height: 1.16;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.login-subtext {
  font-family: var(--font-Body);
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 42px;
}

.login-form {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-group {
  width: 100%;
  position: relative;
  margin-bottom: 10px;
}

.passcode-input {
  width: 100%;
  border: none;
  border-bottom: 1.2px solid var(--gold);
  background: transparent;
  padding: 12px 4px 10px;
  font-family: var(--font-Display);
  font-size: 1.35rem;
  color: var(--text-main);
  text-align: left;
  outline: none;
  transition: border-color 0.25s ease;
}

.passcode-input::placeholder {
  color: var(--text-main);
  opacity: 0.78;
}

.passcode-input:focus {
  border-bottom-color: var(--gold-deep);
}

.login-error {
  min-height: 22px;
  font-size: 0.85rem;
  color: var(--error-rose);
  font-style: italic;
  margin-bottom: 16px;
}

.gold-outline-btn {
  width: 100%;
  max-width: 260px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.3px solid var(--gold);
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-Body);
  font-size: 1.02rem;
  cursor: pointer;
  transition: background-color 0.22s ease, transform 0.15s ease, box-shadow 0.22s ease;
}

.gold-outline-btn:hover {
  background-color: rgba(201, 169, 110, 0.12);
}

.gold-outline-btn:active {
  transform: scale(0.98);
}

.gold-solid-btn {
  width: 100%;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid var(--gold-deep);
  background: linear-gradient(180deg, #CCA96B 0%, #BA9453 100%);
  color: #FFFDF9;
  font-family: var(--font-Body);
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: filter 0.2s ease, transform 0.15s ease;
  box-shadow: 0 6px 16px rgba(182, 145, 82, 0.24);
}

.gold-solid-btn:hover {
  filter: brightness(1.04);
}

.gold-solid-btn:active {
  transform: scale(0.98);
}

.bottom-flourish {
  margin-top: 24px;
  opacity: 0.85;
}

@keyframes gentleShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}

.shake {
  animation: gentleShake 0.44s ease;
}

/* ============================================================
   Home Page — 3 Icons
   ============================================================ */
.home-header {
  margin-bottom: 18px;
}

.home-title {
  font-family: var(--font-Display);
  font-weight: 500;
  font-size: 2.3rem;
  color: var(--text-main);
  margin-top: 10px;
  margin-bottom: 4px;
}

.home-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.icons-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin: 14px 0 18px;
  width: 100%;
}

.icon-choice {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  transition: transform 0.22s ease;
}

.icon-choice:hover {
  transform: translateY(-2px);
}

.icon-choice:active {
  transform: scale(0.96);
}

.icon-circle {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(255, 252, 247, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.icon-choice:hover .icon-circle {
  background: #FFFCF7;
  box-shadow: 0 8px 22px rgba(201, 169, 110, 0.2);
}

.icon-choice:disabled,
.icon-choice.is-confirmed {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
  transform: none;
}

.icon-label {
  font-family: var(--font-Display);
  font-size: 1.32rem;
  font-weight: 500;
  color: var(--text-main);
}

.home-footer {
  margin-top: 6px;
}

.lock-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-Body);
  font-size: 0.78rem;
  opacity: 0.65;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lock-link:hover {
  opacity: 1;
}

/* ============================================================
   Modal Pop-up Overlay & Shared Card Styles
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 32, 23, 0.34);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-stage {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.fade-scale-in {
  animation: fadeScaleIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.popup-card {
  width: 100%;
  background: var(--card-white);
  border: 1.2px solid var(--gold);
  border-radius: 14px;
  padding: 10px;
  position: relative;
  box-shadow: 0 20px 44px rgba(36, 26, 15, 0.16);
}

.card-inner-border {
  border: 1px solid var(--gold-light);
  border-radius: 9px;
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.card-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

.card-close-btn:hover {
  color: var(--text-main);
}

/* ============================================================
   Swipe Scene (Cards 1 & 3)
   ============================================================ */
.swipe-scene {
  width: 100%;
  position: relative;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scene-close-btn {
  position: absolute;
  top: -12px;
  right: 4px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 252, 247, 0.85);
  border-radius: 50%;
  color: var(--text-main);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.scene-top-heading {
  font-family: var(--font-Display);
  font-size: 2.1rem;
  font-weight: 500;
  color: var(--card-white);
  text-shadow: 0 2px 10px rgba(32, 22, 12, 0.35);
  margin-bottom: 18px;
}

.card-stack-wrap {
  width: 100%;
  max-width: 310px;
  position: relative;
  margin-bottom: 24px;
}

.card-stack-back {
  position: absolute;
  inset: 0;
  background: var(--card-white);
  border: 1.2px solid var(--gold);
  border-radius: 14px;
  transform: rotate(3.2deg) translate(6px, 4px);
  opacity: 0.88;
  pointer-events: none;
}

.swipeable-card {
  cursor: grab;
  user-select: none;
  touch-action: none;
  transform: rotate(-1.2deg);
}

.swipeable-card:active {
  cursor: grabbing;
}

.question-center-wrap {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
}

.question-big-title {
  font-family: var(--font-Display);
  font-size: 2.85rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-main);
}

.swipe-stamp {
  position: absolute;
  top: 16px;
  padding: 4px 12px;
  border-radius: 6px;
  font-family: var(--font-Display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

.swipe-stamp-yes {
  right: 16px;
  border: 1.5px solid var(--gold-deep);
  color: var(--gold-deep);
  background: rgba(250, 246, 238, 0.92);
  transform: rotate(8deg);
}

.swipe-stamp-no {
  left: 16px;
  border: 1.5px solid var(--text-muted);
  color: var(--text-muted);
  background: rgba(250, 246, 238, 0.92);
  transform: rotate(-8deg);
}

.swipe-actions-row {
  width: 100%;
  max-width: 290px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.swipe-actions-row.future-actions-single {
  justify-content: flex-end;
}

.swipe-pill-btn {
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid rgba(201, 169, 110, 0.55);
  background: rgba(255, 252, 247, 0.92);
  color: var(--text-main);
  font-family: var(--font-Display);
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.swipe-pill-btn:hover {
  background: #FFFCF7;
  transform: translateY(-1px);
}

@keyframes pulseYes {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.12); box-shadow: 0 0 18px rgba(201, 169, 110, 0.75); }
}

.pulse-attention {
  animation: pulseYes 0.5s ease;
}

.swipe-hint-text {
  font-size: 0.9rem;
  color: #FFFDF9;
  text-shadow: 0 1px 6px rgba(25, 18, 10, 0.45);
  text-align: center;
}

/* ============================================================
   Reply Message Card (After Swipe / Confirm)
   ============================================================ */
.reply-card {
  padding-top: 14px;
}

.reply-top-tag {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #FFFDF9;
  font-family: var(--font-Body);
  font-size: 0.82rem;
  padding: 5px 18px;
  border-radius: 0 0 8px 8px;
  z-index: 4;
  white-space: nowrap;
}

.reply-inner {
  padding: 46px 22px 26px;
}

.reply-message-text {
  font-family: var(--font-Display);
  font-style: italic;
  font-size: 1.72rem;
  line-height: 1.38;
  color: var(--text-main);
  margin-bottom: 22px;
}

.heart-divider {
  margin-bottom: 24px;
}

.subtle-back-link {
  margin-top: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-Body);
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   Card 2: "Let's chill" Date Picker
   ============================================================ */
.chill-inner {
  padding: 22px 18px 20px;
}

.card-top-icon {
  margin-bottom: 8px;
}

.card-serif-heading {
  font-family: var(--font-Display);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.card-subtext {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.calendar-mount {
  width: 100%;
  margin-bottom: 16px;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 6px;
}

.cal-month-label {
  font-family: var(--font-Body);
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--text-main);
}

.cal-nav-btn {
  border: none;
  background: transparent;
  color: var(--gold-deep);
  font-size: 1.3rem;
  padding: 2px 8px;
  cursor: pointer;
}

.cal-nav-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 4px;
  column-gap: 2px;
  text-align: center;
}

.cal-dow {
  font-size: 0.76rem;
  color: var(--text-muted);
  padding-bottom: 4px;
}

.cal-cell {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-Body);
  font-size: 0.84rem;
}

.cal-day {
  border: none;
  background: transparent;
  color: var(--text-main);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.cal-day:hover:not(.disabled):not(.selected) {
  background: rgba(201, 169, 110, 0.18);
}

.cal-day.selected {
  background: var(--gold);
  color: #FFFDF9;
  font-weight: 500;
}

.cal-day.disabled {
  color: #C7BFAF;
  cursor: default;
}

.calendar-text-link {
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   Card 3: Future Date Details
   ============================================================ */
.future-inner {
  padding: 28px 22px 30px;
}

.future-card-title {
  font-family: var(--font-Display);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.18;
  color: var(--text-main);
  margin-bottom: 22px;
}

.future-details-list {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  padding: 0 6px;
}

.future-details-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.96rem;
  color: var(--text-main);
}

.future-details-list svg {
  flex-shrink: 0;
}

.future-place-link {
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.92rem;
  word-break: break-word;
  transition: color 0.18s ease;
}

.future-place-link:hover {
  color: var(--text-main);
}

.future-summary-box {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gold-light);
  border-radius: 8px;
  background: rgba(250, 246, 238, 0.6);
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 18px;
}

.future-summary-place {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.future-summary-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--gold-deep);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}
