/* ============================================================
   SYUNIK X — style.css (optimized)
   Автор: Artyom Tatintsyan
   ============================================================
   1.  CSS-переменные (dark / light)
   2.  Сброс и базовые элементы
   3.  Кнопки
   4.  Preloader
   5.  Логотип SYUNIK X
   6.  Header / Nav / Controls
   7.  Hero
   8.  Секции — общие стили
   9.  About
   10. Cards (places, place-tags)
   11. 3D Modal
   12. Why Visit
   13. History Timeline
   14. Guide
   15. Before/After
   16. Quiz
   17. Game
   18. Album + Lightbox
   19. Interviews
   20. Underrated
   21. Footer
   22. Back-to-top + Utilities
   23. AOS
   24. Img Placeholder
   25. Map
   26. How-to-Get + Countdown
   27. Theme Panel
   28. Cursor
   29. Easter Eggs / Quest
   30. Secret Modal
   31. AI Panel
   32. Toast / Skeleton / Network
   33. Random Place
   34. Lite Mode
   35. Адаптив
   ============================================================ */

/* ============================================================
   1. CSS-ПЕРЕМЕННЫЕ
   ============================================================ */
:root,
[data-theme="dark"] {
  --bg-primary: #07090f;
  --bg-secondary: #0d1220;
  --bg-card: #111827;
  --bg-card-hover: #162035;
  --bg-glass: rgba(13, 18, 32, 0.7);
  --bg-header: rgba(7, 9, 15, 0.9);
  --bg-modal: rgba(0, 0, 0, 0.88);
  --bg-input: #111827;

  --text-primary: #e8f0ff;
  --text-secondary: #8a9bbf;
  --text-muted: #4a5578;
  --text-on-accent: #07090f;

  --accent: #3dffcb;
  --accent-dim: #2ac9a0;
  --accent-hover: #7affd8;
  --accent-light: rgba(61, 255, 203, 0.1);
  --accent-glow: rgba(61, 255, 203, 0.3);
  --accent-glow-strong: rgba(61, 255, 203, 0.6);
  --accent2: #4d8cff;
  --accent2-light: rgba(77, 140, 255, 0.12);
  --accent2-glow: rgba(77, 140, 255, 0.3);

  --grad-accent: linear-gradient(135deg, #3dffcb, #4d8cff);
  --grad-accent-rev: linear-gradient(135deg, #4d8cff, #3dffcb);

  --border: rgba(255, 255, 255, 0.07);
  --border-mid: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(61, 255, 203, 0.35);

  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 0 40px rgba(61, 255, 203, 0.2);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --tr: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --ph-bg: #0e1525;
  --ph-border: rgba(255, 255, 255, 0.07);
  --ph-text: #2a3550;
}

[data-theme="light"] {
  --bg-primary: #f0f4fa;
  --bg-secondary: #e4ebf5;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f8ff;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-header: rgba(240, 244, 250, 0.92);
  --bg-modal: rgba(10, 20, 40, 0.75);
  --bg-input: #ffffff;

  --text-primary: #0e1a30;
  --text-secondary: #3d5070;
  --text-muted: #8090b0;
  --text-on-accent: #ffffff;

  --accent: #00b89a;
  --accent-dim: #009d84;
  --accent-hover: #00d4b0;
  --accent-light: rgba(0, 184, 154, 0.1);
  --accent-glow: rgba(0, 184, 154, 0.25);
  --accent-glow-strong: rgba(0, 184, 154, 0.5);
  --accent2: #2d6fff;
  --accent2-light: rgba(45, 111, 255, 0.1);
  --accent2-glow: rgba(45, 111, 255, 0.25);

  --grad-accent: linear-gradient(135deg, #00b89a, #2d6fff);
  --grad-accent-rev: linear-gradient(135deg, #2d6fff, #00b89a);

  --border: rgba(0, 0, 0, 0.07);
  --border-mid: rgba(0, 0, 0, 0.12);
  --border-accent: rgba(0, 184, 154, 0.35);

  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.13);
  --shadow-accent: 0 0 40px rgba(0, 184, 154, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);

  --ph-bg: #e8eef7;
  --ph-border: rgba(0, 0, 0, 0.08);
  --ph-text: #a0aec0;
}

/* ============================================================
   2. СБРОС И БАЗОВЫЕ ЭЛЕМЕНТЫ
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--bg-primary);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100dvh;
  transition: background-color var(--tr-slow), color var(--tr-slow);
  /* ... существующие стили ... */
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Анимация при смене темы */
@keyframes themeFlash {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.85;
  }

  100% {
    opacity: 1;
  }
}

.theme-switching {
  animation: themeFlash 0.4s ease;

}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--text-primary);
  transition: color var(--tr-slow);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--tr);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

select,
input {
  font-family: var(--font-body);
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  transition: border-color var(--tr), background var(--tr-slow);
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--accent);
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 3px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   3. КНОПКИ
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-accent);
  color: var(--text-on-accent);
  padding: 13px 28px;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: var(--tr-bounce);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity var(--tr);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--accent-glow);
  color: var(--text-on-accent);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border-accent);
  padding: 11px 24px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--tr);
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  color: var(--accent-hover);
}

/* Светлая тема: тёмный текст на акцентных кнопках */
[data-theme="light"] .btn-primary,
[data-theme="light"] .hero-btn-primary,
[data-theme="light"] .filter-btn.active,
[data-theme="light"] .lang-pill.active,
[data-theme="light"] .guide-opt-btn.active,
[data-theme="light"] .guide-route-num {
  color: #0e1a30;
}

/* ============================================================
   4. PRELOADER
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  background: #07090f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#preloader .preloader-logo .logo-syunik {
  color: #e8f0ff;
}

#preloader .preloader-sub {
  color: rgba(255, 255, 255, 0.3);
}

.preloader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.preloader-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeSlideUp 0.6s ease both;
}

.preloader-sub {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fadeSlideUp 0.6s 0.2s ease both;
}

.preloader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  animation: fadeSlideUp 0.6s 0.1s ease both;
}

.preloader-fill {
  height: 100%;
  background: var(--grad-accent);
  animation: plLoad 2s ease forwards;
}

@keyframes plLoad {
  0% {
    width: 0%;
  }

  70% {
    width: 80%;
  }

  100% {
    width: 100%;
  }
}

/* ============================================================
   5. ЛОГОТИП SYUNIK X
   ============================================================ */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  text-decoration: none;
}

.logo-syunik {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  transition: color var(--tr-slow);
}

.logo-x {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
  filter: drop-shadow(0 0 8px var(--accent-glow-strong));
  transition: filter var(--tr);
}

.logo-x::after {
  content: 'X';
  position: absolute;
  inset: 0;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: blur(6px) brightness(1.5);
  opacity: 0.5;
  z-index: -1;
}

.logo:hover .logo-x {
  filter: drop-shadow(0 0 16px var(--accent-glow-strong));
}

/* ============================================================
   6. HEADER / NAV / CONTROLS
   ============================================================ */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--tr), box-shadow var(--tr), backdrop-filter var(--tr);
  padding-top: env(safe-area-inset-top, 0px);
}

#main-header.scrolled {
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  padding: 0 18px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 16px;
}

/* Desktop nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.desktop-nav a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 6px 9px;
  border-radius: var(--r-sm);
  transition: color var(--tr), background var(--tr);
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Стеклянная группа языков */
.ctrl-glass-group {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 3px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 16px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ctrl-glass-group:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 16px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.ctrl-glass-sep {
  width: 1px;
  height: 14px;
  background: var(--border-mid);
  flex-shrink: 0;
  opacity: 0.55;
}

/* Кнопки языков */
.lang-pill {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0 10px;
  height: 28px;
  min-width: 24px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease, background 0.3s var(--ease), box-shadow 0.25s ease, transform 0.25s var(--ease);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.lang-pill:hover:not(.active) {
  color: var(--text-secondary);
}

.lang-pill.active {
  background: var(--grad-accent);
  color: var(--text-on-accent);
  text-shadow: none;
  box-shadow: 0 2px 12px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: langActivate 0.35s var(--ease) forwards;
}

@keyframes langActivate {
  0% {
    transform: scale(0.85);
    opacity: 0.7;
  }

  60% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

[data-theme="light"] .ctrl-glass-group {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ctrl-glass-sep {
  background: var(--border-mid);
}

[data-theme="light"] .lang-pill {
  color: rgba(10, 20, 40, 0.75);
  text-shadow: none;
}

[data-theme="light"] .lang-pill:not(.active) {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .lang-pill.active {
  color: #ffffff;
}

/* Иконочные кнопки */
.ctrl-glass-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.28s ease, background 0.28s ease, border-color 0.28s ease,
    box-shadow 0.28s ease, transform 0.28s var(--ease);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ctrl-glass-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(61, 255, 203, 0.12), rgba(77, 140, 255, 0.08));
  opacity: 0;
  transition: opacity 0.28s ease;
}

.ctrl-glass-icon:hover::before {
  opacity: 1;
}

.ctrl-glass-icon:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  box-shadow: 0 0 18px var(--accent-glow), 0 4px 14px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* Убираем hover-эффект подъёма на тач-устройствах */
@media (hover: none) and (pointer: coarse) {
  .ctrl-glass-icon:hover {
    transform: none;
  }

  .ctrl-glass-icon:active {
    transform: scale(0.95);
  }

  .lang-pill:hover:not(.active) {
    transform: none;
  }

  .lang-pill:active:not(.active) {
    transform: scale(0.95);
  }

  .ctrl-glass-group:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 16px rgba(0, 0, 0, 0.2);
  }

  .theme-swatch:hover {
    transform: none;
  }

  .theme-swatch:active {
    transform: translateX(-3px);
  }
}

.ctrl-glass-icon:active {
  transform: translateY(0) scale(0.95);
}

.ctrl-glass-icon svg {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  stroke: currentColor;
}

[data-theme="light"] .ctrl-glass-icon {
  color: rgba(0, 0, 0, 0.72);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Переключатель темы — иконки */
[data-theme="dark"] .icon-theme-dark {
  display: block;
}

[data-theme="dark"] .icon-theme-light {
  display: none;
}

[data-theme="light"] .icon-theme-dark {
  display: none;
}

[data-theme="light"] .icon-theme-light {
  display: block;
}

/* Анимация переключения темы */
#theme-toggle:active {
  transform: rotate(30deg) scale(0.9);
}

/* Анимация переключения звука */
.sound-switching {
  animation: soundIconSwap 0.35s ease forwards;
}

@keyframes soundIconSwap {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  45%,
  55% {
    transform: scale(0.5);
    opacity: 0;
  }
}

/* Lite button — наследует стиль ctrl-glass-icon */
.lite-btn-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: inherit;
  /* наследует цвет от родителя */
  user-select: none;
  transition: color 0.3s ease;
  display: block;
  text-transform: uppercase;
}

/* Inactive state — идентичен другим ctrl-glass-icon */
#lite-toggle {
  /* всё наследует от .ctrl-glass-icon */
  color: rgba(255, 255, 255, 0.86);
}

[data-theme="light"] #lite-toggle {
  color: rgba(0, 0, 0, 0.72);
}

/* Active (Lite включён) */
#lite-toggle.active {
  border-color: var(--border-accent);
  box-shadow: 0 0 18px var(--accent-glow);
  background: var(--accent-light);
  color: var(--accent);
}

#lite-toggle.active .lite-btn-text {
  color: var(--accent);
}

/* Анимация переключения */
.lite-text-switching {
  animation: liteTextFlip 0.3s ease forwards;
}

@keyframes liteTextFlip {

  0%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  40%,
  60% {
    opacity: 0;
    transform: translateY(-6px) scale(0.8);
  }
}

/* Бургер */
.ctrl-glass-icon.burger-btn {
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  display: none;
}

.burger-line {
  display: block;
  width: 18px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

[data-theme="light"] .burger-line {
  background: rgba(0, 0, 0, 0.55);
}

.burger-btn.open .burger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.burger-btn.open .burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger-btn.open .burger-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* HUD пасхалок */
.egg-hud {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr), transform var(--tr);
}

.egg-hud.visible {
  opacity: 1;
  pointer-events: auto;
}

.egg-hud.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: none;
}

.egg-hud.pulse {
  animation: eggHudPulse 0.7s ease forwards;
}

@keyframes eggHudPulse {

  0%,
  100% {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
  }

  30% {
    box-shadow: 0 0 0 4px var(--accent-glow), 0 0 24px var(--accent-glow-strong);
    border-color: var(--accent);
  }
}

.egg-hud strong {
  color: var(--accent);
  letter-spacing: 0.06em;
}

.egg-hud-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity var(--tr), background var(--tr), color var(--tr);
}

.egg-hud-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 0 20px;
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), padding 0.4s var(--ease),
    border-color 0.3s, box-shadow 0.3s;
}

.mobile-nav.open {
  max-height: calc(100dvh - 56px - env(safe-area-inset-top));
  padding: 10px 20px 18px;
  border-color: var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
}

.mobile-nav a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--r-md);
  transition: var(--tr);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* Canvas частицы */
#particles-canvas,
#neon-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#particles-canvas {
  opacity: 0.5;
}

#neon-particles {
  mix-blend-mode: screen;
  opacity: 0.7;
  z-index: 1;
}

[data-theme="light"] #neon-particles {
  opacity: 0.35;
  mix-blend-mode: normal;
}


/* ============================================================
   LEFT SIDE PANEL (задача 1)
   ============================================================ */
.left-side-panel {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1050;
  display: flex;
  align-items: center;
  /* панель скрыта по умолчанию, виден только индикатор */
}

/* Индикатор — три точки, почти незаметный */
.left-panel-indicator {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 10px;
  background: var(--bg-card);
  border-radius: 0 10px 10px 0;
  border: 1px solid var(--border-accent);
  border-left: none;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  align-items: center;
  justify-content: center;
}

.left-panel-indicator:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 2px 0 20px var(--accent-glow);
}

.lp-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  /* или var(--accent) если хочешь цвет */
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none;
  /* ВАЖНО: убираем свечение по умолчанию */
}

.left-side-panel:hover .lp-dot,
.left-side-panel:focus-within .lp-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow-strong);
  transform: scaleX(1) !important;
  opacity: 1 !important;
}

.left-side-panel:hover .lp-dot,
.left-side-panel:focus-within .lp-dot {
  background: var(--accent);
}

.left-side-panel:hover .lp-dot:nth-child(2),
.left-side-panel:focus-within .lp-dot:nth-child(2) {
  transform: scaleX(1);
}

/* Навигационная панель */
.left-panel-nav {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateX(-100%);
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-accent);
  border-left: none;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 18px 0;
  min-width: 200px;
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.4), var(--shadow-accent);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease,
    visibility 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.left-side-panel:hover .left-panel-nav,
.left-side-panel:focus-within .left-panel-nav {
  transform: translateY(-50%) translateX(28px);
  opacity: 1;
  visibility: visible;
}

.lp-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--r-sm);
  margin: 0 6px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.lp-link:hover,
.lp-link.active {
  color: var(--accent);
  background: var(--accent-light);
  transform: translateX(4px);
}

.lp-icon {
  font-size: 0.6rem;
  color: var(--accent);
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.lp-link:hover .lp-icon {
  opacity: 1;
}

.lp-label {
  flex: 1;
}

/* Светлая тема */
[data-theme="light"] .left-panel-nav {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--border-accent);
}

[data-theme="light"] .left-panel-indicator {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .lp-dot {
  background: var(--text-muted);
}

/* Скрывать на мобильных */
@media (max-width: 900px) {
  .left-side-panel {
    display: none;
  }
}

/* ============================================================
   7. HERO
   ============================================================ */
#hero {
  position: relative;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image: url(assets/images/hero-poster.jpg);
  background-size: cover;
  background-position: center;
}

#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  will-change: transform;
  pointer-events: none;
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom,
      rgba(7, 9, 15, 0.4) 0%,
      rgba(7, 9, 15, 0.2) 30%,
      rgba(7, 9, 15, 0.55) 70%,
      rgba(7, 9, 15, 0.92) 100%);
  transition: background var(--tr-slow);
}

[data-theme="light"] .hero-overlay-gradient {
  background: linear-gradient(to bottom,
      rgba(10, 18, 40, 0.5) 0%,
      rgba(10, 18, 40, 0.25) 30%,
      rgba(10, 18, 40, 0.6) 70%,
      rgba(10, 18, 40, 0.88) 100%);
}

.hero-overlay-noise {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 24px;
  max-width: 860px;
  width: 100%;
}

.hero-line-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  animation: fadeSlideUp 0.8s 0.3s both;
}

.hero-line-top span:first-child,
.hero-line-top span:last-child {
  display: block;
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-line-text {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
}

.hero-title-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 22px;
  animation: fadeSlideUp 0.8s 0.5s both;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.8rem, 10vw, 7.5rem);
  letter-spacing: 0.06em;
  line-height: 1;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.12em;
}

.hero-title-x {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  filter: drop-shadow(0 0 20px var(--accent-glow-strong));
  animation: xPulse 3s ease-in-out infinite;
}

@keyframes xPulse {

  0%,
  100% {
    filter: drop-shadow(0 0 20px var(--accent-glow-strong));
  }

  50% {
    filter: drop-shadow(0 0 35px var(--accent-glow-strong)) brightness(1.2);
  }
}

.hero-title-glow {
  position: absolute;
  bottom: -10px;
  right: -15px;
  width: 160px;
  height: 80px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 36px;
  line-height: 1.7;
  animation: fadeSlideUp 0.8s 0.7s both;
}

.hero-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.8s 0.9s both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: var(--tr-bounce);
  cursor: pointer;
  border: none;
}

.hero-btn-primary {
  background: var(--grad-accent);
  color: var(--text-on-accent);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.hero-btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px var(--accent-glow);
  color: var(--text-on-accent);
}

.hero-btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.hero-btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
  color: #fff;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 44px;
  animation: fadeSlideUp 0.8s 1.1s both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
}

.hero-stat strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  text-align: center;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
}

.scroll-indicator {
  position: absolute;
  /* или fixed */
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-dot {
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {

  0%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }

  50% {
    opacity: 0.3;
    transform: translateY(10px);
  }
}

.scroll-indicator span {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

/* ============================================================
   8. СЕКЦИИ — ОБЩИЕ СТИЛИ
   ============================================================ */
.section {
  padding: 110px 0;
  position: relative;
  transition: background-color var(--tr-slow);
}

.section-dark {
  background: var(--bg-secondary);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  padding: 5px 14px;
  border-radius: var(--r-full);
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  transition: background var(--tr-slow), color var(--tr-slow);
}

.section-tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
  animation: tagDot 2s ease-in-out infinite;
}

@keyframes tagDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.6);
  }
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
  position: relative;
  display: inline-block;
  color: var(--text-primary);
  transition: color var(--tr-slow);
}

.section-header h2::after {
  content: '';
  display: block;
  width: 200px;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
  margin: 14px auto 0;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
  transition: color var(--tr-slow);
}

/* ============================================================
   9. ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.about-text p {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 20px;
  transition: color var(--tr-slow);
}

.about-stats {
  display: flex;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 0 20px;
  position: relative;
}

.stat-item+.stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: var(--border);
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-muted);
  transition: color var(--tr-slow);
}

.stat-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 5px;
  letter-spacing: 0.05em;
  transition: color var(--tr-slow);
}

.about-img-frame {
  position: relative;
}

.about-img-frame .img-placeholder {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-height: 380px;
}

.about-img-deco {
  position: absolute;
  width: 80px;
  height: 80px;
}

.deco-tl {
  top: -14px;
  left: -14px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-sm) 0 0 0;
}

.deco-br {
  bottom: -14px;
  right: -14px;
  border-bottom: 2px solid var(--accent2);
  border-right: 2px solid var(--accent2);
  border-radius: 0 0 var(--r-sm) 0;
}

/* ============================================================
   10. PLACE CARDS
   ============================================================ */
.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

.place-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--tr-bounce), box-shadow var(--tr), border-color var(--tr), background var(--tr-slow);
  position: relative;
}

.place-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  border-color: var(--border-accent);
}

.place-card-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 5;
}

.place-card:hover .place-card-shine {
  left: 150%;
}

.place-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/2;
}

.place-img-wrap .img-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  border-radius: 0;
  min-height: 100%;
}

.place-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.place-card:hover .place-img-wrap img {
  transform: scale(1.07);
}

/* ЗАМЕНИТЬ НА: */
.btn-3d {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--grad-accent);
  color: #07090f !important;
  -webkit-text-fill-color: #07090f !important;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: var(--r-full);
  border: 2px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: var(--tr-bounce);
  box-shadow: 0 4px 16px var(--accent-glow), 0 2px 0 rgba(0, 0, 0, 0.2);
  text-shadow: none;
}

[data-theme="light"] .btn-3d {
  color: #07090f !important;
  -webkit-text-fill-color: #07090f !important;
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 16px var(--accent-glow), 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-3d {
  color: #07090f !important;
  -webkit-text-fill-color: #07090f !important;
}

.btn-3d span {
  color: #07090f !important;
  -webkit-text-fill-color: #07090f !important;
  font-weight: 800;
}


.btn-3d:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow-strong);
}

.place-info {
  padding: 20px 22px 24px;
}

.place-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  transition: color var(--tr-slow);
}

.place-info p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
  transition: color var(--tr-slow);
}

.place-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  transition: background var(--tr-slow), color var(--tr-slow);
}

/* Случайное место */
.btn-random-place {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border-accent);
  padding: 11px 26px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--tr-bounce);
  letter-spacing: 0.04em;
}

.btn-random-place:hover {
  background: var(--accent-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.random-place-toast-card {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-lg);
  padding: 20px 28px;
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  z-index: 8000;
  text-align: center;
  min-width: 280px;
  max-width: 340px;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.random-place-toast-card.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.random-place-toast-card h4 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.random-place-toast-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.random-place-toast-card button {
  background: var(--grad-accent);
  color: var(--text-on-accent);
  border: none;
  padding: 9px 20px;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--tr-bounce);
}

.random-place-toast-card button:hover {
  transform: scale(1.05);
}

/* ============================================================
   11. 3D MODAL
   ============================================================ */
.modal-3d {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg-modal);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-3d.open {
  opacity: 1;
  visibility: visible;
}

.modal-3d-inner {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  transform: scale(0.93) translateY(20px);
  transition: transform 0.4s var(--ease);
}

.modal-3d.open .modal-3d-inner {
  transform: scale(1) translateY(0);
}

.modal-3d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
  transition: background var(--tr-slow);
}

.modal-3d-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-3d-badge {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--grad-accent);
  color: var(--text-on-accent);
}

.modal-3d-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--tr-slow);
}

.modal-3d-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-3d-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  transition: color var(--tr-slow);
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--tr);
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}

.modal-3d-frame-wrap {
  flex: 1;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  background: #000;
}

/* ============================================================
   3D LOADING INDICATOR (задача 11)
   ============================================================ */
.modal-3d-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  z-index: 5;
  gap: 20px;
  transition: opacity 0.4s ease;
}

.modal-3d-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-3d-ring {
  width: 60px;
  height: 60px;
  position: relative;
}

.loader-3d-ring::before,
.loader-3d-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.loader-3d-ring::before {
  inset: 0;
  border-top-color: var(--accent);
  animation: spin3d 1s linear infinite;
}

.loader-3d-ring::after {
  inset: 8px;
  border-top-color: var(--accent2);
  animation: spin3d 0.7s linear infinite reverse;
}

@keyframes spin3d {
  to {
    transform: rotate(360deg);
  }
}

.loader-3d-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  animation: pulse3dIcon 2s ease-in-out infinite;
}

@keyframes pulse3dIcon {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

.loader-3d-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.loader-3d-dots {
  display: inline-flex;
  gap: 4px;
}

.loader-3d-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotBounce3d 1.2s ease-in-out infinite;
}

.loader-3d-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-3d-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce3d {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loader-3d-progress {
  width: 160px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.loader-3d-progress-fill {
  height: 100%;
  background: var(--grad-accent);
  border-radius: 2px;
  animation: progressLoad3d 3s ease forwards;
  box-shadow: 0 0 6px var(--accent-glow);
}

@keyframes progressLoad3d {
  0% {
    width: 0%;
  }

  30% {
    width: 45%;
  }

  70% {
    width: 75%;
  }

  90% {
    width: 88%;
  }

  100% {
    width: 95%;
  }
}

.modal-3d-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.modal-3d-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
  flex-wrap: wrap;
  transition: background var(--tr-slow);
}

/* ============================================================
   12. WHY VISIT
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.why-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 34px 26px;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform var(--tr-bounce), box-shadow var(--tr), border-color var(--tr), background var(--tr-slow);
  position: relative;
  overflow: hidden;
}

.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transition: transform 0.4s var(--ease);
  transform-origin: left;
}

.why-card:hover::before {
  transform: scaleX(1);
}

.why-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card), var(--shadow-accent);
}

.why-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: var(--accent-light);
  border: 1.5px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-x-icon {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--text-primary);
  opacity: 0.14;
  text-shadow: 0 0 18px var(--accent-glow);
}

[data-theme="light"] .why-x-icon {
  opacity: 0.10;
}

.why-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent);
  transition: color var(--tr-slow);
}

.why-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  transition: color var(--tr-slow);
}

/* ============================================================
   13. HISTORY TIMELINE
   ============================================================ */
.timeline-container {
  margin-bottom: 44px;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  position: relative;
}

/* Hint-градиент справа */
.timeline-container::after {
  content: '';
  display: block;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(to right, transparent, var(--bg-secondary));
  pointer-events: none;
}

.timeline-track {
  padding: 28px 12px 50px;
  min-width: 560px;
}

.timeline-line-bg {
  position: absolute;
  top: 38px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  z-index: 0;
}

.timeline-line-progress {
  position: absolute;
  top: 38px;
  left: 20px;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
  z-index: 1;
  width: 0%;
  transition: width 0.5s var(--ease);
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-dots {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.tl-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex: 1;
}

.tl-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-mid);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.tl-dot-inner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-mid);
  flex-shrink: 0;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
}

.tl-dot-ring {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: scale(0.7);
  pointer-events: none;
}

.tl-dot.active {
  border-color: var(--accent);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--accent-light), 0 0 18px var(--accent-glow);
}

.tl-dot.active .tl-dot-inner {
  background: var(--accent);
  transform: scale(1.2);
}

.tl-dot.active .tl-dot-ring {
  opacity: 1;
  transform: scale(1);
}

.tl-dot-wrap:hover .tl-dot {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.tl-dot-wrap:hover .tl-dot-inner {
  background: var(--accent);
}

.tl-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 12px;
  gap: 3px;
}

.tl-year {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
  transition: color 0.35s ease;
}

.tl-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.35s ease;
}

.tl-dot-wrap.active .tl-year,
.tl-dot-wrap:hover .tl-year {
  color: var(--accent);
}

.tl-dot-wrap.active .tl-name {
  color: var(--text-secondary);
}

.history-panel {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 180px;
  transition: background var(--tr-slow), border-color var(--tr);
}

.history-panel-content {
  padding: 36px 44px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.history-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 120px;
}

.history-empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  transition: color var(--tr-slow);
}

.history-event-year {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 10px;
}

.history-event-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  line-height: 1.35;
  transition: color var(--tr-slow);
}

.history-event-text {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 680px;
  transition: color var(--tr-slow);
}

/* ============================================================
   14. GUIDE
   ============================================================ */
.guide-wizard {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.guide-step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  border: 1px solid var(--border);
  transition: background var(--tr-slow), border-color var(--tr);
}

.guide-step:hover {
  border-color: var(--border-accent);
}

.guide-step-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
  margin-top: 2px;
}

.guide-step-content h4 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  transition: color var(--tr-slow);
}

.guide-step-content {
  flex: 1;
}

.guide-options-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.guide-opt-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  padding: 9px 16px;
  border-radius: var(--r-md);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--tr-bounce);
}

.guide-opt-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px var(--accent-glow);
}

.guide-opt-btn.active {
  background: var(--grad-accent);
  color: var(--text-on-accent);
  border-color: transparent;
  box-shadow: 0 6px 20px var(--accent-glow);
}

.guide-opt-small {
  padding: 9px 18px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  min-width: 52px;
  justify-content: center;
}

.guide-generate-wrap {
  text-align: center;
}

.guide-gen-btn {
  padding: 15px 40px;
  font-size: 0.97rem;
}

.guide-result {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-accent);
  overflow: hidden;
  animation: fadeInUp 0.5s ease;
  transition: background var(--tr-slow);
}

.guide-result-header {
  padding: 26px 30px 20px;
  border-bottom: 1px solid var(--border);
}

.guide-result-header h3 {
  font-size: 1.2rem;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.guide-result-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.guide-meta-tag {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}

#guide-result-content {
  padding: 20px 30px 26px;
}

.guide-route-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.guide-route-step:last-child {
  border-bottom: none;
}

.guide-route-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad-accent);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-display);
}

.guide-route-info strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.93rem;
  font-weight: 600;
  margin-bottom: 3px;
  transition: color var(--tr-slow);
}

.guide-route-info span {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.55;
  transition: color var(--tr-slow);
}

/* Кнопка 3D внутри гида */
.guide-route-info .btn-3d {
  position: static;
  margin-top: 10px;
  display: inline-flex;
  color: var(--text-on-accent);
}

/* ============================================================
   15. BEFORE / AFTER
   ============================================================ */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.ba-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 18px;
  color: var(--text-primary);
  transition: color var(--tr-slow);
}

.ba-slider-wrap {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: col-resize;
  user-select: none;
  position: relative;
}

.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 5/3;
  overflow: hidden;
}

.ba-before {
  position: absolute;
  inset: 0;
}

.ba-after {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
}

.ba-before .img-placeholder,
.ba-after .img-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  border-radius: 0;
  min-height: 100%;
}

.ba-before img,
.ba-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 5;
}

.ba-label.after {
  left: auto;
  right: 12px;
  background: var(--grad-accent);
  color: var(--text-on-accent);
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  cursor: col-resize;
  z-index: 10;
  box-shadow: 0 0 12px var(--accent-glow-strong);
}

.ba-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
  transition: background var(--tr-slow);
}

.ba-handle::after {
  content: '◀ ▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.55rem;
  color: var(--accent);
  letter-spacing: 2px;
  pointer-events: none;
  z-index: 1;
}

.ba-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 14px;
  line-height: 1.65;
  transition: color var(--tr-slow);
}

/* ============================================================
   16. QUIZ
   ============================================================ */
.quiz-wrap {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 42px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: background var(--tr-slow);
}

.quiz-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 36px;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--grad-accent);
  border-radius: 4px;
  transition: width 0.5s var(--ease);
  box-shadow: 0 0 8px var(--accent-glow);
}

.quiz-q-num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.quiz-question {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 28px;
  transition: color var(--tr-slow);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--r-md);
  padding: 14px 20px;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--tr);
  width: 100%;
}

.quiz-option:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  transform: translateX(5px);
}

.quiz-option.correct {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
}

.quiz-option.wrong {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.quiz-option:disabled {
  cursor: not-allowed;
  pointer-events: none;
}

.quiz-result {
  text-align: center;
  padding: 10px 0;
  animation: fadeInUp 0.5s ease;
}

.quiz-result h3 {
  font-size: 1.8rem;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.quiz-result p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 28px;
  line-height: 1.7;
  transition: color var(--tr-slow);
}

/* ============================================================
   17. GAME
   ============================================================ */
.game-wrap {
  max-width: 660px;
  margin: 0 auto;
}

.game-start {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 50px 42px;
  text-align: center;
  border: 1px solid var(--border);
  transition: background var(--tr-slow);
}

.game-start h3 {
  font-size: 1.55rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  transition: color var(--tr-slow);
}

.game-start p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 28px;
  line-height: 1.7;
  transition: color var(--tr-slow);
}

/* Обложка игры */
.game-start-cover {
  max-width: 380px;
  height: 220px;
  margin: 0 auto 28px;
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  position: relative;
}

.game-start-cover::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: var(--grad-accent);
  opacity: 0.10;
  filter: blur(30px);
  transform: rotate(12deg);
}

.game-start-cover-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 1.35rem;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px var(--accent-glow));
}

.game-score-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px 18px;
  background: var(--bg-card);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-bottom: none;
  transition: background var(--tr-slow);
}

.game-img-wrap {
  background: var(--bg-card);
  padding: 0 28px 20px;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background var(--tr-slow);
}

.game-img-wrap .img-placeholder {
  height: 280px;
  border-radius: var(--r-lg);
  overflow: hidden;
}

.game-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--bg-card);
  padding: 20px 28px 28px;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  border: 1px solid var(--border);
  border-top: none;
  transition: background var(--tr-slow);
}

.game-option {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--r-md);
  padding: 13px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--tr);
  line-height: 1.3;
}

.game-option:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px var(--accent-glow);
}

.game-option.correct {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.12);
  color: #2ecc71;
}

.game-option.wrong {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}

.game-option:disabled {
  cursor: not-allowed;
  pointer-events: none;
}

.game-result {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: 52px 42px;
  text-align: center;
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-accent);
  animation: fadeInUp 0.5s ease;
  transition: background var(--tr-slow);
}

.game-result-icon {
  font-size: 3.5rem;
  margin-bottom: 18px;
  line-height: 1;
}

.game-result h3 {
  font-size: 1.75rem;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.game-result p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin-bottom: 22px;
  line-height: 1.7;
  transition: color var(--tr-slow);
}

.game-final-score {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 28px;
  line-height: 1;
}

/* ============================================================
   18. ALBUM + LIGHTBOX
   ============================================================ */
.album-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 22px;
  border-radius: var(--r-full);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--tr);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--grad-accent);
  border-color: transparent;
  color: var(--text-on-accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.album-item {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  transition: transform var(--tr-bounce), box-shadow var(--tr);
}

.album-item:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md), var(--shadow-accent);
  z-index: 2;
}

.album-item .img-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  border-radius: 0;
}

.album-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.album-item:hover img {
  transform: scale(1.08);
}

.album-item.hidden {
  display: none;
}

.album-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  background: none;
  padding: 0;
}

.album-overlay span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}

.lightbox p {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--tr);
}

.lightbox-close:hover {
  background: #e74c3c;
  border-color: #e74c3c;
}

/* ============================================================
   19. INTERVIEWS
   ============================================================ */
.interviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 26px;
}

.interview-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--tr-bounce), box-shadow var(--tr), border-color var(--tr), background var(--tr-slow);
}

.interview-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md), var(--shadow-accent);
}

.interview-video-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
  position: relative;
}

.interview-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.interview-info {
  padding: 20px 22px 24px;
}

.interview-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.interview-person .img-placeholder.tiny {
  width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

.interview-person img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.interview-person strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  transition: color var(--tr-slow);
}

.interview-person span {
  font-size: 0.78rem;
  color: var(--accent);
}

.interview-info>p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  transition: color var(--tr-slow);
}

/* ============================================================
   20. UNDERRATED
   ============================================================ */
.underrated-grid {
  margin-bottom: 60px;
}

.underrated-item {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
  transition: var(--tr);
}

.underrated-item:last-child {
  border-bottom: none;
}

.underrated-item:hover .underrated-num {
  -webkit-text-fill-color: transparent;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
}

.underrated-num {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--border-mid);
  line-height: 1;
  flex-shrink: 0;
  width: 80px;
  transition: var(--tr-slow);
}

.underrated-content h3 {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: color var(--tr-slow);
}

.underrated-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.78;
  transition: color var(--tr-slow);
}

.underrated-hero-img {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.underrated-hero-img .img-placeholder.wide {
  height: 420px;
  width: 100%;
  min-height: 420px;
  aspect-ratio: unset;
  border-radius: 0;
}

.underrated-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.underrated-quote {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  padding: 70px 50px 40px;
  z-index: 2;
}

.underrated-quote blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.92);
  max-width: 600px;
  line-height: 1.5;
}

/* ============================================================
   ABOUT PROJECT SECTION (задача 9)
   ============================================================ */
.ap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.ap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  transition: transform var(--tr-bounce), border-color var(--tr), background var(--tr-slow);
}

.ap-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
}

.ap-card-wide {
  grid-column: 1 / -1;
}

.ap-card-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
  line-height: 1;
}

.ap-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  font-family: var(--font-display);
}

.ap-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.ap-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.ap-author-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ap-author-info strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.ap-author-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ap-email {
  font-size: 0.82rem;
  color: var(--accent);
  margin-top: 4px;
}

.ap-tech-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ap-tech-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.ap-tech-badge {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  flex-shrink: 0;
  min-width: 70px;
  text-align: center;
}

.ap-sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.ap-source {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-secondary);
  border-radius: var(--r-md);
  padding: 14px;
  border: 1px solid var(--border);
}

.ap-source-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.ap-source strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  font-family: var(--font-display);
}

.ap-source span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 5px;
}

.ap-source a {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
}

.ap-source a:hover {
  text-decoration: underline;
}

.ap-license p {
  margin-bottom: 16px;
}

.ap-license-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ap-badge {
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-display);
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .ap-sources-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   21. FOOTER
   ============================================================ */
#footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 70px 0 0;
  transition: background var(--tr-slow);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 50px;
  padding-bottom: 50px;
}

.footer-logo {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 300px;
  transition: color var(--tr-slow);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  transition: color var(--tr-slow);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--tr), transform var(--tr);
  display: inline-block;
}

.footer-col ul a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-col>p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  transition: color var(--tr-slow);
}

.creator-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
  margin-bottom: 14px;
  transition: color var(--tr-slow);
}

.footer-email {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 20px;
  transition: color var(--tr);
}

.footer-email:hover {
  color: var(--accent-hover);
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  transition: var(--tr-bounce);
}

.social-link:hover {
  background: var(--grad-accent);
  border-color: transparent;
  color: var(--text-on-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--tr-slow);
}

.footer-conf-note {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   22. BACK-TO-TOP + UTILITIES
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--grad-accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform var(--tr-bounce), box-shadow var(--tr);
  box-shadow: 0 6px 22px var(--accent-glow);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

/* ============================================================
   23. AOS
   ============================================================ */
[data-aos] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="fade-right"] {
  opacity: 0;
  transform: translateX(-28px);
}

[data-aos="fade-right"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}

[data-aos="fade-left"] {
  opacity: 0;
  transform: translateX(28px);
}

[data-aos="fade-left"].aos-animate {
  opacity: 1;
  transform: translateX(0);
}

[data-aos-delay="80"] {
  transition-delay: 0.08s;
}

[data-aos-delay="100"] {
  transition-delay: 0.10s;
}

[data-aos-delay="150"] {
  transition-delay: 0.15s;
}

[data-aos-delay="200"] {
  transition-delay: 0.20s;
}

[data-aos-delay="250"] {
  transition-delay: 0.25s;
}

[data-aos-delay="300"] {
  transition-delay: 0.30s;
}

[data-aos-delay="350"] {
  transition-delay: 0.35s;
}

[data-aos-delay="400"] {
  transition-delay: 0.40s;
}

[data-aos-delay="450"] {
  transition-delay: 0.45s;
}

[data-aos-delay="500"] {
  transition-delay: 0.50s;
}

/* ============================================================
   24. IMG PLACEHOLDER
   ============================================================ */
.img-placeholder {
  background: var(--ph-bg);
  border: 2px dashed var(--ph-border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  transition: background var(--tr-slow), border-color var(--tr-slow);
}

.img-placeholder::before {
  content: attr(data-label);
  font-size: 0.72rem;
  color: var(--ph-text);
  text-align: center;
  padding: 12px;
  line-height: 1.5;
  position: absolute;
  z-index: 0;
  transition: color var(--tr-slow);
}

.img-placeholder img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder.small {
  min-height: 68px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
}

.img-placeholder.tiny {
  min-height: 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.img-placeholder.wide {
  min-height: 420px;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
}

.img-placeholder.wide img {
  width: 100%;
  display: block;
  border-radius: var(--r-lg);
}

/* ============================================================
   25. MAP
   ============================================================ */
.map-syunik-wrap {
  position: relative;
  width: 100%;
}

.map-mountain-svg-container {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: background var(--tr-slow);
  margin-bottom: 16px;
}

.map-mountain-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-point-pulse {
  animation: mapPointPulse 2.5s ease-in-out infinite;
}

@keyframes mapPointPulse {

  0%,
  100% {
    opacity: 0.12;
  }

  50% {
    opacity: 0.06;
  }
}

.map-point-group:hover .map-point-pulse {
  animation: mapPointPulseHover 1s ease-in-out infinite;
}

@keyframes mapPointPulseHover {

  0%,
  100% {
    opacity: 0.25;
  }

  50% {
    opacity: 0.08;
  }
}

.map-info-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-md), var(--shadow-accent);
  animation: fadeInUp 0.35s ease;
  transition: background var(--tr-slow);
  margin-bottom: 16px;
}

.map-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.map-info-alt {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--grad-accent);
  color: var(--text-on-accent);
  display: inline-block;
}

.map-info-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--tr);
}

.map-info-close:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}

.map-info-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  transition: color var(--tr-slow);
}

.map-info-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
  transition: color var(--tr-slow);
}

.map-info-actions {
  display: flex;
  gap: 10px;
}

.map-info-3d-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--grad-accent);
  color: var(--text-on-accent);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  transition: var(--tr-bounce);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.map-info-3d-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px var(--accent-glow-strong);
}

.map-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-legend-dot.accent {
  background: var(--accent);
}

.map-legend-dot.accent2 {
  background: var(--accent2);
}

/* ============================================================
   26. HOW-TO-GET + COUNTDOWN
   ============================================================ */
.htg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-bottom: 40px;
}

.htg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  transition: transform var(--tr-bounce), border-color var(--tr), background var(--tr-slow);
}

.htg-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
}

.htg-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.htg-card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.htg-card ul li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  transition: color var(--tr-slow);
}

.htg-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 10px;
}

.htg-info-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  transition: background var(--tr-slow);
}

.htg-info-block h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  transition: color var(--tr-slow);
}

.htg-info-block p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.7;
  transition: color var(--tr-slow);
}

.htg-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.htg-checklist li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: color var(--tr-slow);
}

/* Countdown */
.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-lg);
  padding: 22px 28px;
  min-width: 100px;
  box-shadow: var(--shadow-card), var(--shadow-accent);
  transition: background var(--tr-slow);
}

.countdown-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
  min-width: 2ch;
  text-align: center;
}

.countdown-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   WEATHER SECTION (задача 8)
   ============================================================ */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.weather-widget {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--tr-bounce), box-shadow var(--tr), border-color var(--tr);
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.weather-widget:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
}

.weather-widget-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
      var(--w-color1, #3dffcb) 0%,
      var(--w-color2, #0d1220) 70%);
  opacity: 0.12;
  z-index: 0;
}

.weather-anim-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

.weather-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.weather-info {
  position: relative;
  z-index: 2;
  padding: 22px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  background: linear-gradient(to top, var(--bg-card) 40%, transparent 100%);
}

.weather-location {
  display: flex;
  align-items: center;
  gap: 12px;
}

.weather-icon-main {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.weather-location strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
  margin-bottom: 2px;
}

.weather-location span {
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.weather-temps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.weather-season {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  border: 1px solid var(--border);
  transition: background var(--tr-slow);
}

.ws-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.weather-season strong {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.weather-season span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-display);
}

.weather-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: auto;
}

.weather-best-season {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-lg);
  padding: 22px 28px;
  box-shadow: var(--shadow-accent);
}

.wbs-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.weather-best-season strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-display);
  margin-bottom: 6px;
}

.weather-best-season p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (max-width: 640px) {
  .weather-grid {
    grid-template-columns: 1fr;
  }

  .weather-best-season {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ============================================================
   27. THEME PANEL
   ============================================================ */
#theme-panel-wrap {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1100;
}

#theme-panel-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 12px 14px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--tr);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

#theme-panel-trigger:hover {
  color: var(--accent);
  background: var(--bg-card-hover);
  padding-right: 18px;
}

#theme-panel-trigger svg {
  flex-shrink: 0;
  color: var(--accent);
}

.theme-panel {
  position: fixed;
  right: -300px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  max-height: 85vh;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-right: none;
  border-radius: 16px 0 0 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
  transition: right 0.4s var(--ease);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1099;
}

.theme-panel.open {
  right: 0;
}

.theme-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.theme-panel-header span {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--tr-slow);
}

.theme-panel-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--tr);
}

.theme-panel-close:hover {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}

.theme-panel-list {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--border-accent) transparent;
}

.theme-swatch {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: var(--tr);
  position: relative;
  text-align: left;
}

.theme-swatch:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateX(-3px);
}

.theme-swatch.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.swatch-preview {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.theme-swatch span {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
  transition: color var(--tr-slow);
}

.theme-swatch.active span {
  color: var(--accent);
  font-weight: 700;
}

.swatch-check {
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity var(--tr);
  flex-shrink: 0;
}

.theme-swatch.active .swatch-check {
  opacity: 1;
}

/* Gold swatch скрыт до разблокировки */
#swatch-gold {
  display: none;
}

html[data-secret-unlocked="true"] #swatch-gold {
  display: flex;
  order: -999;
  border-color: rgba(255, 209, 102, 0.55);
  box-shadow: 0 0 22px rgba(255, 209, 102, 0.22);
}

/* ============================================================
   28. CURSOR (исправлено для светлой темы)
   ============================================================ */
@media (pointer: fine) {

  body,
  a,
  button,
  [onclick],
  .place-card,
  .album-item,
  .tl-dot-wrap,
  .map-point-group,
  .easter-egg,
  .theme-swatch,
  .guide-opt-btn,
  select,
  input,
  label,
  .quiz-option {

    cursor: none;
  }
}

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease, background 0.25s ease;
  will-change: left, top;
}

/* Тёмная тема — неоновый курсор */
[data-theme="dark"] #custom-cursor {
  background: var(--accent);
  mix-blend-mode: screen;
  box-shadow: 0 0 12px var(--accent-glow-strong), 0 0 24px var(--accent-glow);
}

/* Светлая тема — тёмный заметный курсор */
[data-theme="light"] #custom-cursor {
  background: #0e1a30;
  mix-blend-mode: normal;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

#custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.2s ease;
  will-change: left, top;
}

[data-theme="dark"] #custom-cursor-ring {
  border: 1.5px solid var(--accent);
  opacity: 0.45;
}

[data-theme="light"] #custom-cursor-ring {
  border: 1.5px solid #0e1a30;
  opacity: 0.35;
}

#custom-cursor.cursor-hover {
  width: 16px;
  height: 16px;
}

[data-theme="dark"] #custom-cursor.cursor-hover {
  background: var(--accent2);
  box-shadow: 0 0 18px var(--accent2-glow), 0 0 36px var(--accent2-glow);
}

[data-theme="light"] #custom-cursor.cursor-hover {
  background: var(--accent);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

#custom-cursor-ring.cursor-hover {
  width: 46px;
  height: 46px;
}

[data-theme="dark"] #custom-cursor-ring.cursor-hover {
  border-color: var(--accent2);
  opacity: 0.3;
}

[data-theme="light"] #custom-cursor-ring.cursor-hover {
  border-color: var(--accent);
  opacity: 0.5;
}

@media (pointer: coarse) {

  #custom-cursor,
  #custom-cursor-ring {
    display: none;
  }
}

/* ============================================================
   ИСПРАВЛЕНИЕ ПЕРЕСВЕТОВ В СВЕТЛОЙ ТЕМЕ
   ============================================================ */
/* Слишком яркий hero в светлой теме */
[data-theme="light"] .hero-title-syunik {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

[data-theme="light"] .hero-desc {
  color: rgba(255, 255, 255, 0.88);
}

[data-theme="light"] .hero-stat strong {
  color: var(--accent);
  /* убираем прозрачность через -webkit-text-fill-color если есть */
}

[data-theme="light"] .hero-line-text {
  color: rgba(255, 255, 255, 0.7);
}

/* Карточки в светлой теме */
[data-theme="light"] .place-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .place-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 20px var(--accent-glow);
}

/* Секции в светлой теме — убираем пересвет */
[data-theme="light"] .section-dark {
  background: #dde5f0;
}

[data-theme="light"] .why-card,
[data-theme="light"] .htg-card,
[data-theme="light"] .quiz-wrap,
[data-theme="light"] .game-wrap .game-start,
[data-theme="light"] .guide-step,
[data-theme="light"] .ba-grid .ba-item h3,
[data-theme="light"] .interview-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

/* Текст в светлой теме — нормальный контраст */
[data-theme="light"] .text-muted,
[data-theme="light"] .stat-label,
[data-theme="light"] .stat-desc {
  color: #5a6a85;
}

[data-theme="light"] .section-header h2 {
  color: #0e1a30;
}

[data-theme="light"] .section-subtitle {
  color: #3d5070;
}

/* stat-number в светлой теме */
[data-theme="light"] .stat-number {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Убираем пересвет у countdown в светлой теме */
[data-theme="light"] .countdown-block {
  background: #ffffff;
  border-color: var(--border-accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* footer в светлой теме */
[data-theme="light"] #footer {
  background: #d8e2f0;
}

/* neon-particles в светлой теме полностью скрываем */
[data-theme="light"] #neon-particles {
  opacity: 0.15;
  mix-blend-mode: multiply;
}

/* ============================================================
 ИСПРАВЛЕНИЕ ЗАСВЕЧЕННЫХ ТЕМ В СВЕТЛОЙ ТЕМЕ
============================================================ */

/* Изумруд в светлой теме */
[data-theme="light"][data-scheme="emerald"] .section-header h2,
[data-theme="light"][data-scheme="emerald"] .text-primary,
[data-theme="light"][data-scheme="emerald"] h1,
[data-theme="light"][data-scheme="emerald"] h2,
[data-theme="light"][data-scheme="emerald"] h3,
[data-theme="light"][data-scheme="emerald"] h4 {
  color: #0a2010;
}

/* Арктика в светлой теме — белый текст на белом фоне */
[data-theme="light"] .swatch-dot[style*="background:#ddf4ff"],
[data-theme="light"] .swatch-dot[style*="background:#ffffff"] {
  border: 1.5px solid rgba(0, 0, 0, 0.2) !important;
}

/* Киберпанк в светлой теме — жёлтый на белом нечитаем */
[data-theme="light"] #swatch-cyberpunk .theme-swatch span {
  color: #333300 !important;
}

/* Гранит в светлой теме — серый на белом */
[data-theme="light"] #swatch-granite .theme-swatch span {
  color: #2a2a2a !important;
}

/* Арктика в светлой теме */
[data-theme="light"] #swatch-arctic .theme-swatch span {
  color: #0a2040 !important;
}

/* Исправление текста карточек мест в светлой теме для всех светлых схем */
[data-theme="light"] .place-info h3 {
  color: #0e1a30 !important;
}

[data-theme="light"] .place-info p {
  color: #3d5070 !important;
}

[data-theme="light"] .tag {
  color: var(--accent) !important;
}

/* Исправление section-header в светлых схемах */
[data-theme="light"] .section-header h2 {
  color: #0e1a30 !important;
  -webkit-text-fill-color: #0e1a30 !important;
}

[data-theme="light"] .section-header h2::after {
  background: var(--grad-accent);
}

/* Арктика — акцент почти белый, делаем видимым */
[data-theme="light"] .section-tag {
  color: var(--accent-dim) !important;
}

/* Киберпанк светлая — жёлтый акцент слишком яркий */
[data-theme="light"] .hero-stat strong {
  -webkit-text-fill-color: transparent !important;
  background: var(--grad-accent) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

/* Гранит светлая — серый акцент почти невидим */
[data-theme="light"] .guide-opt-btn.active,
[data-theme="light"] .filter-btn.active,
[data-theme="light"] .lang-pill.active {
  color: #ffffff !important;
}

/* Голубой/Изумруд/Арктика — swatch-dot белый невидим */
.swatch-dot[style*="background:#ffffff"],
.swatch-dot[style*="background:#ddf4ff"] {
  border: 1.5px solid rgba(0, 0, 0, 0.15) !important;
  box-sizing: border-box;
}

/* Общее исправление: все карточки в светлой теме имеют тёмный текст */
[data-theme="light"] .why-card h3 {
  color: var(--accent-dim) !important;
}

[data-theme="light"] .why-card p,
[data-theme="light"] .htg-card ul li,
[data-theme="light"] .underrated-content p,
[data-theme="light"] .history-event-text,
[data-theme="light"] .guide-route-info span,
[data-theme="light"] .interview-info>p {
  color: #3d5070 !important;
}

[data-theme="light"] .underrated-content h3,
[data-theme="light"] .history-event-title,
[data-theme="light"] .guide-route-info strong,
[data-theme="light"] .interview-person strong,
[data-theme="light"] .htg-card h3,
[data-theme="light"] .htg-info-block h4 {
  color: #0e1a30 !important;
}

/* Золотой в светлой теме */
[data-theme="light"] #swatch-gold {
  background: rgba(255, 240, 180, 0.3) !important;
}

/* ============================================================
   29. EASTER EGGS / QUEST
   ============================================================ */
.easter-egg {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(61, 255, 203, 0.20), rgba(77, 140, 255, 0.12));
  opacity: 0.5;
  cursor: pointer;
  z-index: 5;
  transition: opacity var(--tr), transform var(--tr), box-shadow var(--tr);
}

.easter-egg:hover {
  opacity: 0.5;
  transform: scale(1.08);
  box-shadow: 0 0 16px var(--accent-glow);
}

.easter-egg.found {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.6);
  box-shadow: none;
}

/* Позиции яиц */
#hidden-places .egg-1 {
  right: 18px;
  bottom: 90px;
}

#about .egg-2 {
  left: 18px;
  top: 120px;
}

#places .egg-3 {
  right: 22px;
  top: 140px;
}

#why-visit .egg-4 {
  left: 22px;
  top: 150px;
}

.egg-5 {
  position: fixed;
  right: 26px;
  top: 40px;
}

/* Quest режим */
html[data-quest="true"] #main-header.scrolled {
  box-shadow: 0 0 0 1px var(--border-accent), 0 12px 40px rgba(0, 0, 0, 0.45);
}

html[data-secret-unlocked="true"] .logo-x {
  filter: drop-shadow(0 0 14px rgba(255, 209, 102, 0.35));
}

/* ============================================================
   30. SECRET MODAL
   ============================================================ */
.secret-modal {
  position: fixed;
  inset: 0;
  z-index: 9600;
  background: var(--bg-modal);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.secret-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.secret-modal-inner {
  width: min(980px, 100%);
}

.secret-wrap {
  text-align: center;
  width: min(980px, 100%);
  background: #0b0f19;
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 209, 102, 0.15);
  position: relative;
}

.secret-head {
  padding: 26px 26px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f1525;
}

.secret-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 6px;
  background: linear-gradient(135deg, #ffd166, #ff2d55);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.secret-sub {
  color: #aab2c5;
  font-size: 0.95rem;
  line-height: 1.7;
}

.scratch-area {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background:
    radial-gradient(circle at 30% 20%, rgba(61, 255, 203, 0.08), transparent 55%),
    radial-gradient(circle at 70% 40%, rgba(77, 140, 255, 0.08), transparent 60%),
    linear-gradient(135deg, #07090f, #0d1220);
}

.hidden-message {
  text-align: center;
  max-width: 720px;
  padding: 10px 14px;
  position: relative;
  z-index: 1;
}

.gold-line {
  font-family: var(--font-serif);
  font-weight: 700;
  background: linear-gradient(90deg, #ffd166, #fff4c2, #ff9a3c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 209, 102, 0.20));
  margin-bottom: 10px;
}

.gold-line.small {
  font-size: clamp(18px, 2vw, 25px);
  opacity: 0.8;
}

.gold-line.big {
  font-size: clamp(30px, 5vw, 55px);
  font-weight: 800;
}

#scratchCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  z-index: 2;
}

.secret-foot {
  padding: 18px 26px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #0f1525;
}

.secret-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--r-full);
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 209, 102, 0.35);
  background: #16122a;
  color: #ffffff;
  transition: var(--tr);
}

.secret-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 209, 102, 0.45);
}

.secret-btn.primary {
  background: linear-gradient(135deg, #ffd166, #ff2d55);
  color: #07090f;
  border-color: transparent;
}

/* ============================================================
   31. AI PANEL
   ============================================================ */
#ai-support-btn {
  position: fixed;
  bottom: 28px;
  right: 82px;
  width: 46px;
  height: 46px;
  background: var(--grad-accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform var(--tr-bounce), box-shadow var(--tr);
  box-shadow: 0 6px 22px var(--accent-glow);
  font-size: 1.1rem;
  font-weight: 700;
}

#ai-support-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#ai-support-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

#ai-panel {
  position: fixed;
  bottom: 90px;
  right: 28px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  z-index: 801;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s var(--ease);
  overflow: hidden;
}

#ai-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.ai-panel-header-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-panel-close {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--tr);
}

.ai-panel-close:hover {
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
}

.ai-questions-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.ai-q-btn {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--tr);
  line-height: 1.4;
  width: 100%;
}

.ai-q-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateX(3px);
}

.ai-answer-wrap {
  padding: 0 12px 12px;
  display: none;
}

.ai-answer-wrap.show {
  display: block;
}

.ai-answer-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.7;
  animation: fadeInUp 0.3s ease;
}

.ai-answer-box strong {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.ai-back-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--tr);
}

.ai-back-btn:hover {
  color: var(--accent);
}

/* ============================================================
   32. TOAST / SKELETON / NETWORK
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9800;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}

.toast-item {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--r-full);
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-md), 0 0 20px var(--accent-glow);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
  white-space: nowrap;
  pointer-events: none;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.toast-item.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Skeleton */
@keyframes skeletonShimmer {
  0% {
    background-position: -400px 0;
  }

  100% {
    background-position: 400px 0;
  }
}

.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.skeleton-img,
.skeleton-text,
.skeleton-tag {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card-hover) 50%, var(--bg-secondary) 75%);
  background-size: 800px 100%;
  animation: skeletonShimmer 1.5s infinite linear;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 3/2;
}

.skeleton-text-wrap {
  padding: 20px 22px 24px;
}

.skeleton-text {
  height: 14px;
  border-radius: 7px;
  margin-bottom: 10px;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-text.long {
  width: 100%;
}

.skeleton-tags {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.skeleton-tag {
  height: 24px;
  width: 70px;
  border-radius: 12px;
}

/* Network warning */
#network-warning {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 9900;
  background: rgba(255, 80, 80, 0.95);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 32px rgba(255, 80, 80, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
  text-align: center;
  max-width: 90vw;
  white-space: nowrap;
}

#network-warning.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

#network-warning.warn {
  background: rgba(255, 160, 0, 0.95);
  box-shadow: 0 8px 32px rgba(255, 160, 0, 0.4);
}

/* Зелёный при восстановлении */
#network-warning.restored {
  background: rgba(46, 204, 113, 0.95);
  box-shadow: 0 8px 32px rgba(46, 204, 113, 0.4);
  color: #ffffff;
}

/* ============================================================
   33. RANDOM PLACE (дополнительная кнопка в section header)
   - уже описана выше в блоке 10
   ============================================================ */

/* ============================================================
   34. LITE MODE
   ============================================================ */
html[data-lite="true"] #hero-video,
html[data-lite="true"] #preloader,
html[data-lite="true"] #particles-canvas,
html[data-lite="true"] #neon-particles {
  display: none;
}

html[data-lite="true"] [data-aos] {
  opacity: 1;
  transform: none;
  transition: none;
}

html[data-lite="true"] * {
  transition: none;
  animation: none;
}

html[data-lite="true"] .ctrl-glass-icon,
html[data-lite="true"] .ctrl-glass-group,
html[data-lite="true"] .mobile-nav,
html[data-lite="true"] #main-header.scrolled {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


/* ============================================================
 CONTENT-VISIBILITY OPTIMIZATION
============================================================ */
#game,
#album,
#interviews,
#underrated,
#about-project {
  content-visibility: auto;
  contain-intrinsic-size: 0 800px;
}

/* ============================================================
   35. АДАПТИВ
   ============================================================ */
/* 1100px */
@media (max-width:1100px) {
  .desktop-nav a {
    font-size: 0.72rem;
    padding: 5px 7px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-grid .footer-col:first-child {
    grid-column: 1 / -1;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* 900px */
@media (max-width:900px) {
  .desktop-nav {
    display: none;
  }

  .ctrl-glass-icon.burger-btn {
    display: flex;
  }

  .mobile-nav {
    display: flex;
  }

  .ba-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .places-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .interviews-grid {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr 1fr;
  }

  .timeline-container {
    overflow-x: auto;
  }
}

/* 640px */
@media (max-width:640px) {
  .section {
    padding: 72px 0;
  }

  .container {
    padding: 0 18px;
  }

  .header-inner {
    padding: 0 12px;
    height: 56px;
    gap: 8px;
  }

  .logo-syunik {
    font-size: 0.95rem;
  }

  .logo-x {
    font-size: 1.1rem;
  }

  .controls {
    gap: 4px;
    flex-wrap: nowrap;
  }

  .ctrl-glass-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .ctrl-glass-group {
    padding: 2px;
  }

  .lang-pill {
    padding: 0 9px;
    font-size: 0.63rem;
  }

  .hero-title {
    font-size: clamp(2.8rem, 13vw, 4rem);
  }

  .hero-stat {
    padding: 0 14px;
  }

  .hero-stat strong {
    font-size: 1.2rem;
  }

  .hero-btns {
    gap: 10px;
  }

  .hero-btn {
    padding: 12px 22px;
    font-size: 0.85rem;
  }

  .about-stats {
    flex-direction: column;
    gap: 20px;
  }

  .stat-item+.stat-item::before {
    display: none;
  }

  .stat-item {
    border-top: 1px solid var(--border);
    padding-top: 20px;
  }

  .places-grid {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .quiz-wrap {
    padding: 28px 22px;
  }

  .game-options {
    grid-template-columns: 1fr;
  }

  .game-score-bar {
    padding: 18px 20px 14px;
  }

  .game-img-wrap {
    padding: 0 20px 16px;
  }

  .game-options {
    padding: 16px 20px 24px;
  }

  .game-start,
  .game-result {
    padding: 36px 24px;
  }

  .album-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .underrated-item {
    flex-direction: column;
    gap: 8px;
  }

  .underrated-num {
    font-size: 2.4rem;
    width: auto;
  }

  .underrated-quote {
    padding: 40px 24px 24px;
  }

  .underrated-hero-img .img-placeholder.wide {
    min-height: 260px;
  }

  .guide-step {
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px;
  }

  .guide-step-num {
    font-size: 1.4rem;
  }

  .modal-3d {
    padding: 12px;
  }

  .modal-3d-frame-wrap {
    min-height: 280px;
  }

  .modal-3d-footer {
    flex-direction: column;
    gap: 10px;
  }

  .modal-3d-hint {
    display: none;
  }

  .history-panel-content {
    padding: 24px 22px;
  }

  .section-header {
    margin-bottom: 44px;
  }

  #history .container {
    overflow: hidden;
    padding: 0 12px;
  }

  #history .timeline-container {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    width: calc(100% + 24px);
  }

  .timeline-track {
    padding: 28px 12px 50px;
    min-width: 580px;
  }

  .tl-year {
    font-size: 0.55rem;
  }

  .tl-name {
    font-size: 0.52rem;
  }

  #back-to-top {
    bottom: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
  }

  #ai-support-btn {
    bottom: 18px;
    right: 70px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  #ai-panel {
    bottom: 78px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .egg-hud {
    top: 70px;
    font-size: 0.85rem;
  }

  .countdown-block {
    padding: 16px 18px;
    min-width: 70px;
  }

  .countdown-num {
    font-size: 2rem;
  }

  .map-info-panel {
    padding: 16px 18px;
  }

  .map-info-title {
    font-size: 1rem;
  }

  #theme-panel-wrap {
    top: auto;
    bottom: calc(80vh - 150px);
    transform: none;
  }

  .theme-panel {
    top: 140px;
    bottom: 0;
    transform: none;
    border-radius: 16px 16px 0 0;
    max-height: 70vh;
  }

  .theme-panel.open {
    right: 0;
  }

  #theme-panel-trigger span {
    display: none;
  }

  #theme-panel-trigger {
    padding: 10px 12px;
  }

  .theme-panel {
    width: 230px;
  }

  .secret-foot {
    flex-direction: column;
    align-items: center;
  }

  .secret-btn {
    width: 100%;
    max-width: 260px;
  }
}

/* 380px */
@media (max-width:380px) {
  .album-grid {
    grid-template-columns: 1fr;
  }

  .game-options {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    display: none;
  }

  .hero-title {
    font-size: 2.5rem;
  }
}

/* Landscape mobile */
@media (max-height:500px) and (orientation:landscape) {
  #hero {
    min-height: 100vh;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-stats,
  .scroll-indicator {
    display: none;
  }
}

/* Safe area support */
@supports (padding-top: env(safe-area-inset-top)) {
  #main-header {
    padding-top: env(safe-area-inset-top);
  }

  .mobile-nav {
    top: calc(56px + env(safe-area-inset-top));
  }
}

@media (min-width:641px) {
  .mobile-nav {
    top: 66px;
  }
}

/* Убираем overflow на мобильных */
@media (max-width:768px) {

  html,
  body {
    overflow-x: hidden;
  }
}

/* iOS fix */
@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }
}