/* ── ПЕРЕМЕННЫЕ ── */
:root {
  --bg:          #060b18;
  --bg2:         #0a1020;
  --blue-deep:   #1e3a6e;
  --blue-mid:    #2563a8;
  --blue:        #3b82f6;
  --blue-light:  #60a5fa;
  --blue-pale:   #93c5fd;
  --text:        #e2e8f0;
  --muted:       #94a3b8;
  --dim:         #64748b;
  --header-h:    64px;
}

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

/* ── HEADER ── */
#main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: rgba(6, 11, 24, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(30, 58, 110, 0.45);
  transition: background 0.3s;
}

/* Эффект при скролле — добавляется через JS */
#main-header.scrolled {
  background: rgba(6, 11, 24, 0.98);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

/* ── ЛОГОТИП ── */
#img-logo {
  margin-left: -20px;
  margin-right: -10px;
  width: 40px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}

.logo-name {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.13em;
  color: #ffffff;
  transition: color 0.2s;
}

.logo-sub {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--blue);
  font-weight: 600;
}

.header-logo:hover .logo-name { color: var(--blue-pale); }

/* ── PIXEL CUBE ── */
.pixel-cube {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.cube-top {
  position: absolute;
  width: 22px; height: 11px;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  top: 0; left: 8px;
  transform: skewX(-30deg);
  border-top: 1px solid rgba(96, 165, 250, 0.45);
}

.cube-left {
  position: absolute;
  width: 15px; height: 22px;
  background: linear-gradient(180deg, #0d1526, #111d35);
  left: 0; top: 9px;
  border-left: 1px solid rgba(30, 58, 110, 0.7);
  border-bottom: 1px solid rgba(30, 58, 110, 0.7);
}

.cube-right {
  position: absolute;
  width: 22px; height: 22px;
  background: linear-gradient(180deg, #162545, #0d1526);
  right: 0; top: 9px;
  border-right: 1px solid rgba(30, 58, 110, 0.7);
  border-bottom: 1px solid rgba(30, 58, 110, 0.7);
}

/* ── НАВИГАЦИЯ ── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}

/* Подчёркивание при ховере */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--blue-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-link:hover { color: var(--blue-pale); }
.nav-link:hover::after { transform: scaleX(1); }

/* Активная страница */
.nav-link.active {
  color: var(--blue-pale);
}
.nav-link.active::after {
  transform: scaleX(1);
  background: var(--blue);
}

/* Discord — фиолетовый акцент */
.nav-discord { color: #a5b4fc; }
.nav-discord:hover { color: #c7d2fe; }
.nav-discord::after { background: #818cf8; }

/* Кнопка «Войти» — выделенная */
.nav-link#auth-link {
  padding: 7px 18px;
  border: 1px solid rgba(59, 130, 246, 0.38);
  border-radius: 6px;
  color: var(--blue-pale);
  transition: all 0.22s;
}

.nav-link#auth-link::after { display: none; }

.nav-link#auth-link:hover {
  color: #fff;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.25);
}

/* ── БУРГЕР (мобайл) ── */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid rgba(30, 58, 110, 0.6);
  border-radius: 7px;
  cursor: pointer;
  padding: 8px;
  transition: border-color 0.2s;
}

.burger:hover { border-color: rgba(59, 130, 246, 0.55); }

.burger span {
  display: block;
  height: 1.5px;
  background: var(--muted);
  border-radius: 2px;
  transition: all 0.25s ease;
  transform-origin: center;
}

/* Бургер → крестик */
.burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── МОБИЛЬНОЕ МЕНЮ ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 99999999999;
  background: rgba(6, 11, 24, 0.97);
  border-bottom: 1px solid rgba(30, 58, 110, 0.45);
  backdrop-filter: blur(18px);
  flex-direction: column;
  padding: 12px 0 16px;
  animation: slideDown 0.22s ease forwards;
}

.mobile-menu.open { display: flex; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-link {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  padding: 13px 28px;
  border-bottom: 1px solid rgba(30, 58, 110, 0.2);
  transition: color 0.18s, background 0.18s;
}

.mobile-link:last-child { border-bottom: none; }

.mobile-link:hover {
  color: var(--blue-pale);
  background: rgba(30, 58, 110, 0.12);
}

/* ── ОТСТУП ПОД HEADER ── */
/* Добавь этот класс на <body> каждой страницы */
body { padding-top: var(--header-h); }

/* ── АДАПТИВ ── */
@media (max-width: 700px) {
  #main-header { padding: 0 20px; }
  .header-nav { display: none; }
  .burger { display: flex; }
}
#skinlogo {
  width: 45px;
  height: 45px;
  margin-left: -20px;
  margin-right: -30px;
  border-radius: 5px;
  overflow: hidden;
  background-color: #010810;
  border: 2px solid #007aff;
  box-shadow: 0 0 15px rgba(0, 122, 255, 0.7);
  transition: all 0.3s ease-in-out;
  display: inline-block;
  background-repeat: no-repeat;
  background-size: 345.6px 345.6px;      /* 64 * 5.625 */
  background-position: -45px -45px;  /* 8 * 5.625 */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: brightness(0.8) saturate(0.7);
}

#skinlogo:hover {
  box-shadow: 0 0 25px rgba(0, 122, 255, 0.9);
  transform: scale(1.05);
  filter: brightness(1) saturate(1);
}