/* Оболочка сайта: шапка, навигация. Фон страниц — общий блок `.background` в разметке (без `background--alt`). */

.site-header {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(
    180deg,
    rgba(12, 14, 22, 0.92) 0%,
    rgba(12, 14, 22, 0.72) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.site-header__inner {
  gap: 20px;
}

.main-nav__link {
  border-radius: 999px;
  padding: 8px 14px;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.main-nav__link:hover {
  background: rgba(255, 214, 120, 0.08);
  color: #ffe9a8;
}

.main-nav__link.is-active {
  background: linear-gradient(135deg, rgba(255, 196, 86, 0.22), rgba(255, 120, 72, 0.12));
  color: #fff4d2;
  box-shadow: 0 0 0 1px rgba(255, 196, 120, 0.35);
}

.burger span {
  background: linear-gradient(90deg, #ffd66a, #ff9a5c);
}

.site-header__tail {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-auth-btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
  white-space: nowrap;
}

.header-auth-btn--login {
  border: none;
  background: linear-gradient(135deg, #ffc456, #ff7a48);
  color: #0b0d14;
  box-shadow: 0 4px 18px rgba(255, 122, 72, 0.35);
}

.header-auth-btn--login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(255, 196, 120, 0.45);
}

#header-auth-login[hidden] {
  display: none !important;
}

.header-auth-user {
  position: relative;
}

/* «Мост» между триггером и попапом: без него курсор проходит зазор 10px вне :hover и меню закрывается до клика по «Выйти». */
.header-auth-user::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  z-index: 25;
}

.header-auth-user__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(206px, 46vw);
  padding: 4px 12px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff4d2;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.header-auth-user__trigger:hover {
  background: rgba(255, 214, 120, 0.1);
  border-color: rgba(255, 196, 120, 0.28);
  box-shadow: 0 0 0 1px rgba(255, 196, 120, 0.12);
}

.header-auth-user__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.25);
}

.header-auth-user__nick {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  text-align: left;
}

.header-auth-user__popover {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 240px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(12, 16, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.header-auth-user:hover .header-auth-user__popover,
.header-auth-user:focus-within .header-auth-user__popover,
.header-auth-user.header-auth-user--open .header-auth-user__popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.header-auth-user__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.header-auth-user__row:last-of-type {
  margin-bottom: 14px;
}

.header-auth-user__label {
  color: rgba(240, 244, 255, 0.55);
  flex-shrink: 0;
}

.header-auth-user__value {
  color: rgba(255, 244, 210, 0.95);
  text-align: right;
  font-weight: 600;
  min-width: 0;
  word-break: break-word;
}

.header-auth-user__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.header-auth-user__link {
  font-size: 13px;
  font-weight: 600;
  color: #ffd88a;
  text-decoration: none;
}

.header-auth-user__link:hover {
  color: #fff4d2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.header-auth-user__link--logout {
  color: rgba(255, 160, 140, 0.95);
}

/* ——— Модалка входа Steam: центр вьюпорта, палитра как у сайта (переменные в style.css :root) ——— */
.login-consent-dialog {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  width: min(100% - 24px, 440px);
  max-height: calc(100vh - 24px);
  max-height: min(90vh, calc(100vh - 24px));
  max-height: min(90dvh, calc(100vh - 24px));
  height: fit-content;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(58, 141, 255, 0.28);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(110% 70% at 50% -30%, rgba(58, 141, 255, 0.22), transparent 52%),
    radial-gradient(90% 50% at 100% 100%, rgba(255, 122, 0, 0.08), transparent 45%),
    linear-gradient(168deg, rgba(5, 15, 31, 0.98) 0%, rgba(4, 9, 22, 0.99) 42%, rgba(7, 14, 28, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 122, 0, 0.14),
    0 28px 72px rgba(0, 0, 0, 0.58),
    0 0 120px rgba(58, 141, 255, 0.07);
  color: var(--color-text);
  font-family: "Montserrat", system-ui, sans-serif;
  transform-origin: center center;
}

@keyframes login-consent-dialog-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes login-consent-dialog-out {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
}

@keyframes login-consent-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes login-consent-backdrop-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.login-consent-dialog[open] {
  animation: login-consent-dialog-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-consent-dialog[open]::backdrop {
  animation: login-consent-backdrop-in 0.28s ease both;
}

.login-consent-dialog[open].is-closing {
  animation: login-consent-dialog-out 0.26s ease forwards;
  pointer-events: none;
}

.login-consent-dialog[open].is-closing::backdrop {
  animation: login-consent-backdrop-out 0.26s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .login-consent-dialog[open],
  .login-consent-dialog[open]::backdrop,
  .login-consent-dialog[open].is-closing,
  .login-consent-dialog[open].is-closing::backdrop {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.legacy-chrome .login-consent-dialog[open],
.legacy-chrome .login-consent-dialog[open]::backdrop,
.legacy-chrome .login-consent-dialog[open].is-closing,
.legacy-chrome .login-consent-dialog[open].is-closing::backdrop {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}

.login-consent-dialog::backdrop {
  background: rgba(2, 6, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.login-consent-dialog__accent {
  height: 3px;
  width: 100%;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.login-consent-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 0;
}

.login-consent-dialog__title {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: var(--color-text);
}

.login-consent-dialog__close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(58, 141, 255, 0.28);
  border-radius: 999px;
  background: rgba(58, 141, 255, 0.1);
  color: var(--color-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.login-consent-dialog__close:hover {
  color: var(--color-text);
  background: rgba(255, 122, 0, 0.14);
  border-color: rgba(255, 122, 0, 0.4);
}

.login-consent-dialog__close:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}

.login-consent-dialog__lead {
  margin: 0;
  padding: 12px 22px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-muted);
}

#steam-consent-modal-root {
  padding: 16px 22px 22px;
}

.steam-consent {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steam-consent__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.52;
  color: var(--color-text);
  padding: 14px 14px;
  border-radius: 10px;
  background: rgba(58, 141, 255, 0.07);
  border: 1px solid rgba(58, 141, 255, 0.14);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.steam-consent__row:hover {
  background: rgba(58, 141, 255, 0.11);
  border-color: rgba(58, 141, 255, 0.26);
}

.steam-consent__checkbox {
  margin: 4px 0 0;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.steam-consent__text {
  flex: 1;
  min-width: 0;
}

.steam-consent__link {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.steam-consent__link:hover {
  color: var(--color-secondary);
}

.steam-consent__steam {
  align-self: stretch;
  justify-content: center;
  min-height: 48px;
}

.steam-consent__steam:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.25);
  transform: none;
  box-shadow: none;
}

.page-legal .legal-doc {
  max-width: 720px;
  margin: 0 auto;
}

.page-legal .legal-doc h2 {
  margin-top: 1.75rem;
}

.page-legal .legal-doc p,
.page-legal .legal-doc li {
  color: rgba(240, 244, 255, 0.82);
  line-height: 1.65;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 9, 14, 0.88);
}

