/* Подключаем Comic Sans (в браузере уже есть на большинстве систем).
   Если нет — fallback на курсивный sans-serif. */

@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap');

:root {
  --bg-card-1: linear-gradient(135deg, #ff69b4, #ffd700, #00ced1);
  --bg-card-2: linear-gradient(180deg, #6a5acd 0%, #ff1493 100%);
  --wordart-fill: linear-gradient(180deg, #ff00ff 0%, #ffea00 50%, #00ffd5 100%);
  /* Белая обводка вокруг градиентного fill через stacked drop-shadow.
     filter работает с background-clip:text, в отличие от text-shadow. */
  --wordart-outline:
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 0 1px #fff)
    drop-shadow(0 0 2px #fff)
    drop-shadow(3px 3px 0 rgba(0,0,0,0.7));
}

.reveal {
  font-family: "Comic Sans MS", "Comic Neue", "Comic Sans", cursive;
  font-size: 32px;
}

.reveal h1, .reveal h2, .reveal h3 {
  font-family: "Comic Sans MS", "Comic Neue", cursive;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--wordart-fill);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: var(--wordart-outline);
  font-weight: 700;
}

.reveal section {
  text-align: center;
}

/* Источник в углу слайда — белая миленькая плашка с розовой обводкой */
.source {
  position: absolute;
  bottom: 24px;
  right: 32px;
  font-size: 14px;
  font-family: "Times New Roman", serif;
  color: #4a148c;
  font-style: italic;
  max-width: 60%;
  text-align: right;
  line-height: 1.3;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px 14px;
  border-radius: 12px;
  border: 2px solid #ff69b4;
  box-shadow: 2px 2px 0 rgba(255, 105, 180, 0.5);
}

/* Открытка-картинка по центру */
.card-image {
  max-width: 60%;
  max-height: 42vh;
  border: 6px solid #ff69b4;
  box-shadow: 0 0 0 4px #ffd700, 0 0 30px rgba(255, 0, 255, 0.6);
  margin: 12px auto;
  display: block;
}

/* Заголовок слайда (стиль Смешариков) — компактнее */
.slide-title {
  font-family: "Comic Sans MS", "Comic Neue", cursive;
  text-transform: none;
  letter-spacing: 1px;
  background: var(--wordart-fill);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: var(--wordart-outline);
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 8px 0;
  line-height: 1.1;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Тезисы-bullets — мельче, плотнее, для деталей */
.slide-body {
  font-family: "Comic Sans MS", "Comic Neue", cursive;
  font-size: 12px;
  color: #fff;
  margin: 0;
  line-height: 1.4;
  text-align: left;
  list-style: none;
  padding: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

.slide-body li {
  margin: 0 0 7px 0;
  padding-left: 14px;
  position: relative;
}

.slide-body li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #ff69b4;
}

/* Всратые fragment-эффекты — каждый пункт со своим */
.slide-body li.fragment.visible.tacky-spin {
  animation: tacky-spin 0.7s ease-out;
}
.slide-body li.fragment.visible.tacky-pop {
  animation: tacky-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.slide-body li.fragment.visible.tacky-shake {
  animation: tacky-shake 0.6s ease;
}
.slide-body li.fragment.visible.tacky-fly {
  animation: tacky-fly 0.6s ease-out;
}
.slide-body li.fragment.visible.tacky-glitch {
  animation: tacky-glitch 0.5s steps(6, end);
}

@keyframes tacky-spin {
  0%   { opacity: 0; transform: scale(0.2) rotate(-720deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes tacky-pop {
  0%   { opacity: 0; transform: scale(0); }
  60%  { opacity: 1; transform: scale(1.3); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes tacky-shake {
  0%   { opacity: 0; transform: translateX(-40px); }
  20%  { opacity: 1; transform: translateX(15px) rotate(-2deg); }
  40%  { transform: translateX(-10px) rotate(1deg); }
  60%  { transform: translateX(6px); }
  100% { transform: translateX(0); }
}
@keyframes tacky-fly {
  0%   { opacity: 0; transform: translateY(60px) skewX(20deg); }
  60%  { opacity: 1; transform: translateY(-8px) skewX(-3deg); }
  100% { opacity: 1; transform: translateY(0) skewX(0); }
}
@keyframes tacky-glitch {
  0%   { opacity: 0; transform: translateX(-5px); filter: hue-rotate(0deg); }
  20%  { opacity: 1; transform: translateX(8px); filter: hue-rotate(180deg) invert(1); }
  40%  { transform: translateX(-3px); filter: hue-rotate(90deg); }
  60%  { transform: translateX(2px); filter: hue-rotate(270deg) invert(1); }
  80%  { transform: translateX(-1px); filter: hue-rotate(45deg); }
  100% { transform: translateX(0); filter: none; }
}

/* Тематические слайды: текст-колонка + картинка, чередуется flip */
.reveal section.thematic-slide {
  display: grid !important;
  grid-template-columns: 34% 1fr;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "title image"
    "body  image"
    ".     image"
    "src   image";
  align-items: start;
  column-gap: 24px;
  row-gap: 8px;
  padding: 24px 32px;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  text-align: left !important;
  overflow: hidden;
}

.reveal section.thematic-slide.flip {
  grid-template-columns: 1fr 34%;
  grid-template-areas:
    "image title"
    "image body"
    "image ."
    "image src";
}

/* min-width: 0 на grid items — иначе intrinsic content расширяет колонки */
.reveal section.thematic-slide > .slide-title,
.reveal section.thematic-slide > .slide-body,
.reveal section.thematic-slide > .source,
.reveal section.thematic-slide > .card-image {
  min-width: 0;
  min-height: 0;
}

.reveal section.thematic-slide > .slide-title {
  grid-area: title;
  align-self: end;
}

.reveal section.thematic-slide > .slide-body {
  grid-area: body;
  align-self: start;
}

.reveal section.thematic-slide > .source {
  grid-area: src;
  align-self: end;
  position: static !important;
  bottom: auto;
  right: auto;
  max-width: 100%;
  text-align: left;
  font-size: 11px;
  padding: 6px 10px;
}

.reveal section.thematic-slide > .card-image {
  grid-area: image;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  margin: 0;
  border-width: 4px;
  box-shadow: 0 0 0 3px #ffd700, 0 0 24px rgba(255, 0, 255, 0.5);
}

/* WordArt-стиль для надписей поверх картинок */
.wordart {
  font-family: "Comic Sans MS", "Comic Neue", cursive;
  background: var(--wordart-fill);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: var(--wordart-outline);
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 2px;
}

/* Декоративные мерцающие звёздочки */
.sparkle {
  position: absolute;
  font-size: 32px;
  animation: sparkle-pulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sparkle-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

.sparkle.tl { top: 40px; left: 40px; }
.sparkle.tr { top: 40px; right: 40px; animation-delay: 0.3s; }
.sparkle.bl { bottom: 80px; left: 40px; animation-delay: 0.6s; }
.sparkle.br { bottom: 80px; right: 40px; animation-delay: 0.9s; }

/* Crazy Frog 3D-вращение в углу слайда «Включая благодарность» */
@keyframes spin-frog {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

/* Слайд «Послание» — кибер-щенок + кнопка ▶ */
.poslanie {
  background: #000;
  text-align: center;
}

.poslanie .poslanie-image {
  max-width: 72%;
  max-height: 70vh;
  display: block;
  margin: 24px auto 18px;
  box-shadow: 0 0 60px rgba(255, 0, 0, 0.35);
}

.poslanie .play-btn {
  display: inline-block;
  background: #0a0a0a;
  color: #fff;
  border: 2px solid #fff;
  padding: 12px 36px;
  font-family: "Courier New", monospace;
  font-size: 22px;
  cursor: pointer;
  letter-spacing: 1px;
}

.poslanie .play-btn:hover {
  background: #fff;
  color: #000;
}

/* Слайд «Вопросы» — FAQ с fragments */
.faq {
  text-align: left;
  font-family: "Comic Sans MS", "Comic Neue", cursive;
  font-size: 22px;
  padding: 0 60px;
}

.faq .faq-item {
  margin-bottom: 30px;
}

.faq .question {
  color: #ff69b4;
  font-weight: 700;
  margin-bottom: 8px;
}

.faq .answer {
  color: #fff;
  margin-left: 20px;
}

.faq img.card-image {
  max-height: 30vh;
  margin-bottom: 20px;
}
