/* ============================================
   LA2PLUS — Premium Dark Fantasy Landing
   ============================================ */

:root {
  --bg-1: #080A0D;
  --bg-2: #0D1016;
  --bg-3: #11141B;
  --gold-1: #D5AD68;
  --gold-2: #E6C382;
  --gold-3: #F0D39B;
  --text-1: #F5F1E8;
  --text-2: #9C9EA5;
  --magic-1: #6D73FF;
  --magic-2: #875CF6;
  --magic-3: #3ECFCC;
  --success: #4ADE80;
  --danger: #F87171;
  --discord: #5865F2;
  --telegram: #2AABEE;

  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --header-h: 80px;
  --container: 1280px;
  --gutter: 24px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-1) var(--bg-2);
}

body {
  font-family: var(--font-body);
  background: var(--bg-1);
  color: var(--text-1);
  line-height: 1.6;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.hidden { display: none !important; }

/* ---- PRELOADER ---- */
.preloader {
  position: fixed; inset: 0; z-index: 100000;
  background: var(--bg-1);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__inner { text-align: center; }
.preloader__logo-img {
  width: min(320px, 70vw);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(109, 115, 255, 0.4));
  animation: logoPulse 2s ease-in-out infinite;
}
.preloader__bar {
  width: 200px; height: 2px;
  background: var(--bg-3);
  margin: 24px auto 12px;
  border-radius: 2px;
  overflow: hidden;
}
.preloader__progress {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-1), var(--gold-3));
  animation: loadBar 1.5s var(--ease-out) forwards;
}
.preloader__text {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--text-2);
}
@keyframes logoPulse { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
@keyframes loadBar { to { width: 100%; } }

/* ---- BUTTONS ----
   Концы кнопки — те же SVG, что у заголовка (banner-end.svg — тёмная, banner-end-gold.svg — золотая), середина — градиент с золотыми линиями.
   --e = ширина конца; середина рисуется между концами с перехлёстом 1px. */
.btn {
  --e: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.35s var(--ease);
  position: relative;
  white-space: nowrap;
}
.btn--sm { --e: 20px; padding: 10px 20px; font-size: 0.7rem; }
.btn--lg { --e: 32px; padding: 18px 40px; font-size: 0.85rem; }
.btn--full { width: 100%; }

.btn--gold, .btn--outline {
  padding-inline: calc(var(--e) + 18px);
  border: 0; border-radius: 0;
}
.btn--gold {
  --end: url('/design/assets/ornaments/banner-end-gold.svg');
  color: #15100a;
  background:
    linear-gradient(#fff0c0, #fff0c0) center top / calc(100% - 2 * var(--e) + 2px) 1px no-repeat,
    linear-gradient(#8f6f36, #8f6f36) center bottom / calc(100% - 2 * var(--e) + 2px) 1px no-repeat,
    linear-gradient(180deg, #ecca7e, #b08a45) center / calc(100% - 2 * var(--e) + 2px) 100% no-repeat;
}
.btn--outline {
  --end: url('/design/assets/ornaments/banner-end.svg');
  color: var(--gold-3);
  background:
    linear-gradient(#f3dfa8, #f3dfa8) center top / calc(100% - 2 * var(--e) + 2px) 1px no-repeat,
    linear-gradient(#7a5c2c, #7a5c2c) center bottom / calc(100% - 2 * var(--e) + 2px) 1px no-repeat,
    linear-gradient(180deg, #1c1912, #0f0e0b) center / calc(100% - 2 * var(--e) + 2px) 100% no-repeat;
}
.btn--gold::before, .btn--gold::after,
.btn--outline::before, .btn--outline::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0;
  width: var(--e);
  background: var(--end) center / 100% 100% no-repeat;
  pointer-events: none;
}
.btn--gold::after, .btn--outline::after { left: auto; right: 0; transform: scaleX(-1); }
/* «Дыхание»: мягкая золотая подсветка кнопки; при наведении замирает и становится ярче */
@keyframes btnBreath {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(213, 173, 104, 0.3)); }
  50% { filter: drop-shadow(0 0 12px rgba(213, 173, 104, 0.7)); }
}
.btn--gold, .btn--outline { animation: btnBreath 3s ease-in-out infinite; }
.btn--gold:hover, .btn--outline:hover {
  animation: none;
  filter: brightness(1.1) drop-shadow(0 0 12px rgba(213, 173, 104, 0.7));
}

.btn--ghost { color: var(--text-1); opacity: 0.85; }
.btn--ghost:hover { opacity: 1; color: var(--gold-2); }

.btn.loading { pointer-events: none; opacity: 0.7; }

/* ---- HEADER ---- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  transition: all 0.4s var(--ease);
}
.header.scrolled {
  background: rgba(8, 10, 13, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(213, 173, 104, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.header__container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(8px, 1.2vw, 16px);
  height: 100%;
}
.header__logo {
  display: flex;
  align-items: center;
  z-index: 2;
  flex-shrink: 0;
  transition: filter 0.3s var(--ease), transform 0.3s var(--ease);
  filter: drop-shadow(0 0 16px rgba(109, 115, 255, 0.5));
}
.header__logo:hover { filter: drop-shadow(0 0 16px rgba(213, 173, 104, 0.4)); }
.header__logo-img {
  height: clamp(34px, 3vw, 44px);
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.header__nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
}
.header__link {
  --px: clamp(6px, 0.75vw, 16px);
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px var(--px);
  font-size: clamp(0.62rem, 0.55rem + 0.25vw, 0.72rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  background: none;
  white-space: nowrap;
  transition: color 0.3s;
}
.header__link::after {
  content: ''; position: absolute; left: var(--px); right: var(--px); bottom: 0; height: 1px;
  background: var(--gold-2);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.header__link:hover { color: var(--gold-2); }
.header__link:hover::after { transform: scaleX(1); }
/* ромбы-разделители между ссылками */
.header__link + .header__link::before {
  content: ''; position: absolute; left: -3px; top: 50%; width: 5px; height: 5px;
  background: var(--gold-1); transform: translateY(-50%) rotate(45deg);
}
.header__icon { display: none; }
.header__mobile { display: none; }

.header__actions {
  display: flex; align-items: center;
  gap: clamp(6px, 0.6vw, 10px);
  z-index: 2; flex-shrink: 0;
}

.burger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 28px; padding: 4px 0;
}
.burger span {
  display: block; height: 2px; width: 100%;
  background: var(--gold-2);
  transition: all 0.3s var(--ease);
}
.burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Соцкнопки: ромбовая рамка из diamond-frame.svg (без поворота иконки) */
.header__social {
  width: 30px; height: 30px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 2px;
  color: var(--gold-2);
  background: url('/design/assets/ornaments/diamond-frame.svg') center / 100% 100% no-repeat;
  transition: filter 0.3s var(--ease);
}
.header__social svg { width: 14px; height: 14px; }
.header__social:hover { filter: drop-shadow(0 0 8px rgba(213, 173, 104, 0.55)); }

.lang-dd { position: relative; }
.lang-dd__btn {
  padding: 8px 12px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  min-width: 72px;
  color: var(--gold-2);
  border: 1px solid var(--gold-2);
  border-radius: 10px; white-space: nowrap;
  background: rgba(8, 10, 13, 0.45);
  transition: background 0.2s;
}
.lang-dd__btn:hover { background: rgba(213, 173, 104, 0.12); }
.lang-dd__menu {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  display: none; list-style: none; min-width: 72px;
  background: rgba(8, 10, 13, 0.55);
  border: 1px solid var(--gold-2);
  border-radius: 10px; padding: 4px 0;
}
.lang-dd.open .lang-dd__menu { display: block; }
.lang-dd__item {
  display: block; width: 100%; padding: 8px 12px; white-space: nowrap;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--text-2); text-align: center;
}
.lang-dd__item:hover, .lang-dd__item.active { color: var(--gold-2); }

/* Кнопки шапки: ширина концов и отступы подстроены под 1024px */
.header__actions .btn--sm {
  --e: 14px;
  padding-inline: calc(var(--e) + 8px);
  font-size: clamp(0.6rem, 0.55rem + 0.15vw, 0.7rem);
  letter-spacing: 0.06em;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero__bg-image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  background-size: cover;
  background-position: center;
  animation: heroZoom 20s ease-in-out infinite alternate;
}
.hero__bg-image--desktop { display: block; }
.hero__bg-image--mobile { display: none; }

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

.hero__gradient {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, rgba(8,10,13,0.35) 0%, rgba(8,10,13,0.05) 30%, rgba(8,10,13,0.55) 78%, var(--bg-1) 100%),
    linear-gradient(90deg, rgba(8,10,13,0.5) 0%, transparent 35%, transparent 60%, rgba(8,10,13,0.5) 100%);
}
.hero__fog {
  position: absolute; z-index: 3;
  width: 200%; height: 40%;
  background: radial-gradient(ellipse, rgba(109, 115, 255, 0.14) 0%, rgba(135, 92, 246, 0.05) 40%, transparent 70%);
  opacity: 0.7;
  animation: fogMove 30s linear infinite;
}
.hero__fog--1 { bottom: 10%; left: -50%; }
.hero__fog--2 { bottom: 20%; left: -50%; animation-delay: -15s; opacity: 0.45; }
@keyframes fogMove { to { transform: translateX(50%); } }

.hero__light {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(ellipse 50% 42% at 68% 28%, rgba(109, 115, 255, 0.12), transparent 70%);
  animation: lightPulse 6s ease-in-out infinite alternate;
}
@keyframes lightPulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.hero__content {
  position: relative; z-index: 10;
  text-align: center;
  padding: calc(var(--header-h) + 2vh) 0 calc(80px + 2vh);
}
/* подложка за текстами первого экрана: фиолетовое свечение кругом; сверху гасится, чтобы не закрывать логотип */
.hero__text { position: relative; }
.hero__text::before {
  content: ''; position: absolute; z-index: -1;
  left: 50%; top: 30%; translate: -50% -50%;
  width: min(90vh, 760px); aspect-ratio: 1;
  background: radial-gradient(circle closest-side, rgba(105, 71, 189, 0.3), transparent);
  mask-image: linear-gradient(transparent 24%, #000 30%);
}
.hero__title {
  margin-bottom: 16px;
  line-height: 0;
}
.hero__logo-img {
  display: block;
  width: min(520px, 88vw, 56vh);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 60px rgba(109, 115, 255, 0.35));
}
.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: 0.06em;
  color: var(--gold-3);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  margin-bottom: 8px;
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-1);
  max-width: 600px;
  margin: 0 auto 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.hero__opening { margin-bottom: 28px; }
.hero__opening-date {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.hero__online-badge {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: var(--success);
  text-shadow: 0 0 30px rgba(74, 222, 128, 0.4);
  animation: onlinePulse 2s ease-in-out infinite;
}
@keyframes onlinePulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.countdown {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.countdown__item { text-align: center; min-width: 70px; }
.countdown__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
}
.countdown__label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-2);
  margin-top: 4px;
}
.countdown__sep {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-1);
  opacity: 0.5;
  margin-bottom: 20px;
}

.hero__cta {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 0;
}

/* Декоративная линия-вензель под заголовками */
.hero__headline::after, .modal__subtitle::after {
  content: ''; display: block;
  height: 16px; width: min(320px, 70%);
  margin: 10px auto 0;
  background: url('/design/assets/ornaments/divider.svg') center / contain no-repeat;
}

/* Server Status Panel */
.server-status {
  display: inline-flex; align-items: center; gap: 24px;
  padding: 16px 32px;
  background: rgba(13, 16, 22, 0.7);
  border: 1px solid rgba(213, 173, 104, 0.15);
  border-radius: 4px;
  backdrop-filter: blur(16px);
  font-size: 0.85rem;
}
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---- SECTIONS ---- */
.section {
  position: relative;
  padding: 120px 0;
}
.section__header { text-align: center; margin-bottom: 64px; max-width: 800px; margin-inline: auto; }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  background: linear-gradient(180deg, var(--text-1), var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section__subtitle {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.7;
}

.about {
  position: relative;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2), var(--bg-1));
  overflow: hidden;
}
.about .container { position: relative; z-index: 2; }

.rates {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
}
.rates .container { position: relative; z-index: 2; }
.rates .section__header { margin-bottom: 48px; }

.features { background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); }

.world {
  min-height: 80vh;
  display: flex; align-items: center;
  overflow: hidden;
}

.howto { position: relative; }
.howto .container { position: relative; z-index: 2; }

.news { background: var(--bg-2); }

.community {
  position: relative;
  min-height: 60vh;
  display: flex; align-items: center;
}

/* ---- LANDING BLOCKS 2–3 ---- */
.streams, .rating {
  position: relative; overflow: hidden;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 1vh) 0 calc(80px + 1vh);
  background: var(--bg-1);
}
.streams .container, .rating .container {
  position: relative; z-index: 2;
  width: min(1000px, 100% - 320px);
}
.streams .section__header, .rating .section__header { margin-bottom: 40px; }

.streams__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.streams__more, .rating__more { text-align: center; margin-top: clamp(12px, 2vh, 36px); }

.section__bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.section__veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(8, 10, 13, 0.35) 0%, rgba(8, 10, 13, 0.82) 80%),
    linear-gradient(180deg, var(--bg-1) 0%, transparent 22%, transparent 78%, var(--bg-1) 100%);
}

.stream-card {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg-3);
  border: 1px solid rgba(213, 173, 104, 0.3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.stream-card:hover {
  border-color: var(--gold-2); transform: translateY(-3px);
  box-shadow: 0 0 24px rgba(213, 173, 104, 0.35);
}
.stream-card__thumb { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.8; }
.stream-card__play {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 30px; margin: -15px 0 0 -22px;
  background: #e53935; border-radius: 8px;
}
.stream-card__play::after {
  content: ''; position: absolute; top: 8px; left: 17px;
  border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.stream-card__title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px;
  font-size: 0.75rem; font-weight: 600; text-align: left;
  background: linear-gradient(0deg, rgba(8, 10, 13, 0.9), transparent);
}
.stream-card__platform {
  position: absolute; top: 6px; right: 6px; padding: 2px 6px;
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(8, 10, 13, 0.75); color: var(--gold-2);
}

/* Рейтинг */
.rating__tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: clamp(8px, 1.8vh, 24px); }
.rating__tab {
  padding: clamp(7px, 1.2vh, 10px) 28px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
  color: var(--text-2);
  border: 0;
  background: rgba(8, 10, 13, 0.6);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  padding-inline: 34px;
  transition: all 0.25s;
}
.rating__tab.active, .rating__tab:hover { color: var(--bg-1); background: var(--gold-2); }
.rating__panel {
  position: relative;
  padding: 4px 20px 6px;
  background: rgba(10, 12, 16, 0.78); backdrop-filter: blur(8px);
  border: 1px solid rgba(213, 173, 104, 0.25);
}
.rating__table { width: 100%; border-collapse: collapse; }
.rating__table th {
  padding: clamp(8px, 1.2vh, 12px) 10px; text-align: left;
  font-size: 0.7rem; letter-spacing: 0.1em; color: var(--gold-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.rating__table td { padding: clamp(4px, 0.7vh, 14px) 10px; font-size: 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.rating__table tbody tr:first-child { background: linear-gradient(90deg, rgba(213, 173, 104, 0.16), transparent); }
.rating__table tbody tr:hover { background: rgba(213, 173, 104, 0.08); }
.rating__char { font-weight: 600; color: var(--text-1); }
.rating__score { color: var(--gold-2); font-weight: 700; }
.rank {
  display: inline-grid; place-items: center; width: clamp(22px, 3.4vh, 28px); height: clamp(22px, 3.4vh, 28px);
  font-size: 0; font-weight: 700;
  color: var(--text-2); border: 1px solid rgba(255, 255, 255, 0.15); transform: rotate(45deg);
}
.rank::after { content: attr(data-n); font-size: 0.8rem; transform: rotate(-45deg); }

/* ---- FOOTER ---- */
.footer {
  padding: 16px 0 8px;
  background: var(--bg-1);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.footer__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  text-align: center;
}
.footer__copy { text-align: left; font-size: 0.6rem; }
.footer__links {
  display: flex;  column-gap: 12px; row-gap: 4px; justify-content: flex-end; align-items: flex-end; flex-wrap: wrap;
  margin: 6px 0 0;
}
.footer__links a {
  color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(213, 173, 104, 0.5);
  font-size: 0.6rem;
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--gold-2); }
.footer__social { display: flex; gap: 16px; }
.footer__company { font-size: 0.7rem; color: var(--text-2); text-align: left; }

/* Главная: футер прилипает к низу экрана, полупрозрачный; секции — пошаговый скролл */
html.landing { scroll-snap-type: y mandatory; }
.landing .hero, .landing .streams, .landing .rating { scroll-snap-align: start; }
.landing .footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  background: rgba(8, 10, 13, 0.55);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(213, 173, 104, 0.15);
}

/* Side anchors (desktop, главная) */
.side-nav {
  position: fixed; left: 28px; top: 50%; transform: translateY(-50%); z-index: 900;
  display: flex; flex-direction: column; gap: 22px;
}
.side-nav::before {
  content: ''; position: absolute; left: 13.5px; top: 14px; bottom: 14px; width: 1px;
  background: linear-gradient(transparent, rgba(213, 173, 104, 0.5) 20%, rgba(213, 173, 104, 0.5) 80%, transparent);
  pointer-events: none;
}
.side-nav__link {
  display: flex; align-items: center; gap: 14px;
  min-height: 28px;
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2);
  transition: color 0.3s, text-shadow 0.3s;
}
.side-nav__link i {
  position: relative; width: 28px; height: 28px; flex-shrink: 0;
  background: url('/design/assets/ornaments/anchor.svg') center / contain no-repeat;
}
.side-nav__link i::after {
  content: ''; position: absolute; inset: 0;
  background: url('/design/assets/ornaments/anchor-active.svg') center / contain no-repeat;
  opacity: 0; transition: opacity 0.3s;
}
.side-nav__link:hover, .side-nav__link.active { color: var(--gold-2); }
.side-nav__link.active { text-shadow: 0 0 12px rgba(213, 173, 104, 0.55); }
.side-nav__link.active i::after { opacity: 1; }

/* Панель стадий справа на первом экране */
.hero__side {
  position: absolute; right: 40px; top: calc(var(--header-h) + 36px); z-index: 11;
  display: flex; flex-direction: column; gap: 14px; width: 290px;
}
.side-item {
  position: relative;
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(8, 10, 13, 0.72), rgba(8, 10, 13, 0.35));
  backdrop-filter: blur(6px);
  text-align: left;
}
.side-item__icon {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center; color: var(--gold-3);
}
.side-item__icon::before {
  content: ''; position: absolute; inset: 0;
  background: url('/design/assets/ornaments/diamond-frame.svg') center / 100% 100% no-repeat;
}
.side-item__icon .icon { width: 24px; height: 24px; position: relative; color: var(--gold-3); fill: rgba(230, 195, 130, 0.22); stroke-width: 1.7; filter: drop-shadow(0 0 6px rgba(213, 173, 104, 0.7)); }
.side-item__name { display: block; font-size: 0.95rem; color: var(--text-1); }
.side-item__sub { display: block; white-space: nowrap; font-size: 0.75rem; color: var(--gold-2); }
.badge {
  padding: 3px 10px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; border-radius: 2px;
  white-space: nowrap;
}

/* Вензеля по углам панелей: готовая 9-slice рамка из frame.svg */
.stream-card::after, .rating__panel::after, .modal__dialog::after, .dl-row::after, .side-item::after {
  content: ''; position: absolute; inset: -1px; z-index: 3; pointer-events: none;
  border: 18px solid transparent;
  border-image: url('/design/assets/ornaments/frame.svg') 22 / 18px stretch;
}

/* Баннер заголовка: концы из banner-end.svg, середина — тёмный градиент с золотыми линиями */
.section__header--banner { display: flex; align-items: center; gap: 18px; max-width: none; margin-bottom: clamp(12px, 2vh, 44px); }
.section__header--banner::before, .section__header--banner::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-1));
}
.section__header--banner::after { background: linear-gradient(270deg, transparent, var(--gold-1)); }
.banner { --e: 48px; }
.wiki__title { --e: 36px; }
.banner, .wiki__title {
  --end: url('/design/assets/ornaments/banner-end.svg');
  position: relative; text-align: center;
  padding: clamp(4px, 1vh, 12px) calc(var(--e) + 24px);
  border: 0; border-radius: 0;
  background:
    linear-gradient(#f3dfa8, #f3dfa8) center top / calc(100% - 2 * var(--e) + 2px) 2px no-repeat,
    linear-gradient(#7a5c2c, #7a5c2c) center bottom / calc(100% - 2 * var(--e) + 2px) 2px no-repeat,
    linear-gradient(180deg, #1c1912, #0f0e0b) center / calc(100% - 2 * var(--e) + 2px) 100% no-repeat;
}
.banner::before, .banner::after, .wiki__title::before, .wiki__title::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0;
  width: var(--e);
  background: var(--end) center / 100% 100% no-repeat;
  pointer-events: none;
}
.banner::after, .wiki__title::after { left: auto; right: 0; transform: scaleX(-1); }
.banner .section__title { margin: 0; background: none; color: var(--text-1); -webkit-text-fill-color: var(--text-1); font-size: clamp(1.5rem, 3vw, 2rem); text-shadow: 0 0 24px rgba(213, 173, 104, 0.35); }
.banner .section__subtitle { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2); }

/* ---- POPUPS ---- */
.modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}
.modal__dialog {
  position: relative;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow: visible;
  background: rgba(8, 10, 13, 0.85);
  border: 1px solid rgba(213, 173, 104, 0.45);
  border-radius: 4px;
  padding: 40px 32px;
  box-shadow: 0 0 0 4px rgba(8, 10, 13, 0.6), 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.4s var(--ease-out);
}
.modal__dialog--wide { width: min(900px, 100%); }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  font-size: 1.5rem;
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}
.modal__close:hover { background: rgba(255,255,255,0.05); color: var(--text-1); }
.modal__content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 6px;
  color: var(--gold-3);
  text-shadow: 0 0 24px rgba(213, 173, 104, 0.4);
}
.modal__subtitle {
  text-align: center; font-size: 0.7rem; letter-spacing: 0.2em;
  color: var(--text-2); margin-bottom: 28px;
}

.dl-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 24px; margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(213, 173, 104, 0.06), rgba(8, 10, 13, 0.5));
  border: 1px solid rgba(213, 173, 104, 0.25);
}
.dl-row__label { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.04em; }
.dl-row__btns { display: flex; gap: 12px; flex-wrap: wrap; }
.dl-row--instr { display: block; padding: 0; }
.dl-row--instr summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 24px; cursor: pointer; list-style: none;
}
.dl-row--instr summary::-webkit-details-marker { display: none; }
.dl-row--instr summary .dl-row__label { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; }
.dl-row__steps { padding: 0 24px 20px 48px; color: var(--text-2); font-size: 0.9rem; line-height: 1.7; }
.dl-row__steps li { margin-bottom: 6px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-2);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  min-height: 48px;
  background: var(--bg-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  color: var(--text-1);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus {
  outline: none;
  border-color: rgba(213, 173, 104, 0.4);
  box-shadow: 0 0 0 3px rgba(213, 173, 104, 0.1);
}
.form-group input.error { border-color: var(--danger); }
.form-group input.success { border-color: var(--success); }

.form-captcha { margin-bottom: 20px; }
@keyframes successPop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 0.75rem; letter-spacing: 0.05em; color: var(--text-2); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-1); color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 2px;
}
.field input:focus { outline: none; border-color: var(--gold-2); }

/* ---- TOAST ---- */
.toast-container {
  position: fixed; top: 100px; right: 24px; z-index: 100001;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 14px 20px;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  font-size: 0.85rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.4s var(--ease-out);
  max-width: 360px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---- ICONS & PARTICLES ---- */
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.fx-particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }

/* ---- INNER PAGES ---- */
/* внутренние страницы с общей шапкой (вход, кабинет, вики, рейтинг): body.cms-page.cms-offset */
.cms-offset { padding-top: var(--header-h); background-size: cover !important; }
/* шапка и футер общие с лендингом: шрифт и интерлиньяж не наследуем от .cms-page */
.header, .footer { font-family: var(--font-body); line-height: 1.6; }
.cms-page .footer { background: rgba(8, 10, 13, 0.8); }
.cms-page .header__link { color: var(--text-2); }
.cms-page .header__link:hover { color: var(--gold-2); }
.cms-page .header .btn--gold, .cms-page .header .btn--gold:hover { color: var(--bg-1); }
.cms-page .header .btn--ghost { color: var(--text-1); }
.cms-page .footer a { color: var(--gold-2); }
.cms-page .footer .header__social { color: var(--gold-2); }
.cms-wide { width: min(var(--container), 100% - 2 * var(--gutter)); margin: 32px auto 80px; }

/* ---- WIKI ---- */
.wiki { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; }
.wiki__nav {
  position: sticky; top: calc(var(--header-h) + 16px); align-self: start;
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
  background: rgba(13, 16, 22, 0.85); border: 1px solid rgba(213, 173, 104, 0.2);
}
.wiki__link {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-2); border-left: 2px solid transparent;
}
.wiki__link:hover, .wiki__link.active { color: var(--gold-2); background: rgba(213, 173, 104, 0.08); border-left-color: var(--gold-2); }
.wiki__link .icon { width: 20px; height: 20px; color: var(--gold-1); }
.wiki__link.active .icon, .wiki__link:hover .icon { color: var(--gold-3); filter: drop-shadow(0 0 5px rgba(213, 173, 104, 0.6)); }
.wiki__sec { margin-bottom: 56px; scroll-margin-top: calc(var(--header-h) + 16px); }
.wiki__title {
  margin-bottom: 18px; padding-block: 14px;
  font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.06em; color: var(--gold-3);
}
.wiki__sub { margin: 24px 0 10px; font-family: var(--font-display); font-size: 1.3rem; color: var(--gold-2); text-align: center; }
.wiki__row {
  position: relative;
  margin-bottom: 6px; padding: 10px 14px 10px 34px; font-size: 0.9rem;
  background: rgba(13, 16, 22, 0.8); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 6px;
}
.wiki__row::before {
  content: ''; position: absolute; left: 14px; top: 50%; width: 6px; height: 6px;
  background: var(--gold-1); transform: translateY(-50%) rotate(45deg);
}
.wiki__row--note { border-color: rgba(213, 173, 104, 0.45); color: var(--gold-3); }
.wiki__table { width: 100%; margin: 10px 0 18px; border-collapse: collapse; font-size: 0.85rem; }
.wiki__table th {
  padding: 8px 12px; text-align: left;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.wiki__table td { padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.wiki__image { width: calc(100% - 32px); height: auto; margin: 0 16px 24px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.07); }

.hero__opening-date { font-size: clamp(1.1rem, 2.2vw, 1.7rem); }

/* ============================================
   RESPONSIVE (3 breakpoints; desktop is the default, >= 1024px)
   ============================================ */

/* (a) Планшет и телефон: бургер-меню, без боковых якорей, одна колонка */
@media (max-width: 1023px) {
  .header, .header.scrolled, .cms-page .header {
    background: rgba(8, 10, 13, 0.96);
    border-bottom: 1px solid rgba(213, 173, 104, 0.25);
    backdrop-filter: none;
  }
  .header__container { grid-template-columns: 1fr auto; }
  .header__actions { gap: 12px; }
  .header__actions > .btn, .header__actions > .header__social { display: none; }
  .burger { display: flex; }

  /* без backdrop-filter у шапки: иначе position:fixed у меню считается от шапки, а не от экрана */
  .header__nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; justify-content: flex-start; gap: 6px;
    padding: 24px 24px 40px; overflow-y: auto;
    background: linear-gradient(180deg, rgba(8, 10, 13, 0.98), rgba(14, 12, 9, 0.98));
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 1001;
  }
  .header__nav.open { transform: translateX(0); }
  .header__link {
    width: min(320px, 100%); justify-content: flex-start; gap: 14px;
    padding: 16px 12px; font-size: 0.95rem; letter-spacing: 0.12em;
    color: var(--text-1); border-bottom: 1px solid rgba(213, 173, 104, 0.18);
  }
  .header__link::after, .header__link + .header__link::before { display: none; }
  .header__icon { display: block; width: 22px; height: 22px; color: var(--gold-2); }
  .header__mobile {
    display: flex; flex-direction: column; gap: 14px; align-items: center;
    width: min(320px, 100%); margin-top: 28px;
  }
  .header__mobile .btn { width: 100%; }

  html.landing { scroll-snap-type: none; }
  .side-nav { display: none; }
  .hero__bg-image--desktop { display: none; }
  .hero__bg-image--mobile { display: block; background-position: center top; }

  .landing .footer {
    position: static;
    background: var(--bg-1);
    backdrop-filter: none;
    border-top-color: rgba(255, 255, 255, 0.04);
  }
  .footer__inner { grid-template-columns: 1fr; gap: 12px; }
  .footer__copy { text-align: center; }
  .footer__links, .footer__social { justify-content: center; }
  .footer__company { text-align: center; }

  .streams, .rating { min-height: auto; padding-bottom: 80px; }
  .streams__grid { grid-template-columns: repeat(2, 1fr); }

  .wiki { grid-template-columns: minmax(0, 1fr); }
  .wiki__nav { position: static; flex-direction: row; max-height: none; overflow-x: auto; overflow-y: visible; }
  .wiki__link { white-space: nowrap; }
  .wiki__table { display: block; overflow-x: auto; }
}

/* (b) Узкий десктоп (1024–1279): только иконки у якорей, без боковой панели, уже контейнер */
@media (max-width: 1279px) {
  .hero__side { display: none; }
  .side-nav__link span { display: none; }
  .streams .container, .rating .container { width: min(1000px, 100% - 160px); }
}

/* (c) Телефон */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section { padding: 80px 0; }
  .streams .container, .rating .container { width: calc(100% - 2 * var(--gutter)); }

  .hero__logo-img { width: min(380px, 92vw); }
  .hero__cta { flex-direction: column; align-items: center; }
  .hero__cta .btn { width: 100%; max-width: 320px; }
  .server-status { flex-direction: column; gap: 12px; text-align: center; }
  .countdown { gap: 12px; }
  .countdown__item { min-width: 56px; }
  .countdown__sep { display: none; }

  .header__logo-img { height: 36px; max-width: 120px; }
  .lang-dd__btn { padding: 8px 12px; }

  .modal__dialog { padding: 32px 20px; }
  .dl-row:not(.dl-row--instr) { padding: 14px 16px; }
  .dl-row--instr summary { padding: 14px 16px; }
  .rating__table th:nth-child(4), .rating__table td:nth-child(4) { display: none; }
}

/* ---- REVEAL ANIMATIONS ----
   Начальное состояние блоков с .reveal на главной; плавное появление запускает initHeroAnimations() (GSAP).
   Если GSAP не загрузился, app.js ставит .no-gsap и блоки показываются сразу. */
.landing .reveal { opacity: 0; transform: translateY(30px); }
.landing.no-gsap .reveal { opacity: 1; transform: none; }

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__bg-image { animation: none; }
  .hero__fog { animation: none; }
  .landing .reveal { opacity: 1; transform: none; }
  .hero__light { animation: none; }
}

/* ===== КОМПОНЕНТ: Рейтинг (дополнение) ===== */
/* Виджет Rating (views/components/rating.php), корень .rating-widget. Базовые .rating__* и .rank выше. */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.dot--on { background: #4ADE80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.8); }
.dot--off { background: #4b5058; }
.rating-widget .rating__tabs { flex-wrap: wrap; }
.rating-widget .rating__table th,
.rating-widget .rating__table td { white-space: nowrap; }

/* на узких экранах таблица прокручивается внутри панели */
@media (max-width: 1023px) { .rating-widget .rating__panel { overflow-x: auto; } }

/* правило «.rating__table th:nth-child(4) { display: none }» выше прячет клан на телефоне; в виджете он нужен */
@media (max-width: 640px) {
  .rating-widget .rating__table th:nth-child(4),
  .rating-widget .rating__table td:nth-child(4) { display: table-cell; }
}
/* ===== КОНЕЦ: Рейтинг (дополнение) ===== */
