* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden; /* trava rolagem: nada escapa da tela */
}

body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 24px 24px;
  position: fixed;
  inset: 0;
  touch-action: none;
  background: url("image.png") center 22% / cover no-repeat fixed;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

.card {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 520px;
  width: 100%;
  max-height: min(42vh, 420px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Controle de etapas */
.step {
  display: none;
  animation: fade 0.5s ease;
}
.step.active {
  display: block;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 1.7rem;
  color: #d6336c;
  margin-bottom: 16px;
}

h2 {
  font-size: 1.35rem;
  color: #d6336c;
  margin-bottom: 24px;
}

.big {
  font-size: 1.3rem;
  color: #444;
  margin-bottom: 28px;
}

.resumo {
  margin-top: 18px;
  font-size: 1.05rem;
  color: #555;
  line-height: 1.6;
}

input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid #f1a7c4;
  border-radius: 12px;
  margin-bottom: 22px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus {
  border-color: #d6336c;
}

.buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  min-height: 60px;
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 14px 28px;
  font-size: 1.05rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
}

.btn-sim {
  background: #d6336c;
  color: #fff;
  box-shadow: 0 6px 18px rgba(214, 51, 108, 0.45);
}

.btn-nao {
  background: #e9ecef;
  color: #555;
}

.btn-next {
  background: #d6336c;
  color: #fff;
  width: 100%;
  box-shadow: 0 6px 18px rgba(214, 51, 108, 0.4);
}

/* Botões de opções de comida */
.opcoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.btn-opcao {
  background: #fff;
  color: #d6336c;
  border: 2px solid #f1a7c4;
  box-shadow: 0 4px 12px rgba(214, 51, 108, 0.15);
}
.btn-opcao:hover {
  background: #d6336c;
  color: #fff;
  border-color: #d6336c;
}

/* Quando o botão "Não" foge — preso ao card (.card é o offset parent) */
.btn-nao.runaway {
  position: absolute;
  z-index: 5;
  margin: 0;
  transition: top 0.2s ease, left 0.2s ease;
}

.hearts {
  font-size: 2.2rem;
  margin-top: 18px;
  animation: beat 1s infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.18); }
}

/* Mobile: card mais compacto, fundo focado no rosto */
@media (max-width: 768px) {
  body {
    align-items: stretch;
    padding: 0 12px 14px;
    touch-action: pan-y;
    background-position: center 18%;
    background-attachment: scroll;
  }

  .card {
    max-width: none;
    padding: 24px 18px;
    border-radius: 20px;
    max-height: min(48vh, 480px);
  }

  h1 {
    font-size: 1.35rem;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 1.1rem;
    margin-bottom: 18px;
    line-height: 1.35;
  }

  .big {
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.45;
  }

  .buttons {
    min-height: 52px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .opcoes {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .btn-opcao {
    width: 100%;
  }
}

@media (max-width: 380px) {
  body {
    padding: 0 8px 10px;
    background-position: center 15%;
  }

  .card {
    padding: 20px 14px;
    max-height: min(50vh, 440px);
  }
}

/* Desktop largo: card estreito no rodapé, grupo visível acima */
@media (min-width: 900px) {
  body {
    background-position: center 20%;
    padding-bottom: 28px;
  }

  .card {
    max-width: 460px;
    max-height: min(38vh, 400px);
    padding: 28px 32px;
  }
}
