/* ==========================================================================
   СТИЛИ САЙТА-ПОЗДРАВЛЕНИЯ ДЛЯ ВИКИ ОТ НАЗАРА
   Палитра скина Apex: Винный/Бордовый + Античное Золото/Шампань + Айвори + Ночной Бархат
   (Уникальный дизайн без нейрослопа: скретч-билет, Apex Supply Bin, Champion HUD)
   ========================================================================== */

:root {
  /* Винная гамма */
  --wine-darkest: #1a040b;
  --wine-deep: #420a1c;
  --wine-main: #731634;
  --wine-bright: #961d45;
  --wine-light: #b82b58;
  --wine-glow: rgba(150, 29, 69, 0.45);
  
  /* Золотая / шампань гамма */
  --gold-dark: #8c681e;
  --gold-main: #d4af37;
  --gold-light: #f3db83;
  --gold-shimmer: #fff3c4;
  --gold-glow: rgba(212, 175, 55, 0.4);

  /* Светлые акценты / Айвори */
  --ivory-pure: #ffffff;
  --ivory-warm: #fcfbfa;
  --ivory-silk: #f4efe7;
  --ivory-muted: #dcd3c7;

  /* Тёмный фон / Ночной Бархат */
  --bg-deep: #09070c;
  --bg-card: rgba(24, 14, 25, 0.82);
  --bg-card-hover: rgba(38, 20, 38, 0.94);
  --border-gold: rgba(212, 175, 55, 0.22);
  --border-gold-bright: rgba(212, 175, 55, 0.65);

  /* Шрифты */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --font-script: 'Marck Script', cursive;

  /* Переходы и скругления */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--ivory-warm);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--ivory-warm);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   ХОЛСТЫ И СЛОИ
   ========================================================================== */
#bg-canvas, #trail-canvas, #confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#bg-canvas { z-index: 0; }
#trail-canvas { z-index: 999; }
#confetti-canvas { z-index: 9999; }

main {
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   3D TILT И ТИПОГРАФИКА
   ========================================================================== */
.tilt-card {
  transition: transform 0.15s ease-out, box-shadow 0.25s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

.gold-gradient-text {
  background: linear-gradient(135deg, var(--gold-shimmer) 0%, var(--gold-main) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.shimmer-text {
  background: linear-gradient(90deg, #fff3c4 0%, #d4af37 25%, #ffffff 50%, #d4af37 75%, #fff3c4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineGold 4s linear infinite;
}

@keyframes shineGold {
  to { background-position: 200% center; }
}

/* ==========================================================================
   ВЕРХНЕЕ МЕНЮ (APEX HUD СТИЛЬ)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 12px 24px;
  background: rgba(9, 7, 12, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-gold);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.hud-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--wine-main);
  color: var(--gold-shimmer);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--gold-main);
  letter-spacing: 1px;
}

.nav-logo .monogram {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ivory-muted);
  font-size: 0.84rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover { color: var(--gold-shimmer); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Кнопки */
.icon-btn {
  background: rgba(115, 22, 52, 0.35);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(115, 22, 52, 0.7);
  border-color: var(--gold-main);
}

.music-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.music-bars span {
  width: 2px;
  background: var(--gold-main);
  border-radius: 2px;
  height: 3px;
}

.music-bars.playing span:nth-child(1) { animation: soundBar 0.8s infinite alternate ease-in-out; }
.music-bars.playing span:nth-child(2) { animation: soundBar 0.6s infinite alternate ease-in-out 0.2s; }
.music-bars.playing span:nth-child(3) { animation: soundBar 1s infinite alternate ease-in-out 0.4s; }

@keyframes soundBar {
  0% { height: 3px; }
  100% { height: 12px; }
}

.btn-gold-sm {
  background: linear-gradient(135deg, var(--gold-main), var(--gold-dark));
  color: var(--wine-darkest);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-gold-sm:hover { transform: translateY(-2px); box-shadow: 0 4px 15px var(--gold-glow); }

.btn-primary-wine {
  background: linear-gradient(135deg, var(--wine-main) 0%, var(--wine-bright) 100%);
  color: var(--ivory-pure);
  border: 1px solid rgba(243, 219, 131, 0.35);
  padding: 14px 30px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 25px rgba(115, 22, 52, 0.45);
}

.btn-primary-wine:hover {
  background: linear-gradient(135deg, var(--wine-bright) 0%, var(--wine-light) 100%);
  border-color: var(--gold-light);
  transform: translateY(-3px) scale(1.02);
}

.pulse-btn { animation: pulseGlow 2.5s infinite; }

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(150, 29, 69, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(150, 29, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(150, 29, 69, 0); }
}

.btn-secondary-gold {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-shimmer);
  border: 1px solid var(--gold-main);
  padding: 14px 30px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary-gold:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--gold-light);
  transform: translateY(-3px) scale(1.02);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--border-gold-bright);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-gold:hover {
  background: rgba(212, 175, 55, 0.18);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline-gold-sm {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   ОБЩИЕ СЕКЦИИ
   ========================================================================== */
.section-block {
  padding: 95px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-main);
  font-weight: 700;
  margin-bottom: 12px;
  background: rgba(212, 175, 55, 0.1);
  padding: 4px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-gold);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ivory-pure);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--ivory-muted);
  line-height: 1.75;
}

/* ==========================================================================
   1. HERO SECTION & APEX CHAMPION HUD
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px 24px 70px 24px;
  position: relative;
  overflow: hidden;
}

.hero-glow-1 {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(115, 22, 52, 0.38) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 1;
}

.hero-glow-2 {
  position: absolute;
  bottom: 12%;
  right: 15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.champion-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 10, 20, 0.85);
  border: 1px solid var(--gold-main);
  padding: 6px 20px;
  border-radius: 4px;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.hud-icon { font-size: 1.2rem; }

.hud-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-shimmer);
}

.hud-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #38d9a9;
  background: rgba(56, 217, 169, 0.15);
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 1px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6.2vw, 4.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--ivory-pure);
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ivory-silk);
  max-width: 700px;
  margin: 0 auto 28px auto;
  line-height: 1.8;
}

.hero-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 35px;
}

.sig-line {
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-main));
}

.hero-signature .sig-line:last-child {
  background: linear-gradient(90deg, var(--gold-main), transparent);
}

.sig-text {
  font-family: var(--font-script);
  font-size: 1.65rem;
  color: var(--gold-shimmer);
}

.bday-countdown-box {
  background: var(--bg-card);
  border: 1px solid var(--border-gold-bright);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 26px 32px;
  margin: 0 auto 35px auto;
  max-width: 540px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(115, 22, 52, 0.3);
}

.countdown-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.countdown-digits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.digit-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 65px;
}

.digit-val {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--ivory-pure);
  line-height: 1;
}

.digit-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ivory-muted);
  margin-top: 4px;
}

.digit-sep {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--gold-main);
  margin-top: -14px;
  opacity: 0.7;
}

.bday-test-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(212, 175, 55, 0.25);
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.scroll-down-indicator {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.8;
  animation: bounceSlow 2s infinite ease-in-out;
}

/* ==========================================================================
   2. УНИКАЛЬНЫЙ ИНТЕРАКТИВ: СКРЕТЧ-БИЛЕТ (СТИРАЕМ МОНЕТКОЙ!)
   ========================================================================== */
.scratch-ticket-container {
  max-width: 620px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(38, 12, 24, 0.9) 0%, rgba(18, 8, 18, 0.95) 100%);
  border: 2px dashed var(--gold-main);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.2);
}

.ticket-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.ticket-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold-light);
  letter-spacing: 1.5px;
}

.ticket-win-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--wine-main);
  border: 1px solid var(--gold-main);
  color: var(--gold-shimmer);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.scratch-area-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Скрытый нижний слой приза */
.scratch-prize-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #420a1c 0%, #1a040b 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: var(--radius-md);
}

.prize-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-shimmer);
  margin-bottom: 8px;
}

.prize-text {
  font-size: 0.95rem;
  color: var(--ivory-silk);
  line-height: 1.5;
  margin-bottom: 12px;
  max-width: 480px;
}

.prize-badges {
  display: flex;
  gap: 8px;
}

.p-badge {
  font-size: 0.75rem;
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid var(--gold-main);
  color: var(--gold-light);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* Верхний холст фольги */
.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  z-index: 5;
}

.scratch-hint-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ivory-muted);
}

/* ==========================================================================
   3. УНИКАЛЬНЫЙ ИНТЕРАКТИВ: APEX SUPPLY BIN (ЗОЛОТОЙ ЛУТБОКС)
   ========================================================================== */
.supply-bin-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.apex-crate {
  width: 320px;
  height: 160px;
  position: relative;
  cursor: pointer;
  perspective: 800px;
  margin-bottom: 35px;
  transition: transform 0.3s;
}

.apex-crate:hover { transform: scale(1.04); }

.crate-lid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, #61132a 0%, #3b0a18 100%);
  border: 2px solid var(--gold-main);
  border-radius: 8px 8px 0 0;
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.crate-light-strip {
  position: absolute;
  bottom: 6px;
  width: 80%;
  height: 4px;
  background: var(--gold-shimmer);
  box-shadow: 0 0 10px #f3db83;
  border-radius: 2px;
}

.crate-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-light);
}

.crate-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 110px;
  background: linear-gradient(180deg, #2b0813 0%, #120308 100%);
  border: 2px solid var(--border-gold-bright);
  border-radius: 0 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7);
}

.crate-open-prompt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-shimmer);
  background: rgba(115, 22, 52, 0.5);
  border: 1px solid var(--gold-main);
  padding: 6px 14px;
  border-radius: 4px;
  letter-spacing: 1.5px;
  animation: pulseGlow 2s infinite;
}

/* Открытое состояние контейнера */
.apex-crate.open .crate-lid {
  transform: rotateX(110deg);
}

.apex-crate.open .crate-open-prompt {
  display: none;
}

.loot-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 960px;
  animation: zoomIn 0.6s ease-out;
}

.loot-items-grid.hidden { display: none; }

.loot-card {
  background: var(--bg-card);
  border: 2px solid var(--gold-main);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  position: relative;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.2);
}

.loot-tier-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: #000;
  background: var(--gold-main);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.loot-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.loot-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-shimmer);
  margin-bottom: 8px;
}

.loot-desc {
  font-size: 0.88rem;
  color: var(--ivory-silk);
  line-height: 1.5;
}

/* ==========================================================================
   4. МОСТ ЛЮБВИ СКВОЗЬ РАССТОЯНИЕ
   ========================================================================== */
.distance-section { padding-top: 50px; }

.distance-bridge-container {
  background: var(--bg-card);
  border: 1px solid var(--border-gold-bright);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  backdrop-filter: blur(14px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(115, 22, 52, 0.25);
}

.bridge-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 5;
  min-width: 140px;
}

.node-avatar {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine-main) 0%, var(--wine-darkest) 100%);
  border: 2px solid var(--gold-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-shimmer);
  box-shadow: 0 0 25px var(--gold-glow);
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
}

.node-ring {
  position: absolute;
  inset: -10px;
  border: 1.5px dashed rgba(212, 175, 55, 0.65);
  border-radius: 50%;
  animation: spinSlow 12s linear infinite;
  pointer-events: none;
  transform-origin: center center;
  box-sizing: border-box;
}

.node-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ivory-pure);
  margin-top: 12px;
}

.node-sub { font-size: 0.8rem; color: var(--gold-light); }

.bridge-line-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0 15px;
}

.bridge-line {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(212, 175, 55, 0.25);
  border-radius: 2px;
}

.beam-energy {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold-shimmer), var(--wine-bright), transparent);
  background-size: 200% 100%;
  animation: beamFlow 2.2s linear infinite;
}

@keyframes beamFlow {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.floating-heart-msg {
  position: absolute;
  top: -24px;
  left: 0%;
  font-size: 1.6rem;
  transform: translateX(-50%);
  animation: heartTravel 5s ease-in-out infinite alternate;
}

@keyframes heartTravel {
  0% { left: 10%; transform: translateX(-50%) scale(1); }
  50% { left: 50%; transform: translateX(-50%) scale(1.3) rotate(10deg); }
  100% { left: 90%; transform: translateX(-50%) scale(1); }
}

.bridge-metric { margin-top: 20px; text-align: center; }

.bridge-metric-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-shimmer);
}

.bridge-metric-lbl {
  font-size: 0.8rem;
  color: var(--ivory-muted);
}

.distance-quote-box {
  background: rgba(30, 14, 25, 0.6);
  border-left: 3px solid var(--gold-main);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.distance-quote-box p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ivory-silk);
  line-height: 1.7;
}

.distance-author {
  display: block;
  font-family: var(--font-script);
  font-size: 1.35rem;
  color: var(--gold-light);
  margin-top: 8px;
  text-align: right;
}

/* ==========================================================================
   5. ТАЙМЕР НАШЕЙ ЛЮБВИ
   ========================================================================== */
.timer-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.time-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  backdrop-filter: blur(14px);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.time-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-main), transparent);
  opacity: 0.6;
}

.time-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-main);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(115, 22, 52, 0.35);
}

.time-card.highlight-card {
  background: rgba(45, 12, 27, 0.7);
  border-color: rgba(212, 175, 55, 0.4);
}

.time-card.pulse-card .time-number { animation: numberPulse 1s infinite alternate; }

.time-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-number {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-light);
}

.time-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ivory-silk);
  margin-top: 6px;
}

.time-sub {
  font-size: 0.78rem;
  color: var(--ivory-muted);
  margin-top: 8px;
  font-style: italic;
}

.love-milestones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.milestone-item {
  background: rgba(22, 14, 23, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.milestone-item:hover {
  background: rgba(45, 15, 30, 0.8);
  border-color: var(--gold-main);
  transform: translateX(4px);
}

.milestone-icon { font-size: 2rem; }

.milestone-info { display: flex; flex-direction: column; }

.milestone-value {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold-shimmer);
}

.milestone-label { font-size: 0.82rem; color: var(--ivory-muted); }

/* ==========================================================================
   6. ИНТЕРАКТИВНЫЙ ТОРТ СО СВЕЧАМИ
   ========================================================================== */
.cake-section { text-align: center; }

.cake-stage-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0 20px 0;
}

.cake-display {
  position: relative;
  width: 320px;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 30px;
}

.candles-rack {
  position: absolute;
  top: 30px;
  width: 170px;
  display: flex;
  justify-content: space-around;
  z-index: 10;
}

.candle {
  width: 14px;
  height: 46px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.candle:hover { transform: scale(1.15); }

.candle .wax {
  width: 100%;
  height: 36px;
  background: linear-gradient(to right, #f7f3eb 0%, #e2d7c5 50%, #f7f3eb 100%);
  border-radius: 4px 4px 2px 2px;
  position: absolute;
  bottom: 0;
}

.candle .wax::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(212, 175, 55, 0.6) 4px, rgba(212, 175, 55, 0.6) 6px);
  border-radius: 4px;
}

.candle .wick {
  width: 2px;
  height: 8px;
  background: #333;
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
}

.candle .flame {
  width: 12px;
  height: 18px;
  background: radial-gradient(ellipse at bottom, #ffffff 0%, #ffe600 40%, #ff5e00 80%, transparent 100%);
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  transform-origin: bottom center;
}

.candle.lit .flame {
  opacity: 1;
  animation: candleFlicker 0.9s infinite alternate ease-in-out;
}

.cake-tier {
  position: relative;
  border-radius: 12px 12px 6px 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.tier-top {
  width: 180px;
  height: 60px;
  background: linear-gradient(180deg, #87193e 0%, #68132c 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  z-index: 5;
}

.tier-middle {
  width: 230px;
  height: 65px;
  background: linear-gradient(180deg, #f7f2ea 0%, #e6dcce 100%);
  border: 1px solid rgba(212, 175, 55, 0.5);
  margin-top: -8px;
  z-index: 4;
}

.tier-bottom {
  width: 280px;
  height: 75px;
  background: linear-gradient(180deg, #68132c 0%, #4a0d1f 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  margin-top: -8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cake-ribbon-gold {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-shimmer), var(--gold-dark));
}

.cake-text-emboss {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 2px;
  color: var(--gold-light);
  z-index: 5;
}

.cake-plate {
  width: 320px;
  height: 16px;
  background: linear-gradient(180deg, #e3c46e 0%, #ad8225 100%);
  border-radius: 50% 50% 40% 40% / 100% 100% 0% 0%;
  margin-top: -4px;
}

.cake-controls {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.btn-large { padding: 16px 36px; font-size: 1.1rem; }

.wish-result-card {
  max-width: 650px;
  margin-top: 35px;
  background: var(--bg-card);
  border: 1px solid var(--gold-main);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 35px var(--gold-glow);
  animation: zoomIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.wish-result-card.hidden { display: none; }

.wish-badge {
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.wish-result-card h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--ivory-pure);
  margin-bottom: 14px;
}

.wish-result-card p {
  color: var(--ivory-silk);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.wish-signature {
  display: block;
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--gold-shimmer);
}

/* ==========================================================================
   7. 50 ПРИЧИН МОЕЙ ЛЮБВИ
   ========================================================================== */
.reasons-view-toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.view-btn {
  background: rgba(30, 16, 30, 0.7);
  border: 1px solid var(--border-gold);
  color: var(--ivory-muted);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.view-btn:hover, .view-btn.active {
  background: var(--wine-main);
  border-color: var(--gold-main);
  color: var(--gold-shimmer);
}

.reason-card-wrapper {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reason-card {
  width: 100%;
  min-height: 240px;
  background: linear-gradient(135deg, rgba(46, 12, 28, 0.88) 0%, rgba(24, 10, 22, 0.92) 100%);
  border: 2px solid var(--gold-main);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  backdrop-filter: blur(16px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.25);
}

.card-corner-ornament {
  position: absolute;
  font-size: 1.2rem;
  color: var(--gold-main);
  opacity: 0.6;
}
.top-left { top: 12px; left: 16px; }
.top-right { top: 12px; right: 16px; }
.bottom-left { bottom: 12px; left: 16px; }
.bottom-right { bottom: 12px; right: 16px; }

.card-badge {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-main);
  margin-bottom: 18px;
}

.reason-text {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--ivory-pure);
  margin-bottom: 18px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reason-category-tag {
  font-size: 0.78rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  padding: 4px 14px;
  border-radius: var(--radius-full);
}

.reason-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 25px;
}

.btn-icon-gold {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(30, 16, 30, 0.85);
  border: 1px solid var(--gold-main);
  color: var(--gold-light);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon-gold:hover {
  background: var(--wine-main);
  color: #fff;
  transform: scale(1.12);
}

.reason-progress-bar-container {
  width: 100%;
  height: 5px;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 3px;
  margin-top: 20px;
  overflow: hidden;
}

.reason-progress-bar {
  height: 100%;
  width: 2%;
  background: linear-gradient(90deg, var(--wine-bright), var(--gold-main));
  transition: width 0.3s ease;
}

.reason-counter-text {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--ivory-muted);
}

.reasons-all-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.reasons-all-grid.hidden { display: none; }

.grid-reason-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.grid-reason-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-main);
}

.grid-reason-num {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gold-main);
  margin-bottom: 8px;
}

.grid-reason-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--ivory-pure);
  line-height: 1.4;
  margin-bottom: 12px;
}

/* ==========================================================================
   8. ГАЛЕРЕЯ ЛЮБИМОГО ПЕРСОНАЖА (4 КАДРА)
   ========================================================================== */
.character-intro-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-gold-bright);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 35px;
}

.char-banner-text h4 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.char-banner-text p {
  font-size: 0.95rem;
  color: var(--ivory-muted);
}

.polaroid-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  padding: 10px;
}

.polaroid-item {
  background: #ffffff;
  color: #222;
  padding: 14px 14px 22px 14px;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.polaroid-item:nth-child(1) { transform: rotate(-2deg); }
.polaroid-item:nth-child(2) { transform: rotate(2deg); }
.polaroid-item:nth-child(3) { transform: rotate(-1.5deg); }
.polaroid-item:nth-child(4) { transform: rotate(2.5deg); }

.polaroid-item:hover {
  transform: rotate(0deg) scale(1.05) translateY(-8px) !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--gold-glow);
  z-index: 15;
}

.polaroid-pin {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, #f6df94 0%, #ad8225 100%);
  border-radius: 50%;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.polaroid-img-box {
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: #151016;
  border-radius: 2px;
}

.polaroid-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.polaroid-item:hover .polaroid-img-box img { transform: scale(1.08); }

.polaroid-caption {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: #33232c;
  text-align: center;
  margin-top: 14px;
  line-height: 1.2;
}

/* ==========================================================================
   9. ХРОНИКА НАШЕЙ ЛЮБВИ (TIMELINE)
   ========================================================================== */
.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold-main) 10%, var(--gold-main) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-card {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
}

.timeline-card.left { left: 0; text-align: right; }
.timeline-card.right { left: 50%; text-align: left; }

.timeline-node {
  position: absolute;
  top: 30px;
  width: 36px;
  height: 36px;
  background: var(--wine-main);
  border: 2px solid var(--gold-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--gold-shimmer);
  z-index: 5;
}

.timeline-card.left .timeline-node { right: -18px; }
.timeline-card.right .timeline-node { left: -18px; }

.bday-node {
  background: linear-gradient(135deg, var(--gold-main), var(--gold-dark));
  color: #000;
  font-size: 1.2rem;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-main);
  margin-bottom: 6px;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--ivory-pure);
  margin-bottom: 10px;
}

.timeline-content p {
  font-size: 0.92rem;
  color: var(--ivory-silk);
  line-height: 1.6;
}

/* ==========================================================================
   10. СЕКРЕТНОЕ ПИСЬМО В СУРГУЧНОМ КОНВЕРТЕ
   ========================================================================== */
.envelope-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
}

.envelope-container {
  width: 100%;
  max-width: 680px;
  perspective: 1000px;
  margin-bottom: 25px;
}

.envelope {
  position: relative;
  width: 100%;
  min-height: 420px;
  background: #501124;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transition: min-height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.envelope.open {
  min-height: unset;
  height: auto;
  overflow: visible;
  padding-bottom: 25px;
  background: transparent;
  box-shadow: none;
}

.envelope-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #3b0918;
}

.envelope.open .envelope-back {
  display: none;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 180px;
  background: linear-gradient(180deg, #6e1532 0%, #521025 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.6s ease;
  z-index: 20;
}

.envelope.open .envelope-flap {
  transform: rotateX(180deg);
  opacity: 0.15;
  z-index: 1;
}

.envelope-front {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 40%, 50% 70%, 100% 40%, 100% 100%, 0 100%);
  background: linear-gradient(135deg, #61122b 0%, #460c1e 100%);
  z-index: 15;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.envelope.open .envelope-front {
  opacity: 0;
}

.wax-seal {
  position: absolute;
  top: 140px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 35% 35%, #961d45 0%, #4e0a20 70%, #300512 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  transition: transform 0.3s ease, opacity 0.4s ease;
}

.wax-seal:hover { transform: translate(-50%, -50%) scale(1.1); }
.envelope.open .wax-seal { opacity: 0; pointer-events: none; display: none; }

.wax-seal-inner {
  width: 60px;
  height: 60px;
  border: 2px dashed rgba(212, 175, 55, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
}

.seal-prompt {
  position: absolute;
  bottom: -28px;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-shimmer);
  background: rgba(0, 0, 0, 0.65);
  padding: 2px 10px;
  border-radius: 4px;
}

.letter-paper {
  position: absolute;
  top: 100px;
  left: 5%;
  width: 90%;
  background: #fffcf7;
  color: #2c2024;
  border-radius: 8px;
  padding: 35px 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.envelope.open .letter-paper {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  margin-top: 20px;
  z-index: 30;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.15);
}

.letter-border {
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 24px;
  border-radius: 4px;
  background: radial-gradient(circle at center, #ffffff 0%, #faf4eb 100%);
}

.letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(115, 22, 52, 0.15);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.letter-monogram {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--wine-main);
  letter-spacing: 2px;
}

.letter-date { font-size: 0.85rem; font-weight: 600; color: #8c7353; }

.letter-salutation {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--wine-main);
  margin-bottom: 16px;
}

.letter-body p {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.8;
  color: #3b2a32;
  margin-bottom: 16px;
}

.letter-farewell { margin-top: 25px; text-align: right; }

.letter-sign {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--wine-bright);
  margin-top: 6px;
}

/* ==========================================================================
   11. ДИСТАНЦИОННЫЕ КУПОНЫ ЛЮБВИ
   ========================================================================== */
.coupons-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.coupon-card {
  flex: 0 1 calc(33.333% - 20px);
  min-width: 320px;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px dashed var(--gold-main);
  border-radius: var(--radius-md);
  display: flex;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.coupon-card:hover { transform: translateY(-4px); }

.coupon-left {
  width: 90px;
  background: linear-gradient(180deg, var(--wine-main) 0%, var(--wine-darkest) 100%);
  border-right: 2px dashed rgba(212, 175, 55, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  position: relative;
}

.coupon-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-light);
  transform: rotate(-90deg);
  white-space: nowrap;
  margin-bottom: 18px;
}

.coupon-icon { font-size: 2rem; }

.coupon-right {
  flex: 1;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.coupon-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--ivory-pure);
  margin-bottom: 6px;
}

.coupon-desc {
  font-size: 0.88rem;
  color: var(--ivory-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.coupon-btn {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-main);
  color: var(--gold-shimmer);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  transition: var(--transition);
}

.coupon-btn:hover { background: var(--gold-main); color: var(--wine-darkest); }

.coupon-stamp {
  display: none;
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%) rotate(-12deg) scale(0);
  border: 3px double var(--gold-main);
  background: radial-gradient(circle, rgba(115, 22, 52, 0.96) 0%, rgba(38, 6, 17, 0.98) 100%);
  color: var(--gold-shimmer);
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 2px;
  padding: 8px 18px;
  border-radius: 8px;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.5), inset 0 0 15px rgba(212, 175, 55, 0.3);
  text-shadow: 0 0 10px rgba(243, 219, 131, 0.8);
  z-index: 20;
}

.coupon-card.activated {
  border: 1.5px solid var(--gold-main);
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.4), 0 14px 40px rgba(0, 0, 0, 0.7);
  animation: couponCardPunch 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.coupon-card.activated .coupon-stamp {
  display: block;
  animation: stampSlam 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.coupon-card.activated .coupon-btn {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-shimmer);
  font-weight: 700;
  border: 1px solid var(--gold-main);
  opacity: 0.95;
  cursor: pointer;
}

.coupon-card.activated .coupon-btn:hover {
  background: rgba(115, 22, 52, 0.8);
  color: #fff;
}

@keyframes couponCardPunch {
  0% { transform: scale(1); }
  35% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@keyframes stampSlam {
  0% {
    opacity: 0;
    transform: translateY(-50%) rotate(-28deg) scale(3.2);
    filter: blur(5px);
  }
  60% {
    opacity: 1;
    transform: translateY(-50%) rotate(-10deg) scale(0.94);
    filter: blur(0);
  }
  80% {
    transform: translateY(-50%) rotate(-14deg) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) rotate(-12deg) scale(1);
  }
}

/* Эффектные легкие золотые искры при активации купона */
.coupon-sparkle-star {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #ffffff 0%, var(--gold-shimmer) 60%, var(--gold-main) 100%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 0 10px #fff, 0 0 16px var(--gold-shimmer);
  animation: sparkleStarFly 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sparkleStarFly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1.4);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0.2);
  }
}

/* Всплывающие сердечки при клике */
.click-heart-particle {
  position: fixed;
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 10001;
  animation: heartFloatUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heartFloatUp {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  50% { transform: translate(-50%, -80px) scale(1.4); }
  100% { opacity: 0; transform: translate(-50%, -140px) scale(1); }
}

/* ==========================================================================
   ФУТЕР
   ========================================================================== */
.footer {
  background: rgba(8, 6, 10, 0.94);
  border-top: 1px solid var(--border-gold);
  padding: 65px 24px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.footer-container { max-width: 700px; margin: 0 auto; }

.footer-monogram {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-light);
  margin-bottom: 14px;
}

.footer-text { font-size: 1.05rem; color: var(--ivory-silk); margin-bottom: 8px; }
.footer-subtext { font-size: 0.85rem; color: var(--ivory-muted); margin-bottom: 25px; }

/* ==========================================================================
   LIGHTBOX МОДАЛЬНОЕ ОКНО
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active { opacity: 1; pointer-events: auto; }

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox-content {
  position: relative;
  z-index: 10;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: var(--ivory-pure);
  font-size: 2.5rem;
  cursor: pointer;
}

.lightbox-img-wrapper {
  max-width: 85vw;
  max-height: 75vh;
  border: 2px solid var(--gold-main);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 75vh;
  display: block;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 14px;
  color: var(--gold-shimmer);
  font-family: var(--font-script);
  font-size: 1.5rem;
  text-align: center;
}

/* ==========================================================================
   АНИМАЦИИ
   ========================================================================== */
@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes spinSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes bounceSlow {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -8px); }
}

@keyframes candleFlicker {
  0% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.08, 0.95); }
  100% { transform: translateX(-50%) scale(0.96, 1.05); }
}

@keyframes numberPulse {
  0% { opacity: 0.9; }
  100% { opacity: 1; transform: scale(1.02); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
/* ==========================================================================
   АДАПТИВНОСТЬ И МОБИЛЬНАЯ ОПТИМИЗАЦИЯ (ПК, ПЛАНШЕТЫ И СМАРТФОНЫ)
   ========================================================================== */
button, a, .wax-seal, .candle, .apex-crate, .coupon-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .timeline-line { left: 20px; }
  .timeline-card { width: 100%; padding-left: 55px; padding-right: 15px; }
  .timeline-card.left, .timeline-card.right { left: 0; text-align: left; }
  .timeline-card.left .timeline-node, .timeline-card.right .timeline-node { left: 2px; }
  .distance-bridge-container { flex-direction: column; gap: 30px; }
  .bridge-line-wrapper { width: 100%; }
}

@media (max-width: 600px) {
  /* Верхнее меню */
  .navbar { padding: 8px 12px; }
  .nav-logo h2 { font-size: 1rem; }
  .hud-tag { font-size: 0.65rem; padding: 2px 6px; }
  .nav-actions { gap: 6px; }
  .btn-gold-action, .btn-music-toggle { padding: 6px 10px; font-size: 0.78rem; }

  /* Главный блок Hero */
  .hero-section { padding-top: 85px; padding-bottom: 35px; }
  .hero-title { font-size: 2.1rem; line-height: 1.22; }
  .hero-subtitle { font-size: 0.94rem; margin-bottom: 22px; padding: 0 4px; }
  .champion-hud-badge { font-size: 0.7rem; padding: 4px 10px; }
  .hero-signature { font-size: 0.85rem; }

  /* Обратный отсчёт ко Дню Рождения */
  .bday-countdown-box { padding: 14px 10px; border-radius: 12px; width: 100%; }
  .countdown-digits { gap: 6px; }
  .digit-col { min-width: 44px; }
  .digit-val { font-size: 1.55rem; padding: 6px 4px; min-width: 44px; }
  .digit-sep { font-size: 1.3rem; margin-top: -12px; }
  .digit-label { font-size: 0.62rem; letter-spacing: 0.5px; }

  /* Скретч-билет */
  .scratch-area-wrapper { height: 210px; }
  .scratch-hint-bar { flex-direction: column; gap: 10px; text-align: center; }

  /* Золотой лутбокс */
  .apex-crate { width: 260px; height: 130px; }
  .crate-open-prompt { font-size: 0.75rem; }
  .loot-items-grid { grid-template-columns: 1fr; gap: 14px; }
  .loot-card { padding: 18px 14px; }

  /* Мост расстояния */
  .distance-radar-stage { padding: 24px 10px; }
  .distance-bridge-container { flex-direction: column; gap: 24px; }
  .radar-node-box { width: 120px; padding: 12px 8px; }
  .node-avatar { width: 48px; height: 48px; font-size: 1.4rem; }
  .node-name { font-size: 0.95rem; }
  .bridge-line-wrapper { width: 100%; height: 50px; }
  .bridge-metric-badge { font-size: 0.75rem; }

  /* Таймер отношений (удобная сетка 2x3) */
  .timer-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 25px;
  }
  .timer-card { padding: 14px 8px; }
  .timer-card-val { font-size: 1.9rem; }
  .timer-card-label { font-size: 0.72rem; }
  .milestones-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .milestone-item { padding: 12px 8px; }
  .milestone-value { font-size: 1.1rem; }
  .milestone-label { font-size: 0.7rem; }

  /* Праздничный торт */
  .cake-stage-container { min-height: 270px; }
  .cake-display { transform: scale(0.72); margin-bottom: 0; transform-origin: center bottom; }

  /* 50 причин */
  .reason-card { min-height: 190px; padding: 24px 14px 18px; }
  .reason-text { font-size: 1.12rem; line-height: 1.5; }
  .reasons-all-grid { grid-template-columns: 1fr; gap: 12px; }
  .reason-actions { gap: 10px; }
  .btn-icon-gold { width: 42px; height: 42px; font-size: 1.2rem; }

  /* Галерея Polaroid */
  .polaroid-grid-4 { grid-template-columns: 1fr; gap: 20px; max-width: 320px; margin: 0 auto; }
  .polaroid-item { padding: 10px 10px 18px; }
  .polaroid-caption { font-size: 1.15rem; }

  /* Сургучный конверт и письмо */
  .envelope-wrapper { padding: 15px 0; }
  .envelope { min-height: 300px; }
  .wax-seal { width: 68px; height: 68px; top: 115px; }
  .wax-seal-inner { width: 50px; height: 50px; font-size: 0.85rem; }
  .envelope-flap { height: 140px; }
  .envelope.open .letter-paper { padding: 22px 14px; margin-top: 10px; }
  .letter-header { margin-bottom: 14px; }
  .letter-monogram { font-size: 1.25rem; }
  .letter-date { font-size: 0.82rem; }
  .letter-salutation { font-size: 1.15rem; margin-bottom: 12px; }
  .letter-body p { font-size: 0.92rem; line-height: 1.65; margin-bottom: 12px; }
  .letter-sign { font-size: 1.35rem; }

  /* Купоны любви */
  .coupons-grid { flex-direction: column; gap: 16px; }
  .coupon-card { width: 100%; max-width: 100%; flex: 1 1 auto; flex-direction: row; }
  .coupon-left { width: 65px; }
  .coupon-icon { font-size: 1.5rem; }
  .coupon-tag { font-size: 0.58rem; }
  .coupon-right { padding: 14px 14px; }
  .coupon-title { font-size: 1.15rem; }
  .coupon-desc { font-size: 0.82rem; line-height: 1.45; margin-bottom: 12px; }
  .coupon-btn { padding: 7px 14px; font-size: 0.8rem; }
  .coupon-stamp { font-size: 0.88rem; padding: 6px 12px; right: 10px; }

  /* Общие секции */
  .section-block { padding: 45px 0; }
  .section-title { font-size: 1.75rem; }
  .section-desc { font-size: 0.88rem; }
  .section-tag { font-size: 0.65rem; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 1.85rem; }
  .digit-val { font-size: 1.35rem; }
  .timer-card-val { font-size: 1.65rem; }
  .cake-display { transform: scale(0.64); }
  .coupon-card { flex-direction: column; }
  .coupon-left {
    width: 100%;
    height: 40px;
    flex-direction: row;
    justify-content: center;
    border-right: none;
    border-bottom: 2px dashed rgba(212, 175, 55, 0.4);
  }
  .coupon-tag { transform: none; margin-right: 8px; }
}

/* ==========================================================================
   ВХОДНОЙ ЭКРАН (WELCOME / ATMOSPHERE OVERLAY)
   ========================================================================== */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at center, rgba(38, 12, 24, 0.96) 0%, rgba(10, 6, 12, 0.98) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.8s;
}

.welcome-overlay.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-card {
  max-width: 520px;
  width: 100%;
  background: linear-gradient(145deg, rgba(35, 16, 28, 0.92), rgba(18, 10, 16, 0.96));
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 0 60px rgba(115, 22, 52, 0.45), 0 0 35px rgba(212, 175, 55, 0.25), inset 0 0 25px rgba(212, 175, 55, 0.08);
  border-radius: 20px;
  padding: 40px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: welcomeAppear 0.8s ease-out forwards;
}

@keyframes welcomeAppear {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(115, 22, 52, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 6px 14px;
  border-radius: 30px;
  font-family: var(--font-hud, monospace);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--gold-light, #f7e7a9);
  margin-bottom: 14px;
}

.welcome-monogram {
  font-family: var(--font-hud, monospace);
  font-size: 0.85rem;
  letter-spacing: 4px;
  color: var(--gold-main, #d4af37);
  opacity: 0.85;
  margin-bottom: 12px;
}

.welcome-title {
  font-family: var(--font-title, 'Cormorant Garamond', serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff9e6;
  margin-bottom: 14px;
  line-height: 1.25;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.welcome-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ded1d8;
  margin-bottom: 28px;
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.welcome-btn-primary {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 50%, #8b1538 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.35), 0 0 20px rgba(115, 22, 52, 0.4);
  transition: all 0.3s ease;
  animation: pulseGoldBtn 2.2s infinite ease-in-out;
}

@keyframes pulseGoldBtn {
  0%, 100% {
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.35), 0 0 20px rgba(115, 22, 52, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 12px 38px rgba(212, 175, 55, 0.55), 0 0 30px rgba(115, 22, 52, 0.6);
    transform: scale(1.02);
  }
}

.welcome-btn-primary:active {
  transform: scale(0.98);
}

.welcome-btn-secondary {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.welcome-btn-secondary:hover {
  color: rgba(255, 255, 255, 0.85);
}
