/* ==========================================
   DESIGN TOKENS & RESET
========================================== */
:root {
  --heading-rose: #D6336C;
  --primary-btn: #E0447A;
  --primary-btn-hover: #D03B6F;
  --secondary-bg-hover: #FFF0F5;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --card-bg: #FFFFFF;
  --border-light: #E5E7EB;
  --shadow-card: 0 24px 60px rgba(214, 51, 108, 0.16), 0 8px 20px rgba(0, 0, 0, 0.04);
  --shadow-btn: 0 6px 18px rgba(224, 68, 122, 0.28);
  --shadow-btn-hover: 0 10px 24px rgba(224, 68, 122, 0.42);
  --radius-card: 24px;
  --radius-pill: 9999px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  /* Pastel pink to lavender gradient across the whole page */
  background: linear-gradient(135deg, #FFE5EC 0%, #F0E6FF 50%, #E8DFF5 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  padding: 16px;
}

/* Ambient glow decoration */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
  animation: float-glow 14s ease-in-out infinite alternate;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #FFB3C6 0%, rgba(255, 179, 198, 0) 70%);
  top: -80px;
  left: -80px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #D8B4F8 0%, rgba(216, 180, 248, 0) 70%);
  bottom: -100px;
  right: -80px;
  animation-delay: -7s;
}

@keyframes float-glow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(35px, -35px) scale(1.08); }
}

/* ==========================================
   APP CONTAINER & MAIN CARD
========================================== */
.app-container {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
}

/* Centred white card with rounded corners (24px radius) and soft drop shadow */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 42px 38px;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: min-height 0.3s ease;
}

@media (max-width: 580px) {
  .card {
    padding: 30px 20px;
    border-radius: 20px;
    min-height: 440px;
  }
}

/* ==========================================
   SCREEN TRANSITIONS (300 to 400ms)
========================================== */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   TYPOGRAPHY & HEADINGS (Playfair Display)
========================================== */
.screen-header {
  text-align: center;
  margin-bottom: 28px;
}

.main-heading, .section-heading {
  font-family: var(--font-serif);
  color: var(--heading-rose);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}

.main-heading {
  font-size: 2.1rem;
}

.section-heading {
  font-size: 1.8rem;
}

@media (max-width: 580px) {
  .main-heading {
    font-size: 1.55rem;
  }
  .section-heading {
    font-size: 1.4rem;
  }
}

.subtitle {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ==========================================
   PRIMARY ACTION BUTTONS
   Pill shaped, solid pink/magenta (#E0447A),
   white bold text, subtle hover lift
========================================== */
.btn-primary {
  background: var(--primary-btn);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  padding: 15px 40px;
  box-shadow: var(--shadow-btn);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.pill {
  border-radius: var(--radius-pill);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
  background: var(--primary-btn-hover);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.screen-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* ==========================================
   SCREEN 1: ASK & NO BUTTON DODGE
========================================== */
.ask-buttons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
  margin-bottom: 24px;
  min-height: 110px;
  position: relative;
}

.btn-yes {
  font-size: 1.3rem;
  padding: 18px 52px;
  animation: pulse-yes 2s infinite;
}

@keyframes pulse-yes {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(224, 68, 122, 0.28); }
  50% { transform: scale(1.04); box-shadow: 0 12px 28px rgba(224, 68, 122, 0.45); }
}

.btn-yes:hover {
  animation: none;
}

.btn-no-tiny {
  background: #F8F9FA;
  color: #4B5563;
  border: 1px solid var(--border-light);
  padding: 9px 20px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: top 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-no-tiny:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

/* When dodging, btn-no gets positioned absolutely inside the card */
.btn-no-tiny.dodging {
  position: absolute;
  z-index: 50;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* ==========================================
   SCREEN 2: FOOD PICKER
   Secondary option cards: white or light grey,
   thin border, rounded corners, dark text
========================================== */
.food-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 14px;
}

@media (min-width: 520px) {
  .food-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.food-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
  font-family: var(--font-sans);
}

.food-card:hover {
  border-color: #FFB3C6;
  background: #FFF9FB;
  transform: translateY(-2px);
}

.food-card.selected {
  border-color: var(--heading-rose);
  background: var(--secondary-bg-hover);
  box-shadow: 0 6px 18px rgba(214, 51, 108, 0.16);
  transform: scale(1.03);
  font-weight: 600;
}

.food-emoji {
  font-size: 2.3rem;
  line-height: 1;
}

.food-label {
  font-size: 0.98rem;
}

/* ==========================================
   SCREEN 3: DATE & TIME PICKERS
========================================== */
.picker-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.picker-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.picker-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.picker-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--heading-rose);
}

/* Calendar Widget */
.calendar-widget {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}

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

.cal-month-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--heading-rose);
}

.cal-nav-btn {
  background: #F8F9FA;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-nav-btn:hover {
  background: var(--secondary-bg-hover);
  color: var(--heading-rose);
  border-color: #FFB3C6;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
}

.cal-day:hover:not(.empty) {
  background: #FFF0F5;
  color: var(--heading-rose);
}

.cal-day.empty {
  cursor: default;
}

.cal-day.selected {
  background: var(--primary-btn);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(224, 68, 122, 0.35);
}

.cal-day.today:not(.selected) {
  border: 1.5px solid var(--heading-rose);
  color: var(--heading-rose);
  font-weight: 600;
}

/* Time Grid */
.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 210px;
  overflow-y: auto;
  padding: 4px;
}

@media (min-width: 480px) {
  .time-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.time-grid::-webkit-scrollbar {
  width: 6px;
}

.time-grid::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 8px;
}

.time-grid::-webkit-scrollbar-thumb {
  background: #FFB3C6;
  border-radius: 8px;
}

.time-pill {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 10px 8px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.time-pill:hover {
  border-color: #FFB3C6;
  background: #FFF9FB;
}

.time-pill.selected {
  background: var(--primary-btn);
  color: #ffffff;
  border-color: var(--primary-btn);
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(224, 68, 122, 0.3);
  transform: scale(1.03);
}

/* ==========================================
   SCREEN 4: CONFIRMATION & CONFETTI
========================================== */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 100;
}

.confetti-emoji {
  position: absolute;
  top: -50px;
  user-select: none;
  pointer-events: none;
  will-change: transform, opacity;
  animation-name: fall-emoji;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes fall-emoji {
  0% {
    transform: translateY(-50px) rotate(var(--start-rot, 0deg));
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(var(--end-rot, 360deg));
    opacity: 0;
  }
}

.confirmation-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 20;
}

.celebration-badge {
  font-size: 3.2rem;
  margin-bottom: 14px;
  animation: bounce-heart 1.8s infinite cubic-bezier(0.28, 0.84, 0.42, 1);
}

@keyframes bounce-heart {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.15) translateY(-8px); }
}

.confirm-heading {
  font-size: 2.5rem;
  margin-bottom: 6px;
}

.confirm-subtitle {
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.summary-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: 20px;
  padding: 24px 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.summary-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.summary-icon {
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  background: #FFF0F5;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.summary-value {
  font-family: var(--font-sans);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-main);
}

.summary-divider {
  height: 1px;
  background: #F1F5F9;
  width: 100%;
}

.final-message {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--heading-rose);
  margin-bottom: 24px;
}

.footer-note {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.5;
}
