:root {
  --pink: #c94f6d;
  --pink-soft: #e88aa0;
  --yes-1: #d05a78;
  --yes-2: #b8455f;
  --gray-1: #cfd2d6;
  --gray-2: #b9bdc2;
  --card-bg: #ffffff;
  --text: #b23a56;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
  background: linear-gradient(165deg, #fdf3f4 0%, #f7ebf1 50%, #f0e6ee 100%);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.scene {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.card {
  position: relative;
  width: 100%;
  background: var(--card-bg);
  border-radius: 34px;
  padding: 34px 26px 30px;
  box-shadow: 0 24px 60px rgba(178, 58, 86, 0.18), 0 4px 14px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.4s ease;
}

/* переключение экранов */
.screen[hidden] { display: none; }
.screen--active { animation: screenIn 0.55s cubic-bezier(.2,.8,.25,1); }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* пульсирующие сердечки на экране обнимашек */
.hug-heart {
  transform-box: fill-box;
  transform-origin: center;
  animation: heartPulse 1.3s ease-in-out infinite;
}
@keyframes heartPulse {
  0%, 100% { transform: scale(1);   opacity: 0.85; }
  50%      { transform: scale(1.3); opacity: 1; }
}

.card.sad {
  animation: shakeSad 0.5s ease;
}

@keyframes shakeSad {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px) rotate(-1deg); }
  75% { transform: translateX(6px) rotate(1deg); }
}

/* Котики */
.cats {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.cats-scene {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* лёгкое покачивание всей сцены */
.cat--tabby { animation: bob 3.4s ease-in-out infinite; transform-origin: 70px 190px; }
.cat--white { animation: bob 3.4s ease-in-out infinite; animation-delay: 0.7s; transform-origin: 270px 190px; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* небо: солнышко и тучки */
.sun { transform-box: fill-box; transform-origin: center; animation: sunPulse 4s ease-in-out infinite; }
.sun-rays { transform-box: fill-box; transform-origin: center; animation: spin 20s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sunPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.cloud-1 { animation: drift1 9s ease-in-out infinite; }
.cloud-2 { animation: drift2 12s ease-in-out infinite; }
@keyframes drift1 {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(12px); }
}
@keyframes drift2 {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-14px); }
}

/* летающие ноты на экране концерта */
.mnote {
  transform-box: fill-box;
  transform-origin: center;
  animation: noteFloat 3s ease-in-out infinite;
}
@keyframes noteFloat {
  0%   { transform: translateY(2px) rotate(-8deg);  opacity: 0.55; }
  50%  { transform: translateY(-10px) rotate(8deg); opacity: 1; }
  100% { transform: translateY(2px) rotate(-8deg);  opacity: 0.55; }
}

/* хвостики */
.tail { transform-origin: center; animation: tailWag 4s ease-in-out infinite; }
@keyframes tailWag {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(4deg); }
}

.eye { transition: transform 0.3s ease; transform-origin: center; }
.mouth { transition: opacity 0.3s ease; }

/* грустное состояние котиков */
.sad-face { opacity: 0; transition: opacity 0.35s ease; }
.cat.is-sad .sad-face { opacity: 1; }
.cat.is-sad .mouth,
.cat.is-sad .mouth-o { opacity: 0; }
.cat.is-sad .head {
  transform: rotate(-4deg) translateY(3px);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.4s ease;
}
/* слезинка капает */
.cat.is-sad .tear-drop { animation: teardrop 1.6s ease-in-out 0.2s infinite; }
@keyframes teardrop {
  0%   { opacity: 0; transform: translateY(0); }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

.heart-float {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  font-size: 20px;
  opacity: 0;
  pointer-events: none;
}

/* Вопрос */
.question {
  margin: 4px 0 24px;
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.2px;
}

/* Кнопки */
.buttons {
  position: relative;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  min-height: 58px;
}

.btn {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  padding: 15px 40px;
  border-radius: 18px;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.btn:active { transform: scale(0.95); }

.btn--yes {
  background: linear-gradient(160deg, var(--yes-1), var(--yes-2));
  box-shadow: 0 8px 18px rgba(184, 69, 95, 0.35);
}

.btn--yes.grow {
  animation: growPulse 0.6s ease infinite alternate;
}
@keyframes growPulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.btn--no {
  background: linear-gradient(160deg, var(--gray-1), var(--gray-2));
  color: #6b6f74;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* Превращение в губы */
.btn--no.kiss {
  padding: 12px 22px;
  font-size: 26px;
  background: linear-gradient(160deg, #ff9db2, #e8607f);
  color: #fff;
  border-radius: 50%;
  animation: kissPop 0.45s ease;
}
@keyframes kissPop {
  0% { transform: scale(0.7) rotate(-10deg); }
  60% { transform: scale(1.2) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Плавающие сердечки при "Да" */
.floating-heart {
  position: fixed;
  bottom: -40px;
  font-size: 26px;
  pointer-events: none;
  animation: rise linear forwards;
  z-index: 50;
}
@keyframes rise {
  to {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}
