/* ===== БАЗА ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #0a0a0a;
  color: #f5f5f5;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1a0e05 0%, transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
}

/* ===== ФОН ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 122, 24, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 122, 24, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: float 14s ease-in-out infinite;
}

.bg-glow--orange {
  background: #ff6a00;
  top: -200px;
  left: -150px;
}

.bg-glow--red {
  background: #b30000;
  bottom: -250px;
  right: -200px;
  animation-delay: -7s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(40px, 30px); }
}

/* ===== СЦЕНА ===== */
.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: screenIn 0.6s ease both;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== ЭКРАН-ИНТРО (ПОДАРОЧНАЯ КОРОБКА) ===== */
.screen--gift {
  justify-content: center;
  padding: 30px 0;
}

.gift-greet {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 5px;
  color: #ffb98a;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.gift-title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(38px, 8vw, 58px);
  letter-spacing: 1px;
  line-height: 1;
  margin: 0 0 28px;
  background: linear-gradient(180deg, #fff5d8 0%, #ffd089 30%, #ff7a18 70%, #c8410b 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(255, 122, 24, 0.3);
}

/* Кликабельная "коробка-кнопка" с эмодзи и блёстками */
.gift-box {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 28px;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  outline: none;
  animation: giftIdle 3.4s ease-in-out infinite;
  transition: transform 220ms cubic-bezier(0.34, 1.6, 0.64, 1);
}

.gift-box:hover { transform: scale(1.05) rotate(-2deg); }
.gift-box:active { transform: scale(0.95); }

.gift-box__emoji {
  font-size: 160px;
  line-height: 1;
  filter:
    drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 35px rgba(255, 122, 24, 0.6));
}

.gift-box__emoji img.twemoji {
  width: 160px;
  height: 160px;
  display: block;
}

.gift-box__sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd089;
  box-shadow: 0 0 14px #ffd089, 0 0 24px rgba(255, 122, 24, 0.6);
  pointer-events: none;
  animation: giftSparkle 2.4s ease-in-out infinite;
}

.gift-box__sparkle--1 { top: 18px; left: 22px;  animation-delay: 0s;   }
.gift-box__sparkle--2 { top: 38px; right: 16px; animation-delay: 0.6s; }
.gift-box__sparkle--3 { bottom: 32px; right: 36px; animation-delay: 1.2s; }
.gift-box__sparkle--4 { bottom: 50px; left: 28px;  animation-delay: 1.8s; }

@keyframes giftIdle {
  0%, 100% { transform: translateY(0)    rotate(-2deg); }
  50%      { transform: translateY(-10px) rotate(2deg); }
}

@keyframes giftSparkle {
  0%, 100% { opacity: 0;  transform: scale(0.4); }
  50%      { opacity: 1;  transform: scale(1); }
}

/* CTA-кнопка под коробкой */
.gift-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 208, 137, 0.4);
  background: rgba(255, 122, 24, 0.08);
  color: #ffd089;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, transform 150ms ease;
}

.gift-cta:hover {
  background: rgba(255, 122, 24, 0.18);
  border-color: rgba(255, 208, 137, 0.7);
}

.gift-cta:active { transform: scale(0.97); }

.gift-hint {
  margin-top: 14px;
  font-size: 12px;
  color: #7a7a7a;
  letter-spacing: 0.5px;
}

/* Анимация «распаковки» коробки при тапе */
.screen--gift.is-leaving { pointer-events: none; }
.screen--gift.is-leaving .gift-box { animation: giftBurst 700ms cubic-bezier(0.34, 1.6, 0.64, 1) forwards; }
.screen--gift.is-leaving .gift-greet,
.screen--gift.is-leaving .gift-title,
.screen--gift.is-leaving .gift-cta,
.screen--gift.is-leaving .gift-hint {
  animation: giftFade 500ms ease forwards;
}

@keyframes giftBurst {
  0%   { transform: scale(1) translateY(0)    rotate(-2deg); opacity: 1; }
  35%  { transform: scale(1.25) translateY(-10px) rotate(6deg); }
  100% { transform: scale(0)   translateY(-50px) rotate(-12deg); opacity: 0; }
}

@keyframes giftFade {
  to { opacity: 0; transform: translateY(-6px); }
}

/* ===== ЭКРАН СТАРТ ===== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 122, 24, 0.35);
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.06);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #ffb98a;
  margin-bottom: 28px;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7a18, #c8410b);
  color: #fff;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 16px;
  line-height: 1;
}

.title {
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 1px;
  line-height: 1;
}

.title__small {
  font-size: 20px;
  color: #c9c9c9;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  margin-bottom: 6px;
}

.title__big {
  font-size: clamp(32px, 7vw, 54px);
  color: #fff;
  line-height: 1.05;
  margin-top: 2px;
}

.title__accent {
  font-size: clamp(36px, 8vw, 60px);
  background: linear-gradient(180deg, #ffd089 0%, #ff7a18 60%, #c8410b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(255, 122, 24, 0.35);
  margin-top: 4px;
  line-height: 1.05;
}

.subtitle {
  max-width: 460px;
  margin: 0 auto 18px;
  color: #d6d6d6;
  font-size: 16px;
  line-height: 1.55;
}

.subtitle--lead {
  color: #ffd089;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.2px;
  margin-bottom: 20px;
}

/* Тёплое пожелание под заголовком — основной текст обращения от компании. */
.wish {
  max-width: 520px;
  margin: 0 auto 14px;
  color: #d8d2c4;
  font-size: 15.5px;
  line-height: 1.6;
  letter-spacing: 0.2px;
}

.wish--strong {
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 30px;
}

.wish__emoji {
  display: inline-block;
  font-size: 1.05em;
  vertical-align: -2px;
}

/* Кнопка СПИН */
.btn-spin {
  position: relative;
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  background: transparent;
  outline: none;
}

.btn-spin__inner {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 20px 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a2a 0%, #ff5500 50%, #b32d00 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow:
    0 14px 40px -10px rgba(255, 90, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-spin:hover .btn-spin__inner {
  transform: translateY(-2px);
  box-shadow:
    0 20px 50px -10px rgba(255, 90, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.btn-spin:active .btn-spin__inner {
  transform: translateY(1px) scale(0.98);
}

.btn-spin__icon {
  display: inline-block;
  transition: transform 0.25s ease;
  font-size: 20px;
}

.btn-spin:hover .btn-spin__icon {
  transform: translateX(4px);
}

.btn-spin__pulse {
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 122, 24, 0.6) 0%, transparent 70%);
  filter: blur(20px);
  z-index: 1;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.95; transform: scale(1.08); }
}

.hint {
  margin-top: 22px;
  font-size: 13px;
  color: #7a7a7a;
  letter-spacing: 0.5px;
}

/* ===== ЭКРАН БАРАБАНА ===== */
.screen--reel {
  justify-content: center;
}

.reel-frame {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 40px auto 24px;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.0)),
    #111;
  border: 1px solid rgba(255, 122, 24, 0.25);
  box-shadow:
    0 20px 60px -20px rgba(255, 90, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.reel-pointer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  z-index: 5;
  filter: drop-shadow(0 0 12px rgba(255, 122, 24, 0.9));
}

.reel-pointer--top {
  top: 4px;
  border-top: 16px solid #ff7a18;
}

.reel-pointer--bottom {
  bottom: 4px;
  border-bottom: 16px solid #ff7a18;
}

.reel-window {
  position: relative;
  height: 180px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 50%, #0d0d0d 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 20px 30px -10px rgba(0, 0, 0, 0.8),
    inset 0 -20px 30px -10px rgba(0, 0, 0, 0.8);
}

.reel-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
  will-change: transform;
}

.reel-item {
  flex: 0 0 160px;
  height: 160px;
  margin: 0 6px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #1f1f1f, #141414);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
  font-size: 13px;
  color: #cfcfcf;
  text-align: center;
  padding: 10px;
}

.reel-item__icon {
  font-size: 44px;
  line-height: 1;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reel-item__icon img.twemoji {
  width: 56px;
  height: 56px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

/* Эмодзи в обычном inline-тексте: подгоняем под высоту строки */
img.twemoji {
  height: 1em;
  width: 1em;
  vertical-align: -0.15em;
  display: inline-block;
}

.reel-item--win {
  background: linear-gradient(180deg, #2a160a, #4a1d05);
  border-color: rgba(255, 122, 24, 0.55);
  color: #fff;
  box-shadow: 0 0 30px rgba(255, 122, 24, 0.35) inset;
}

.reel-item--win .reel-item__icon {
  font-size: 56px;
  filter: drop-shadow(0 4px 10px rgba(255, 90, 0, 0.6));
}

.reel-item--win .reel-item__icon img.twemoji {
  width: 70px;
  height: 70px;
}

/* Все призы — вырезанные PNG с прозрачным фоном.
   Показываем целиком (contain) и подкладываем мягкую тень. */
.reel-item__img {
  width: 130px;
  height: 90px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}

/* У выигрышного приза тень более тёплая — оранжевый «glow». */
.reel-item--win .reel-item__img {
  width: 150px;
  height: 100px;
  filter:
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 18px rgba(255, 122, 24, 0.7));
}

.reel-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 3;
}

.reel-fade--left {
  left: 0;
  background: linear-gradient(90deg, #0d0d0d 0%, transparent 100%);
}

.reel-fade--right {
  right: 0;
  background: linear-gradient(-90deg, #0d0d0d 0%, transparent 100%);
}

/* Зарезервированная высота под все возможные состояния — чтобы при смене
   на «Победа!» строка не «прыгала» (layout shift = виден лаг). */
.reel-status {
  margin-top: 14px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: #ffb98a;
  letter-spacing: 0.6px;
  transform-origin: center;
  transition: color 220ms ease;
  will-change: transform, text-shadow;
}

/* Не меняем размер шрифта и вес — это вызывает reflow.
   Используем transform/text-shadow, GPU-accelerated. */
.reel-status--win {
  color: #ffd089;
  animation: winPulse 1.1s ease infinite alternate;
}

@keyframes winPulse {
  from { transform: scale(1);     text-shadow: 0 0 6px rgba(255, 122, 24, 0.45); }
  to   { transform: scale(1.08);  text-shadow: 0 0 22px rgba(255, 122, 24, 0.95); }
}

/* ===== ЭКРАН ПРИЗА (СЕРТИФИКАТ) ===== */
.screen--prize {
  position: relative;
  padding: 10px 0 30px;
}

.prize-burst {
  position: absolute;
  top: -40px;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 122, 24, 0.35) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: burst 1.2s ease both;
  z-index: -1;
}

@keyframes burst {
  from { opacity: 0; transform: translateX(-50%) scale(0.6); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}

.certificate {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 30px 24px 22px;
  border-radius: 22px;
  background:
    /* лёгкая текстура «мерцающей бумаги» */
    radial-gradient(circle at 12% 100%, rgba(255, 208, 137, 0.07), transparent 45%),
    radial-gradient(circle at 90% 0%,  rgba(255, 208, 137, 0.10), transparent 50%),
    radial-gradient(circle at 50% 0%,  rgba(255, 122, 24, 0.20), transparent 60%),
    linear-gradient(180deg, #1a1410 0%, #0e0e0e 100%);
  border: 1px solid rgba(255, 208, 137, 0.5);
  box-shadow:
    0 30px 70px -20px rgba(255, 90, 0, 0.45),
    inset 0 0 0 1px rgba(255, 208, 137, 0.06);
  overflow: hidden;
  animation: certIn 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes certIn {
  from { opacity: 0; transform: scale(0.85) rotate(-2deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.certificate__corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: rgba(255, 208, 137, 0.75);
  border-style: solid;
  border-width: 0;
}

.certificate__corner--tl { top: 10px;    left: 10px;   border-top-width: 2px; border-left-width: 2px;  border-top-left-radius: 10px; }
.certificate__corner--tr { top: 10px;    right: 10px;  border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 10px; }
.certificate__corner--bl { bottom: 10px; left: 10px;   border-bottom-width: 2px; border-left-width: 2px;  border-bottom-left-radius: 10px; }
.certificate__corner--br { bottom: 10px; right: 10px;  border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 10px; }

/* ===== ДИАГОНАЛЬНЫЙ БАННЕР «GIFT» В УГЛУ ===== */
.gift-banner {
  position: absolute;
  top: 18px;
  right: -52px;
  width: 180px;
  text-align: center;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #ffd089 0%, #ff8a2a 50%, #c8410b 100%);
  color: #1a0a02;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 14px;
  letter-spacing: 6px;
  padding: 6px 0;
  box-shadow:
    0 4px 14px -4px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  pointer-events: none;
  z-index: 4;
  animation: bannerIn 0.7s ease both 0.45s;
}
.gift-banner span { display: inline-block; }
.gift-banner::before,
.gift-banner::after {
  content: "";
  position: absolute;
  top: 100%;
  border: 6px solid transparent;
  border-top-color: #5a1a02;
}
.gift-banner::before { left: 14px; }
.gift-banner::after  { right: 14px; }

@keyframes bannerIn {
  from { opacity: 0; transform: rotate(45deg) translateY(-12px); }
  to   { opacity: 1; transform: rotate(45deg) translateY(0); }
}

.certificate__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* SVG-бант на месте старой круглой печати. */
.certificate__bow {
  width: 66px;
  height: 52px;
  filter:
    drop-shadow(0 6px 14px rgba(255, 90, 0, 0.45))
    drop-shadow(0 0 18px rgba(255, 208, 137, 0.45));
  animation: bowIn 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.4) both 0.2s;
}
.certificate__bow svg { width: 100%; height: 100%; display: block; }

@keyframes bowIn {
  from { opacity: 0; transform: scale(0.4) rotate(-25deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

.certificate__brand {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 8px;
  color: #ffd089;
  font-size: 14px;
}

.certificate__line {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffd089, transparent);
}

.certificate__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4px;
}

.certificate__sub {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #cfc0a8;
  margin-bottom: 4px;
}

.certificate__big {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 48px;
  letter-spacing: 2px;
  line-height: 1;
  background: linear-gradient(180deg, #fff5d8 0%, #ffd089 30%, #ff8a2a 70%, #c8410b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.certificate__hint {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #9b9b9b;
}

.certificate__car {
  margin: 12px auto 8px;
  width: 100%;
  max-width: 420px;
}

.certificate__car svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(255, 90, 0, 0.35));
}

.certificate__photo {
  width: 100%;
  height: auto;
  display: block;
  /* Прозрачный PNG: вместо рамки — мягкое свечение и контактная тень под колёсами */
  filter:
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 30px rgba(255, 90, 0, 0.35));
  animation: photoIn 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.1) both 0.15s;
}

/* Декоративная "лужа света" под пикапом */
.certificate__car {
  position: relative;
}
.certificate__car::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -2px;
  height: 22px;
  background: radial-gradient(ellipse at center, rgba(255, 122, 24, 0.45) 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: -1;
}

@keyframes photoIn {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.certificate__prize {
  text-align: center;
  margin: 4px 0 18px;
}

.certificate__label {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #9b9b9b;
  margin-bottom: 4px;
}

.certificate__value {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 56px;
  line-height: 1;
  background: linear-gradient(180deg, #ffd089, #ff7a18 60%, #c8410b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
}

.certificate__note {
  margin-top: 6px;
  font-size: 13px;
  color: #cfcfcf;
  letter-spacing: 0.5px;
}

.certificate__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 122, 24, 0.35);
}

.certificate__code {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.certificate__codeLabel {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8a8a8a;
}

.certificate__codeValue {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 20px;
  letter-spacing: 2px;
  color: #ffd089;
}

.certificate__date {
  font-size: 11px;
  color: #8a8a8a;
  text-align: right;
  letter-spacing: 0.5px;
}

/* ===== БЛОК «ЧТО ВНУТРИ» НА ЭКРАНЕ ПРИЗА =====
   Появляется ниже сертификата. Описывает фактическую комплектацию
   Раптора и показывает машину с трёх ракурсов. */
.prize-spec {
  width: min(720px, 100%);
  margin: 28px auto 0;
  padding: 22px 22px 24px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 208, 137, 0.08), transparent 55%),
    linear-gradient(160deg, rgba(40, 22, 14, 0.6) 0%, rgba(15, 12, 10, 0.85) 100%);
  border: 1px solid rgba(255, 208, 137, 0.18);
  box-shadow: 0 30px 60px -30px rgba(255, 90, 0, 0.4);
  text-align: left;
}

.prize-spec__head {
  text-align: center;
  margin-bottom: 18px;
}

.prize-spec__kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ffd089;
  opacity: 0.85;
  margin-bottom: 6px;
}

.prize-spec__title {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 1px;
  color: #fff;
}

.prize-spec__list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.prize-spec__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 208, 137, 0.10);
}

.prize-spec__icon {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 14px;
  color: #ff8a2a;
  text-shadow: 0 0 8px rgba(255, 138, 42, 0.6);
}

.prize-spec__text {
  font-size: 14.5px;
  line-height: 1.5;
  color: #e8dfcc;
}

.prize-spec__text strong {
  color: #fff;
  font-weight: 700;
}

.prize-spec__text b {
  color: #ffd089;
  font-weight: 700;
}

/* Галерея ракурсов: 2 колонки по умолчанию.
   На широких экранах — те же 2 крупные карточки. */
.prize-spec__gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.prize-spec__shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px 8px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 138, 42, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 208, 137, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.prize-spec__shot:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -16px rgba(255, 90, 0, 0.5);
  border-color: rgba(255, 208, 137, 0.32);
}

.prize-spec__shot img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s ease;
}

.prize-spec__shot img:active {
  transform: scale(0.97);
}

.prize-spec__shot figcaption {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 208, 137, 0.7);
  text-align: center;
  white-space: nowrap;
}

/* Кнопки на экране приза */
.prize-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 22px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #ff8a2a, #c8410b);
  box-shadow: 0 10px 30px -10px rgba(255, 90, 0, 0.6);
}

.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px) scale(0.98); }

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #ddd;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}

.prize-foot {
  margin-top: 18px;
  text-align: center;
  color: #b9b9b9;
  font-size: 14px;
}

.prize-hint {
  margin-top: 6px;
  text-align: center;
  color: #6c6c6c;
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* ===== КОНФЕТТИ ===== */
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

/* ===== LIGHTBOX (полноэкранный просмотр фото) ===== */
.certificate__photo.zoomable {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 56px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
  animation: lightboxFade 0.18s ease;
}

@keyframes lightboxFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox[hidden] {
  display: none;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 80px rgba(255, 90, 0, 0.35));
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__caption {
  margin-top: 18px;
  color: #ffd089;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  max-width: 90vw;
}

.lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 208, 137, 0.35);
  background: rgba(0, 0, 0, 0.6);
  color: #ffd089;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  z-index: 1;
}

.lightbox__close:hover {
  background: rgba(255, 138, 42, 0.18);
  border-color: rgba(255, 208, 137, 0.65);
}

.lightbox__close:active {
  transform: scale(0.94);
}

/* ===== АДАПТИВ — ТЕЛЕФОН ===== */
@media (max-width: 600px) {
  body { padding: 16px 12px; }

  /* Интро-экран с коробкой */
  .gift-greet { font-size: 13px; letter-spacing: 4px; margin-bottom: 8px; }
  .gift-title { margin-bottom: 18px; }
  .gift-box { width: 180px; height: 180px; margin-bottom: 22px; }
  .gift-box__emoji { font-size: 130px; }
  .gift-box__emoji img.twemoji { width: 130px; height: 130px; }
  .gift-cta { padding: 12px 22px; font-size: 13px; }
  .gift-hint { font-size: 11px; margin-top: 10px; }

  /* Стартовый экран — компактнее */
  .brand { margin-bottom: 14px; padding: 7px 12px; font-size: 12px; }
  .title { margin-bottom: 12px; }
  .title__small { font-size: 14px; letter-spacing: 3px; margin-bottom: 4px; }
  .subtitle { font-size: 14px; margin-bottom: 14px; max-width: 360px; }
  .subtitle--lead { font-size: 14px; margin-bottom: 14px; }
  .wish { font-size: 14px; line-height: 1.55; margin-bottom: 12px; max-width: 360px; }
  .wish--strong { font-size: 14.5px; margin-bottom: 22px; }
  .btn-spin__inner { padding: 16px 28px; font-size: 15px; }
  .hint { font-size: 12px; margin-top: 16px; }

  /* Барабан */
  .reel-frame { padding: 14px; margin: 24px auto 18px; }
  .reel-window { height: 150px; border-radius: 14px; }
  .reel-item {
    flex: 0 0 122px;
    height: 122px;
    margin: 0 5px;
    padding: 8px;
    font-size: 12px;
    border-radius: 12px;
  }
  .reel-item__img { width: 105px; height: 70px; }
  .reel-item--win .reel-item__img { width: 118px; height: 78px; }
  .reel-fade { width: 50px; }
  .reel-status { height: 32px; font-size: 13px; }

  /* Сертификат */
  .certificate { padding: 24px 18px 18px; border-radius: 18px; }
  .certificate__corner { width: 22px; height: 22px; }
  .certificate__brand { font-size: 12px; letter-spacing: 6px; }
  .certificate__bow { width: 56px; height: 44px; }
  .certificate__big { font-size: 38px; letter-spacing: 1px; }
  .certificate__hint { font-size: 10px; letter-spacing: 2px; }
  .certificate__value { font-size: 42px; }
  .certificate__label { font-size: 10px; letter-spacing: 3px; }
  .certificate__note { font-size: 12px; }
  .certificate__codeValue { font-size: 17px; }
  .certificate__codeLabel { font-size: 9px; }
  .certificate__date { font-size: 10px; }
  .gift-banner {
    top: 14px;
    right: -56px;
    width: 170px;
    font-size: 12px;
    letter-spacing: 5px;
    padding: 5px 0;
  }

  /* Блок «комплектация» — компактнее на мобиле */
  .prize-spec {
    margin-top: 22px;
    padding: 18px 16px 18px;
    border-radius: 18px;
  }
  .prize-spec__title { font-size: 24px; }
  .prize-spec__kicker { font-size: 10px; letter-spacing: 3px; }
  .prize-spec__list { gap: 8px; margin-bottom: 16px; }
  .prize-spec__list li { padding: 9px 10px; gap: 8px; border-radius: 10px; }
  .prize-spec__icon { font-size: 12px; }
  .prize-spec__text { font-size: 13.5px; line-height: 1.45; }
  .prize-spec__gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .prize-spec__shot {
    padding: 10px 8px 8px;
    border-radius: 12px;
  }
  .prize-spec__shot img { max-height: 140px; }
  .prize-spec__shot figcaption { font-size: 9px; letter-spacing: 1.5px; }

  /* Лайтбокс на мобиле — кнопка крупнее, отступы меньше */
  .lightbox { padding: 24px 8px 40px; }
  .lightbox__img { max-height: calc(100vh - 100px); }
  .lightbox__caption { font-size: 11px; letter-spacing: 2px; margin-top: 12px; }
  .lightbox__close { width: 40px; height: 40px; font-size: 24px; top: 10px; right: 10px; }

  /* Кнопки на экране приза — занимают полную ширину */
  .prize-actions {
    margin-top: 18px;
    gap: 8px;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }
  .prize-actions button {
    width: 100%;
    padding: 13px 18px;
    font-size: 14px;
  }
  .prize-foot { font-size: 13px; margin-top: 14px; }
}

/* Совсем узкие экраны (старые андроиды, iPhone SE 1) */
@media (max-width: 360px) {
  .gift-box { width: 150px; height: 150px; }
  .gift-box__emoji { font-size: 110px; }
  .gift-box__emoji img.twemoji { width: 110px; height: 110px; }
  .reel-item { flex: 0 0 104px; height: 108px; }
  .reel-item__img { width: 92px; height: 62px; }
  .reel-window { height: 132px; }
  .certificate__big { font-size: 34px; }
  .certificate__value { font-size: 36px; }
  .gift-banner { font-size: 11px; letter-spacing: 4px; }
}

/* Скрыть, когда экран не активен */
[hidden] { display: none !important; }

/* На момент скачивания через html2canvas подменяем градиентный текст
   на сплошные цвета — иначе html2canvas рендерит просто оранжевый
   прямоугольник на месте текста (он не понимает background-clip: text). */
.certificate.is-saving .certificate__big {
  background: none !important;
  -webkit-background-clip: border-box !important;
          background-clip: border-box !important;
  color: #ffd089 !important;
  text-shadow: none !important;
}
.certificate.is-saving .certificate__value {
  background: none !important;
  -webkit-background-clip: border-box !important;
          background-clip: border-box !important;
  color: #ff8a2a !important;
  text-shadow: none !important;
}

/* ===== ПЕЧАТЬ / СОХРАНЕНИЕ В PDF ===== */
/* При window.print() показываем только сертификат — без фона, кнопок, конфетти. */
@page {
  size: auto;
  margin: 12mm;
}

@media print {
  html, body {
    background: #fff !important;
  }
  .bg-grid, .bg-glow, .prize-burst, #confetti,
  .screen--start, .screen--reel,
  .prize-actions, .prize-foot {
    display: none !important;
  }
  .stage { padding: 0; }
  .screen--prize { padding: 0; }
  .certificate {
    margin: 0 auto;
    max-width: 160mm;
    border: 1px solid #c8410b;
    box-shadow: none !important;
    animation: none !important;
  }
  .certificate__photo { animation: none !important; }
  .certificate__bow { animation: none !important; }
}
