/* Сброс и база */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  color: #1b1734;
  background: radial-gradient(120% 120% at 80% 10%, #ffe2f6 0%, #f5f6ff 40%, #eaf7ff 80%);
  overflow: hidden; /* чтобы скрыть вылет шариков за края */
}

/* Слой для шариков */
#balloon-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none; /* клики проходят к контенту */
}

/* Контент выше шариков */
.page {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  padding: 20px 16px max(env(safe-area-inset-bottom, 16px), 16px);
}

/* Заголовок */
.hero { text-align: center; margin-top: 8px; }
.title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(28px, 8vw, 48px);
  line-height: 1.1;
  margin: 8px 0 6px;
  background: linear-gradient(90deg, #ff6ec7, #736efe 60%, #1ed6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 24px rgba(115,110,254,0.18);
}
.subtitle {
  margin: 0;
  opacity: 0.8;
  font-size: clamp(14px, 3.8vw, 18px);
}

/* Видео-блок (под телефон, 9:16) */
.video-card {
  margin-top: clamp(12px, 5vw, 24px);
  display: grid;
  gap: 14px;
  place-items: center;
}
.phone-frame {
  width: min(92vw, 420px);
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.55));
  position: relative;
  box-shadow:
    0 20px 50px rgba(115, 110, 254, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.phone-frame::before {
  /* динамичный отблеск */
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 60%;
  background: radial-gradient(100% 100% at 50% 0%, rgba(255,255,255,0.65), rgba(255,255,255,0) 60%);
  transform: translateY(-10%);
  pointer-events: none;
}
.video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* вертикальное видео */
  border-radius: 28px;
}

/* Кнопки */
.actions { display: flex; gap: 10px; }
.btn {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 15px;
  background: white;
  color: #2d2a50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.btn.primary {
  background: linear-gradient(90deg, #ff6ec7, #736efe);
  color: #fff;
  box-shadow: 0 8px 24px rgba(115,110,254,0.35);
}
.btn:active { transform: translateY(1px); }

/* Подвал */
.footer {
  text-align: center;
  opacity: 0.7;
  font-size: 14px;
  padding-top: 10px;
}

/* Шарики — новая форма (сердечки и звёздочки), бесконечный полёт */
.balloon {
  position: absolute;
  will-change: transform, opacity;
  width: 46px; /* базовая ширина, масштаб регулируется инлайн стилем */
  opacity: 0;
  transform: translate(0, 0);
  /* цвет фигуры берётся из color, для SVG fill="currentColor" */
  color: hsl(var(--h, 320) 90% 65%);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.12));
}
.balloon svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Узел шарика */
.balloon::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 10px;
  height: 8px;
  background: hsl(var(--h, 320) 90% 48%);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
  filter: brightness(0.95);
}

/* Верёвочка */
.balloon::after {
  content: "";
  position: absolute;
  bottom: -58px;
  left: 50%;
  width: 2px;
  height: 56px;
  background: linear-gradient(transparent, rgba(0,0,0,0.12));
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Малые экраны */
@media (max-width: 360px) {
  .actions { width: 100%; }
  .btn { flex: 1; }
}