/* ============================================
   🎨 ИМПОРТ ШРИФТОВ
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&family=Nunito:wght@400;600;700;800&display=swap');

/* ============================================
   🔧 ПЕРЕМЕННЫЕ + СБРОС
   ============================================ */
:root {
  --pink: #ff6fa5;
  --pink-soft: #ffb3d1;
  --pink-dark: #e05585;
  --blue: #4facfe;
  --blue-soft: #a1d4ff;
  --purple: #a18cd1;
  --dark: #2a2a4a;
  --text-muted: #9b9bb0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
  overflow-x: hidden;
  padding: 30px 15px;
  position: relative;
  color: var(--dark);
}

h1, h2, .reasons-title, .gallery-title, .cloud p {
  font-family: 'Comfortaa', 'Nunito', sans-serif;
  letter-spacing: -0.3px;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ============================================
   🌸 ФОНЫ СТРАНИЦ
   ============================================ */
.page-index, .page-no {
  background: linear-gradient(135deg, #ffe0ec 0%, #ffc4dd 25%, #fec8d8 50%, #ffd7c9 75%, #ffe0ec 100%);
}
.page-quiz {
  background: linear-gradient(135deg, #d4e8ff 0%, #b8d9ff 25%, #c3e8ff 50%, #b6e0f5 75%, #d4e8ff 100%);
}
.page-reasons {
  background: linear-gradient(135deg, #fdd6f0 0%, #e0c3fc 25%, #c8b6ff 50%, #b8d4ff 75%, #fdd6f0 100%);
}
.page-yes {
  background: linear-gradient(135deg, #c5e4ff 0%, #d8c8ff 25%, #ffd3e8 50%, #ffe0cc 75%, #c5e4ff 100%);
}
.page-gallery {
  background: linear-gradient(135deg, #1a1a3e 0%, #2d1b5e 25%, #4a2a7a 50%, #5c3a8a 75%, #1a1a3e 100%);
  padding: 20px 15px;
}

/* ============================================
   💌 КАРТОЧКА
   ============================================ */
.card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 55px 45px;
  border-radius: 35px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 30px 80px rgba(255, 111, 165, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  text-align: center;
  max-width: 560px;
  width: 100%;
  animation: pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 5;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 179, 209, 0.3), transparent 50%);
  pointer-events: none;
  animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}

@keyframes pop {
  0% { transform: scale(0.6) rotate(-5deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.shake-card {
  animation: pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), shake 0.7s ease 0.8s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-12px) rotate(-2deg); }
  40% { transform: translateX(12px) rotate(2deg); }
  60% { transform: translateX(-8px) rotate(-1deg); }
  80% { transform: translateX(8px) rotate(1deg); }
}

h1 {
  color: var(--pink);
  font-size: 28px;
  margin-bottom: 15px;
  line-height: 1.4;
  font-weight: 700;
  text-shadow: 0 2px 20px rgba(255, 111, 165, 0.3);
}

.sub {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 16px;
  font-weight: 500;
}

.emoji {
  font-size: 70px;
  margin-bottom: 15px;
  display: inline-block;
  filter: drop-shadow(0 10px 20px rgba(255, 111, 165, 0.4));
}

.bounce { animation: bounce 2.2s ease-in-out infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

.wobble { animation: wobble 2s ease-in-out infinite; }

@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-12deg) scale(1.05); }
  75% { transform: rotate(12deg) scale(1.05); }
}

.hint {
  color: #b8b8d0;
  font-size: 13px;
  margin-top: 28px;
  font-style: italic;
  min-height: 20px;
  font-weight: 500;
}

/* ============================================
   🎯 КНОПКИ
   ============================================ */
.buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

button {
  padding: 16px 42px;
  font-size: 17px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.btn-yes {
  background: linear-gradient(135deg, #ff8db8 0%, #ff6fa5 50%, var(--pink-dark) 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(255, 111, 165, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.btn-yes::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.btn-yes:hover:not(:disabled)::before { left: 100%; }

.btn-yes:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 40px rgba(255, 111, 165, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

.btn-yes:active:not(:disabled) { transform: translateY(-1px) scale(1.02); }

.btn-yes:disabled {
  background: linear-gradient(135deg, #d0d0e0, #b8b8c8);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-no {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-muted);
  border: 2px solid rgba(180, 180, 210, 0.4);
  backdrop-filter: blur(10px);
}

.btn-no:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #7a7a95;
  transform: translateY(-3px);
  border-color: rgba(180, 180, 210, 0.6);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(255, 111, 165, 0.45); }
  50% { transform: scale(1.06); box-shadow: 0 15px 45px rgba(255, 111, 165, 0.7); }
}

/* ============================================
   ✨ ЧАСТИЦЫ ФОНА
   ============================================ */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  animation: floatUp linear infinite;
  opacity: 0.6;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

@keyframes floatUp {
  0% { transform: translateY(100vh) rotate(0) scale(0.8); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.7; }
  100% { transform: translateY(-100px) rotate(360deg) scale(1.1); opacity: 0; }
}

/* ============================================
   💭 ВИКТОРИНА
   ============================================ */
.quiz-container {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  padding: 45px 40px;
  border-radius: 35px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  max-width: 660px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(79, 172, 254, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  position: relative;
  z-index: 5;
  animation: pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-header h2 {
  color: var(--blue);
  text-align: center;
  margin-bottom: 22px;
  font-size: 23px;
  font-weight: 700;
}

.progress {
  background: rgba(200, 220, 255, 0.4);
  height: 10px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff8db8, var(--blue));
  width: 0;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(79, 172, 254, 0.6);
}

.quiz-count {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
  font-weight: 600;
}

.quiz-question {
  font-size: 20px;
  color: var(--dark);
  margin-bottom: 28px;
  text-align: center;
  font-weight: 700;
  min-height: 60px;
  line-height: 1.45;
  font-family: 'Comfortaa', sans-serif;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.answer-btn {
  background: linear-gradient(135deg, rgba(224, 242, 255, 0.9), rgba(240, 248, 255, 0.9));
  color: #3a5a8c;
  border: 2px solid rgba(184, 224, 255, 0.6);
  padding: 16px 22px;
  font-size: 15px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 600;
  font-family: inherit;
  text-align: left;
}

.answer-btn:hover {
  background: linear-gradient(135deg, #ff8db8, var(--blue));
  color: white;
  transform: translateY(-3px) scale(1.02);
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(79, 172, 254, 0.4);
}

.fade-in { animation: fadeIn 0.5s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-end { text-align: center; }
.quiz-end h2 { color: var(--blue); margin: 15px 0 12px; font-size: 24px; }
.quiz-end .btn-yes { margin-top: 22px; }

/* ============================================
   💙 ПРИЧИНЫ
   ============================================ */
.reasons-container {
  max-width: 1100px;
  width: 100%;
  position: relative;
  z-index: 5;
  text-align: center;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

.reasons-title {
  color: #6a4c93;
  font-size: 28px;
  margin-bottom: 12px;
  font-weight: 700;
}

.reasons-container .sub {
  color: #7a7a95;
  margin-bottom: 22px;
  font-weight: 500;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
  overflow-y: auto;
  padding: 12px;
  max-height: 65vh;
  scrollbar-width: thin;
  scrollbar-color: rgba(161, 140, 209, 0.5) transparent;
}

.reasons-grid::-webkit-scrollbar { width: 8px; }
.reasons-grid::-webkit-scrollbar-thumb {
  background: rgba(161, 140, 209, 0.5);
  border-radius: 10px;
}

.reason-card {
  aspect-ratio: 1;
  perspective: 1200px;
  cursor: pointer;
  position: relative;
  min-height: 125px;
}

.reason-front, .reason-back {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  backface-visibility: hidden;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 12px 30px rgba(161, 140, 209, 0.3);
}

.reason-front {
  background: linear-gradient(135deg, #ffb3d1 0%, var(--blue-soft) 100%);
  font-size: 55px;
  color: white;
  font-weight: bold;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.reason-back {
  background: rgba(255, 255, 255, 0.98);
  transform: rotateY(180deg);
  color: #5a5a8c;
  font-size: 12.5px;
  text-align: center;
  line-height: 1.4;
  font-weight: 600;
  border: 2px solid rgba(255, 179, 209, 0.4);
}

.reason-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.reason-card.flipped .reason-front { transform: rotateY(-180deg); }
.reason-card.flipped .reason-back { transform: rotateY(0); }

.reasons-footer { text-align: center; padding-top: 12px; }

/* ============================================
   🐰 ФИНАЛЬНАЯ СТРАНИЦА
   ============================================ */
.final-container {
  text-align: center;
  position: relative;
  z-index: 5;
  padding: 20px;
  animation: pop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 620px;
}

.cloud {
  position: relative;
  background: rgba(255, 255, 255, 0.98);
  padding: 28px 32px;
  border-radius: 45px;
  max-width: 520px;
  margin: 0 auto 30px;
  box-shadow: 0 20px 60px rgba(255, 111, 165, 0.3);
  animation: float 3.5s ease-in-out infinite;
  border: 2px solid rgba(255, 179, 209, 0.4);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.cloud::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 22px solid rgba(255, 255, 255, 0.98);
}

.cloud::before {
  content: '';
  position: absolute;
  bottom: -26px;
  left: 45%;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 50%;
}

.cloud p {
  color: #5a5a8c;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 600;
}

.cloud .name { color: var(--pink); font-weight: 700; }

.bunny {
  font-size: 140px;
  display: inline-block;
  animation: bunnyBounce 1.6s ease-in-out infinite;
  filter: drop-shadow(0 20px 35px rgba(255, 111, 165, 0.4));
  margin: 20px 0;
}

@keyframes bunnyBounce {
  0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); }
  50% { transform: translateY(-24px) rotate(4deg) scale(1.05); }
}

.celebrate-btn { display: block; margin: 22px auto 0; }

.final-message {
  margin-top: 32px;
  opacity: 0;
  transform: scale(0.7) translateY(20px);
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--pink);
  font-size: 21px;
  font-weight: 700;
  font-family: 'Comfortaa', sans-serif;
}

.final-message.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* ============================================
   💕 СЕРДЕЧКИ И КОНФЕТТИ
   ============================================ */
.heart {
  position: fixed;
  font-size: 26px;
  animation: riseUp 4.5s linear infinite;
  opacity: 0.85;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 0 10px rgba(255, 111, 165, 0.6));
}

@keyframes riseUp {
  0% { transform: translateY(100vh) scale(0.4) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-120px) scale(1.3) rotate(360deg); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  animation: fall linear forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(100vh) rotate(900deg); opacity: 0; }
}

/* ============================================
   📸 КНОПКА ГАЛЕРЕИ
   ============================================ */
.gallery-btn {
  display: block;
  margin: 28px auto 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.gallery-btn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation: pulse 2.5s infinite;
}

/* ============================================
   🖼️ ГАЛЕРЕЯ
   ============================================ */
.page-gallery {
  padding: 25px 15px;
  display: block;
  min-height: 100vh;
}

.gallery-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 35px 30px;
  text-align: center;
  animation: pop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 5;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.gallery-title {
  color: white;
  font-size: 34px;
  margin-bottom: 10px;
  text-shadow: 0 4px 30px rgba(255, 179, 209, 0.6);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.gallery-sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  margin-bottom: 28px;
  font-weight: 500;
}

/* СЛАЙДШОУ */
.slideshow {
  position: relative;
  width: 100%;
  height: 78vh;
  min-height: 480px;
  max-height: 900px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(255, 111, 165, 0.15);
  margin-bottom: 28px;
  background: #0a0a1a;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

/* СЛАЙД */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s ease, transform 8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0a1a;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* 🌫️ Размытый ФОН для ФОТО */
.slide-bg {
  position: absolute;
  inset: -60px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(50px) brightness(0.4) saturate(1.3);
  transform: scale(1.15);
  z-index: 0;
}

/* 🌫️ Размытый ФОН для ВИДЕО */
.slide-bg-video {
  position: absolute;
  inset: -60px;
  width: calc(100% + 120px);
  height: calc(100% + 120px);
  object-fit: cover;
  filter: blur(50px) brightness(0.4) saturate(1.3);
  transform: scale(1.15);
  z-index: 0;
  pointer-events: none;
}

/* 🖼️ ФОТО — размер для ПК */
.slide-img {
  position: relative;
  max-width: 1%;
  max-height: 1%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  z-index: 1;
  border-radius: 22px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.25);
}

/* 🎥 ВИДЕО — размер для ПК */
.slide-video {
  position: relative;
  max-width: 1%;
  max-height: 1%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  z-index: 5;
  cursor: pointer;
  border-radius: 22px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9);
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

/* Затемнение по краям */
.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    transparent 15%,
    transparent 85%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
  z-index: 3;
  border-radius: 26px;
}

/* Стрелки */
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: white;
  font-size: 34px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
  line-height: 1;
  font-weight: 300;
}

.slide-nav:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.5);
}

.slide-nav.prev { left: 20px; }
.slide-nav.next { right: 20px; }

/* Точки */
.slide-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 90%;
  padding: 9px 15px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dot.active {
  background: linear-gradient(135deg, #ff8db8, var(--pink));
  width: 28px;
  border-radius: 6px;
  box-shadow: 0 0 18px rgba(255, 111, 165, 0.95);
}

/* Подпись */
.slide-caption {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(15px);
  color: white;
  padding: 12px 26px;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Comfortaa', sans-serif;
  z-index: 8;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: 85%;
  text-align: center;
  pointer-events: none;
}

.slide-caption.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Счётчик */
.slide-counter {
  position: absolute;
  top: 20px;
  right: 22px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  color: white;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 700;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
}

/* Миниатюры */
.thumbnails {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 8px;
  margin-bottom: 28px;
  justify-content: center;
  flex-wrap: wrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

.thumbnails::-webkit-scrollbar { height: 6px; }
.thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 10px;
}

.thumb {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  opacity: 0.55;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.thumb:hover {
  opacity: 1;
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 12px 30px rgba(255, 111, 165, 0.5);
}

.thumb.active {
  border-color: #ff8db8;
  opacity: 1;
  box-shadow: 0 0 35px rgba(255, 111, 165, 0.9), 0 0 0 2px rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.thumb-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  font-size: 22px;
  z-index: 2;
  transition: background 0.3s ease;
}

.thumb-video:hover .play-icon {
  background: rgba(255, 111, 165, 0.55);
}

/* Финальная плашка */
.gallery-footer {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 28px 32px;
  border-radius: 25px;
  margin-top: 15px;
}

.gallery-quote {
  color: white;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 22px;
  font-style: italic;
  font-weight: 500;
}

/* Кнопка музыки */
.music-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 11px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
  font-family: 'Nunito', sans-serif;
}

.music-toggle:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px) scale(1.05);
}

/* Кнопка Play */
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  border: 3px solid rgba(255, 255, 255, 0.6);
  color: white;
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding-left: 6px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
  animation: playPulse 2s ease-in-out infinite;
}

.video-play-btn:hover {
  background: rgba(255, 111, 165, 0.7);
  transform: translate(-50%, -50%) scale(1.15);
}

.video-play-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.5);
}

@keyframes playPulse {
  0%, 100% { box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(255, 255, 255, 0.5); }
  50% { box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4), 0 0 0 25px rgba(255, 255, 255, 0); }
}

/* Заглушка */
.video-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a1a4a, #1a1a3e);
  color: white;
  z-index: 20;
  padding: 20px;
  text-align: center;
}

.video-error span { font-size: 60px; margin-bottom: 15px; }
.video-error p { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.video-error small {
  font-size: 13px;
  opacity: 0.6;
  font-family: monospace;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 8px;
}

/* ============================================
   📱 МОБИЛЬНАЯ ВЕРСИЯ
   ============================================ */
@media (max-width: 768px) {
  body {
    padding: 12px 8px;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
  }

  .card, .quiz-container {
    padding: 32px 22px;
    border-radius: 26px;
  }

  h1 { font-size: 21px; }
  .emoji { font-size: 54px; }
  .bunny { font-size: 100px; }
  .reasons-title { font-size: 19px; }

  button {
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 16px;
    min-height: 48px;
  }

  .quiz-question { font-size: 17px; min-height: 55px; }
  .answer-btn { padding: 15px 18px; font-size: 14px; min-height: 52px; }

  .reasons-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 62vh;
  }
  .reason-front { font-size: 38px; border-radius: 16px; }
  .reason-back { font-size: 11px; padding: 9px; border-radius: 16px; }
  .reason-icon { font-size: 22px; }

  .cloud { padding: 22px 24px; border-radius: 35px; }
  .cloud p { font-size: 15px; }
  .final-message { font-size: 18px; }

  /* ГАЛЕРЕЯ */
  .page-gallery { padding: 12px 8px; }

  .gallery-container {
    padding: 20px 14px;
    border-radius: 24px;
  }

  .gallery-title { font-size: 21px; margin-bottom: 8px; }
  .gallery-sub { font-size: 13px; margin-bottom: 18px; }

  .slideshow {
    height: 60vh;
    min-height: 340px;
    max-height: 500px;
    border-radius: 20px;
    margin-bottom: 18px;
    touch-action: pan-y;
  }

  .slide-img {
    max-width: 100%;
    max-height: 100%;
  }

  .slide-video {
    max-width: 100%;
    max-height: 100%;
  }

  .slide-nav {
    width: 46px;
    height: 46px;
    font-size: 26px;
    background: rgba(255, 255, 255, 0.22);
  }
  .slide-nav.prev { left: 8px; }
  .slide-nav.next { right: 8px; }

  .slide-counter {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .slide-caption {
    bottom: 58px;
    font-size: 12.5px;
    padding: 8px 16px;
    max-width: 88%;
  }

  .slide-dots { bottom: 12px; padding: 6px 10px; gap: 6px; }
  .dot { width: 7px; height: 7px; }
  .dot.active { width: 20px; }

  .video-play-btn {
    width: 72px;
    height: 72px;
    font-size: 30px;
    padding-left: 5px;
  }

  .thumbnails {
    gap: 8px;
    padding: 8px 4px;
    margin-bottom: 18px;
    -webkit-overflow-scrolling: touch;
  }

  .thumb {
    width: 62px;
    height: 62px;
    border-radius: 13px;
    transition: transform 0.2s ease, border-color 0.2s ease;
  }
  .thumb:hover { transform: scale(1.05); }
  .play-icon { font-size: 18px; }

  .gallery-footer { padding: 20px 18px; border-radius: 18px; }
  .gallery-quote { font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }

  .music-toggle {
    top: 10px;
    right: 10px;
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 25px;
  }

  .slide-nav:hover,
  .thumb:hover,
  .music-toggle:hover {
    transform: none;
  }
  .slide-nav:hover {
    transform: translateY(-50%);
  }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
  body { padding: 8px 6px; }

  .slideshow {
    height: 55vh;
    min-height: 300px;
    border-radius: 16px;
  }

  .gallery-title { font-size: 18px; }
  .gallery-sub { font-size: 12px; }
  .gallery-container { padding: 16px 10px; border-radius: 20px; }

  .thumb { width: 52px; height: 52px; border-radius: 11px; }
  .slide-nav { width: 40px; height: 40px; font-size: 22px; }

  .reasons-grid {
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 8px;
  }
  .reason-front { font-size: 30px; }
  .reason-back { font-size: 9.5px; }

  h1 { font-size: 17px; }
  .emoji { font-size: 44px; }
  .bunny { font-size: 86px; }

  .slide-caption {
    bottom: 54px;
    font-size: 11.5px;
    padding: 7px 14px;
  }

  .video-play-btn {
    width: 60px;
    height: 60px;
    font-size: 26px;
  }

  .music-toggle { padding: 7px 12px; font-size: 11px; }
}

/* Очень маленькие */
@media (max-width: 360px) {
  .slideshow { height: 50vh; min-height: 260px; }
  .thumb { width: 46px; height: 46px; }
  .slide-nav { width: 36px; height: 36px; font-size: 20px; }
  .gallery-title { font-size: 16px; }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
  .slideshow { height: 70vh; max-height: 750px; }
  .gallery-title { font-size: 28px; }
  .thumb { width: 72px; height: 72px; }
}

/* Большие экраны */
@media (min-width: 1440px) {
  .gallery-container { max-width: 1300px; }
  .slideshow { height: 80vh; max-height: 950px; }
}

/* iOS-фиксы */
@supports (-webkit-touch-callout: none) {
  .music-toggle {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
  }
}

/* Уменьшенная анимация */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   💌 СТРАНИЦА ИЗВИНЕНИЯ — PREMIUM
   ============================================ */
.page-sorry {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 111, 165, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(79, 172, 254, 0.15), transparent 50%),
    linear-gradient(135deg, #0f0520 0%, #1e0b3d 25%, #3d1a6b 50%, #5a2a8a 75%, #0f0520 100%);
  background-size: 300% 300%;
  animation: gradientMove 20s ease infinite;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

/* 🌌 Звёздное небо */
.stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 12px rgba(255, 179, 209, 0.5);
  animation: twinkleStar 3s ease-in-out infinite;
}

@keyframes twinkleStar {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* 🌫️ Светящиеся пятна */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #ff6fa5, transparent 70%);
  top: -150px;
  left: -150px;
  animation: floatGlow 12s ease-in-out infinite;
}

.glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #4facfe, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation: floatGlow 15s ease-in-out infinite reverse;
}

.glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #a18cd1, transparent 70%);
  top: 40%;
  right: 20%;
  animation: floatGlow 18s ease-in-out infinite;
  opacity: 0.3;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -40px) scale(1.15); }
  66% { transform: translate(-40px, 30px) scale(0.9); }
}

/* 📦 КОНТЕЙНЕР */
.sorry-container {
  background: rgba(20, 8, 40, 0.65);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  padding: 60px 55px;
  max-width: 780px;
  width: 100%;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 120px rgba(255, 111, 165, 0.15);
  text-align: center;
  position: relative;
  z-index: 5;
  animation: pop 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.container-glow {
  position: absolute;
  inset: -3px;
  border-radius: 42px;
  background: linear-gradient(135deg, #ff6fa5, #4facfe, #a18cd1, #ff6fa5);
  background-size: 400% 400%;
  z-index: -1;
  opacity: 0.4;
  filter: blur(20px);
  animation: glowShift 6s ease infinite;
}

@keyframes glowShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 📊 ПОЛОСА ПРОГРЕССА */
.progress-line {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #ff6fa5, #4facfe, #a18cd1);
  border-radius: 3px 0 0 0;
  box-shadow: 0 0 15px rgba(255, 111, 165, 0.9), 0 0 30px rgba(79, 172, 254, 0.6);
  transition: width 0.3s ease;
  z-index: 10;
}

.sorry-icon {
  font-size: 85px;
  margin-bottom: 20px;
  display: inline-block;
  animation: bounce 2.2s ease-in-out infinite;
  filter: drop-shadow(0 15px 40px rgba(255, 111, 165, 0.7));
}

.sorry-title {
  color: white;
  font-size: 36px;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow:
    0 4px 30px rgba(255, 179, 209, 0.7),
    0 0 80px rgba(255, 111, 165, 0.5);
  letter-spacing: -0.5px;
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow:
      0 4px 30px rgba(255, 179, 209, 0.7),
      0 0 80px rgba(255, 111, 165, 0.5);
  }
  50% {
    text-shadow:
      0 4px 40px rgba(255, 179, 209, 1),
      0 0 120px rgba(255, 111, 165, 0.8);
  }
}

.sorry-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 25px 0;
  gap: 15px;
}

.sorry-divider::before,
.sorry-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 130px;
  background: linear-gradient(90deg, transparent, rgba(255, 179, 209, 0.6), transparent);
}

.sorry-divider span {
  color: rgba(255, 179, 209, 0.85);
  font-size: 24px;
  letter-spacing: 4px;
  filter: drop-shadow(0 0 15px rgba(255, 111, 165, 0.8));
  animation: dividerPulse 2s ease-in-out infinite;
}

@keyframes dividerPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* 📜 ТЕКСТ */
.sorry-text {
  text-align: center;
  margin-bottom: 15px;
  min-height: 100px;
}

.sorry-text p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 19px;
  line-height: 1.85;
  margin-bottom: 16px;
  font-weight: 500;
  font-family: 'Comfortaa', sans-serif;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
  min-height: 1.85em;
  word-wrap: break-word;
}

.sorry-text p:last-child {
  margin-bottom: 0;
}

/* Курсор */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--pink-soft);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 0.8s infinite;
  box-shadow: 0 0 10px rgba(255, 179, 209, 1), 0 0 20px rgba(255, 111, 165, 0.8);
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ✍️ ПОДПИСЬ — появляется в самом конце */
.sorry-signature {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  transition:
    opacity 1.4s ease,
    transform 1.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 35px;
  margin-bottom: 25px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sorry-signature.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Линия-росчерк над подписью */
.signature-line {
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 179, 209, 0.9),
    rgba(255, 111, 165, 1),
    rgba(255, 179, 209, 0.9),
    transparent);
  border-radius: 2px;
  box-shadow: 0 0 15px rgba(255, 111, 165, 0.7);
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
}

.sorry-signature.show .signature-line {
  width: 180px;
}

/* Текст подписи */
.sorry-signature p {
  color: var(--pink-soft);
  font-size: 26px;
  font-style: italic;
  font-family: 'Comfortaa', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow:
    0 2px 20px rgba(255, 111, 165, 0.9),
    0 0 40px rgba(255, 179, 209, 0.6);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 1s ease 0.8s,
    transform 1s ease 0.8s;
}

.sorry-signature.show p {
  opacity: 1;
  transform: translateY(0);
}

/* Сердечко возле подписи */
.signature-heart {
  display: inline-block;
  font-size: 22px;
  opacity: 0;
  transform: scale(0) rotate(-45deg);
  transition:
    opacity 0.8s ease 1.4s,
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s;
  filter: drop-shadow(0 0 12px rgba(255, 111, 165, 0.9));
}

.sorry-signature.show .signature-heart {
  opacity: 1;
  transform: scale(1) rotate(0);
  animation: heartBeat 1.8s ease-in-out 2.2s infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1); }
  75% { transform: scale(1.15); }
}

/* 🔘 КНОПКИ */
.sorry-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
  min-height: 60px;
}

.sorry-actions .btn-yes {
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sorry-actions .btn-yes.show {
  opacity: 1;
  transform: translateY(0);
  animation: pulse 2.5s infinite;
}

/* 💫 Финальное сердечко */
.final-heart {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 40px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 20px rgba(255, 111, 165, 0.9));
  animation: heartBeat 1.5s ease-in-out infinite;
}

.final-heart.show {
  opacity: 1;
  transform: scale(1);
}

/* 🎉 Салют из сердечек */
.celebration-heart {
  position: fixed;
  bottom: -60px;
  pointer-events: none;
  z-index: 15;
  animation: riseUpCelebration linear forwards;
  filter: drop-shadow(0 0 15px rgba(255, 111, 165, 0.9));
}

@keyframes riseUpCelebration {
  0% {
    transform: translateY(0) scale(0.5) rotate(0);
    opacity: 0;
  }
  10% { opacity: 1; }
  100% {
    transform: translateY(-110vh) scale(1.3) rotate(360deg);
    opacity: 0;
  }
}

/* ============================================
   📱 АДАПТИВ
   ============================================ */
@media (max-width: 768px) {
  .page-sorry {
    padding: 25px 12px;
  }

  .sorry-container {
    padding: 40px 24px;
    border-radius: 28px;
  }

  .sorry-icon {
    font-size: 64px;
    margin-bottom: 15px;
  }

  .sorry-title {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .sorry-text p {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 14px;
  }

  .sorry-divider {
    margin: 20px 0;
  }

  .sorry-divider span {
    font-size: 18px;
  }

  .sorry-signature p {
    font-size: 22px;
  }

  .sorry-signature.show .signature-line {
    width: 140px;
  }

  .sorry-actions {
    flex-direction: column;
    align-items: center;
  }

  .sorry-actions button {
    width: 100%;
    max-width: 300px;
  }

  .final-heart {
    font-size: 32px;
    top: 15px;
    right: 15px;
  }

  .glow-1, .glow-2, .glow-3 {
    filter: blur(80px);
    opacity: 0.35;
  }

  .glow-1, .glow-2 { width: 300px; height: 300px; }
  .glow-3 { width: 250px; height: 250px; }
}

@media (max-width: 480px) {
  .page-sorry {
    padding: 15px 8px;
  }

  .sorry-container {
    padding: 30px 18px;
    border-radius: 24px;
  }

  .sorry-icon {
    font-size: 55px;
  }

  .sorry-title {
    font-size: 20px;
  }

  .sorry-text p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
  }

  .sorry-signature p {
    font-size: 20px;
  }

  .sorry-signature.show .signature-line {
    width: 120px;
  }

  .sorry-divider span {
    font-size: 16px;
  }

  .final-heart {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}