@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --pink: #e72b83;
  --pink-dark: #d61d72;
  --soft: #f6d6f8;
  --text: #29212e;
  --muted: #9b829c;
}

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

body {
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.7) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,.65) 0 2px, transparent 3px),
    linear-gradient(145deg, #f4d0f5 0%, #edc4f0 45%, #f4d3f4 100%);
}

.page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  overflow: visible;
  position: relative;
  isolation: isolate;
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(55px);
  opacity: .25;
  z-index: -2;
}

.page::before {
  background: #fff;
  top: -90px;
  left: -70px;
}

.page::after {
  background: #d84db4;
  bottom: -110px;
  right: -80px;
}

.card {
  width: min(92vw, 520px);
  min-height: min(610px, calc(100dvh - 64px));
  padding: 42px 30px 32px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 38px;
  background: rgba(255, 250, 255, .45);
  box-shadow:
    0 28px 70px rgba(130, 55, 125, .15),
    inset 0 1px 0 rgba(255,255,255,.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: cardIn .7s ease both;
}

.card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -90px;
  right: -60px;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
}

.dots {
  direction: ltr;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 34px;
}

.dots i,
.dots b {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #efa5d0;
}

.dots b {
  width: 34px;
  background: var(--pink);
  border-radius: 20px;
}

.emoji {
  font-size: 68px;
  line-height: 1;
  margin-bottom: 20px;
  filter: drop-shadow(0 8px 12px rgba(80,30,70,.08));
  animation: float 3s ease-in-out infinite;
}

h1 {
  font-size: clamp(27px, 7vw, 38px);
  line-height: 1.4;
  margin: 0 0 10px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -.7px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 2;
  text-align: center;
  font-weight: 500;
}

.buttons {
  width: min(100%, 360px);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  direction: ltr;
  margin-top: 36px;
}

button {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    width .45s cubic-bezier(.2,.8,.2,1),
    height .45s cubic-bezier(.2,.8,.2,1),
    transform .2s ease,
    font-size .35s ease,
    opacity .35s ease;
}

button:active {
  transform: scale(.96);
}

.yes-btn {
  direction: rtl;
  width: 178px;
  height: 74px;
  border-radius: 38px;
  background: linear-gradient(135deg, #ec2c85, #d92075);
  color: white;
  font-size: 24px;
  box-shadow: 0 13px 30px rgba(218, 31, 117, .25);
}

.yes-btn span {
  font-size: 20px;
  margin-right: 4px;
}

.no-btn {
  direction: rtl;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,.32);
  color: #8f7b91;
  font-size: 15px;
  box-shadow: 0 5px 18px rgba(120, 70, 120, .05);
}

.no-btn.hidden {
  opacity: 0;
  pointer-events: none;
  width: 0;
  margin: 0;
}

.hint {
  min-height: 30px;
  margin: 22px 0 0;
  color: #9b728f;
  font-size: 14px;
  font-weight: 600;
  transition: opacity .25s ease, transform .25s ease;
}

.hint.pop {
  animation: pop .35s ease;
}

.floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.floating-hearts span {
  position: absolute;
  font-size: 20px;
  opacity: .55;
  animation: drift 7s ease-in-out infinite;
}

.floating-hearts span:nth-child(1) { top: 13%; left: 20%; animation-delay: -.5s; }
.floating-hearts span:nth-child(2) { top: 18%; right: 17%; animation-delay: -2s; }
.floating-hearts span:nth-child(3) { top: 30%; left: 8%; animation-delay: -4s; }
.floating-hearts span:nth-child(4) { top: 35%; right: 8%; animation-delay: -1s; }
.floating-hearts span:nth-child(5) { top: 55%; left: 13%; animation-delay: -3s; }
.floating-hearts span:nth-child(6) { top: 65%; right: 13%; animation-delay: -5s; }
.floating-hearts span:nth-child(7) { top: 75%; left: 24%; animation-delay: -2.5s; }
.floating-hearts span:nth-child(8) { top: 72%; right: 25%; animation-delay: -4.5s; }
.floating-hearts span:nth-child(9) { top: 48%; left: 50%; animation-delay: -6s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

@keyframes pop {
  0% { transform: scale(.9); opacity: .5; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

@media (max-width: 480px) {
  .page { padding: 14px; }

  .card {
    width: 94vw;
    min-height: 590px;
    border-radius: 34px;
    padding: 34px 20px 28px;
  }

  .dots { margin-bottom: 28px; }
  .emoji { font-size: 61px; }
  .subtitle { font-size: 13px; }
  .buttons { margin-top: 30px; }
  .yes-btn { width: 165px; height: 70px; }
  .no-btn { width: 54px; height: 54px; }
}


.form-card, .food-card, .review-card {
  justify-content: flex-start;
  padding-top: 34px;
}

.steps {
  direction: ltr;
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 25px;
}

.steps i, .steps b {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e8a3cf;
}

.steps b {
  width: 34px;
  background: #e72b83;
  border-radius: 20px;
}

.page-icon {
  font-size: 53px;
  line-height: 1;
  margin: 4px 0 17px;
}

.form-card h1, .food-card h1, .review-card h1 {
  font-size: clamp(25px, 6vw, 34px);
  margin-bottom: 5px;
}

.form-card .subtitle, .food-card .subtitle, .review-card .subtitle {
  font-size: 14px;
  margin-bottom: 22px;
}

form {
  width: 100%;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  text-align: right;
}

label {
  color: #74566f;
  font-weight: 700;
  font-size: 14px;
  margin: 9px 5px 7px;
}

input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(220, 113, 177, .24);
  background: rgba(255,255,255,.3);
  border-radius: 18px;
  padding: 0 16px;
  color: #6e5069;
  font: inherit;
  font-size: 15px;
  outline: none;
  direction: ltr;
  text-align: center;
}

input:focus {
  border-color: rgba(231,43,131,.55);
  box-shadow: 0 0 0 4px rgba(231,43,131,.08);
}

.main-btn {
  width: 100%;
  height: 59px;
  border-radius: 19px;
  margin-top: 22px;
  background: linear-gradient(135deg, #eb398d, #db2479);
  color: white;
  font-size: 17px;
  box-shadow: 0 11px 25px rgba(218,31,117,.2);
}

.main-btn:disabled {
  opacity: .45;
  cursor: default;
  box-shadow: none;
}

.food-grid {
  width: 100%;
  max-width: 350px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.food-option {
  height: 132px;
  border-radius: 23px;
  border: 1.5px solid rgba(222, 120, 181, .12);
  background: rgba(255,255,255,.2);
  color: #674d63;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  position: relative;
}

.food-option span {
  font-size: 34px;
}

.food-option strong {
  font-size: 14px;
}

.food-option.selected {
  border-color: #e82f83;
  background: rgba(246, 191, 225, .3);
  box-shadow: 0 8px 20px rgba(222, 54, 139, .1);
}

.food-option.selected::before {
  content: "✓";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eb3b8b;
  color: white;
  font-size: 13px;
}

.food-card .main-btn {
  max-width: 350px;
}

.summary {
  width: 100%;
  max-width: 350px;
  border-radius: 23px;
  background: rgba(255,255,255,.25);
  padding: 8px 16px;
}

.summary-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 3px;
  border-bottom: 1px solid rgba(180, 104, 160, .1);
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row > span {
  width: 40px;
  text-align: center;
  font-size: 27px;
}

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

.summary-row small {
  color: #9a7b95;
  font-size: 12px;
}

.summary-row strong {
  color: #4d394a;
  font-size: 15px;
}

.final-text {
  width: 100%;
  max-width: 350px;
  color: #80637b;
  font-size: 14px;
  line-height: 2;
  text-align: center;
  margin: 19px 0 0;
}

.review-card .main-btn {
  max-width: 350px;
  margin-top: 15px;
}

@media (max-width: 480px) {
  .form-card, .food-card, .review-card {
    min-height: 590px;
  }

  .page-icon {
    font-size: 48px;
    margin-bottom: 13px;
  }

  .food-option {
    height: 122px;
  }

  .food-grid {
    gap: 10px;
  }
}


/* Responsive / desktop usability fixes */
html {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

button,
input {
  pointer-events: auto;
}

@media (max-height: 720px) {
  .page {
    align-items: flex-start;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .card {
    min-height: 0;
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .emoji {
    margin-bottom: 12px;
  }

  .dots {
    margin-bottom: 20px;
  }

  .buttons {
    margin-top: 24px;
  }

  .form-card,
  .food-card,
  .review-card {
    min-height: 0;
  }
}

@media (min-width: 700px) {
  .card {
    max-height: none;
  }

  .food-card .food-grid {
    max-width: 390px;
  }

  .form-card form,
  .review-card .summary,
  .review-card .final-text,
  .review-card .main-btn,
  .food-card .main-btn {
    max-width: 390px;
  }
}

@media (max-width: 699px) {
  .page {
    min-height: 100dvh;
    padding: 16px 12px;
  }

  .card {
    width: min(94vw, 520px);
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 12px 10px;
  }

  .card {
    width: 95vw;
  }
}
