/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Nunito', sans-serif;
  background-color: #fdf6f0;
  color: #3d1a1a;
  overflow: hidden;
}

/* ── Particles ────────────────────────────────────────────── */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -60px;
  animation: floatUp linear infinite;
  opacity: 0;
  user-select: none;
}

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg) scale(1);   opacity: 0;   }
  10%  { opacity: 0.75; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-110vh) rotate(720deg) scale(0.6); opacity: 0; }
}

/* ── Screens ──────────────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 10;
}

.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.07);
  padding: 2.5rem 2rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ── Avatars ──────────────────────────────────────────────── */
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 22px;
  object-fit: cover;
  margin-bottom: 1.4rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.avatar-wide {
  width: 150px;
  height: 120px;
}

.emoji-header {
  font-size: 3.2rem;
  margin-bottom: 0.9rem;
  display: block;
  line-height: 1;
}

/* ── Headings & text ──────────────────────────────────────── */
h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #3d1a1a;
  line-height: 1.2;
  margin-bottom: 0.9rem;
}

.heading-upper {
  text-transform: uppercase;
  font-size: 2rem;
  font-weight: 900;
}

.subtext {
  color: #999;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-yes {
  background: #f4a7b9;
  color: #fff;
  border: none;
  padding: 1rem 3rem;
  font-size: 1.35rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(244, 167, 185, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-yes:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(244, 167, 185, 0.55);
}

.btn-yes:active { transform: scale(0.97); }

/* The escapable NO button — fixed on viewport */
.btn-no {
  position: fixed;
  z-index: 200;
  background: #c9b8e8;
  color: #fff;
  border: none;
  padding: 0.55rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  transition: left 0.18s cubic-bezier(.25,.46,.45,.94),
              top  0.18s cubic-bezier(.25,.46,.45,.94);
  user-select: none;
  /* Initial position set by JS */
  left: 20%;
  top: 75%;
  display: none; /* shown only on screen-1 */
}

.btn-primary {
  background: #f4a7b9;
  color: #fff;
  border: none;
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  width: 100%;
  margin-top: 1.25rem;
  box-shadow: 0 4px 14px rgba(244, 167, 185, 0.4);
  transition: transform 0.12s ease, opacity 0.2s ease;
}

.btn-primary:hover:not(:disabled) { transform: scale(1.02); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Screen-1 heading: force single line ─────────────────── */
#screen-1 .card { max-width: 560px; }

#screen-1 h1 {
  font-size: 1.45rem;
  white-space: nowrap;
}

/* ── Landing button area ──────────────────────────────────── */
.landing-buttons {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* ── Form elements ────────────────────────────────────────── */
.form-group {
  text-align: left;
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: #3d1a1a;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #ede5f5;
  border-radius: 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.98rem;
  color: #3d1a1a;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus { border-color: #f4a7b9; }

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ── Options grid (food & activity) ──────────────────────── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin: 1.1rem 0;
}

.option-card {
  background: #f3eeff;
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 0.85rem 0.4rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.12s, background 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.option-card:hover {
  background: #e8ddf8;
  transform: scale(1.04);
}

.option-card.selected {
  border-color: #f4a7b9;
  background: #fff0f5;
}

.option-card .opt-icon {
  font-size: 2rem;
  line-height: 1;
}

.option-card .opt-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3d1a1a;
  text-align: center;
  line-height: 1.25;
}

/* ── Confirmation screen ──────────────────────────────────── */
.confirmation-body {
  font-size: 1.05rem;
  font-weight: 600;
  color: #3d1a1a;
  line-height: 1.6;
  margin: 0.6rem 0 0.5rem;
}

.choice-badge {
  display: inline-block;
  background: #f3eeff;
  border-radius: 50px;
  padding: 0.35rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #3d1a1a;
  margin: 0.4rem 0 1.2rem;
}

.ps-note {
  font-style: italic;
  font-size: 0.78rem;
  color: #bbb;
  line-height: 1.55;
  margin-top: 1.5rem;
}

/* ── Flatpickr customisation ──────────────────────────────── */
.flatpickr-calendar {
  font-family: 'Nunito', sans-serif !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.1) !important;
  border: none !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  background: #f4a7b9 !important;
  border-color: #f4a7b9 !important;
}

.flatpickr-day:hover { background: #fce4ec !important; }

.flatpickr-months .flatpickr-month,
.flatpickr-weekdays,
.flatpickr-weekday {
  color: #3d1a1a !important;
  fill: #3d1a1a !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  font-family: 'Nunito', sans-serif !important;
  font-weight: 700 !important;
  color: #3d1a1a !important;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .card {
    padding: 2rem 1.2rem 1.5rem;
    border-radius: 22px;
  }

  h1 { font-size: 1.6rem; }
  .heading-upper { font-size: 1.65rem; }

  .avatar { width: 100px; height: 100px; }
  .avatar-wide { width: 120px; height: 100px; }

  .options-grid { grid-template-columns: repeat(2, 1fr); }

  .opt-icon { font-size: 1.6rem; }
  .opt-label { font-size: 0.7rem; }

  /* Screen-1 heading: allow wrapping on narrow screens */
  #screen-1 .card { max-width: 100%; }
  #screen-1 h1 {
    white-space: normal;
    font-size: 1.5rem;
  }
}
