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

body {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, #fff0f7 0%, #f8ecff 45%, #f4f9ff 100%);
  color: #2a1f35;
  min-height: 100vh;
}

.app {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px;
}

.screen {
  display: none;
  width: 100%;
  animation: fadeIn 0.6s ease;
}

.screen.active {
  display: flex;
}

.card {
  margin: auto;
  background: #ffffff;
  border: 1px solid #f2d8f1;
  border-radius: 24px;
  padding: 32px;
  max-width: 760px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(120, 82, 155, 0.18);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

h1,
h2 {
  text-align: center;
  color: #7e2f8e;
}

.story {
  line-height: 1.7;
  font-size: 1rem;
  color: #4a3d5c;
}

.genie {
  font-size: 3rem;
  text-align: center;
  filter: drop-shadow(0 8px 14px rgba(139, 92, 246, 0.2));
}

.genie.small {
  font-size: 2rem;
}

.counter {
  text-align: center;
  font-weight: 600;
  color: #b04cb4;
}

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

.answer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7fd;
  border: 1px solid #f2d8f1;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.answer input {
  accent-color: #b04cb4;
}

.answer:hover {
  border-color: #d79be6;
  background: #ffeef9;
  transform: translateY(-1px);
}

.warning {
  display: none;
  color: #e1846a;
  font-size: 0.9rem;
  text-align: center;
}

.warning.visible {
  display: block;
}

button {
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  align-self: center;
}

.primary {
  background: linear-gradient(135deg, #b77dff, #ff9ad5);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(183, 125, 255, 0.3);
}

.secondary {
  background: #fff4fb;
  color: #7e2f8e;
  border: 1px solid #f2d8f1;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(92, 45, 120, 0.2);
}

.final-message {
  text-align: center;
  color: #5a3a69;
  line-height: 1.6;
}

.final-images {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  margin-top: 8px;
  flex-wrap: nowrap;
}

.final-photo {
  flex: 1 1 50%;
  max-width: 50%;
  width: 50%;
  height: 260px;
  border-radius: 0;
  border: 2px solid #f2d8f1;
  box-shadow: 0 16px 30px rgba(124, 73, 150, 0.18);
  object-fit: contain;
}

.final-photo:first-child {
  border-radius: 18px 0 0 18px;
}

.final-photo:last-child {
  border-radius: 0 18px 18px 0;
  border-left-width: 0;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(44, 19, 66, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  border: 1px solid #f2d8f1;
  box-shadow: 0 20px 50px rgba(112, 71, 142, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-content.angry {
  border-color: #ffb3b3;
  box-shadow: 0 20px 50px rgba(190, 61, 61, 0.25);
}

.genie.angry {
  filter: drop-shadow(0 10px 16px rgba(190, 61, 61, 0.35));
}

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

@media (max-width: 640px) {
  .card {
    padding: 24px;
  }

  .story {
    font-size: 0.92rem;
  }

  .final-images {
    flex-direction: column;
  }

  .final-photo {
    max-width: 100%;
    width: 100%;
    height: 220px;
    border-radius: 18px;
    border-left-width: 2px;
  }

  .final-photo:last-child {
    border-left-width: 2px;
  }
}
