:root {
  --night-950: #04070d;
  --night-900: #070c17;
  --night-800: #0d1526cc;
  --night-700: #141f36;
  --line: rgba(216, 180, 106, 0.18);
  --moon-100: #eef2f8;
  --moon-300: #c9d6ea;
  --muted: #8ea0bd;
  --gold-400: #d8b46a;
  --gold-300: #e8cd97;
  --forest-500: #3c8f4c;
  --forest-400: #4fae5f;
  --red-event: #e2564a;
  --purple-event: #9a86e8;
  --gold-event: #d6a94a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--moon-100);
  background: #04070d;
  overflow-x: hidden;
}

/* ============================================================
   ФОН
   ============================================================ */
.bg-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-img {
  position: absolute;
  inset: -2% -2% -2% -2%;
  background-image: url('../bg.png');
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.04);
  will-change: transform;
  transition: transform 0.1s ease-out;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 8%, rgba(4, 7, 13, 0.15), transparent 60%),
    linear-gradient(to bottom, rgba(2, 4, 9, 0.75) 0%, rgba(2, 4, 9, 0.25) 16%, rgba(2, 4, 9, 0.15) 45%, rgba(2, 4, 9, 0.55) 78%, rgba(2, 4, 9, 0.92) 100%),
    linear-gradient(to right, rgba(2, 4, 9, 0.55) 0%, rgba(2, 4, 9, 0.0) 22%, rgba(2, 4, 9, 0.0) 78%, rgba(2, 4, 9, 0.55) 100%);
}

.bg-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 15%, #fff, transparent),
    radial-gradient(1px 1px at 40% 8%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 65% 20%, #fff, transparent),
    radial-gradient(1px 1px at 82% 12%, #fff, transparent),
    radial-gradient(1px 1px at 10% 28%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 92% 30%, #fff, transparent);
  opacity: 0.5;
  animation: twinkle 5s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: .35; }
  100% { opacity: .75; }
}

/* ============================================================
   ПАДАЮЩИЕ ЗВЕЗДЫ
   ============================================================ */
.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.6);
  animation: shoot linear infinite;
  opacity: 0;
}

.shooting-star::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
  right: 2px;
}

@keyframes shoot {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(1);
  }
  5% {
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  30% {
    opacity: 0;
    transform: translate(-180px, 100px) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(-180px, 100px) scale(0.5);
  }
}

/* ============================================================
   СВЕТЛЯЧКИ
   ============================================================ */
.firefly {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffd98a;
  box-shadow: 0 0 8px 2px #ffcf78, 0 0 18px 6px rgba(255, 190, 90, 0.35);
  opacity: 0;
  animation: rise linear infinite;
}

@keyframes rise {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }
  10% {
    opacity: .9;
  }
  50% {
    transform: translate(var(--dx, 10px), -180px) scale(1);
  }
  90% {
    opacity: .5;
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx, 10px)*1.6), -340px) scale(0.4);
  }
}

/* ============================================================
   НАВИГАЦИЯ
   ============================================================ */
.topnav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 24px 0;
  flex-wrap: wrap;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 15, 26, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  padding: 5px;
  border-radius: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--moon-300);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: background .25s ease, color .25s ease, transform .2s ease;
  white-space: nowrap;
  cursor: pointer;
}

.nav-item i {
  font-size: 13px;
  opacity: .85;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(180deg, #caa25a, #a97f38);
  color: #241a08;
}

.nav-item.active i {
  opacity: 1;
}

.nav-item.community-trigger {
  cursor: pointer;
}

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

.signin-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  background: rgba(10, 15, 26, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  color: var(--moon-100);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .25s ease;
  text-decoration: none;
}

.signin-pill:hover {
  border-color: var(--gold-400);
  color: #fff;
}

/* ============================================================
   ВЫПАДАЮЩЕЕ МЕНЮ СООБЩЕСТВА
   ============================================================ */
.community-dropdown {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 15, 26, 0.95);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(14px);
  z-index: 100;
  min-width: 180px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.community-dropdown .dropdown-item {
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--moon-300);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.25s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-dropdown .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.community-dropdown .dropdown-item i {
  color: var(--gold-400);
  width: 18px;
}

/* ============================================================
   СОЦИАЛЬНАЯ ПАНЕЛЬ
   ============================================================ */
.social-rail {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 20;
}

.rail-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(10, 15, 26, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  color: var(--moon-300);
  text-decoration: none;
  font-size: 16px;
  transition: all .25s ease;
}

.rail-btn:hover {
  color: #fff;
  border-color: var(--gold-400);
  transform: translateX(4px);
}

/* ============================================================
   ГЛАВНАЯ СЕКЦИЯ
   ============================================================ */
.hero {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 90px 20px;
}

.title {
  margin: 5px 0 6px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(48px, 9vw, 108px);
  letter-spacing: 1px;
  color: var(--moon-100);
  text-shadow: 0 0 40px rgba(200, 215, 255, 0.35), 0 4px 30px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.subtitle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gold-300);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: clamp(15px, 2.4vw, 22px);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.subtitle-row .arrow {
  font-size: 14px;
  color: var(--gold-400);
  opacity: .8;
}

.quote {
  font-style: italic;
  color: var(--moon-300);
  font-size: 15px;
  margin-bottom: 15px;
  text-align: center;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 20px;
  font-weight: 600;
}

.meta-row .live {
  position: relative;
  padding-left: 16px;
  color: #bfe8c8;
}

.meta-row .live::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4fae5f;
  box-shadow: 0 0 8px 2px rgba(79, 174, 95, 0.7);
  animation: blip 1.6s ease-in-out infinite;
}

@keyframes blip {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ============================================================
   КНОПКИ
   ============================================================ */
.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: transform .2s ease, box-shadow .3s ease, filter .2s ease;
  text-decoration: none;
}

.btn-moon {
  background: linear-gradient(180deg, #d8b46a, #a97f38);
  color: #241a08;
  box-shadow: 0 10px 24px rgba(169, 127, 56, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-moon:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 30px rgba(169, 127, 56, 0.55);
}

.btn-secondary {
  background: rgba(15, 20, 32, 0.7);
  border: 1px solid var(--line);
  color: var(--moon-100);
  backdrop-filter: blur(6px);
}

.btn-secondary:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: #8ea3ff;
  background: rgba(88, 101, 242, 0.18);
}

.btn i {
  font-size: 16px;
}

/* ============================================================
   ПАНЕЛИ (НОВОСТИ И СОБЫТИЯ)
   ============================================================ */
.panels {
  position: relative;
  z-index: 15;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  flex-wrap: wrap;
}

.panel {
  width: 340px;
  background: linear-gradient(180deg, rgba(13, 19, 33, 0.72), rgba(9, 13, 23, 0.82));
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  padding: 20px 20px 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(24px);
  animation: riseIn .8s ease forwards;
}

.panel.right {
  animation-delay: .15s;
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--moon-100);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head .pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 8px 2px rgba(216, 180, 106, 0.6);
}

/* ----- НОВОСТИ ----- */
.news-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.news-item:last-of-type {
  border-bottom: none;
}

.news-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.news-icon.blue {
  background: rgba(84, 150, 255, 0.15);
  color: #79a9ff;
}

.news-icon.purple {
  background: rgba(154, 134, 232, 0.15);
  color: var(--purple-event);
}

.news-icon.gold {
  background: rgba(214, 169, 74, 0.15);
  color: var(--gold-event);
}

.news-icon.red {
  background: rgba(226, 86, 74, 0.15);
  color: var(--red-event);
}

.news-icon.green {
  background: rgba(79, 174, 95, 0.15);
  color: #4fae5f;
}

.news-body {
  flex: 1;
}

.news-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.news-title.blue {
  color: #79a9ff;
}

.news-title.purple {
  color: var(--purple-event);
}

.news-title.gold {
  color: var(--gold-event);
}

.news-title.red {
  color: var(--red-event);
}

.news-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 4px;
}

.news-date {
  font-size: 11px;
  color: #5f6d85;
}

/* ----- СОБЫТИЯ ----- */
.event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.event-item:last-of-type {
  border-bottom: none;
}

.event-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.event-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.event-icon.red {
  background: rgba(226, 86, 74, 0.15);
  color: var(--red-event);
}

.event-icon.purple {
  background: rgba(154, 134, 232, 0.15);
  color: var(--purple-event);
}

.event-icon.gold {
  background: rgba(214, 169, 74, 0.15);
  color: var(--gold-event);
}

.event-icon.blue {
  background: rgba(84, 150, 255, 0.15);
  color: #79a9ff;
}

.event-icon.green {
  background: rgba(79, 174, 95, 0.15);
  color: #4fae5f;
}

.event-title {
  font-weight: 700;
  font-size: 13px;
}

.event-title.red {
  color: var(--red-event);
}

.event-title.purple {
  color: var(--purple-event);
}

.event-title.gold {
  color: var(--gold-event);
}

.event-title.blue {
  color: #79a9ff;
}

.event-title.green {
  color: #4fae5f;
}

.event-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.countdown {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  letter-spacing: .5px;
}

/* ============================================================
   ССЫЛКА ПАНЕЛИ
   ============================================================ */
.panel-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  color: var(--gold-300);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: all .25s ease;
}

.panel-link:hover {
  background: rgba(216, 180, 106, 0.1);
  border-color: var(--gold-400);
}

/* ============================================================
   ФУТЕР
   ============================================================ */
.foot {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 26px 20px 30px;
  font-size: 12px;
  color: #5f6d85;
  letter-spacing: .5px;
}

/* ============================================================
   НАЗАД
   ============================================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s ease;
}

.back-link:hover {
  color: var(--moon-100);
}

/* ============================================================
   УВЕДОМЛЕНИЯ
   ============================================================ */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  z-index: 1000;
  animation: slideUp 0.4s ease;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success {
  background: rgba(79, 174, 95, 0.15);
  color: #4fae5f;
  border-color: rgba(79, 174, 95, 0.2);
}

.toast.error {
  background: rgba(226, 86, 74, 0.15);
  color: var(--red-event);
  border-color: rgba(226, 86, 74, 0.2);
}

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

/* ============================================================
   МОДАЛЬНОЕ ОКНО
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay .modal {
  background: #141a2b;
  border: 1px solid #2a2f45;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay .modal .modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 1100px) {
  .panels {
    justify-content: center;
  }
  .panel {
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 980px) {
  .social-rail {
    display: none;
  }
  .hero {
    padding: 40px 20px 20px;
  }
  .topnav {
    padding: 14px 12px 0;
  }
  .nav-pill {
    justify-content: center;
  }
  .community-dropdown {
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
  }
}

@media (max-width: 600px) {
  .title {
    font-size: clamp(32px, 10vw, 48px);
  }
  .subtitle-row {
    font-size: clamp(12px, 2vw, 16px);
  }
  .cta-row .btn {
    padding: 12px 20px;
    font-size: 12px;
  }
  .panel {
    padding: 16px 14px;
  }
  .nav-item {
    font-size: 12px;
    padding: 8px 12px;
  }
  .nav-pill {
    gap: 4px;
    padding: 4px;
  }
  .signin-pill {
    font-size: 12px;
    padding: 8px 14px;
  }
  .community-dropdown {
    top: 55px;
    min-width: 140px;
    left: 50%;
    transform: translateX(-50%);
  }
  .community-dropdown .dropdown-item {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* ============================================================
   СКРОЛЛБАР
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: rgba(216, 180, 106, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(216, 180, 106, 0.5);
}

/* ============================================================
   ВЫДЕЛЕНИЕ ТЕКСТА
   ============================================================ */
::selection {
  background: rgba(216, 180, 106, 0.3);
  color: #fff;
}