/* ═══ ПЕРЕМЕННЫЕ И ПЕРЕОПРЕДЕЛЕНИЕ ГЛОБАЛЬНЫХ ЦВЕТОВ ═══ */
body {
  --fun-accent: #8B5CF6;
  --fun-soft: #F5F3FF;
  --fun-dark: #6D28D9;
  
  /* Переопределяем глобальные переменные сайта на фиолетовую тему */
  --accent: #8B5CF6;
  --accent-dark: #6D28D9;
  --accent-soft: #F5F3FF;
}

/* ═══ HOVER-СОСТОЯНИЯ (переопределяем оранжевый на фиолетовый) ═══ */
body .btn-primary:hover,
body .btn-primary:focus {
  background: var(--fun-dark);
  border-color: var(--fun-dark);
  color: #fff;
}

body .btn-outline:hover,
body .btn-outline:focus {
  background: var(--fun-soft);
  border-color: var(--fun-accent);
  color: var(--fun-dark);
}

body .site-nav__link:hover,
body .site-nav__link:focus,
body .site-nav__dropdown-btn:hover {
  color: var(--fun-dark);
}

body .site-nav__dropdown-item:hover,
body .mobile-nav__sublink:hover {
  background: var(--fun-soft);
  color: var(--fun-dark);
}

body a:not(.personality-card):hover {
  color: var(--fun-dark);
}

body .cross-promo__card:hover {
  border-color: var(--fun-accent);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

body .cookie-banner__btn:hover {
  background: var(--fun-dark);
  border-color: var(--fun-dark);
}

/* ═══ ОСНОВНЫЕ СТИЛИ СТРАНИЦЫ ═══ */
.fun-page {
  background:
    radial-gradient(1100px 480px at 50% -120px, rgba(139, 92, 246, 0.16) 0%, rgba(139, 92, 246, 0) 70%),
    #F8FAFC;
  min-height: 100vh;
}

.fun-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.fun-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--fun-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ═══ ЭКРАН СТАРТА ═══ */
.fun-start {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(109, 40, 217, 0.08);
}

.fun-start__emoji {
  font-size: 5rem;
  margin-bottom: 20px;
}

.fun-start h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--fun-dark);
  margin-bottom: 16px;
  line-height: 1.2;
}

.fun-lead {
  font-size: 1.1rem;
  color: #475569;
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.fun-meta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: #64748B;
}

.fun-meta span {
  padding: 6px 14px;
  background: var(--fun-soft);
  border-radius: 12px;
  font-weight: 600;
}

.fun-primary {
  padding: 16px 48px;
  background: var(--fun-accent);
  color: #fff;
  border: 2px solid var(--fun-accent);
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}

.fun-primary:hover {
  background: var(--fun-dark);
  border-color: var(--fun-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.25);
}

.fun-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: #94A3B8;
}

/* ═══ ЭКРАН ПРОХОЖДЕНИЯ ═══ */
.fun-run {
  background: #fff;
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 4px 24px rgba(109, 40, 217, 0.08);
}

.fun-progress {
  margin-bottom: 32px;
}

.fun-progress__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.fun-progress__track {
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
}

.fun-progress__bar,
.fun-progress__fill {
  display: block;
  height: 100%;
  background: var(--fun-accent);
  border-radius: 4px;
  transition: width 0.3s;
}

.fun-question {
  border: none;
  padding: 0;
  margin: 0;
}

.fun-question__number {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fun-dark);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.fun-question__text {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 24px;
  line-height: 1.4;
}

.fun-answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fun-answer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  font-size: 1rem;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.fun-answer:hover {
  border-color: var(--fun-accent);
  background: var(--fun-soft);
}

.fun-answer.is-selected {
  border-color: var(--fun-dark);
  background: var(--fun-soft);
}

.fun-answer__letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #fff;
  border: 2px solid #CBD5E1;
  border-radius: 8px;
  font-weight: 800;
  color: #64748B;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.fun-answer.is-selected .fun-answer__letter {
  background: var(--fun-dark);
  border-color: var(--fun-dark);
  color: #fff;
}

.fun-back {
  padding: 12px 24px;
  background: transparent;
  border: 2px solid #CBD5E1;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.fun-back:hover {
  border-color: var(--fun-dark);
  color: var(--fun-dark);
}

.fun-run__footer {
  margin-top: 24px;
}

/* ═══ ЭКРАН РЕЗУЛЬТАТА ═══ */
.fun-result {
  background: #fff;
  border-radius: 24px;
  padding: 48px 32px;
  box-shadow: 0 4px 24px rgba(109, 40, 217, 0.08);
  text-align: center;
}

.fun-result__celebrate {
  display: inline-block;
  padding: 8px 20px;
  background: var(--fun-accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  border-radius: 20px;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fun-result__emoji {
  font-size: 6rem;
  margin-bottom: 20px;
}

.fun-result h2 {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--fun-dark);
  margin-bottom: 12px;
}

.fun-result__subtitle {
  font-size: 1.2rem;
  color: #64748B;
  margin-bottom: 32px;
  font-weight: 600;
}

/* ═══ ШКАЛА ═══ */
.fun-scale {
  margin: 40px 0;
}

.fun-scale__bar {
  position: relative;
  height: 24px;
  background: linear-gradient(90deg, #E2E8F0 0%, var(--fun-soft) 100%);
  border-radius: 12px;
  overflow: visible;
  margin-bottom: 12px;
}

.fun-scale__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--fun-accent);
  border-radius: 12px;
  width: 0%;
  transition: width 1s ease;
}

.fun-scale__marker {
  position: absolute;
  top: -8px;
  width: 40px;
  height: 40px;
  background: var(--fun-dark);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
  transform: translateX(-50%);
  transition: left 1s ease;
  left: 0%;
}

.fun-scale__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #64748B;
  font-weight: 600;
}

.fun-gauge {
  font-size: 1.1rem;
  color: var(--fun-dark);
  font-weight: 700;
  margin: 24px 0;
  padding: 16px 24px;
  background: var(--fun-soft);
  border-radius: 12px;
  display: inline-block;
}

.fun-result__description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #475569;
  margin: 24px 0;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.fun-result__strengths {
  margin: 32px 0;
}

.fun-result__strengths strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--fun-dark);
  margin-bottom: 12px;
}

.fun-result__strengths > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.fun-result__strengths > div > span {
  padding: 8px 16px;
  background: var(--fun-soft);
  color: var(--fun-dark);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

.fun-result__advice {
  margin: 32px 0;
  padding: 24px;
  background: #F8FAFC;
  border-radius: 16px;
  text-align: left;
}

.fun-result__advice strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--fun-dark);
  margin-bottom: 8px;
}

.fun-result__advice p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* ═══ ШАРИНГ ═══ */
.fun-share-link {
  margin: 32px 0;
}

.fun-share-link label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px;
}

.fun-share-link__row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.fun-share-link input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1E293B;
  background: #F8FAFC;
}

.fun-share-link input:focus {
  outline: none;
  border-color: var(--fun-accent);
}

.fun-share-hint {
  font-size: 0.85rem;
  color: #94A3B8;
  margin: 0;
}

/* ═══ КНОПКИ РЕЗУЛЬТАТА ═══ */
.fun-secondary {
  padding: 14px 36px;
  background: var(--fun-accent);
  color: #fff;
  border: 2px solid var(--fun-accent);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  margin: 8px 4px;
}

.fun-secondary:hover {
  background: var(--fun-dark);
  border-color: var(--fun-dark);
  color: #fff;
}

.fun-restart {
  padding: 14px 36px;
  background: transparent;
  color: #64748B;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin: 8px 4px;
}

.fun-restart:hover {
  border-color: #CBD5E1;
  color: #1E293B;
}

/* ═══ SEO-БЛОК И FAQ ═══ */
.fun-info {
  margin: 48px 0;
  padding: 32px 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.fun-info h2 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--fun-dark);
  margin-bottom: 16px;
}

.fun-info p {
  font-size: 1rem;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 12px;
}

/* ═══ АДАПТАЦИЯ ═══ */
@media (max-width: 640px) {
  .fun-shell {
    padding: 16px 12px 40px;
  }
  
  .fun-start,
  .fun-run,
  .fun-result {
    padding: 32px 16px;
    border-radius: 20px;
  }
  
  .fun-start h1 {
    font-size: 1.7rem;
  }
  
  .fun-result h2 {
    font-size: 1.9rem;
  }
  
  .fun-result__emoji {
    font-size: 4.5rem;
  }
  
  .fun-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .fun-question__text {
    font-size: 1.2rem;
  }
  
  .fun-scale__labels {
    font-size: 0.75rem;
  }
  
  .fun-scale__marker {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
}

/* ═══ МОДАЛКА С КАРТОЧКОЙ (МОБИЛКИ) ═══ */
.fun-card-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fun-card-modal[hidden] {
  display: none;
}

.fun-card-modal__inner {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.fun-card-modal__inner img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.fun-card-modal__hint {
  color: #E2E8F0;
  font-size: 0.9rem;
  margin: 14px 0;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .fun-share-link__row {
    flex-direction: column;
  }
  .fun-share-link__row .fun-primary {
    width: 100%;
    padding: 14px 24px;
  }
}

.personality-related .personality-primary {
  background: var(--accent, #F97316);
  color: #fff;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  transition: all .2s;
}

.personality-related .personality-primary:hover {
  background: var(--accent-dark, #C2410C);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.fun-page .personality-related .personality-primary {
  background: var(--fun-accent);
  color: #fff;
}

.fun-page .personality-related .personality-primary:hover {
  background: var(--fun-dark);
  color: #fff;
}

body.fun-page .personality-related .personality-primary:hover {
  background: var(--fun-dark);
  color: #fff;
}