  /* ==========================================================================
       DESIGN SYSTEM & CSS VARIABLES
       ========================================================================== */
    :root {
      --background: #f6f7fb;
      --surface: #ffffff;
      --surface-soft: #f1f3f8;
      --surface-accent: #eceff6;

      --text: #151821;
      --text-secondary: #626a7a;
      --text-muted: #9299a8;

      --border: #e7e9ef;
      --border-strong: #d9dce5;

      --primary: #6d4aff;
      --primary-hover: #5c3bea;
      --primary-soft: #f0edff;
      --primary-border: #d4caff;

      --success: #18a957;
      --success-soft: #e9f8f0;

      --warning: #e99b18;
      --warning-soft: #fff6df;

      --danger: #e84c5b;
      --danger-soft: #ffedf0;

      --info: #0ea5e9;
      --info-soft: #e0f2fe;

      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 18px;
      --radius-xl: 24px;
      --radius-full: 9999px;

      --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.04);
      --shadow-sm: 0 4px 12px rgba(21, 24, 33, 0.05);
      --shadow-md: 0 10px 25px -4px rgba(21, 24, 33, 0.07);
      --shadow-lg: 0 20px 35px -8px rgba(109, 74, 255, 0.12);

      --font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      --container-max: 1380px;
      --header-height: 70px;
      --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* ==========================================================================
       RESET & BASE STYLES
       ========================================================================== */
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      scroll-behavior: smooth;
      -webkit-font-smoothing: antialiased;
    }

    body {
      font-family: var(--font-family);
      background-color: var(--background);
      color: var(--text);
      font-size: 15px;
      line-height: 1.6;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      overflow-x: hidden;
    }

    a {
      color: inherit;
      text-decoration: none;
      transition: var(--transition);
    }

    button {
      font-family: inherit;
      border: none;
      outline: none;
      cursor: pointer;
      background: none;
      transition: var(--transition);
    }

    input, select, textarea {
      font-family: inherit;
      font-size: 14px;
    }

    img {
      max-width: 100%;
      height: auto;
      display: block;
    }

    .container {
      width: 100%;
      max-width: var(--container-max);
      margin: 0 auto;
      padding: 0 24px;
    }

    /* ==========================================================================
       HEADER & NAVIGATION
       ========================================================================== */

.cyber-header {
  z-index: 500;
  background: #0d1017;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  color: #f1f3f9;
}

/* --------------------------------------------------------------------------
   ЯРУС 1: ВЕРХНЯЯ ПАНЕЛЬ (БРЕНД И ПОИСК)
   -------------------------------------------------------------------------- */
.deck-top {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: radial-gradient(circle at 50% 0%, rgba(109, 74, 255, 0.08), transparent 70%);
}

.deck-top-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Бренд */
.brand-glitch {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge-box {
  position: relative;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #6d4aff 0%, #a855f7 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(109, 74, 255, 0.4);
}

.badge-core {
  font-weight: 900;
  font-size: 17px;
  color: #fff;
}

.badge-pulse {
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.6);
  animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #ffffff;
  line-height: 1.1;
}

.brand-caption {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #717b94;
  font-weight: 600;
}

/* Поиск */
.search-command-center {
  flex: 1;
  max-width: 640px;
}

.search-input-shell {
  display: flex;
  align-items: center;
  background: rgba(25, 30, 44, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 14px;
  transition: all 0.25s ease;
}

.search-input-shell:focus-within {
  background: rgba(20, 24, 38, 0.95);
  border-color: #6d4aff;
  box-shadow: 0 0 15px rgba(109, 74, 255, 0.25);
}

.search-shell-icon {
  color: #64748b;
  margin-right: 10px;
  flex-shrink: 0;
}

.search-input-shell input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13.5px;
}

.search-input-shell input::placeholder {
  color: #555e75;
}

.key-shortcut {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #79859f;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
}

/* --------------------------------------------------------------------------
   ЯРУС 2: НИЖНЯЯ ПАНЕЛЬ (МЕНЮ СЛЕВА + ДЕЙСТВИЯ СПРАВА)
   -------------------------------------------------------------------------- */
.deck-bottom {
  padding: 6px 0;
  background: rgba(13, 16, 23, 0.95);
}

.deck-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Навигация */
.nav-cluster {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-cluster-item a,
.simple-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.2s;
}

.nav-cluster-item a:hover,
.simple-dropdown-trigger:hover,
.nav-cluster-item.active a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.chevron-rot {
  transition: transform 0.2s ease;
  color: #64748b;
}

.has-simple-dropdown:hover .chevron-rot {
  transform: rotate(180deg);
  color: #a855f7;
}

/* ПРОСТОЙ И ЧИСТЫЙ ВЫПАДАЮЩИЙ СПИСОК */
.has-simple-dropdown {
  position: relative;
}

.simple-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 220px;
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px;
  margin: 0;
  list-style: none;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 550;
}

.has-simple-dropdown:hover .simple-dropdown-menu,
.has-simple-dropdown.open .simple-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  transition: all 0.2s ease;
}

.dropdown-link:hover {
  background: rgba(109, 74, 255, 0.12) !important;
  color: #fff !important;
  transform: translateX(3px);
}

.dropdown-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64748b;
  transition: 0.2s;
}

.dropdown-link:hover .dropdown-bullet {
  background: #a855f7;
  box-shadow: 0 0 6px #a855f7;
}

.dropdown-tag {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 2px 5px;
  border-radius: 4px;
}

.neon-fire {
  display: inline-block;
  filter: drop-shadow(0 0 5px rgba(249, 115, 22, 0.6));
}

/* --------------------------------------------------------------------------
   ПРАВАЯ ЗОНА НИЖНЕГО ЯРУСА: КНОПКИ ВХОДА + МИНИ-ПРОФИЛЬ
   -------------------------------------------------------------------------- */
.deck-bottom-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Кнопки входа */
.auth-switch-dock {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dock-btn-login {
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 6px;
  transition: 0.2s;
}

.dock-btn-login:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.dock-btn-register {
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  text-decoration: none;
  transition: 0.2s;
}

.dock-btn-register:hover {
  background: rgba(255, 255, 255, 0.14);
}

.dock-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
}

/* ВЫПАДАЮЩИЙ МИНИ-ПРОФИЛЬ */
.user-capsule-dropdown {
  position: relative;
}

.user-capsule-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(25, 30, 44, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px 4px 5px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-capsule-trigger:hover,
.user-capsule-dropdown:hover .user-capsule-trigger {
  border-color: rgba(109, 74, 255, 0.5);
  background: rgba(30, 36, 54, 0.85);
}

.avatar-ring {
  position: relative;
  width: 28px;
  height: 28px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #6d4aff;
}

.rank-ring-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #0d1017;
}

.user-meta-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.user-handle {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

.coin-amount {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
}

.arrow-indicator {
  color: #64748b;
  transition: transform 0.2s;
}

.user-capsule-dropdown:hover .arrow-indicator {
  transform: rotate(180deg);
  color: #c4b5fd;
}

/* Дропдаун меню профиля */
.profile-megabox {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 600;
  overflow: hidden;
}

.user-capsule-dropdown:hover .profile-megabox,
.user-capsule-dropdown.open .profile-megabox {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.megabox-hero {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.megabox-name {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
}

.megabox-sub {
  font-size: 11px;
  color: #8b5cf6;
  font-weight: 600;
}

.megabox-menu-list {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.megabox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  transition: 0.2s;
}

.megabox-item:hover {
  background: rgba(109, 74, 255, 0.12);
  color: #fff;
}

.megabox-footer {
  padding: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.megabox-logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}

.megabox-logout-btn:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* --------------------------------------------------------------------------
   АДАПТИВНОСТЬ
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .deck-bottom { display: none; }
  .mobile-menu-toggle { display: flex; }
}

@media (max-width: 640px) {
  .brand-caption, .key-shortcut { display: none; }
  .search-command-center { max-width: 220px; }
}

/* ==========================================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ И ШТОРКА (DRAWER)
   ========================================================================== */

/* Кнопка открытия мобильного меню по умолчанию скрыта на ПК */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: 0.2s ease;
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: rgba(109, 74, 255, 0.2);
  border-color: rgba(109, 74, 255, 0.5);
}

/* Фон-затемнение */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Выезжающая шторка */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: #11141f;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-drawer.open {
  right: 0;
}

/* Шапка шторки */
.drawer-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

.drawer-close-btn:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Тело шторки */
.drawer-body {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Карточка профиля в мобильном меню */
.drawer-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.drawer-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-auth-actions {
  display: flex;
  gap: 8px;
}

.drawer-btn-account {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6d4aff, #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.drawer-btn-logout {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.2s;
}

/* Список ссылок */
.drawer-nav {
  margin-top: 8px;
}

.drawer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s;
}

.drawer-link:hover,
.drawer-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Аккордеон "Игры" */
.drawer-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.drawer-accordion-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.accordion-arrow {
  transition: transform 0.25s ease;
}

.drawer-accordion.open .accordion-arrow {
  transform: rotate(180deg);
  color: #a855f7;
}

.drawer-sublist {
  list-style: none;
  padding: 4px 0 4px 18px;
  margin: 0;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.drawer-accordion.open .drawer-sublist {
  display: flex;
}

.drawer-sublist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.drawer-sublist a:hover {
  color: #c4b5fd;
  background: rgba(109, 74, 255, 0.1);
}

/* ==========================================================================
   МЕДИАЗАПРОСЫ (BREAKPOINTS)
   ========================================================================== */

/* Планшеты и ниже */
@media (max-width: 992px) {
  .deck-bottom {
    display: none; /* скрываем нижний ярус на мобильных экранах */
  }

  .mobile-menu-toggle {
    display: flex; /* показываем бургер */
  }

  .deck-top-grid {
    gap: 16px;
  }

  .search-command-center {
    max-width: none; /* поиск растягивается на всю свободную ширину */
  }
}

/* Смартфоны */
@media (max-width: 640px) {
  .brand-caption,
  .key-shortcut {
    display: none; /* скрываем второстепенный текст для экономии места */
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-badge-box {
    width: 34px;
    height: 34px;
  }

  .search-input-shell {
    padding: 6px 10px;
  }

  .search-input-shell input {
    font-size: 12.5px;
  }
}

    /* ==========================================================================
       BUTTONS & UI COMPONENTS
       ========================================================================== */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 18px;
      border-radius: var(--radius-md);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: var(--transition);
      user-select: none;
    }

    .btn-sm {
      padding: 6px 12px;
      font-size: 13px;
      border-radius: var(--radius-sm);
    }

    .btn-lg {
      padding: 14px 26px;
      font-size: 16px;
      border-radius: var(--radius-lg);
    }

    .btn-primary {
      background: var(--primary);
      color: #ffffff;
      box-shadow: 0 4px 14px rgba(109, 74, 255, 0.3);
    }

    .btn-primary:hover {
      background: var(--primary-hover);
      box-shadow: 0 6px 18px rgba(109, 74, 255, 0.4);
      transform: translateY(-1px);
    }

    .btn-secondary {
      background: var(--surface-soft);
      color: var(--text);
      border: 1px solid var(--border);
    }

    .btn-secondary:hover {
      background: var(--surface-accent);
      border-color: var(--border-strong);
    }

    .btn-outline {
      background: transparent;
      color: var(--primary);
      border: 1.5px solid var(--primary-border);
    }

    .btn-outline:hover {
      background: var(--primary-soft);
      border-color: var(--primary);
    }

    .btn-ghost {
      background: transparent;
      color: var(--text-secondary);
    }

    .btn-ghost:hover {
      background: var(--surface-soft);
      color: var(--text);
    }

    .btn-danger {
      background: var(--danger-soft);
      color: var(--danger);
    }

    .btn-danger:hover {
      background: var(--danger);
      color: #fff;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 9px;
      border-radius: var(--radius-full);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.2px;
      text-transform: uppercase;
    }

    .badge-primary { background: var(--primary-soft); color: var(--primary); }
    .badge-success { background: var(--success-soft); color: var(--success); }
    .badge-warning { background: var(--warning-soft); color: var(--warning); }
    .badge-danger { background: var(--danger-soft); color: var(--danger); }
    .badge-info { background: var(--info-soft); color: var(--info); }
    .badge-neutral { background: var(--surface-soft); color: var(--text-secondary); border: 1px solid var(--border); }

    .online-indicator {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background-color: var(--success);
      display: inline-block;
      box-shadow: 0 0 0 3px rgba(24, 169, 87, 0.2);
    }

    .tag-chip {
      font-size: 12.5px;
      font-weight: 600;
      color: var(--text-secondary);
      background: var(--surface-soft);
      padding: 5px 12px;
      border-radius: var(--radius-full);
      border: 1px solid var(--border);
      transition: var(--transition);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .tag-chip:hover {
      background: var(--surface);
      color: var(--primary);
      border-color: var(--primary-border);
    }

    /* Rating Stars UI */
    .rating-stars {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      color: var(--warning);
    }

    .rating-stars svg {
      width: 16px;
      height: 16px;
      fill: currentColor;
    }

    /* Breadcrumbs */
    .breadcrumbs {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13.5px;
      color: var(--text-muted);
      margin-bottom: 24px;
      flex-wrap: wrap;
    }

    .breadcrumbs a {
      color: var(--text-secondary);
      font-weight: 500;
    }

    .breadcrumbs a:hover {
      color: var(--primary);
    }

    .breadcrumbs span.current {
      color: var(--text);
      font-weight: 600;
    }

    /* ==========================================================================
       MAIN CONTENT VIEWS & SPA ROUTING
       ========================================================================== */
    #app-view {
      flex: 1;
      opacity: 1;
      transition: opacity 0.15s ease-in-out;
    }

    #app-view.fade-out {
      opacity: 0;
    }

    /* ==========================================================================
       HERO COMPONENT (HOME)
       ========================================================================== */
    .hero-section {
      padding: 56px 0 40px;
      background: radial-gradient(circle at 80% 20%, rgba(109, 74, 255, 0.08) 0%, transparent 60%),
                  radial-gradient(circle at 10% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
      border-bottom: 1px solid var(--border);
      position: relative;
    }

    .hero-grid {
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: 48px;
      align-items: center;
    }

    .hero-content h1 {
      font-size: 48px;
      font-weight: 800;
      line-height: 1.15;
      letter-spacing: -1px;
      color: var(--text);
      margin-bottom: 18px;
    }

    .hero-content h1 span {
      background: linear-gradient(135deg, var(--primary), #926bff);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .hero-subtitle {
      font-size: 18px;
      color: var(--text-secondary);
      margin-bottom: 32px;
      max-width: 580px;
      line-height: 1.5;
    }

    .hero-search-box {
      background: var(--surface);
      border: 2px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 8px 10px 8px 20px;
      display: flex;
      align-items: center;
      box-shadow: var(--shadow-md);
      transition: var(--transition);
      margin-bottom: 24px;
    }

    .hero-search-box:focus-within {
      border-color: var(--primary);
      box-shadow: 0 10px 30px rgba(109, 74, 255, 0.15);
    }

    .hero-search-box input {
      border: none;
      outline: none;
      width: 100%;
      font-size: 16px;
      color: var(--text);
      background: transparent;
      padding-right: 12px;
    }

    .hero-categories-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .hero-categories-pills span.label {
      font-size: 13px;
      color: var(--text-muted);
      font-weight: 600;
      margin-right: 4px;
    }

    /* Hero Preview Widget */
    .hero-preview-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      overflow: hidden;
      box-shadow: var(--shadow-lg);
      position: relative;
      transition: var(--transition);
    }

    .hero-preview-card:hover {
      transform: translateY(-4px);
    }

    .hero-preview-cover {
      position: relative;
      aspect-ratio: 16/9;
      background: #1e1b2e;
      overflow: hidden;
    }

    .hero-preview-cover img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
    }

    .hero-preview-card:hover .hero-preview-cover img {
      transform: scale(1.03);
    }

    .hero-badge-overlay {
      position: absolute;
      top: 14px;
      left: 14px;
      display: flex;
      gap: 8px;
    }

    .hero-preview-body {
      padding: 24px;
    }

    .hero-preview-header {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 14px;
    }

    .hero-preview-logo {
      width: 54px;
      height: 54px;
      border-radius: var(--radius-md);
      background: var(--surface-soft);
      border: 2px solid #fff;
      box-shadow: var(--shadow-sm);
      object-fit: cover;
      flex-shrink: 0;
    }

    .hero-preview-title {
      font-size: 20px;
      font-weight: 800;
      color: var(--text);
    }

    .hero-preview-meta {
      display: flex;
      align-items: center;
      gap: 16px;
      font-size: 13.5px;
      color: var(--text-secondary);
      margin-bottom: 16px;
    }

    /* ==========================================================================
       SECTION COMMONS
       ========================================================================== */
    .section {
      padding: 56px 0;
    }

    .section-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      margin-bottom: 32px;
      flex-wrap: wrap;
      gap: 16px;
    }

    .section-title-wrap h2 {
      font-size: 30px;
      font-weight: 800;
      letter-spacing: -0.5px;
      color: var(--text);
      line-height: 1.2;
    }

    .section-title-wrap p {
      font-size: 15px;
      color: var(--text-secondary);
      margin-top: 4px;
    }

    /* Grid Layouts */
    .grid-4 {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 24px;
    }

    .grid-3 {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 24px;
    }

    .grid-2 {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 24px;
    }

    /* ==========================================================================
       GAME CARDS (CATALOG & HOME)
       ========================================================================== */
    .game-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: var(--shadow-xs);
      transition: var(--transition);
      position: relative;
    }

    .game-card:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-md);
      border-color: var(--primary-border);
    }

    .game-card-media {
      position: relative;
      aspect-ratio: 16/9;
      background: #252836;
      overflow: hidden;
    }

    .game-card-cover {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
    }

    .game-card:hover .game-card-cover {
      transform: scale(1.04);
    }

    .card-fav-btn {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 36px;
      height: 36px;
      border-radius: var(--radius-full);
      background: rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-secondary);
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      transition: var(--transition);
      z-index: 5;
    }

    .card-fav-btn:hover {
      transform: scale(1.1);
      color: var(--danger);
    }

    .card-fav-btn.active {
      color: var(--danger);
      background: #ffffff;
    }

    .game-card-content {
      padding: 20px;
      display: flex;
      flex-direction: column;
      flex: 1;
    }

    .game-card-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }

    .game-card-logo {
      width: 44px;
      height: 44px;
      border-radius: var(--radius-sm);
      object-fit: cover;
      background: var(--surface-soft);
      border: 1px solid var(--border);
      flex-shrink: 0;
    }

    .game-card-name {
      font-size: 17px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.25;
    }

    .game-card-category {
      font-size: 13px;
      color: var(--primary);
      font-weight: 600;
    }

    .game-card-stats {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
      border-top: 1px dashed var(--border);
      border-bottom: 1px dashed var(--border);
      margin-bottom: 14px;
      font-size: 13.5px;
    }

    .stat-rating {
      font-weight: 700;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .stat-online {
      color: var(--success);
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .game-card-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 18px;
    }

    .game-card-footer {
      margin-top: auto;
      display: flex;
      gap: 10px;
    }

    /* ==========================================================================
       MEDIA / NEWS / PROMO / GUIDE CARDS
       ========================================================================== */
    .news-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: var(--shadow-xs);
      transition: var(--transition);
    }

    .news-card:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-md);
      border-color: var(--primary-border);
    }

    .news-media {
      aspect-ratio: 16/9;
      background: #1e293b;
      position: relative;
      overflow: hidden;
    }

    .news-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
    }

    .news-card:hover .news-media img {
      transform: scale(1.04);
    }

    .news-body {
      padding: 20px;
      display: flex;
      flex-direction: column;
      flex: 1;
    }

    .news-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 12.5px;
      color: var(--text-muted);
      margin-bottom: 10px;
    }

    .news-title {
      font-size: 17px;
      font-weight: 700;
      line-height: 1.35;
      color: var(--text);
      margin-bottom: 10px;
    }

    .news-desc {
      font-size: 13.5px;
      color: var(--text-secondary);
      line-height: 1.5;
      margin-bottom: 16px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .promo-highlight-badge {
      background: var(--warning-soft);
      border: 1px solid rgba(233, 155, 24, 0.3);
      border-radius: var(--radius-sm);
      padding: 6px 12px;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--warning);
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 12px;
    }

    /* ==========================================================================
       PAGE: GAME DETAIL (/game/majestic-rp) - THE FLAGSHIP
       ========================================================================== */
    .game-hero {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      padding: 40px 0 48px;
    }

    .game-hero-layout {
      display: grid;
      grid-template-columns: 460px 1fr;
      gap: 44px;
    }

    .game-hero-media {
      position: relative;
    }

    .game-hero-cover {
      border-radius: var(--radius-xl);
      aspect-ratio: 16/10;
      object-fit: cover;
      width: 100%;
      box-shadow: var(--shadow-md);
      border: 1px solid var(--border);
    }

    .game-hero-floating-logo {
      position: absolute;
      bottom: -20px;
      left: 24px;
      width: 80px;
      height: 80px;
      border-radius: var(--radius-lg);
      border: 4px solid #fff;
      background: #fff;
      box-shadow: var(--shadow-md);
      object-fit: cover;
    }

    .game-hero-info {
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .game-hero-topline {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }

    .game-hero-title {
      font-size: 38px;
      font-weight: 800;
      line-height: 1.15;
      color: var(--text);
      margin-bottom: 14px;
    }

    .game-hero-desc {
      font-size: 16px;
      color: var(--text-secondary);
      margin-bottom: 24px;
      line-height: 1.6;
    }

    .game-hero-stats-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 28px;
      padding: 16px 22px;
      background: var(--surface-soft);
      border-radius: var(--radius-lg);
      border: 1px solid var(--border);
      margin-bottom: 24px;
    }

    .hero-stat-item {
      display: flex;
      flex-direction: column;
    }

    .hero-stat-label {
      font-size: 12px;
      color: var(--text-muted);
      text-transform: uppercase;
      font-weight: 600;
      letter-spacing: 0.5px;
    }

    .hero-stat-val {
      font-size: 19px;
      font-weight: 800;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .game-hero-actions {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 14px;
    }

    /* Game Page Navigation Sub-tabs */
    .page-subnav {
      position: sticky;
      top: var(--header-height);
      z-index: 90;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--border);
      margin-bottom: 40px;
    }

    .page-subnav-list {
      display: flex;
      align-items: center;
      gap: 8px;
      overflow-x: auto;
      padding: 12px 0;
      scrollbar-width: none;
    }

    .page-subnav-list::-webkit-scrollbar {
      display: none;
    }

    .page-subnav-btn {
      padding: 8px 16px;
      border-radius: var(--radius-full);
      font-size: 14px;
      font-weight: 600;
      color: var(--text-secondary);
      white-space: nowrap;
    }

    .page-subnav-btn:hover {
      background: var(--surface-soft);
      color: var(--text);
    }

    .page-subnav-btn.active {
      background: var(--primary);
      color: #fff;
    }

    /* Content Layout (Main + Sidebar) */
    .game-content-layout {
      display: grid;
      grid-template-columns: 1fr 360px;
      gap: 36px;
      align-items: start;
    }

    .content-block {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 32px;
      margin-bottom: 32px;
      box-shadow: var(--shadow-xs);
    }

    .content-block-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 24px;
    }

    .content-block-title {
      font-size: 22px;
      font-weight: 800;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 10px;
    }

    /* Video Player Mock */
    .video-mock-container {
      position: relative;
      aspect-ratio: 16/9;
      background: #111420;
      border-radius: var(--radius-lg);
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: var(--shadow-md);
    }

    .video-mock-poster {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0.65;
      transition: var(--transition);
    }

    .video-mock-container:hover .video-mock-poster {
      opacity: 0.8;
      transform: scale(1.02);
    }

    .video-play-btn {
      position: relative;
      z-index: 2;
      width: 72px;
      height: 72px;
      border-radius: 50%;
      background: var(--primary);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 24px rgba(109, 74, 255, 0.5);
      transition: var(--transition);
    }

    .video-mock-container:hover .video-play-btn {
      transform: scale(1.15);
      background: var(--primary-hover);
    }

    .video-overlay-details {
      position: absolute;
      bottom: 16px;
      left: 20px;
      right: 20px;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      z-index: 2;
      color: #fff;
    }

    .video-title {
      font-size: 16px;
      font-weight: 700;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    }

    .video-duration {
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(4px);
      padding: 4px 10px;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 700;
    }

    /* Screenshots Gallery */
    .screenshots-hero {
      border-radius: var(--radius-lg);
      overflow: hidden;
      aspect-ratio: 16/9;
      background: #111420;
      cursor: pointer;
      margin-bottom: 14px;
      border: 1px solid var(--border);
    }

    .screenshots-hero img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }

    .screenshots-hero:hover img {
      transform: scale(1.02);
    }

    .screenshots-thumbs {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 10px;
    }

    .thumb-item {
      aspect-ratio: 16/10;
      border-radius: var(--radius-sm);
      overflow: hidden;
      cursor: pointer;
      border: 2px solid transparent;
      background: #1a1d29;
      transition: var(--transition);
    }

    .thumb-item.active {
      border-color: var(--primary);
    }

    .thumb-item:hover {
      opacity: 0.9;
    }

    .thumb-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* Rating Breakdown */
    .rating-breakdown-box {
      display: grid;
      grid-template-columns: 200px 1fr;
      gap: 32px;
      align-items: center;
      background: var(--surface-soft);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 24px;
    }

    .rating-score-large {
      text-align: center;
    }

    .big-number {
      font-size: 56px;
      font-weight: 800;
      color: var(--text);
      line-height: 1;
      margin-bottom: 6px;
    }

    .score-count {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: 4px;
    }

    .rating-bars-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .rating-bar-row {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
    }

    .rating-bar-track {
      flex: 1;
      height: 8px;
      background: var(--border);
      border-radius: var(--radius-full);
      overflow: hidden;
    }

    .rating-bar-fill {
      height: 100%;
      background: var(--warning);
      border-radius: var(--radius-full);
    }

    /* Download CTA Box */
    .download-card-cta {
      background: linear-gradient(135deg, #1f1b3c, #2a2253);
      color: #ffffff;
      border-radius: var(--radius-xl);
      padding: 36px;
      position: relative;
      overflow: hidden;
      box-shadow: var(--shadow-lg);
    }

    .download-card-cta::after {
      content: '';
      position: absolute;
      right: -40px;
      bottom: -40px;
      width: 260px;
      height: 260px;
      background: radial-gradient(circle, rgba(109, 74, 255, 0.4) 0%, transparent 70%);
      pointer-events: none;
    }

    .download-content {
      position: relative;
      z-index: 2;
    }

    .download-content h3 {
      font-size: 26px;
      font-weight: 800;
      margin-bottom: 8px;
    }

    .download-content p {
      color: #c4bfe8;
      font-size: 15px;
      margin-bottom: 24px;
      max-width: 520px;
    }

    .download-actions {
      display: flex;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
      margin-bottom: 20px;
    }

    .download-meta-info {
      display: flex;
      align-items: center;
      gap: 20px;
      font-size: 13px;
      color: #a49fc4;
    }

    /* System Requirements Accordion */
    .accordion-item {
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      margin-bottom: 12px;
      background: var(--surface);
      overflow: hidden;
      transition: var(--transition);
    }

    .accordion-header {
      padding: 18px 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 16px;
      font-weight: 700;
      color: var(--text);
      cursor: pointer;
      user-select: none;
    }

    .accordion-header:hover {
      color: var(--primary);
    }

    .accordion-chevron {
      transition: transform 0.3s ease;
      color: var(--text-muted);
    }

    .accordion-item.active .accordion-chevron {
      transform: rotate(180deg);
      color: var(--primary);
    }

    .accordion-body {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
      padding: 0 22px;
      background: var(--surface-soft);
      font-size: 14.5px;
      color: var(--text-secondary);
    }

    .accordion-item.active .accordion-body {
      max-height: 1000px;
      padding: 16px 22px 22px;
      border-top: 1px solid var(--border);
    }

    .sys-req-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
    }

    .sys-col h4 {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 12px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .sys-specs-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .spec-item {
      display: flex;
      justify-content: space-between;
      border-bottom: 1px dashed var(--border);
      padding-bottom: 4px;
      font-size: 13.5px;
    }

    .spec-name {
      color: var(--text-muted);
    }

    .spec-val {
      font-weight: 600;
      color: var(--text);
      text-align: right;
    }

    /* Sidebar Info Table */
    .info-table {
      width: 100%;
      border-collapse: collapse;
    }

    .info-table tr {
      border-bottom: 1px solid var(--border);
    }

    .info-table tr:last-child {
      border-bottom: none;
    }

    .info-table td {
      padding: 12px 0;
      font-size: 14px;
    }

    .info-table td.label {
      color: var(--text-muted);
      font-weight: 500;
      width: 45%;
    }

    .info-table td.val {
      font-weight: 600;
      color: var(--text);
      text-align: right;
    }

    /* Reviews List */
    .reviews-list {
      display: flex;
      flex-direction: column;
      gap: 16px;
      margin-top: 24px;
    }

    .review-item {
      padding: 20px;
      background: var(--surface-soft);
      border-radius: var(--radius-lg);
      border: 1px solid var(--border);
    }

    .review-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }

    .review-user {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .user-avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--primary), var(--info));
      color: #fff;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
    }

    .user-name {
      font-weight: 700;
      color: var(--text);
    }

    .review-date {
      font-size: 12.5px;
      color: var(--text-muted);
    }

    .review-text {
      font-size: 14.5px;
      color: var(--text-secondary);
      line-height: 1.6;
      margin-bottom: 12px;
    }

    .review-foot {
      display: flex;
      align-items: center;
      gap: 16px;
      font-size: 12.5px;
      color: var(--text-muted);
    }

    .helpful-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      cursor: pointer;
    }

    .helpful-btn:hover {
      color: var(--primary);
    }

    /* ==========================================================================
       PAGE: SERVERS (/servers) & SERVER DETAIL (/server/:id)
       ========================================================================== */
    .servers-table-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }

    .servers-table {
      width: 100%;
      border-collapse: collapse;
      text-align: left;
    }

    .servers-table th {
      background: var(--surface-soft);
      padding: 16px 20px;
      font-size: 13px;
      font-weight: 700;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      border-bottom: 1px solid var(--border);
    }

    .servers-table td {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      font-size: 14.5px;
      vertical-align: middle;
    }

    .servers-table tr:hover td {
      background: var(--primary-soft);
    }

    .server-name-cell {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .server-chart-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 32px;
      margin-bottom: 32px;
    }

    .chart-container {
      width: 100%;
      height: 260px;
      position: relative;
      margin-top: 20px;
    }

    /* ==========================================================================
       PAGE: ARTICLE & PROMOCODES (/news/majestic-rp-promocodes-september-2026)
       ========================================================================== */
    .article-container {
      max-width: 860px;
      margin: 0 auto;
      padding: 40px 0 60px;
    }

    .article-header {
      margin-bottom: 32px;
    }

    .article-title {
      font-size: 38px;
      font-weight: 800;
      line-height: 1.2;
      color: var(--text);
      margin: 16px 0;
    }

    .article-meta-bar {
      display: flex;
      align-items: center;
      gap: 20px;
      font-size: 14px;
      color: var(--text-muted);
      border-bottom: 1px solid var(--border);
      padding-bottom: 20px;
    }

    .article-featured-img {
      width: 100%;
      aspect-ratio: 16/9;
      border-radius: var(--radius-xl);
      object-fit: cover;
      margin-bottom: 36px;
      box-shadow: var(--shadow-sm);
    }

    .article-body {
      font-size: 16.5px;
      line-height: 1.75;
      color: #2c3345;
    }

    .article-body p {
      margin-bottom: 20px;
    }

    .article-body h2 {
      font-size: 26px;
      font-weight: 800;
      margin: 36px 0 16px;
      color: var(--text);
    }

    /* Promo Code Card Component */
    .promocode-card {
      background: var(--surface);
      border: 2px solid var(--border-strong);
      border-radius: var(--radius-lg);
      padding: 22px;
      margin: 20px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      position: relative;
      overflow: hidden;
      box-shadow: var(--shadow-xs);
      transition: var(--transition);
    }

    .promocode-card:hover {
      border-color: var(--primary);
      box-shadow: var(--shadow-md);
    }

    .promocode-left {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .promocode-badge-val {
      font-family: monospace;
      font-size: 20px;
      font-weight: 800;
      letter-spacing: 1.5px;
      color: var(--primary);
      background: var(--primary-soft);
      padding: 4px 14px;
      border-radius: var(--radius-sm);
      display: inline-block;
      width: fit-content;
      border: 1px dashed var(--primary);
    }

    .promocode-reward {
      font-size: 15px;
      font-weight: 700;
      color: var(--text);
    }

    .promocode-expiry {
      font-size: 12.5px;
      color: var(--text-muted);
    }

    /* ==========================================================================
       MODALS, LIGHTBOX & TOAST NOTIFICATIONS
       ========================================================================== */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(6px);
      z-index: 1100;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      opacity: 0;
      visibility: hidden;
      transition: var(--transition);
    }

    .modal-overlay.open {
      opacity: 1;
      visibility: visible;
    }

    .modal-box {
      background: var(--surface);
      width: 100%;
      max-width: 480px;
      border-radius: var(--radius-xl);
      padding: 32px;
      box-shadow: var(--shadow-lg);
      transform: translateY(20px);
      transition: var(--transition);
      position: relative;
    }

    .modal-overlay.open .modal-box {
      transform: translateY(0);
    }

    .modal-close-btn {
      position: absolute;
      top: 20px;
      right: 20px;
      width: 36px;
      height: 36px;
      border-radius: var(--radius-full);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      cursor: pointer;
    }

    .modal-close-btn:hover {
      background: var(--surface-soft);
      color: var(--text);
    }

    /* Lightbox Gallery */
    .lightbox-overlay {
      position: fixed;
      inset: 0;
      background: rgba(8, 10, 15, 0.95);
      backdrop-filter: blur(12px);
      z-index: 1200;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: var(--transition);
    }

    .lightbox-overlay.open {
      opacity: 1;
      visibility: visible;
    }

    .lightbox-main-img {
      max-width: 90vw;
      max-height: 80vh;
      border-radius: var(--radius-md);
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
      user-select: none;
    }

    .lightbox-controls {
      position: absolute;
      width: 100%;
      display: flex;
      justify-content: space-between;
      padding: 0 32px;
      pointer-events: none;
    }

    .lightbox-nav-btn {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(8px);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      pointer-events: auto;
      transition: var(--transition);
    }

    .lightbox-nav-btn:hover {
      background: var(--primary);
      transform: scale(1.1);
    }

    .lightbox-topbar {
      position: absolute;
      top: 24px;
      left: 32px;
      right: 32px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: #fff;
      font-size: 15px;
      font-weight: 600;
    }

    /* Toast */
    .toast-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 1500;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .toast {
      background: var(--text);
      color: #fff;
      padding: 12px 20px;
      border-radius: var(--radius-md);
      font-size: 14px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 10px;
      box-shadow: var(--shadow-lg);
      animation: slideUp 0.3s ease forwards;
    }

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

    /* Star Rating Selector in Modal */
    .star-select-row {
      display: flex;
      gap: 8px;
      font-size: 32px;
      color: var(--border-strong);
      margin: 16px 0 24px;
      cursor: pointer;
    }

    .star-select-row span:hover,
    .star-select-row span.active {
      color: var(--warning);
    }

   /* ==========================================================================
   CYBER-LOUNGE FOOTER
   ========================================================================== */
.cyber-footer {
  position: relative;
  background: #090c13;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-family: var(--font-family);
  overflow: hidden;
  margin-top: auto;
  padding: 48px 0 28px;
}

/* Неоновое фоновое свечение */
.footer-ambient-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 240px;
  background: radial-gradient(circle, rgba(109, 74, 255, 0.12) 0%, rgba(168, 85, 247, 0.04) 50%, transparent 75%);
  filter: blur(60px);
  pointer-events: none;
}

.footer-content-wrap {
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   СТАТУС-ПАНЕЛЬ СВЕРХУ ФУТЕРА
   -------------------------------------------------------------------------- */
.footer-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  margin-bottom: 44px;
  background: rgba(22, 27, 40, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  gap: 16px;
  flex-wrap: wrap;
}

.status-indicator-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.pulse-node {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: hubPulse 2s infinite ease-in-out;
}

.status-lead {
  color: #64748b;
  font-weight: 500;
}

.status-highlight {
  color: #f1f5f9;
  font-weight: 700;
}

/* Социальные ссылки */
.footer-social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-chip:hover {
  color: #ffffff;
  background: rgba(109, 74, 255, 0.15);
  border-color: rgba(109, 74, 255, 0.4);
  transform: translateY(-1px);
}

.social-chip svg {
  color: #a855f7;
}

/* --------------------------------------------------------------------------
   ОСНОВНАЯ СЕТКА КОЛОНОК
   -------------------------------------------------------------------------- */
.footer-main-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 36px;
  margin-bottom: 48px;
}

/* Блок бренда и описания */
.footer-identity-col {
  display: flex;
  flex-direction: column;
  padding-right: 20px;
}

.footer-mission-text {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.65;
  margin: 16px 0 22px;
  max-width: 360px;
}

.footer-live-counter {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
}

.counter-box {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 14px;
  border-radius: 10px;
}

.counter-val {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.counter-label {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

/* Навигационные колонки */
.footer-nav-col {
  display: flex;
  flex-direction: column;
}

.col-head {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffffff;
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
}

.col-head::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 18px;
  height: 2px;
  background: #6d4aff;
  border-radius: 2px;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #79859f;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-links-list a:hover {
  color: #fff;
  transform: translateX(3px);
}

.hot-badge {
  font-size: 9px;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --------------------------------------------------------------------------
   НИЖНЯЯ ПРАВОВАЯ СТРОКА
   -------------------------------------------------------------------------- */
.footer-sub-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  align-items: center;
  gap: 24px;
  font-size: 12px;
  color: #555e75;
  line-height: 1.5;
}

.legal-copy strong {
  color: #94a3b8;
}

.legal-disclaimer {
  color: #4b556b;
}

/* --------------------------------------------------------------------------
   АДАПТИВНОСТЬ ФУТЕРА
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .footer-main-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .footer-identity-col {
    grid-column: span 3;
    padding-right: 0;
    margin-bottom: 10px;
  }
  .footer-mission-text {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .footer-status-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-social-links {
    width: 100%;
    justify-content: flex-start;
  }
  .footer-main-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }
  .footer-identity-col {
    grid-column: span 2;
  }
  .footer-sub-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .footer-main-grid {
    grid-template-columns: 1fr;
  }
  .footer-identity-col {
    grid-column: span 1;
  }
  .footer-live-counter {
    flex-direction: column;
    align-items: stretch;
  }
  .social-chip {
    flex: 1;
    justify-content: center;
  }
}

    /* ==========================================================================
       RESPONSIVE DESIGN (320px to 1920px)
       ========================================================================== */
    @media (max-width: 1180px) {
      .grid-4 { grid-template-columns: repeat(3, 1fr); }
      .game-hero-layout { grid-template-columns: 380px 1fr; }
      .game-content-layout { grid-template-columns: 1fr 320px; }
      .footer-grid { grid-template-columns: repeat(3, 1fr); }
    }

    @media (max-width: 980px) {
      .nav-links, .quick-search-trigger { display: none; }
      .mobile-menu-toggle { display: flex; }
      .hero-grid { grid-template-columns: 1fr; gap: 32px; }
      .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
      .game-hero-layout { grid-template-columns: 1fr; }
      .game-content-layout { grid-template-columns: 1fr; }
      .footer-grid { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 640px) {
      .hero-content h1 { font-size: 34px; }
      .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
      .game-hero-title { font-size: 28px; }
      .game-hero-actions { flex-direction: column; align-items: stretch; }
      .game-hero-actions .btn { width: 100%; }
      .rating-breakdown-box { grid-template-columns: 1fr; }
      .sys-req-grid { grid-template-columns: 1fr; }
      .footer-grid { grid-template-columns: 1fr; }
      .promocode-card { flex-direction: column; align-items: flex-start; }
      .promocode-card .btn { width: 100%; }
      .servers-table-card { overflow-x: auto; }
    }

/* ==========================================================================
   DLE SYSTEM ALERT (info.tpl)
   ========================================================================== */
.system-alert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 20px 0 28px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.system-alert-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.system-alert-content {
  flex: 1;
}

.system-alert-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.system-alert-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.system-alert-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.system-alert-text a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

@media (max-width: 640px) {
  .system-alert-card {
    padding: 16px;
    gap: 12px;
  }
  .system-alert-icon {
    width: 36px;
    height: 36px;
  }
  .system-alert-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* ==========================================================================
   PROMO VOUCHER CARD
   ========================================================================== */
.promo-hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}

.promo-hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

/* Шапка карточки */
.promo-hub-head {
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.promo-game-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 4px 10px 4px 6px;
  border-radius: var(--radius-full);
}

.promo-game-ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.promo-game-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.promo-status-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Контентная часть */
.promo-hub-body {
  padding: 14px 20px 16px;
  flex: 1;
}

.promo-hub-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
}

.promo-hub-title a {
  color: var(--text);
}

.promo-hub-title a:hover {
  color: var(--primary);
}

.promo-hub-reward {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Декоративная линия купона с боковыми вырезами */
.promo-coupon-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
}

.coupon-line {
  width: 100%;
  height: 1px;
  border-top: 2px dashed var(--border);
}

.cutout {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 20px;
  background-color: var(--background);
  border: 1px solid var(--border);
  z-index: 2;
}

.cutout-left {
  left: -1px;
  border-left: none;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.cutout-right {
  right: -1px;
  border-right: none;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

/* Нижняя панель */
.promo-hub-footer {
  padding: 12px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.promo-meta-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.promo-count-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 800;
}

.promo-date-sync {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.promo-hub-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.promo-hub-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.promo-hub-card:hover .promo-hub-btn svg {
  transform: translateX(2px);
}

/* Модификатор для карточки сайта (синевато-фиолетовый акцент) */
.download-card-cta.cta-portal {
  background: linear-gradient(135deg, #161c33 0%, #1e2547 100%);
}

/* Модификатор для карточки "Начать играть" (динамичный темный градиент с изумрудным отсветом) */
.download-card-cta.cta-play {
  background: linear-gradient(135deg, #17212b 0%, #1c2738 100%);
}
.download-card-cta.cta-play::after {
  background: radial-gradient(circle, rgba(24, 169, 87, 0.25) 0%, transparent 70%);
}

/* ==========================================================================
   MINI COMPACT CARDS (GUIDES & PROMOS FOR GAME DETAIL)
   ========================================================================== */
.mini-cards-grid {
  display: grid;
  
  gap: 12px;
}

/* Базовый каркас карточки-полоски */
.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

/* 1. Стили Промокода */
.mini-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-gift {
  background: var(--warning-soft);
  color: var(--warning);
}

.mini-promo-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.mini-promo-code {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.mini-badge-status {
  font-size: 10px;
  font-weight: 700;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.mini-card-info {
  flex: 1;
  min-width: 0; /* защита от переполнения flex-элемента */
}

.mini-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.mini-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.mini-copy-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 2. Стили Гайда */
.mini-guide-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-soft);
}

.mini-guide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mini-card-guide:hover .mini-guide-thumb img {
  transform: scale(1.08);
}

.mini-guide-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.mini-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-meta-dot {
  color: var(--border-strong);
}

.mini-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.mini-card-guide:hover .mini-arrow-btn {
  background: var(--primary);
  color: #fff;
  transform: translateX(2px);
}

/* Адаптивность для мобильных */
@media (max-width: 680px) {
  .mini-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MINI PROMO LINK CARD (ДЛЯ СТРАНИЦЫ ИГРЫ)
   ========================================================================== */
a.mini-card-promo-hub {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

a.mini-card-promo-hub:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}

/* Мета-строка с бейджем количества и датой */
.mini-promo-hub-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.mini-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.2px;
}

.mini-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.mini-promo-hub-date {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Заголовок новости */
.mini-card-promo-hub .mini-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

a.mini-card-promo-hub:hover .mini-card-title {
  color: var(--primary);
}

/* Анимация круглой стрелки при наведении */
a.mini-card-promo-hub:hover .mini-arrow-btn {
  background: var(--primary);
  color: #ffffff;
  transform: translateX(3px);
}

/* Контейнер всего фильтра */
.multixfield-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

/* Строка фильтра (название + горизонтальный список) */
.mxf-row,
.mxf-checked-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

/* Заголовок строки (например, "Жанр:") */
.mxf-row-title {
    font-weight: 600;
    font-size: 14px;
    min-width: 100px;
    color: #333;
}

/* Горизонтальный ряд элементов */
.mxf-row-items,
.mxf-checked-items {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

/* Обычный элемент */
.mxf-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f1f3f5;
    color: #333;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

/* Выбранный активный элемент */
.mxf-item.active {
    background: #007bff; /* Цвет фона выделения */
    color: #fff;      /* Цвет текста */
    font-weight: 600;
}

.mxf-item.active .mxf-count {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.mxf-item:hover {
    background: #007bff;
    color: #fff;
}

/* Счетчик новостей рядом с названием */
.mxf-count {
    font-size: 11px;
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 10px;
}

.mxf-item:hover .mxf-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Выбранные активные фильтры */
.mxf-checked-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #28a745;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
}

.mxf-remove {
    font-weight: bold;
    font-size: 15px;
    line-height: 1;
}

.not_filter {
    font-size: 13px;
    color: #888;
}

.tagsgame a {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-soft);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tagsgames a {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-soft);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Уникальная партнерская кнопка "Играть" */
.btn-partner-play {
  flex: 1.2; /* Кнопка "Играть" чуть шире кнопки "Обзор" для акцента */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm); /* 8px */
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

/* Эффект скользящего светового блика */
.btn-partner-play::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  transition: left 0.6s ease;
}

.btn-partner-play:hover {
  background: linear-gradient(135deg, #18a957 0%, #047857 100%);
  box-shadow: 0 5px 18px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-partner-play:hover::after {
  left: 130%;
}

.btn-partner-play svg {
  transition: transform 0.2s ease;
}

.btn-partner-play:hover svg {
  transform: scale(1.15);
}
/* Базовый адаптивный контейнер */
.video-mock-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f111a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

/* Растягивание плеера YouTube внутри контейнера */
.video-mock-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
  display: block;
}

/* ==========================================================================
   COMMENTS & ADD-COMMENT FORM (comments.tpl / addcomments.tpl)
   ========================================================================== */

/* 1. Карточка отдельного отзыва */
.review-item {
  padding: 22px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  margin-bottom: 16px;
}

.review-item:hover {
  border-color: var(--border-strong);
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.review-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Аватарка */
.user-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b6aff);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  text-transform: uppercase;
}

.user-name {
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}

.review-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.comment-num-order {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Текст отзыва */
.review-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
  word-break: break-word;
}

/* Подвал отзыва */
.review-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.comment-votes {
  display: flex;
  align-items: center;
  gap: 14px;
}

.helpful-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
}

.helpful-btn:hover {
  color: var(--primary);
}

.comment-manage-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-action-link {
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 600;
  transition: var(--transition);
}

.comment-action-link:hover {
  color: var(--primary);
}

.comment-action-link.link-del:hover {
  color: var(--danger);
}

/* 2. Форма добавления отзыва */
.add-comment-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 32px;
}

.add-comment-header {
  margin-bottom: 20px;
}

.add-comment-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.add-comment-sub {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.req-star {
  color: var(--danger);
}

/* Поля формы */
.form-control {
  width: 100%;
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14.5px;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Область текстового редактора DLE */
.comment-editor-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.comment-editor-box textarea {
  width: 100%;
  min-height: 120px;
  border: none;
  outline: none;
  padding: 14px 16px;
  background: transparent;
  font-size: 14.5px;
  line-height: 1.6;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
}

/* Капча */
.captcha-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.captcha-img-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 42px;
}

.captcha-img-wrap img {
  height: 100%;
  width: auto;
  cursor: pointer;
}

.captcha-input {
  max-width: 170px;
}

/* Подвал формы */
.add-comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.form-terms-notice {
  font-size: 12.5px;
  color: var(--text-muted);
}

@media (max-width: 680px) {
  .add-comment-card {
    padding: 20px;
  }
  .form-row-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .add-comment-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .add-comment-footer .btn {
    width: 100%;
  }
}

/* ==========================================================================
   SHARE BOX PANEL
   ========================================================================== */
.share-box-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 32px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.share-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.share-box-title svg {
  color: var(--primary);
}

.share-box-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Базовый стиль кнопок */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

/* Telegram */
.share-tg {
  background: #e7f5fd;
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.15);
}
.share-tg:hover {
  background: #0284c7;
  color: #ffffff;
  transform: translateY(-1px);
}

/* VK */
.share-vk {
  background: #eef3fc;
  color: #2787f5;
  border-color: rgba(39, 135, 245, 0.15);
}
.share-vk:hover {
  background: #2787f5;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Копировать */
.share-copy {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.share-copy:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .share-box-panel {
    flex-direction: column;
    align-items: flex-start;
  }
  .share-box-actions {
    width: 100%;
  }
  .share-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   ARTICLE HEADER & PROMO COUNT BADGE
   ========================================================================== */
.article-header {
  margin-bottom: 28px;
}

.article-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* Акцентная плашка количества промокодов */
.promo-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(24, 169, 87, 0.1) 0%, rgba(16, 185, 129, 0.18) 100%);
  border: 1px solid rgba(24, 169, 87, 0.35);
  color: #0e8341;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.promo-count-badge svg {
  color: var(--success);
}

/* Заголовок статьи */
.article-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

/* Панель мета-данных */
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
}

.meta-item svg {
  color: var(--text-muted);
}

.meta-game strong {
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 640px) {
  .article-title {
    font-size: 24px;
  }
  .article-meta-bar {
    gap: 12px;
  }
}



/* ==========================================================================
   ОБНОВЛЕННАЯ КАРТОЧКА МОДА (С ФИЛЬТРАМИ, ДАТОЙ И МЕТРИКАМИ)
   ========================================================================== */

.mod-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  position: relative;
}

.mod-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.mod-tile-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #1e2029;
  overflow: hidden;
}

.mod-tile-cover-link {
  display: block;
  width: 100%;
  height: 100%;
}

.mod-tile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.mod-tile:hover .mod-tile-cover img {
  transform: scale(1.05);
}

/* Бейджи проекта и фильтров */
.mod-tile-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 50px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  z-index: 2;
  pointer-events: none;
}

.tile-tag {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-game {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Стили фильтров: FPS Boost, Графика, Сбалансированный */
.tag-filter-fps {
  background: rgba(16, 185, 129, 0.95);
  color: #ffffff;
}

.tag-filter-gfx {
  background: rgba(109, 74, 255, 0.95);
  color: #ffffff;
}

.tag-filter-balance {
  background: rgba(245, 158, 11, 0.95);
  color: #ffffff;
}

/* Кнопка "В избранное" с поддержкой DLE тегов */
.mod-tile-fav-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}

.mod-tile-fav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: var(--transition);
}

.mod-tile-fav a {
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.mod-tile-fav:hover {
  transform: scale(1.1);
  color: var(--danger);
  background: #ffffff;
}

.mod-tile-fav.active {
  color: var(--danger);
  background: #ffffff;
}

/* Нижняя стеклянная плашка характеристик на превью */
.mod-tile-quick-specs {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  pointer-events: none;
}

.mod-tile-quick-specs .dot {
  opacity: 0.4;
}

/* Контентная область */
.mod-tile-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mod-tile-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mod-cat-name,
.mod-cat-name a {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  text-decoration: none;
}

.mod-cat-name a:hover {
  text-decoration: underline;
}

.mod-tile-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 800;
  color: var(--warning);
}

.mod-tile-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 16px;
}

.mod-tile-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mod-tile-title a:hover {
  color: var(--primary);
}

/* Подвал карточки с метаданными */
.mod-tile-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  gap: 8px;
}

.mod-metrics-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.metric-node {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.metric-node strong {
  color: var(--text);
  font-weight: 700;
}

.metric-date {
  font-size: 11.5px;
  color: var(--text-muted);
}

.meta-dot {
  color: var(--border-strong);
}

/* Кнопка загрузки */
.mod-tile-dl-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: var(--transition);
}

.mod-tile-dl-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.05);
}

/* ==========================================================================
   2. ПОЛНАЯ СТРАНИЦА: ВЕРХНИЙ ЭКРАН (ГАЛЕРЕЯ СЛЕВА + СКАЧАТЬ СПРАВА)
   ========================================================================== */
/* ==========================================================================
   ОБНОВЛЕННАЯ СТРАНИЦА МОДИФИКАЦИИ
   ========================================================================== */

.mod-details-page {
  padding: 56px 0 60px;
}

/* Шапка материала */
.mod-head-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.mod-pill-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.mod-title-main {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
}

.mod-meta-chips {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.mod-action-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Верхняя сетка (Галерея + Скачать/Баннер) */
.mod-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
}

.mod-gallery-pod {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-xs);
}

.gallery-active-view {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111420;
  margin-bottom: 12px;
}

.gallery-active-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.gallery-fullscreen-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.gallery-film-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.film-item {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.film-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-item.active {
  border-color: var(--primary);
}

.mod-action-pod {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Карточка загрузки */
.download-master-card {
  background: var(--surface);
  border: 2px solid var(--primary-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.dl-master-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dl-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
}

.dl-size-tag {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  background: var(--surface-soft);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.dl-spec-summary {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 12.5px;
}

.dl-spec-col {
  display: flex;
  flex-direction: column;
}

.spec-k {
  color: var(--text-muted);
  font-size: 11px;
}

.spec-v {
  font-weight: 700;
  color: var(--text);
}

.dl-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-dl-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b6aff 100%);
  color: #fff;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(109, 74, 255, 0.3);
  transition: var(--transition);
}

.btn-dl-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(109, 74, 255, 0.45);
}

.dl-main-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dl-main-text {
  display: flex;
  flex-direction: column;
}

.dl-main-label {
  font-size: 14.5px;
  font-weight: 800;
}

.dl-main-sub {
  font-size: 11px;
  opacity: 0.85;
}

.dl-mirrors-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mirror-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: var(--transition);
}

.mirror-link-btn:hover {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary-border);
}

.dl-security-note {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.dl-security-note code {
  background: var(--surface-soft);
  padding: 1px 4px;
  border-radius: 4px;
  font-family: monospace;
}

/* ЕДИНСТВЕННЫЙ РЕКЛАМНЫЙ БАННЕР (ПОД СКАЧИВАНИЕМ) */
.ad-banner-box {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.ad-banner-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.ad-corner-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  z-index: 3;
}

.ad-banner-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  text-decoration: none;
}

.ad-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ad-banner-box:hover .ad-banner-img {
  transform: scale(1.04);
}

.ad-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #fff;
}

.ad-banner-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-border);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.ad-banner-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
}

.ad-banner-cta {
  font-size: 12px;
  font-weight: 700;
  color: #5eead4;
}

/* Нижняя сетка */
.mod-bottom-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

.mod-article-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mod-aside-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mod-feature-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.feature-pill-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.f-pill-icon {
  font-size: 18px;
}

.feature-pill-item strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

.feature-pill-item span {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Оценка */
.rate-submit-pod {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  margin-top: 18px;
  flex-wrap: wrap;
}

.rate-prompt {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.star-rating-buttons {
  display: inline-flex;
  gap: 2px;
}

.star-rating-buttons .star-btn {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--border-strong);
  cursor: pointer;
  transition: var(--transition);
}

.star-rating-buttons .star-btn:hover,
.star-rating-buttons .star-btn.active {
  color: var(--warning);
  transform: scale(1.15);
}

.rate-feedback {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   ЕДИНЫЙ ЛЕЙАУТ С ЛИПКИМ САЙДБАРОМ
   ========================================================================== */

/* Сквозной двухколоночный грид */
.mod-layout-columns {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start; /* Важно: выравнивание по верху для работы sticky */
}

/* Левая колонка со всем основным материалом */
.mod-article-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* Правая колонка сайдбара */
.mod-aside-column {
  position: relative;
  width: 100%;
}

/* Липкая оболочка сайдбара */
.mod-sticky-wrapper {
  
  top: 90px; /* Отступ от верхнего края экрана с учетом высоты шапки */
  display: flex;
  flex-direction: column;
  gap: 20px;
  will-change: transform;
}

/* Стилизация галереи внутри основного контента */
.mod-gallery-pod {
  padding: 16px !important;
  margin-bottom: 0 !important;
}

.gallery-active-view {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111420;
  margin-bottom: 12px;
}

.gallery-active-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.gallery-fullscreen-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.gallery-film-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.film-item {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.film-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-item.active {
  border-color: var(--primary);
}

/* Карточка скачивания в сайдбаре */
.download-master-card {
  background: var(--surface);
  border: 2px solid var(--primary-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.dl-master-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dl-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
}

.dl-size-tag {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  background: var(--surface-soft);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.dl-spec-summary {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 12.5px;
}

.dl-spec-col {
  display: flex;
  flex-direction: column;
}

.spec-k {
  color: var(--text-muted);
  font-size: 11px;
}

.spec-v {
  font-weight: 700;
  color: var(--text);
}

.dl-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-dl-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b6aff 100%);
  color: #fff;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(109, 74, 255, 0.3);
  transition: var(--transition);
}

.btn-dl-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(109, 74, 255, 0.45);
}

.dl-main-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dl-main-text {
  display: flex;
  flex-direction: column;
}

.dl-main-label {
  font-size: 14.5px;
  font-weight: 800;
}

.dl-main-sub {
  font-size: 11px;
  opacity: 0.85;
}

.dl-mirrors-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mirror-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: var(--transition);
}

.mirror-link-btn:hover {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary-border);
}

.dl-security-note {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.dl-security-note code {
  background: var(--surface-soft);
  padding: 1px 4px;
  border-radius: 4px;
  font-family: monospace;
}

/* Рекламный баннер */
.ad-banner-box {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.ad-banner-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.ad-corner-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  z-index: 3;
}

.ad-banner-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  text-decoration: none;
}

.ad-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ad-banner-box:hover .ad-banner-img {
  transform: scale(1.04);
}

.ad-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #fff;
}

.ad-banner-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-border);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.ad-banner-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
}

.ad-banner-cta {
  font-size: 12px;
  font-weight: 700;
  color: #5eead4;
}

/* Виджет полезных статей */
.guides-magazine-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}

.widget-header-clean {
  margin-bottom: 16px;
}

.widget-header-badge {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary);
  margin-bottom: 2px;
}

.widget-clean-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}

.guides-magazine-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mag-guide-card {
  display: flex;
  gap: 14px;
  text-decoration: none;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.mag-guide-card:hover {
  background: var(--surface-soft);
}

.mag-guide-thumb-wrap {
  position: relative;
  width: 90px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #111420;
}

.mag-guide-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mag-guide-card:hover .mag-guide-thumb-wrap img {
  transform: scale(1.08);
}

.mag-guide-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mag-guide-badge.badge-teal { background: #059669; }
.mag-guide-badge.badge-amber { background: #d97706; }

.mag-guide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mag-guide-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mag-read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mag-cat-label {
  font-weight: 600;
  color: var(--primary);
}

.mag-guide-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mag-guide-card:hover .mag-guide-title {
  color: var(--primary);
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 1100px) {
  .mod-layout-columns {
    grid-template-columns: 1fr;
  }

  .mod-sticky-wrapper {
    position: static; /* Отключаем sticky на мобильных и планшетах */
  }

  .similar-mods-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .similar-mods-grid {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================================
   КРАСИВЫЙ ВИДЖЕТ: ПОЛЕЗНЫЕ СТАТЬИ И ГАЙДЫ (САЙДБАР)
   ========================================================================== */
.guides-magazine-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}

.widget-header-clean {
  margin-bottom: 16px;
}

.widget-header-badge {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary);
  margin-bottom: 2px;
}

.widget-clean-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}

.guides-magazine-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mag-guide-card {
  display: flex;
  gap: 14px;
  text-decoration: none;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.mag-guide-card:hover {
  background: var(--surface-soft);
}

.mag-guide-thumb-wrap {
  position: relative;
  width: 90px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #111420;
}

.mag-guide-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mag-guide-card:hover .mag-guide-thumb-wrap img {
  transform: scale(1.08);
}

.mag-guide-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mag-guide-badge.badge-teal { background: #059669; }
.mag-guide-badge.badge-amber { background: #d97706; }

.mag-guide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mag-guide-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mag-read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mag-cat-label {
  font-weight: 600;
  color: var(--primary);
}

.mag-guide-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mag-guide-card:hover .mag-guide-title {
  color: var(--primary);
}

/* ==========================================================================
   ПОЛНОРАЗМЕРНЫЙ БЛОК: ПОХОЖИЕ МОДЫ (ПОД КОММЕНТАРИЯМИ)
   ========================================================================== */
.similar-mods-section {
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.similar-mods-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}

.similar-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.similar-main-heading {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
}

.similar-mods-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.sim-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.sim-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.sim-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #111420;
  overflow: hidden;
}

.sim-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.sim-card:hover .sim-card-cover img {
  transform: scale(1.05);
}

.sim-card-rating {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: var(--warning);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.sim-card-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.sim-card-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sim-card-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.sim-card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 14px;
}

.sim-card-title a {
  text-decoration: none;
  color: inherit;
}

.sim-card-title a:hover {
  color: var(--primary);
}

.sim-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.sim-size-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.sim-btn-download {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  transition: var(--transition);
}

.sim-btn-download:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 1100px) {
  .mod-showcase-grid,
  .mod-bottom-layout {
    grid-template-columns: 1fr;
  }

  .similar-mods-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .mod-head-banner {
    flex-direction: column;
  }

  .mod-action-tools {
    width: 100%;
  }

  .mod-action-tools .btn {
    flex: 1;
  }

  .mod-feature-pills {
    grid-template-columns: 1fr;
  }

  .similar-mods-grid {
    grid-template-columns: 1fr;
  }

  .mod-title-main {
    font-size: 24px;
  }
}

/* ==========================================================================
   5. АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 1100px) {
  .mod-showcase-grid,
  .mod-bottom-layout {
    grid-template-columns: 1fr;
  }

  .mod-feature-pills {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .mod-head-banner {
    flex-direction: column;
  }

  .mod-action-tools {
    width: 100%;
  }

  .mod-action-tools .btn {
    flex: 1;
  }

  .mod-title-main {
    font-size: 24px;
  }

  .ad-strip-body {
    flex-direction: column;
    align-items: stretch;
  }

  .ad-strip-body .btn {
    width: 100%;
  }
}

/* ==========================================================================
   НОВОСТНОЙ РАЗДЕЛ: СВЕТЛЫЙ СТИЛЬ
   ========================================================================== */

/* 1. Карточка новости в каталоге */
.news-card-clean {
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.news-card-clean:hover {
  transform: translateY(-4px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.news-card-clean .news-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111420;
}

.news-cover-link {
  display: block;
  width: 100%;
  height: 100%;
}

.news-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  box-shadow: var(--shadow-xs);
}

.news-read-chip {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.news-source-game {
  font-weight: 700;
  color: var(--primary);
}

.meta-dot {
  color: var(--border-strong);
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.news-author-tiny {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text);
}

.author-avatar-xs {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-metrics-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-metrics-group span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 2. Полная страница новости */
.news-single-view {
  padding-top: 56px;
}

.article-container-full {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  box-shadow: var(--shadow-xs);
}

.news-meta-enhanced {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 20px;
}

.meta-author-block {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

.meta-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.article-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Обложка статьи */
.article-feature-lead {
  margin: 28px 0 32px;
}

.article-feature-lead .article-featured-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}

.article-feature-caption {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Оформление текста новости */
.article-lead-paragraph {
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 24px;
}

.article-quote-card {
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--surface-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  font-style: italic;
}

.article-quote-card p {
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}

.article-quote-card cite {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  font-style: normal;
}

/* Теги под статьей */
.article-tags-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.tags-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Профиль автора новости */
.author-profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 28px;
}

.author-profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-profile-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: var(--text);
}

.author-profile-bio {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* 3. Блок «Читайте также» снизу */
.similar-news-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

/* Адаптивность */
@media (max-width: 1040px) {
  .article-container-full {
    padding: 24px 20px;
  }
}

@media (max-width: 768px) {
  .news-meta-enhanced {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-user-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }

  .author-profile-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ==========================================================================
   УНИКАЛЬНЫЙ ВИДЖЕТ: ДРУГИЕ НОВОСТИ (SIDEBAR STREAM)
   ========================================================================== */

.other-news-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

/* Шапка виджета */
.widget-lead-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}

.widget-accent-mark {
  width: 4px;
  height: 32px;
  background: linear-gradient(180deg, var(--primary) 0%, #a855f7 100%);
  border-radius: var(--radius-full);
}

.widget-header-text {
  flex: 1;
}

.widget-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 3px;
}

.widget-headline {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin: 0;
}

.widget-all-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  transition: var(--transition);
}

.widget-all-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateX(2px);
}

/* Поток карточек новостей */
.other-news-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.other-news-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background: var(--surface);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.other-news-card:hover {
  background: var(--surface-soft);
  border-color: var(--border);
  transform: translateX(4px);
}

/* Цифровой индекс карточки */
.news-card-index {
  font-family: monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--border-strong);
  line-height: 1;
  padding-top: 4px;
  width: 18px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.other-news-card:hover .news-card-index {
  color: var(--primary);
}

/* Обложка-миниатюра */
.news-card-thumb-shell {
  position: relative;
  width: 82px;
  height: 68px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: #111420;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.news-card-thumb-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.other-news-card:hover .news-card-thumb-shell img {
  transform: scale(1.1);
}

/* Точечный индикатор игры на превью */
.news-cat-dot {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.dot-crmp { background: #f59e0b; }
.dot-samp { background: #0ea5e9; }
.dot-gta5 { background: #10b981; }
.dot-mta  { background: #ec4899; }

/* Контентная часть */
.news-card-payload {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.news-card-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 8px;
}

.news-project-pill {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: 4px;
}

.pill-crmp { background: var(--warning-soft); color: #d97706; }
.pill-samp { background: var(--info-soft); color: #0284c7; }
.pill-gta5 { background: var(--success-soft); color: #059669; }
.pill-mta  { background: #fce7f3; color: #db2777; }

.news-time-passed {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Заголовок новости */
.news-card-heading {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-heading a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.other-news-card:hover .news-card-heading a {
  color: var(--primary);
}

/* Нижняя панель метрик */
.news-card-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: auto;
}

.news-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.news-badge-trending {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Акцент на первой трендовой новости */
.other-news-card.is-trend {
  background: linear-gradient(135deg, rgba(109, 74, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
  border: 1px solid rgba(109, 74, 255, 0.15);
}

.other-news-card.is-trend .news-card-index {
  color: var(--primary);
}


/* ==========================================================================
   АВТОРИЗАЦИЯ И ВОССТАНОВЛЕНИЕ ПАРОЛЯ (LOSTPASSWORD.TPL)
   ========================================================================== */

.auth-form-container {
  max-width: 520px;
  margin: 40px auto 60px;
}

.auth-card {
  padding: 36px 32px !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, #0ea5e9 100%);
}

/* Шапка карточки */
.auth-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-icon-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(109, 74, 255, 0.15);
}

.auth-card-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.25;
}

.auth-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 auto;
  max-width: 380px;
}

/* Список полей */
.auth-form-fields {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Поле ввода с левой иконкой */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.input-with-icon .form-control {
  padding-left: 42px;
}

.input-with-icon .form-control:focus + .input-field-icon,
.input-with-icon:focus-within .input-field-icon {
  color: var(--primary);
}

/* Блок DLE Капчи */
.captcha-interactive-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.captcha-render-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  height: 44px;
  flex-shrink: 0;
  transition: var(--transition);
}

.captcha-render-box:hover {
  border-color: var(--primary-border);
  background: var(--surface);
}

.captcha-render-box img {
  height: 36px;
  width: auto;
  display: block;
}

.captcha-field {
  max-width: 170px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 1px;
}

.recaptcha-wrapper {
  display: flex;
  justify-content: center;
  margin: 6px 0;
}

/* Кнопка отправки */
.auth-submit-btn {
  width: 100%;
  box-shadow: 0 4px 14px rgba(109, 74, 255, 0.35);
}

.auth-submit-btn:hover {
  box-shadow: 0 6px 20px rgba(109, 74, 255, 0.45);
}

/* Подвал со ссылками */
.auth-card-footer-links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

.link-primary {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.link-primary:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Адаптивность для мобильных */
@media (max-width: 580px) {
  .auth-card {
    padding: 24px 20px !important;
    border-radius: var(--radius-lg);
  }

  .auth-card-title {
    font-size: 20px;
  }

  .captcha-interactive-group {
    flex-direction: column;
    align-items: stretch;
  }

  .captcha-field {
    max-width: 100%;
  }
}

/* ==========================================================================
   ЛИЧНЫЕ СООБЩЕНИЯ (PM.TPL) - СВЕТЛЫЙ СТИЛЬ
   ========================================================================== */

.pm-layout-card {
  padding: 28px 32px !important;
  margin-bottom: 36px;
  border-radius: var(--radius-xl);
}

/* 1. Шапка личных сообщений */
.pm-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.pm-title-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pm-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pm-main-heading {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

.pm-sub-heading {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Лимит хранилища */
.pm-storage-meter {
  min-width: 220px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.storage-text-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.storage-value strong {
  color: var(--text);
}

.storage-track {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

/* Стилизация полосы DLE */
.storage-track .progress,
.storage-track div {
  height: 100% !important;
  background: linear-gradient(90deg, var(--primary), #0ea5e9) !important;
  border-radius: var(--radius-full);
}

/* 2. Навигация по папкам */
.pm-navigation-dock {
  margin: 20px 0 24px;
}

.pm-nav-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pm-nav-btn {
  text-decoration: none;
  cursor: pointer;
}

.pm-nav-btn a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 3. Таблица сообщений DLE */
.pm-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.pm-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.pm-table-wrapper th {
  background: var(--surface-soft);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
}

.pm-table-wrapper td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.pm-table-wrapper tr:last-child td {
  border-bottom: none;
}

.pm-table-wrapper tr:hover td {
  background: var(--primary-soft);
}

.pm-table-wrapper td a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.pm-table-wrapper td a:hover {
  color: var(--primary);
}

/* 4. Форма создания письма */
.pm-compose-panel {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-top: 10px;
}

.compose-header {
  margin-bottom: 18px;
}

.compose-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.compose-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.compose-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.compose-buttons-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* 5. Просмотр переписки (диалог) */
.pm-dialog-card {
  padding: 28px 32px !important;
  margin-bottom: 36px;
  border-radius: var(--radius-xl);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.dialog-meta-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dialog-subject {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.dialog-interlocutor {
  font-size: 13px;
  background: var(--surface-soft);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.interlocutor-label {
  color: var(--text-muted);
  margin-right: 4px;
}

.interlocutor-name {
  color: var(--primary);
  font-weight: 700;
}

/* Лента сообщений диалога */
.dialog-messages-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.dialog-bubble-item {
  display: flex;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.dialog-bubble-item:hover {
  border-color: var(--border-strong);
}

.dialog-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.dialog-avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  background-color: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
}

.avatar-stub {
  font-weight: 800;
  color: var(--primary);
  font-size: 14px;
  text-transform: uppercase;
}

.dialog-online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #fff;
}

.dialog-msg-body {
  flex: 1;
  min-width: 0;
}

.dialog-msg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 10px;
}

.dialog-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dialog-author-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 800;
}

.dialog-msg-date {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Тулбар сообщений */
.dialog-msg-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.msg-tool-btn a,
.msg-tool-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.msg-tool-btn:hover a,
.msg-tool-btn:hover {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary-border);
}

.msg-tool-btn.tool-danger:hover a,
.msg-tool-btn.tool-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(232, 76, 91, 0.3);
}

.dialog-msg-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.dialog-msg-signature {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Блок быстрого ответа */
.dialog-reply-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.reply-box-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}

.reply-box-footer {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 768px) {
  .pm-layout-card,
  .pm-dialog-card {
    padding: 20px !important;
  }

  .compose-fields-grid {
    grid-template-columns: 1fr;
  }

  .pm-top-header {
    flex-direction: column;
    align-items: stretch;
  }

  .pm-storage-meter {
    width: 100%;
  }

  .compose-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .compose-buttons-group {
    width: 100%;
    margin-left: 0;
  }

  .compose-buttons-group .btn {
    flex: 1;
  }

  .dialog-bubble-item {
    flex-direction: column;
  }

  .dialog-msg-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .dialog-msg-tools {
    margin-top: 4px;
  }
}

/* ==========================================================================
   ФОРМА РЕГИСТРАЦИИ (REGISTRATION.TPL) - СВЕТЛЫЙ СТИЛЬ
   ========================================================================== */

/* Блок поля с кнопкой действия (проверка логина) */
.input-with-action {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.input-with-action .input-with-icon {
  flex: 1;
}

.btn-check-login {
  white-space: nowrap;
  padding: 0 16px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Вывод AJAX ответа DLE о занятости логина */
.registration-ajax-status {
  font-size: 12.5px;
  margin-top: 6px;
  min-height: 18px;
}

.registration-ajax-status font[color="red"],
.registration-ajax-status .status-error {
  color: var(--danger) !important;
  font-weight: 600;
}

.registration-ajax-status font[color="green"],
.registration-ajax-status .status-success {
  color: var(--success) !important;
  font-weight: 600;
}

/* Адаптивность для мобильных экранов */
@media (max-width: 480px) {
  .input-with-action {
    flex-direction: column;
  }
  
  .btn-check-login {
    width: 100%;
    padding: 9px 0;
  }
}

/* ==========================================================================
   ПОИСКОВАЯ СТРАНИЦА (SEARCH.TPL) - СВЕТЛЫЙ СТИЛЬ
   ========================================================================== */

.search-page-card {
  padding: 32px 36px !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}

/* Шапка поиска */
.search-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.search-header-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin: 0;
}

.search-page-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* 1. Блок простого поиска */
.simple-search-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.simple-search-input-shell input[type="text"],
.simple-search-input-shell input:not([type="button"]):not([type="submit"]) {
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
}

.simple-search-input-shell input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.simple-search-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* 2. Блок расширенного поиска */
.extended-search-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ext-search-grid-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ext-search-grid-mid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.ext-filters-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ext-categories-stack {
  display: flex;
  flex-direction: column;
}

.h-full {
  height: 100%;
}

/* Стилизация полевых секций (Fieldset) */
.ext-search-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.ext-search-fieldset:hover {
  border-color: var(--border-strong);
}

.ext-search-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  padding: 0 8px;
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.ext-search-legend svg {
  color: var(--primary);
}

.fieldset-inner {
  padding-top: 6px;
}

.inline-flex-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Поля ввода внутри расширенного поиска */
.ext-input-field input[type="text"],
.ext-user-field input[type="text"],
.input-styled-slot input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
  font-size: 14px;
  transition: var(--transition);
  box-sizing: border-box;
}

.ext-input-field input[type="text"]:focus,
.ext-user-field input[type="text"]:focus,
.input-styled-slot input[type="text"]:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.input-styled-slot input[type="text"] {
  width: 70px;
  text-align: center;
  padding: 7px 10px;
}

/* Выпадающие селекторы DLE */
.select-styled-slot select,
.category-list-scroll select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.select-styled-slot select:focus,
.category-list-scroll select:focus {
  border-color: var(--primary);
  background: var(--surface);
}

/* Скролл категорий DLE */
.category-list-scroll select {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-md);
  padding: 8px;
}

/* Стилизация радиокнопок и опций DLE */
.ext-options-row,
.ext-search-areas,
.radio-styled-slot {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ext-sub-label {
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.ext-options-row input,
.ext-search-areas input,
.radio-styled-slot input {
  accent-color: var(--primary);
  margin-right: 5px;
}

/* Нижняя панель действий */
.ext-search-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

/* Блок уведомления о количестве найденного */
.search-result-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.search-result-stat-card .stat-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.search-result-stat-card .stat-info-text b,
.search-result-stat-card .stat-info-text strong {
  color: var(--primary);
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 992px) {
  .search-page-card {
    padding: 24px 20px !important;
  }
  .ext-search-grid-top,
  .ext-search-grid-mid {
    grid-template-columns: 1fr;
  }
  .category-list-scroll select {
    height: 180px;
  }
}

@media (max-width: 640px) {
  .search-page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .simple-search-actions,
  .ext-search-bottom-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .simple-search-actions .btn,
  .ext-search-bottom-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   РЕЗУЛЬТАТЫ ПОИСКА (SEARCHRESULT.TPL) - СВЕТЛЫЙ СТИЛЬ
   ========================================================================== */

/* 1. Карточка найденной новости/статьи */
.search-result-card {
  padding: 22px 26px !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
  transition: var(--transition);
  position: relative;
}

.search-result-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.search-result-card.is-fixed {
  border-left: 4px solid var(--warning);
}

/* Верхняя полоса: Категория и действия */
.search-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.search-result-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.search-cat-badge a {
  color: inherit;
  text-decoration: none;
}

.search-cat-badge a:hover {
  text-decoration: underline;
}

/* Кнопка быстрого редактирования */
.search-result-actions {
  display: flex;
  align-items: center;
}

.btn-action-edit a,
.btn-action-edit i {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.btn-action-edit:hover a,
.btn-action-edit:hover i {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--surface);
}

/* Заголовок найденной статьи */
.search-result-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
}

.search-result-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.search-result-title a:hover {
  color: var(--primary);
}

/* Текст сниппета */
.search-result-snippet {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Подвал найденной публикации */
.search-result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  gap: 12px;
  flex-wrap: wrap;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-author,
.meta-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-author strong {
  color: var(--text);
}

.meta-date a {
  color: inherit;
  text-decoration: none;
}

.meta-date a:hover {
  color: var(--primary);
}

.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  transition: var(--transition);
}

.btn-read-more:hover {
  background: var(--primary);
  color: #fff;
  transform: translateX(2px);
}

/* 2. Карточка найденного комментария */
.search-comment-card {
  padding: 20px 24px !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  margin-bottom: 14px;
  transition: var(--transition);
}

.search-comment-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.search-comment-head {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

.search-comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.search-comment-target-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.search-comment-target-title a {
  color: inherit;
  text-decoration: none;
}

.search-comment-target-title a:hover {
  color: var(--primary);
}

.search-comment-body {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Адаптивность для мобильных */
@media (max-width: 640px) {
  .search-result-card {
    padding: 16px 18px !important;
  }

  .search-result-title {
    font-size: 17px;
  }

  .search-result-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-result-more {
    width: 100%;
  }

  .btn-read-more {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   ПРИКРЕПЛЕННЫЕ ФАЙЛЫ (ATTACHMENT.TPL) - СВЕТЛЫЙ СТИЛЬ
   ========================================================================== */

/* 1. Карточка доступного файла */
.attachment-file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin: 16px 0;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.attachment-file-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.attachment-file-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

/* Иконка файла */
.attachment-file-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attachment-file-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Имя файла */
.attachment-file-name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-download-link {
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.attachment-download-link:hover {
  color: var(--primary);
}

/* Мета-данные файла (вес, скачивания) */
.attachment-file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.attachment-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.chip-size {
  color: var(--primary);
  font-weight: 700;
}

/* Блок кнопок */
.attachment-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.attachment-online-btn {
  font-size: 12.5px;
}

.attachment-download-btn {
  font-size: 12.5px;
  box-shadow: 0 2px 8px rgba(109, 74, 255, 0.25);
}

.attachment-download-btn:hover {
  box-shadow: 0 4px 14px rgba(109, 74, 255, 0.35);
}

/* 2. Карточка заблокированного файла */
.attachment-locked-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin: 16px 0;
}

.attachment-locked-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--warning-soft);
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attachment-locked-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.attachment-locked-text strong {
  font-size: 13.5px;
  color: var(--text);
}

.attachment-locked-text span {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.attachment-locked-text a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

.attachment-locked-text a:hover {
  text-decoration: none;
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 640px) {
  .attachment-file-card {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .attachment-file-actions {
    width: 100%;
    flex-direction: column;
  }

  .attachment-file-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ (USERINFO.TPL): СИСТЕМА ВКЛАДОК И СТИЛИ
   ========================================================================== */

.profile-main-wrapper {
  padding: 0 !important;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin-bottom: 40px;
}

/* 1. Херо-карточка профиля */
.profile-card-hero {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.profile-cover-gradient {
  height: 150px;
  background: linear-gradient(135deg, rgba(109, 74, 255, 0.15) 0%, rgba(14, 165, 233, 0.12) 100%);
  border-bottom: 1px solid var(--border);
}

.profile-hero-inner {
  padding: 0 32px 20px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  position: relative;
  flex-wrap: wrap;
}

/* Аватар */
.profile-avatar-box {
  position: relative;
  margin-top: -65px;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  border: 4px solid var(--surface);
  object-fit: cover;
  background: var(--surface-soft);
  box-shadow: var(--shadow-md);
  display: block;
}

.profile-status-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #fff;
}

.profile-status-dot.online {
  background-color: var(--success);
  box-shadow: 0 0 0 2px rgba(24, 169, 87, 0.2);
}

.profile-status-dot.offline {
  background-color: var(--text-muted);
}

/* Имя и мета */
.profile-identity {
  flex: 1;
  padding-bottom: 6px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.profile-username {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.profile-subtext {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.profile-subtext .sep {
  color: var(--border-strong);
}

/* Кнопки действий */
.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
}

.profile-action-btn.pm-btn a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.profile-action-btn.pm-btn a:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.profile-ignore-link a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  text-decoration: none;
  transition: var(--transition);
}

.profile-ignore-link a:hover {
  background: var(--danger);
  color: #fff;
}

/* 2. Навигационные вкладки */
.profile-tabs-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 32px;
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
}

.profile-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.profile-tab-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.profile-tab-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.profile-tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(109, 74, 255, 0.25);
}

.profile-tab-btn.active svg {
  stroke: #fff;
}

/* 3. Управление отображением вкладок */
.profile-tabs-content {
  padding: 32px;
}

.profile-tab-pane {
  display: none;
}

.profile-tab-pane.active {
  display: block;
  animation: fadeInPane 0.22s ease-in-out forwards;
}

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

/* 4. Сетка статистики */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.p-stat-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.p-stat-card:hover {
  border-color: var(--primary-border);
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xs);
}

.p-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.p-stat-icon svg {
  width: 22px;
  height: 22px;
}

.icon-purple { background: var(--primary-soft); color: var(--primary); }
.icon-teal   { background: var(--success-soft); color: var(--success); }
.icon-amber  { background: var(--warning-soft); color: var(--warning); }
.icon-blue   { background: var(--info-soft); color: var(--info); }

.p-stat-data {
  display: flex;
  flex-direction: column;
}

.p-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.p-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

/* 5. Паспорт и Подпись */
.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.profile-info-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.p-block-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.p-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p-info-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.p-info-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.p-info-list .label {
  color: var(--text-muted);
  font-weight: 600;
}

.p-info-list .val {
  color: var(--text);
  text-align: right;
}

.p-signature-box {
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  border-left: 3px solid var(--primary);
  font-style: italic;
}

.p-empty-stub {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-soft);
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px dashed var(--border-strong);
}

/* 6. Форма настроек профиля (Вкладка 2) */
.p-settings-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.p-settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.p-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.p-section-heading svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.p-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.full-width {
  grid-column: span 2;
}

.p-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p-field-group label:not(.p-checkbox-label) {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.p-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.p-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
}

.p-soc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.p-sub-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.p-form-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 980px) {
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px 20px;
  }
  .profile-avatar-box {
    margin-top: -55px;
  }
  .profile-name-row,
  .profile-subtext {
    justify-content: center;
  }
  .profile-header-actions {
    width: 100%;
    justify-content: center;
  }
  .profile-tabs-nav {
    padding: 8px 16px;
    overflow-x: auto;
  }
  .profile-tabs-content {
    padding: 20px;
  }
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }
  .p-form-grid {
    grid-template-columns: 1fr;
  }
  .full-width {
    grid-column: span 1;
  }
  .p-form-submit-bar {
    flex-direction: column;
    gap: 12px;
  }
  .p-form-submit-bar .btn {
    width: 100%;
  }
}

/* Контейнер формы поиска */
.search-input-shell {
  display: flex;
  align-items: center;
  border-radius: var(--radius-full);
  padding: 6px 10px 6px 16px;
  position: relative;
  transition: var(--transition);
  width: 100%;
}

.search-shell-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 10px;
}

.search-input-shell input[type="text"] {
  flex: 1;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: 14px;
  padding: 4px 0;
  min-width: 0;
}

.search-input-shell input[type="text"]::placeholder {
  color: var(--text-muted);
}

/* Кнопка отправки */
.search-submit-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 8px;
  transition: var(--transition);
}

.search-submit-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* Шорткат / Ссылка на расширенный поиск */
.key-shortcut {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 7px;
  margin-left: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.key-shortcut:hover {
  color: var(--primary);
  border-color: var(--primary-border);
}

/* Стилизация встроенного всплывающего AJAX-окна подсказок DLE */
#searchsuggestions {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-md) !important;
  margin-top: 8px !important;
  padding: 8px 0 !important;
  font-family: inherit !important;
  z-index: 1000 !important;
  overflow: hidden;
}

#searchsuggestions .searchitem {
  padding: 8px 16px !important;
  font-size: 13.5px !important;
  color: var(--text) !important;
  transition: var(--transition) !important;
  border: none !important;
}

#searchsuggestions .searchitem:hover,
#searchsuggestions .selected {
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
}

#searchsuggestions .searchitem a {
  color: inherit !important;
  text-decoration: none !important;
  display: block;
}

#searchsuggestions .searchitem span {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* 1. Защита двухколоночного грида от переполнения */
.game-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px; /* minmax(0, 1fr) не дает левой колонке распирать сайт */
  gap: 32px;
  align-items: start;
}

/* 2. Защита контейнера статьи */
.game-main-col {
  min-width: 0;           /* Сбрасывает дефолтный min-width: auto */
  max-width: 100%;
  overflow-wrap: break-word; /* Переносит длинные слова и ссылки */
  word-break: break-word;
}

/* 3. Ограничение всех вложенных элементов в {full-story} */
.article-body {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Изображения внутри текста не должны вылезать за пределы */
.article-body img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--radius-md);
}

/* Адаптивность для видео и iframe (YouTube и др.) */
.article-body iframe,
.article-body video,
.article-body embed {
  max-width: 100% !important;
}

/* Защита таблиц от вылезания: добавляет горизонтальный скролл при необходимости */
.article-body table {
  max-width: 100% !important;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

/* Длинные фрагменты кода и теги pre */
.article-body pre,
.article-body code {
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 100%;
}

/* ==========================================================================
   ПАГИНАЦИЯ (NAVIGATION.TPL) - СВЕТЛЫЙ СТИЛЬ
   ========================================================================== */

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 36px 0 20px;
  width: 100%;
}

.pagination-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
  justify-content: center;
}

/* Кнопки Назад / Вперед */
.pagination-arrow-btn {
  display: inline-flex;
  align-items: center;
}

.pagination-arrow-btn a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  user-select: none;
}

.pagination-arrow-btn a:hover {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}

.pagination-arrow-btn a:active {
  transform: translateY(0);
}

/* Список страниц DLE ({pages}) */
.pagination-pages-list {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Обычные ссылки с номерами */
.pagination-pages-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.pagination-pages-list a:hover {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--primary);
}

/* Активная (текущая) страница */
.pagination-pages-list span:not(.nav_ext) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(109, 74, 255, 0.35);
  user-select: none;
}

/* Разделитель многоточия (...) в DLE */
.pagination-pages-list span.nav_ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 36px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  user-select: none;
}

/* Адаптивность для мобильных экранов */
@media (max-width: 580px) {
  .pagination-wrapper {
    gap: 4px;
    padding: 6px;
    border-radius: var(--radius-lg);
  }

  .pagination-arrow-btn a span {
    display: none; /* скрываем слова "Назад" / "Вперед", оставляя только стрелки */
  }

  .pagination-arrow-btn a {
    padding: 7px 10px;
  }

  .pagination-pages-list a,
  .pagination-pages-list span:not(.nav_ext) {
    min-width: 32px;
    height: 32px;
    font-size: 12.5px;
  }
}

/* ==========================================================================
   ИСПРАВЛЕНИЕ СЕТКИ GRID-4 И ВЫПАДАЮЩЕЙ ПАГИНАЦИИ
   ========================================================================== */

/* 1. Настройка сетки каталога */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

/* 2. ПРИНУДИТЕЛЬНО РАСТЯГИВАЕМ ПАГИНАЦИЮ НА ВСЮ ШИРИНУ СЕТКИ */
.grid-4 > .pagination-container {
  grid-column: 1 / -1 !important; /* Растягивает блок с 1-й по 4-ю колонку */
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 20px;
}

/* 2. ПРИНУДИТЕЛЬНО РАСТЯГИВАЕМ ПАГИНАЦИЮ НА ВСЮ ШИРИНУ СЕТКИ */
.grid-3 > .pagination-container {
  grid-column: 1 / -1 !important; /* Растягивает блок с 1-й по 4-ю колонку */
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 20px;
}
/* 3. Фикс карточек модов, чтобы ничего не наезжало */
.mod-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0; /* предотвращает распирание колонок */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mod-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

/* 4. Защита зоны обложки (если картинка пустая src="") */
.mod-tile-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #181a20; /* Фон-заглушка на случай пустой картинки */
  overflow: hidden;
  width: 100%;
}

.mod-tile-cover-link {
  display: block;
  width: 100%;
  height: 100%;
}

.mod-tile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 5. Кнопка избранного в углу превью */
.mod-tile-fav-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
}

.mod-tile-fav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.mod-tile-fav:hover {
  color: var(--danger);
  transform: scale(1.08);
}

/* 6. Нижняя часть карточки (аккуратные отступы и прижатый футер) */
.mod-tile-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mod-tile-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin: 4px 0 12px;
  /* Ограничиваем длинные названия двумя строками */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-tile-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mod-metrics-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.metric-node {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.metric-node strong {
  color: var(--text);
}

.mod-tile-dl-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.mod-tile-dl-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* 7. Адаптивность колонок */
@media (max-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ПАНЕЛЬ СОРТИРОВКИ МАТЕРИАЛОВ (DLE SORT)
   ========================================================================== */

.catalog-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 8px 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.sort-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  user-select: none;
}

.sort-bar-label svg {
  color: var(--primary);
}

.sort-bar-form {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

/* Список DLE */
ul.sort {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

ul.sort li {
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}

/* Кнопки-ссылки */
ul.sort li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-transform: capitalize;
  user-select: none;
  white-space: nowrap;
}

ul.sort li a:hover {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}

/* Активный пункт (по возрастанию .asc) */
ul.sort li.asc a {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(109, 74, 255, 0.3);
}

/* Активный пункт (по убыванию .desc) */
ul.sort li.desc a {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(109, 74, 255, 0.3);
}

/* Индикатор направления: Стрелка вверх (ASC) */
ul.sort li.asc a::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 2px solid #ffffff;
  border-top: 2px solid #ffffff;
  transform: rotate(-45deg);
  margin-left: 2px;
}

/* Индикатор направления: Стрелка вниз (DESC) */
ul.sort li.desc a::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg);
  margin-left: 2px;
  margin-top: -2px;
}

/* Адаптивность для мобильных экранов */
@media (max-width: 768px) {
  .catalog-sort-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }

  .sort-bar-form {
    width: 100%;
    justify-content: flex-start;
  }

  ul.sort {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  ul.sort::-webkit-scrollbar {
    height: 3px;
  }

  ul.sort::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
  }
}

/* ==========================================================================
   СТИЛИ КУПОНА ПРОМОКОДА (PROMOCODE-BOX) - LIGHT THEME
   ========================================================================== */

.promocode-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border: 2px dashed var(--primary-border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin: 24px 0;
  box-shadow: 0 4px 20px rgba(109, 74, 255, 0.06);
  background-image: radial-gradient(var(--surface-soft) 1px, transparent 1px);
  background-size: 14px 14px;
  overflow: hidden;
  transition: var(--transition);
}

.promocode-box:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(109, 74, 255, 0.12);
  transform: translateY(-1px);
}

/* Левая контентная часть */
.promocode-box__left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.promocode-box__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Сам код (стилизованный под билетный штамп) */
.promocode-box__code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(109, 74, 255, 0.25);
  padding: 6px 16px;
  border-radius: var(--radius-md);
  user-select: all;
  cursor: pointer;
  transition: var(--transition);
}

.promocode-box__code:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(109, 74, 255, 0.25);
}

.promocode-box__tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #b45309;
  background: var(--warning-soft);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Описание бонуса */
.promocode-box__reward {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

/* Строка статуса */
.promocode-box__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.status-check-ico {
  color: var(--success);
  flex-shrink: 0;
}

.promocode-box__status strong {
  color: var(--success);
  font-weight: 700;
}

/* Правая часть с кнопкой */
.promocode-box__right {
  flex-shrink: 0;
}

.btn-copy-promo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 13.5px;
  font-weight: 800;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(109, 74, 255, 0.3);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-copy-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(109, 74, 255, 0.45);
}

.btn-copy-promo:active {
  transform: translateY(0);
}

/* Состояние «Успешно скопировано» */
.btn-copy-promo.is-copied {
  background: var(--success) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.btn-copy-promo.is-copied .copy-ico-default {
  display: none !important;
}

.btn-copy-promo.is-copied .copy-ico-done {
  display: inline-block !important;
  color: #fff;
}

/* Адаптивность */
@media (max-width: 640px) {
  .promocode-box {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 16px;
  }

  .promocode-box__code {
    width: 100%;
    font-size: 18px;
  }

  .btn-copy-promo {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   СТИЛИ ШАПКИ, МОБИЛЬНОГО МЕНЮ И МОДАЛЬНОГО ОКНА (С СОЦСЕТЯМИ)
   ========================================================================== */

/* 1. Кнопки входа и регистрации на нижнем ярусе (deck-bottom-right) */
.deck-bottom-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-switch-dock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 6px;
  border-radius: var(--radius-md);
}

.dock-btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.dock-btn-login:hover {
  background: rgba(109, 74, 255, 0.25);
  color: #ffffff;
}

.dock-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
}

.dock-btn-register {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: var(--primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(109, 74, 255, 0.35);
  transition: var(--transition);
}

.dock-btn-register:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* 2. Обновленный выпадающий список каталога модов */
.simple-dropdown-menu {
  min-width: 250px;
  background: #141824;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.dropdown-link {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 12px !important;
  border-radius: var(--radius-md) !important;
  transition: var(--transition);
}

.dropdown-link:hover {
  background: rgba(109, 74, 255, 0.16) !important;
  transform: translateX(3px);
}

.dropdown-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
}

.dropdown-tag.tag-hot {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 3. Поиск внутри мобильного меню */
.drawer-search-box {
  width: 100%;
  margin-bottom: 4px;
}

.drawer-search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 14px;
}

.drawer-search-form svg {
  color: #64748b;
  margin-right: 8px;
  flex-shrink: 0;
}

.drawer-search-form input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: 13px;
  color: #fff;
  min-width: 0;
}

.drawer-search-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.drawer-search-form button:hover {
  background: var(--primary-hover);
}

.drawer-guest-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.user-sub-badge {
  font-size: 11px;
  color: #8b5cf6;
  font-weight: 600;
}

/* 4. Модальное окно авторизации */
.modal-dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-dialog-layer.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop-shell {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.7);
  backdrop-filter: blur(8px);
}

.modal-box-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
  z-index: 2;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog-layer.is-active .modal-box-card {
  transform: scale(1) translateY(0);
}

.modal-close-trigger {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-trigger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.modal-card-head {
  text-align: center;
  margin-bottom: 20px;
}

.modal-badge-ico {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.modal-card-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.modal-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Кнопки соцсетей (VK ID, Яндекс ID, Mail.ru) */
.modal-social-auth {
  margin-bottom: 18px;
}

.social-auth-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.social-auth-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.soc-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 8px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.soc-vk {
  background: #0077ff;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 119, 255, 0.25);
}
.soc-vk:hover {
  background: #0066dc;
  transform: translateY(-1px);
}

.soc-yandex {
  background: #fc3f1d;
  color: #fff;
  box-shadow: 0 2px 10px rgba(252, 63, 29, 0.25);
}
.soc-yandex:hover {
  background: #e03212;
  transform: translateY(-1px);
}

.soc-mailru {
  background: #005ff9;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 95, 249, 0.25);
}
.soc-mailru:hover {
  background: #0050d5;
  transform: translateY(-1px);
}

.modal-or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.modal-or-divider::before,
.modal-or-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px dashed var(--border);
}

.modal-or-divider span {
  padding: 0 10px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.form-forgot-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

.form-forgot-link:hover {
  text-decoration: underline;
}

.form-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-check-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-footer-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* 5. Скрытие строки поиска из первого яруса на мобильных устройствах */
@media (max-width: 940px) {
  .desktop-search-only {
    display: none !important;
  }
}

/* ==========================================================================
   ОБРАТНАЯ СВЯЗЬ (FEEDBACK.TPL) - СВЕТЛЫЙ СТИЛЬ
   ========================================================================== */

.feedback-card {
  max-width: 780px;
  margin: 32px auto 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px !important;
  box-shadow: var(--shadow-sm);
}

/* Шапка формы */
.feedback-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.feedback-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(109, 74, 255, 0.2);
}

.feedback-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 6px;
}

.feedback-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* Сетка полей ввода */
.feedback-form-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.col-span-2 {
  grid-column: span 2;
}

/* Стилизация выпадающего списка получателя DLE */
.custom-recipient-select select {
  width: 100%;
  padding: 11px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.custom-recipient-select select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Текстовая область */
.feedback-textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

/* Стилизация поля загрузки файлов */
.file-upload-box {
  position: relative;
  background: var(--surface-soft);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.file-upload-box:hover {
  border-color: var(--primary);
  background: var(--surface);
}

.file-upload-box svg {
  color: var(--primary);
}

.file-native-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-hint {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.recaptcha-center {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}

/* Подвал формы */
.feedback-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.feedback-submit-btn {
  margin-left: auto;
  box-shadow: 0 4px 14px rgba(109, 74, 255, 0.35);
}

.feedback-submit-btn:hover {
  box-shadow: 0 6px 20px rgba(109, 74, 255, 0.45);
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 640px) {
  .feedback-card {
    padding: 24px 18px !important;
    margin: 20px 0 40px;
  }

  .feedback-header {
    flex-direction: column;
    gap: 14px;
  }

  .feedback-title {
    font-size: 22px;
  }

  .feedback-form-grid {
    grid-template-columns: 1fr;
  }

  .col-span-2 {
    grid-column: span 1;
  }

  .feedback-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .feedback-submit-btn {
    width: 100%;
    margin-left: 0;
  }
}
/* ==========================================================================
   ИСПРАВЛЕНИЕ АДАПТИВНОСТИ ДВУХКОЛОНОЧНОГО МАКЕТА СТАТЬИ
   ========================================================================== */

/* 1. Перевод колонок статьи и сайдбара в 1 колонку на экранах <= 992px */
@media (max-width: 992px) {
  .game-content-layout {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .game-sidebar-col {
    width: 100% !important;
  }
}

/* 2. Защита от распирания контентом (таблицы, цитаты, код, картинки) */
.article-body {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

/* Принудительный горизонтальный скролл для таблиц внутри статьи */
.article-body table {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 20px 0;
}

.article-body table th,
.article-body table td {
  white-space: nowrap; /* сохраняет аккуратность ячеек при прокрутке */
  padding: 10px 14px;
}

/* Защита изображений и фреймов внутри текста */
.article-body img,
.article-body iframe,
.article-body video {
  max-width: 100% !important;
  height: auto !important;
}

/* 3. Адаптивность мета-панели и заголовка на смартфонах */
@media (max-width: 640px) {
  .article-title {
    font-size: 22px !important;
    line-height: 1.3 !important;
  }

  .article-meta-bar {
    gap: 10px !important;
    font-size: 12px !important;
  }

  .content-block {
    padding: 18px 16px !important; /* уменьшаем внутренние отступы карточек */
    border-radius: var(--radius-lg) !important;
  }

  .breadcrumbs {
    font-size: 12px !important;
    margin-bottom: 16px !important;
  }
}

/* ==========================================================================
   ОБНОВЛЕННАЯ ГЛАВНАЯ СТРАНИЦА И УНИКАЛЬНЫЙ FAQ АККОРДЕОН
   ========================================================================== */

/* Обертка для рекомендуемого материала в Hero */
.hero-featured-wrap {
  width: 100%;
}

/* ==========================================================================
   FAQ АККОРДЕОН (NEO-CLEAN STYLE)
   ========================================================================== */
.faq-interactive-section {
  padding-bottom: 70px;
}

.faq-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px;
}

.faq-section-header .badge {
  margin-bottom: 12px;
}

.faq-main-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.faq-main-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-accordion-wrapper {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Карточка элемента FAQ */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  border-color: var(--primary-border);
}

.faq-item.active {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(109, 74, 255, 0.08);
}

/* Кнопка-вопрос */
.faq-question-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  user-select: none;
}

.faq-question-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  transition: color 0.2s ease;
}

.faq-item:hover .faq-question-text,
.faq-item.active .faq-question-text {
  color: var(--primary);
}

/* Круглая стрелка поворота */
.faq-icon-rot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s, color 0.2s;
}

.faq-item.active .faq-icon-rot {
  transform: rotate(180deg);
  background: var(--primary);
  color: #ffffff;
}

/* Раскрывающийся ответ */
.faq-answer-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer-collapse {
  max-height: 500px; /* Достаточный запас для текста */
}

.faq-answer-content {
  padding: 0 24px 22px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  border-top: 1px dashed transparent;
}

.faq-item.active .faq-answer-content {
  border-top-color: var(--border);
  padding-top: 16px;
}

.faq-answer-content p {
  margin-bottom: 12px;
}

.faq-answer-content p:last-child {
  margin-bottom: 0;
}

.faq-answer-content ul {
  padding-left: 20px;
  margin: 10px 0 12px;
}

.faq-answer-content li {
  margin-bottom: 6px;
}

.faq-answer-content strong {
  color: var(--text);
}

.faq-answer-content code {
  background: var(--surface-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
  color: var(--primary);
  border: 1px solid var(--border);
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ FAQ
   ========================================================================== */
@media (max-width: 640px) {
  .faq-main-title {
    font-size: 24px;
  }
  .faq-question-btn {
    padding: 16px 18px;
    gap: 12px;
  }
  .faq-question-text {
    font-size: 14.5px;
  }
  .faq-answer-content {
    padding: 0 18px 18px;
    font-size: 13.5px;
  }
}

/* Выравниваем содержимое шапки секции по верхнему краю */
.section-header {
  align-items: flex-start !important;
}

/* Фиксируем кнопку от смещения и сжатия при длинном описании */
.section-header .btn {
  flex-shrink: 0;
  margin-top: 6px;
}

/* Ограничиваем ширину текстового блока, чтобы он не упирался в кнопку */
.section-title-wrap {
  flex: 1;
 
  min-width: 0;
}

/* ==========================================================================
   ФИЛЬТРЫ ПРОЕКТОВ И ПРЕСЕТОВ (PROJECTS-PRESETS-FILTER)
   ========================================================================== */

.projects-presets-filter {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 10px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

/* Блок отдельной группы фильтра */
.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Лейбл группы */
.filter-group-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
  white-space: nowrap;
}

.filter-group-label svg {
  color: var(--primary);
}

/* Контейнер кнопок-ссылок */
.filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Базовый чип ссылки */
.filter-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition: var(--transition);
}

.filter-tab-link:hover {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}

.filter-tab-link:active {
  transform: translateY(0);
}

/* Активное состояние фильтра */
.filter-tab-link.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 12px rgba(109, 74, 255, 0.35);
}

/* Разделитель между группами */
.filter-group-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* Цветовые индикаторы для пресетов */
.tab-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ind-fps {
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(24, 169, 87, 0.2);
}

.ind-balanced {
  background: var(--warning);
  box-shadow: 0 0 0 2px rgba(233, 155, 24, 0.2);
}

/* Ховеры с сохранением цвета текста для спец-тегов */
.filter-tab-link.tab-fps:hover {
  border-color: rgba(24, 169, 87, 0.4);
  color: #0e8341;
}

.filter-tab-link.tab-balanced:hover {
  border-color: rgba(233, 155, 24, 0.4);
  color: #b45309;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И СМАРТФОНОВ
   ========================================================================== */
@media (max-width: 900px) {
  .projects-presets-filter {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .filter-group {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .filter-tabs::-webkit-scrollbar {
    height: 3px;
  }

  .filter-tabs::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
  }

  .filter-group-divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    margin: 2px 0;
  }
}

/* ==========================================================================
   ИНФО-КАРТОЧКА: УСТАНОВКА РЕДУКСА
   ========================================================================== */

.redux-install-notice-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin: 32px 0 40px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.redux-install-notice-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.install-notice-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.install-notice-body {
  flex: 1;
  min-width: 0;
}

.install-notice-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.install-notice-desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.install-notice-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.install-notice-link:hover {
  color: var(--primary-hover);
  transform: translateX(3px);
}

/* ==========================================================================
   FAQ СЕКЦИЯ НА DETAILS & SUMMARY
   ========================================================================== */

.faq-details-section {
  margin: 40px 0 60px;
}

.faq-details-header {
  margin-bottom: 24px;
}

.faq-details-header .badge {
  margin-bottom: 8px;
}

.faq-details-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 6px;
}

.faq-details-subtitle {
  font-size: 14.5px;
  color: var(--text-secondary);
}

.faq-accordion-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Элемент details */
.faq-details-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-details-item:hover {
  border-color: var(--primary-border);
}

.faq-details-item[open] {
  border-color: var(--primary);
  box-shadow: 0 4px 18px rgba(109, 74, 255, 0.08);
}

/* Заголовок-кнопка summary */
.faq-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  list-style: none; /* Убирает дефолтный треугольник браузера */
  user-select: none;
  transition: color 0.2s ease;
}

.faq-details-summary::-webkit-details-marker {
  display: none; /* Убирает треугольник в Safari */
}

.faq-details-summary:hover {
  color: var(--primary);
}

.faq-summary-title {
  line-height: 1.35;
}

/* Круглая стрелка поворота */
.faq-icon-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.faq-details-item[open] .faq-icon-arrow {
  transform: rotate(180deg);
  background: var(--primary);
  color: #ffffff;
}

/* Раскрывающийся контент */
.faq-details-content {
  padding: 0 22px 20px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.faq-details-content strong {
  color: var(--text);
}

.faq-details-content code {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 13px;
  color: var(--primary);
}

/* ==========================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */

@media (max-width: 640px) {
  .redux-install-notice-card {
    flex-direction: column;
    padding: 20px 18px;
    gap: 14px;
  }

  .install-notice-title {
    font-size: 18px;
  }

  .install-notice-desc {
    font-size: 13.5px;
  }

  .faq-details-title {
    font-size: 22px;
  }

  .faq-details-summary {
    padding: 16px 18px;
    font-size: 14.5px;
  }

  .faq-details-content {
    padding: 0 18px 16px;
    padding-top: 12px;
    font-size: 13.5px;
  }
}

/* ==========================================================================
   СЕКЦИЯ ВЫБОРА РЕДУКСА И ТАБЛИЦА ПРЕСЕТОВ
   ========================================================================== */

.redux-picker-section {
  margin: 36px 0 44px;
}

/* Шапка секции */
.redux-picker-header {
  margin-bottom: 22px;
}

.redux-picker-header .badge {
  margin-bottom: 8px;
}

.redux-picker-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.4px;
}

.redux-picker-desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 860px;
}

/* Оболочка таблицы */
.preset-table-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: var(--transition);
}

.preset-table-shell:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

/* Базовая таблица */
.preset-custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.preset-custom-table thead th {
  background: var(--surface-soft);
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
}

.preset-custom-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.18s ease;
}

.preset-custom-table tbody tr:last-child {
  border-bottom: none;
}

.preset-custom-table tbody tr:hover {
  background-color: #fafbfe;
}

.preset-custom-table tbody td {
  padding: 16px 20px;
  vertical-align: middle;
  font-size: 14px;
}

/* Колонка 1: Вариант (иконка + название + мини-тег) */
.preset-lead-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preset-ico-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ico-fps { background: var(--success-soft); border: 1px solid rgba(24, 169, 87, 0.2); }
.ico-balance { background: var(--warning-soft); border: 1px solid rgba(233, 155, 24, 0.2); }
.ico-gta5rp { background: var(--info-soft); border: 1px solid rgba(14, 165, 233, 0.2); }
.ico-majestic { background: #fef2f2; border: 1px solid rgba(220, 38, 38, 0.2); }

.preset-name-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preset-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

.preset-sub-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
}

.tag-fps { color: var(--success); background: rgba(24, 169, 87, 0.1); }
.tag-balance { color: var(--warning); background: rgba(233, 155, 24, 0.1); }
.tag-gta5rp { color: var(--info); background: rgba(14, 165, 233, 0.1); }
.tag-majestic { color: #dc2626; background: rgba(220, 38, 38, 0.1); }

/* Колонка 2: Для кого */
.preset-target-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Колонка 3: Задача */
.preset-task-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Колонка 4: Кнопка действия */
.preset-action-cell {
  text-align: right;
}

.preset-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
  transition: var(--transition);
  white-space: nowrap;
}

.preset-cta-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(109, 74, 255, 0.25);
  transform: translateY(-1px);
}

.preset-cta-btn:hover svg {
  transform: translateX(2px);
}

.preset-cta-btn svg {
  transition: transform 0.2s ease;
}

/* ==========================================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (ТРАНСФОРМАЦИЯ В КАРТОЧКИ <= 680px)
   ========================================================================== */
@media (max-width: 680px) {
  .preset-table-shell {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .preset-custom-table,
  .preset-custom-table tbody,
  .preset-custom-table tr,
  .preset-custom-table td {
    display: block;
    width: 100%;
  }

  .preset-custom-table thead {
    display: none; /* Скрываем шапку на мобилках */
  }

  .preset-custom-table tbody tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-xs);
  }

  .preset-custom-table tbody tr:hover {
    background: var(--surface);
    border-color: var(--primary-border);
  }

  .preset-custom-table tbody td {
    padding: 6px 0;
    border: none;
  }

  .preset-custom-table tbody td[data-label="Вариант"] {
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 8px;
  }

  .preset-custom-table tbody td[data-label="Для кого"]::before {
    content: "Для кого: ";
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 6px;
  }

  .preset-custom-table tbody td[data-label="Задача"] {
    margin: 4px 0 10px;
  }

  .preset-custom-table tbody td.preset-action-cell {
    text-align: left;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
  }

  .preset-cta-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 0;
  }

  .redux-picker-title {
    font-size: 20px;
  }
}

/* ==========================================================================
   МОНИТОРИНГ СЕРВЕРОВ (LIGHT & NEO-CLEAN)
   ========================================================================== */

/* 1. Верхний баннер со статистикой */
.monitoring-hero-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 44px;
  background-image: radial-gradient(rgba(109, 74, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.monitoring-head-title {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 36px;
}

.monitoring-head-title .badge {
  margin-bottom: 12px;
}

.monitoring-h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.monitoring-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Сетка карточек общего онлайна */
.monitoring-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.mon-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.mon-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.mon-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-total .mon-stat-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-card-majestic .mon-stat-icon {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
}

.stat-card-gta5rp .mon-stat-icon {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}

.mon-project-abbr {
  font-weight: 900;
  font-size: 18px;
}

.mon-stat-val {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  font-feature-settings: "tnum";
}

.mon-stat-val.text-majestic { color: #dc2626; }
.mon-stat-val.text-gta5rp { color: #2563eb; }

.mon-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 3px;
}

/* 2. Панель управления и фильтры */
.monitoring-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 12px 18px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.mon-filter-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mon-filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.mon-filter-btn:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--primary-border);
}

.mon-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(109, 74, 255, 0.3);
}

/* Поле поиска сервера */
.mon-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 280px;
}

.mon-search-ico {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.mon-search-input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: var(--transition);
}

.mon-search-input:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* 3. Сетка карточек серверов */
.monitoring-servers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  position: relative;
}

.server-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.server-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
}

.badge-majestic {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.badge-gta5rp {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.server-copy-ip-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
}

.server-copy-ip-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.server-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 14px;
}

.online-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.online-indicators {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--text);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(24, 169, 87, 0.2);
}

.online-percent-num {
  font-weight: 800;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Прогресс-бар заполненности */
.online-bar-bg {
  height: 7px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.online-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.bar-majestic {
  background: linear-gradient(90deg, #f87171 0%, #dc2626 100%);
}

.bar-gta5rp {
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
}

/* 4. SEO-блок */
.seo-content-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
}

.seo-content-card h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 28px 0 12px;
  color: var(--text);
}

.seo-content-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.seo-split-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.seo-col-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.seo-col-box h3 {
  margin-top: 0;
}

.seo-specs-list {
  padding-left: 20px;
  margin: 14px 0 24px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.7;
}

.seo-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.seo-step-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.seo-step-card strong {
  font-size: 14px;
  color: var(--text);
}

.seo-step-card span {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   АДАПТИВНОСТЬ СТРАНИЦЫ МОНИТОРИНГА
   ========================================================================== */
@media (max-width: 1200px) {
  .monitoring-servers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .monitoring-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .monitoring-servers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .seo-split-cols,
  .seo-steps-grid {
    grid-template-columns: 1fr;
  }
  .monitoring-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .mon-filter-buttons {
    width: 100%;
    overflow-x: auto;
  }
  .mon-search-wrapper {
    width: 100%;
  }
}

@media (max-width: 580px) {
  .monitoring-servers-grid {
    grid-template-columns: 1fr;
  }
  .monitoring-h1 {
    font-size: 24px;
  }
}

/* ==========================================================================
   КОНФИГУРАТОР SETTINGS.XML (LIGHT MODERN ADAPTIVE)
   ========================================================================== */

.wrapperset {
  width: 100%;
  max-width: 1040px;
  margin: 32px auto 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 1. Карточка шапки */
.cfg-header-card {
  text-align: center;
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.cfg-header-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, #0ea5e9 100%);
}

.cfg-header-card .badge {
  margin-bottom: 12px;
}

.cfg-main-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.4px;
}

.cfg-main-title span {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cfg-subtitle {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
}

/* 2. Основная панель настроек */
.settings-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Навигационные табы */
.tabs-scroll-wrapper {
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.tabs-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}

.tabs-scroll-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-soft);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

/* Содержимое вкладок */
.tab-content {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.tab-content.active {
  display: flex;
  animation: tabFadeIn 0.22s ease-in-out forwards;
}

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

.tab-sub-head h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

/* Элементы форм */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}

.form-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label-row label,
.switch-text-group label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  transition: var(--transition);
}

.info-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.description {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Кастомный селект */
.cfg-select {
  width: 100%;
  padding: 10px 38px 10px 14px;
  background-color: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23626a7a' stroke-width='2.5'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: var(--transition);
}

.cfg-select:focus,
.form-control:focus {
  background-color: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Двухколоночный ряд */
.cfg-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Ползунки Range */
.range-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  accent-color: var(--primary);
}

.range-value {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  min-width: 82px;
  text-align: center;
}

/* Переключатели Switch */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.switch-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background-color: var(--border-strong);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Панель кнопок */
.action-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}

.btn-download-cfg {
  flex: 1.4;
}

.btn-copy-cfg {
  flex: 1;
}

/* 3. Инструкция по установке */
.instructions-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

.instructions-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.instructions-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.instructions-head h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.instructions-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.instructions-list strong {
  color: var(--text);
}

.instructions-list kbd {
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.instructions-list code {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12.5px;
  color: var(--primary);
  word-break: break-all;
}

/* Всплывающий тост */
.cfg-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 700;
  z-index: 1200;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cfg-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И МОБИЛЬНЫХ ЭКРАНОВ
   ========================================================================== */
@media (max-width: 768px) {
  .wrapperset {
    margin: 20px auto 40px;
    gap: 18px;
  }

  .cfg-header-card,
  .settings-panel,
  .instructions-card {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }

  .cfg-main-title {
    font-size: 22px;
  }

  .cfg-form-row {
    grid-template-columns: 1fr;
  }

  .action-footer {
    flex-direction: column;
  }

  .action-footer .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .range-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}

/* Центрирование рекламного блока в сайдбаре */
.ad-banner-box {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  text-align: center !important;
  padding: 16px 0 !important;
  box-sizing: border-box !important;
}

/* Растягивание контейнеров DLE и центрирование содержимого */
.ad-banner-box .dle_b_apps,
.ad-banner-box .dle_b_apps > div {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}

/* Центрирование самой обертки баннера и маркировки */
.ad-banner-box .image-container {
  display: inline-block !important;
  margin: 0 auto !important;
  position: relative !important;
  max-width: 100% !important;
}

/* Корректное отображение самого баннера внутри */
.ad-banner-box .image-container img {
  margin: 0 auto !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--radius-md) !important;
}

/* ==========================================================================
   УНИВЕРСАЛЬНЫЕ КАРТОЧКИ ПОИСКА (SEARCH RESULT ROWS)
   ========================================================================== */

/* Контейнер строки */
.search-row-item {
  display: flex;
  align-items: stretch;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.search-row-item:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

/* Левая колонка с обложкой */
.search-row-media {
  width: 140px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #111420;
  flex-shrink: 0;
  align-self: center;
}

.search-row-media a {
  display: block;
  width: 100%;
  height: 100%;
}

.search-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.search-row-item:hover .search-row-media img {
  transform: scale(1.06);
}

/* Заглушка, если обложки нет */
.search-row-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  color: var(--text-muted);
}

/* Центральное тело карточки */
.search-row-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0; /* предотвращает распирание flex-элемента */
}

/* Верхняя мета-строка */
.search-row-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.search-cat-chip a,
.search-cat-chip {
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.search-cat-chip a:hover {
  text-decoration: underline;
}

.search-date {
  color: var(--text-muted);
  font-weight: 500;
}

/* Заголовок карточки */
.search-row-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 6px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-row-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.search-row-title a:hover {
  color: var(--primary);
}

/* Сниппет текста */
.search-row-snippet {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Подвал строки */
.search-row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  gap: 12px;
}

.search-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.search-metric {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.search-metric svg {
  color: var(--text-muted);
}

/* Кнопка перехода */
.search-btn-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.search-btn-goto:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateX(2px);
}

/* Карточка найденного комментария */
.search-row-comment {
  border-left: 3px solid var(--info);
}

.search-comment-author {
  font-size: 12.5px;
  color: var(--text-muted);
}

.search-comment-author b {
  color: var(--text);
}

/* ==========================================================================
   АДАПТИВНОСТЬ КАРТОЧЕК ПОИСКА
   ========================================================================== */
@media (max-width: 680px) {
  .search-row-item {
    flex-direction: column;
    padding: 16px;
    gap: 14px;
  }

  .search-row-media {
    width: 100%;
    height: 150px;
    align-self: stretch;
  }

  .search-row-title {
    white-space: normal; /* на мобилках переносим на 2-3 строки */
    font-size: 16px;
  }

  .search-row-footer {
    flex-wrap: wrap;
  }

  .search-btn-goto {
    width: 100%;
    justify-content: center;
    padding: 8px 0;
  }
}

/* ==========================================================================
   СТИЛИЗАЦИЯ JQUERY UI ОКНА ЖАЛОБЫ DLE (.dle-popup-complaint)
   ========================================================================== */

/* 1. Родительский контейнер модального окна */
.ui-dialog.dle-popup-complaint {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18) !important;
  padding: 0 !important;
  overflow: hidden !important;
  max-height: none !important; /* Сбрасываем жесткий инлайн-лимит DLE в 195px */
  height: auto !important;
  font-family: var(--font-family) !important;
  z-index: 1100 !important;
  transition: transform 0.2s ease, opacity 0.2s ease !important;
}

/* 2. Шапка модального окна */
.ui-dialog.dle-popup-complaint .ui-dialog-titlebar {
  background: var(--surface) !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 18px 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
}

/* Заголовок окна */
.ui-dialog.dle-popup-complaint .ui-dialog-title {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  float: none !important;
}

/* Кнопка закрытия (крестик) */
.ui-dialog.dle-popup-complaint .ui-dialog-titlebar-close {
  position: static !important;
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: var(--surface-soft) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  outline: none !important;
  transition: var(--transition) !important;
}

.ui-dialog.dle-popup-complaint .ui-dialog-titlebar-close:hover {
  background: var(--danger-soft) !important;
  border-color: rgba(232, 76, 91, 0.3) !important;
  color: var(--danger) !important;
}

/* Скрытие дефолтной спрайт-иконки jQuery UI и замена на аккуратный SVG-крестик */
.ui-dialog.dle-popup-complaint .ui-dialog-titlebar-close .ui-button-icon {
  display: none !important;
}

.ui-dialog.dle-popup-complaint .ui-dialog-titlebar-close::before {
  content: '' !important;
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'><path d='M18 6L6 18M6 6l12 12'/></svg>") no-repeat center / contain !important;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'><path d='M18 6L6 18M6 6l12 12'/></svg>") no-repeat center / contain !important;
}

/* 3. Тело формы жалобы (#dlecomplaint) */
.ui-dialog.dle-popup-complaint .ui-dialog-content#dlecomplaint {
  padding: 22px 24px !important;
  background: var(--surface) !important;
  color: var(--text-secondary) !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  overflow: visible !important;
  height: auto !important;
  min-height: auto !important;
}

/* Текстовая область жалобы */
.ui-dialog.dle-popup-complaint textarea#dle-promt-text {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 10px !important;
  padding: 12px 16px !important;
  background: var(--surface-soft) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-family) !important;
  font-size: 14px !important;
  color: var(--text) !important;
  line-height: 1.55 !important;
  outline: none !important;
  resize: vertical !important;
  min-height: 110px !important;
  transition: var(--transition) !important;
}

.ui-dialog.dle-popup-complaint textarea#dle-promt-text:focus {
  background: var(--surface) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-soft) !important;
}

/* 4. Нижняя панель действий (кнопки) */
.ui-dialog.dle-popup-complaint .ui-dialog-buttonpane {
  background: var(--surface-soft) !important;
  border: none !important;
  border-top: 1px solid var(--border) !important;
  padding: 14px 24px !important;
  margin: 0 !important;
}

.ui-dialog.dle-popup-complaint .ui-dialog-buttonset {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  float: none !important;
}

/* Базовый вид всех кнопок в панели */
.ui-dialog.dle-popup-complaint .ui-dialog-buttonset button.ui-button {
  margin: 0 !important;
  padding: 9px 20px !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-family) !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
  transition: var(--transition) !important;
  line-height: 1.4 !important;
}

/* Первая кнопка: «Отмена» */
.ui-dialog.dle-popup-complaint .ui-dialog-buttonset button.ui-button:first-child {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
}

.ui-dialog.dle-popup-complaint .ui-dialog-buttonset button.ui-button:first-child:hover {
  background: var(--surface-accent) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
}

/* Вторая кнопка: «Отправить» */
.ui-dialog.dle-popup-complaint .ui-dialog-buttonset button.ui-button:last-child {
  background: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(109, 74, 255, 0.3) !important;
}

.ui-dialog.dle-popup-complaint .ui-dialog-buttonset button.ui-button:last-child:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  box-shadow: 0 5px 16px rgba(109, 74, 255, 0.45) !important;
  transform: translateY(-1px) !important;
}

.ui-dialog.dle-popup-complaint .ui-dialog-buttonset button.ui-button:last-child:active {
  transform: translateY(0) !important;
}

/* Подложка затемнения экрана от jQuery UI */
.ui-widget-overlay.ui-front {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(4px) !important;
  opacity: 1 !important;
  z-index: 1099 !important;
}

/* 5. Адаптивность для смартфонов (экраны до 640px) */
@media (max-width: 640px) {
  .ui-dialog.dle-popup-complaint {
    width: calc(100% - 32px) !important;
    left: 16px !important;
    right: 16px !important;
    max-width: none !important;
  }

  .ui-dialog.dle-popup-complaint .ui-dialog-titlebar,
  .ui-dialog.dle-popup-complaint .ui-dialog-content#dlecomplaint,
  .ui-dialog.dle-popup-complaint .ui-dialog-buttonpane {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .ui-dialog.dle-popup-complaint .ui-dialog-buttonset {
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }

  .ui-dialog.dle-popup-complaint .ui-dialog-buttonset button.ui-button {
    width: 100% !important;
  }
}

 .game-title {
      font-size: 17px;
      font-weight: 700;
      line-height: 1.35;
      color: var(--text);
     
    }
    
    /* ==========================================================================
   ДИНАМИЧЕСКАЯ ГАЛЕРЕЯ И LIGHTBOX-СЛАЙДЕР
   ========================================================================== */

.mod-gallery-pod {
  padding: 16px !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  margin-bottom: 24px;
}

/* Главный активный экран */
.gallery-active-view {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0f111a;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
}

.gallery-active-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.gallery-active-view:hover img {
  transform: scale(1.02);
}

.gallery-fullscreen-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  transition: var(--transition);
}

.gallery-active-view:hover .gallery-fullscreen-badge {
  background: var(--primary);
}

/* Полоса миниатюр */
.gallery-film-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.film-item {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: #111420;
  position: relative;
  transition: var(--transition);
}

.film-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.film-item:hover img,
.film-item.active img {
  opacity: 1;
}

.film-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

/* ==========================================================================
   ПОЛНОЭКРАННЫЙ LIGHTBOX СЛАЙДЕР
   ========================================================================== */

.gallery-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gallery-lightbox-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.94);
  backdrop-filter: blur(12px);
}

.lightbox-ui-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  box-sizing: border-box;
}

.lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: #fff;
  z-index: 5;
}

.lightbox-counter {
  font-family: monospace;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.lightbox-btn-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-btn-close:hover {
  background: var(--danger);
  border-color: var(--danger);
  transform: scale(1.08);
}

/* Сцена просмотра */
.lightbox-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 16px;
  margin: 10px 0;
}

.lightbox-stage {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-stage img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  user-select: none;
  animation: lightboxZoom 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxZoom {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Стрелки слайдера */
.lightbox-nav-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.lightbox-nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ СМАРТФОНОВ
   ========================================================================== */
@media (max-width: 768px) {
  .lightbox-ui-shell {
    padding: 14px;
  }

  .lightbox-nav-btn {
    position: absolute;
    bottom: 20px;
    width: 44px;
    height: 44px;
    z-index: 10;
  }

  .lightbox-nav-btn.btn-prev {
    left: 20px;
  }

  .lightbox-nav-btn.btn-next {
    right: 20px;
  }

  .lightbox-stage img {
    max-width: 96vw;
    max-height: 72vh;
  }

  .gallery-film-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   СТИЛИ БЛОКА FAQ ДЛЯ MAJESTIC RP (.rm-faq-box)
   ========================================================================== */

.rm-faq-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin: 24px auto;
  box-sizing: border-box;
}

/* Элемент аккордеона */
.rm-faq-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.rm-faq-node:hover {
  border-color: var(--primary-border);
}

.rm-faq-node.is-open {
  border-color: var(--primary);
  box-shadow: 0 4px 18px rgba(109, 74, 255, 0.08);
}

/* Кнопка с вопросом */
.rm-faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  text-align: left;
  user-select: none;
}

.rm-faq-quest {
  font-family: var(--font-family);
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  transition: color 0.2s ease;
}

.rm-faq-node:hover .rm-faq-quest,
.rm-faq-node.is-open .rm-faq-quest {
  color: var(--primary);
}

/* Круглая стрелка */
.rm-faq-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 13px;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, color 0.2s ease;
}

.rm-faq-node.is-open .rm-faq-arrow {
  transform: rotate(180deg);
  background: var(--primary);
  color: #ffffff;
}

/* Выдвижная область с ответом */
.rm-faq-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.rm-faq-pane {
  padding: 0 22px 20px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  border-top: 1px dashed transparent;
}

.rm-faq-node.is-open .rm-faq-pane {
  border-top-color: var(--border);
  padding-top: 14px;
}

.rm-faq-pane p {
  margin: 0;
}

/* Ссылки внутри ответов */
.rm-faq-pane .faq-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.18s ease;
}

.rm-faq-pane .faq-link:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* Адаптивность для мобильных */
@media (max-width: 640px) {
  .rm-faq-trigger {
    padding: 15px 16px;
    gap: 12px;
  }

  .rm-faq-quest {
    font-size: 14.5px;
  }

  .rm-faq-pane {
    padding: 0 16px 16px;
    padding-top: 12px;
    font-size: 13.5px;
  }

  .rm-faq-arrow {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
}

/* ==========================================================================
   ФИКСАЦИЯ КНОПОК В ШАПКЕ МАТЕРИАЛА (MOD-HEAD-BANNER)
   ========================================================================== */

/* 1. Родительский контейнер */
.mod-head-banner {
  display: flex !important;
  align-items: flex-start !important; /* Кнопки всегда прижаты к верхнему краю */
  justify-content: space-between !important;
  gap: 28px !important;
  flex-wrap: nowrap !important; /* Запрещаем перенос кнопок под заголовок на ПК */
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 30px;
  margin-bottom: 24px;
}

/* 2. Левая текстовая колонка с заголовком */
.mod-head-main {
  flex: 1 1 auto !important;
  min-width: 0 !important; /* Обязательно: предотвращает распирание flex-контейнера длинным текстом */
}

.mod-title-main {
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin: 10px 0 12px;
}

/* 3. Правый блок кнопок (фиксированная позиция) */
.mod-action-tools {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important; /* Запрещает сжатие кнопок */
  white-space: nowrap !important;
  margin-top: 2px; /* Выравнивание по верхнему уровню бейджей */
}

/* Страховка для вложенных ссылок и кнопок DLE */
.mod-action-tools > a,
.mod-action-tools .btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (ЭКРАНЫ <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .mod-head-banner {
    flex-direction: column !important;
    gap: 18px !important;
    padding: 20px 18px !important;
  }

  .mod-head-main {
    width: 100% !important;
  }

  .mod-title-main {
    font-size: 22px !important;
  }

  /* На смартфонах аккуратно растягиваем кнопки на всю ширину */
  .mod-action-tools {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
  }

  .mod-action-tools > a {
    flex: 1 !important;
  }

  .mod-action-tools .btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ==========================================================================
   ТИПОГРАФИКА И СИСТЕМНЫЕ ТЕГИ ВНУТРИ СТАТЕЙ (.article-body)
   ========================================================================== */

.article-body {
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.75;
  word-break: break-word;
}

/* 1. Абзацы */
.article-body p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body strong,
.article-body b {
  color: var(--text);
  font-weight: 700;
}

/* 2. Заголовки уровней H2, H3, H4 */
.article-body h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin: 36px 0 16px;
  letter-spacing: -0.3px;
  position: relative;
  display: flex;
  align-items: center;
}

.article-body h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
  margin-right: 10px;
  flex-shrink: 0;
}

.article-body h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin: 28px 0 12px;
}

.article-body h4 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 10px;
}

/* 3. Маркированные списки (UL, LI) */
.article-body ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-body ul > li {
  position: relative;
  padding-left: 24px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.article-body ul > li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.article-body ul > li > p {
  margin-bottom: 0;
  display: inline;
}

/* 4. Нумерованные списки (OL, LI) */
.article-body ol {
  list-style: none;
  counter-reset: custom-ol;
  padding: 0;
  margin: 18px 0 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-body ol > li {
  counter-increment: custom-ol;
  position: relative;
  padding-left: 38px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.article-body ol > li::before {
  content: counter(custom-ol);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  font-family: monospace;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-body ol > li > p {
  margin-bottom: 0;
  display: inline;
}

/* 5. Инлайн-код и консольные команды (CODE) */
.article-body code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  word-break: break-all;
}

/* 6. Цитаты и важные примечания (BLOCKQUOTE) */
.article-body blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--surface-soft);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
}

.article-body blockquote p {
  margin-bottom: 0;
}

/* 7. Ссылки внутри текста */
.article-body a:not(.btn):not(.preset-btn):not(.promocode-box__code) {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition);
}

.article-body a:not(.btn):not(.preset-btn):not(.promocode-box__code):hover {
  color: var(--primary-hover);
  text-decoration-color: transparent;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ СМАРТФОНОВ
   ========================================================================== */
@media (max-width: 640px) {
  .article-body {
    font-size: 14.5px;
    line-height: 1.65;
  }

  .article-body h2 {
    font-size: 20px;
    margin: 28px 0 14px;
  }

  .article-body h3 {
    font-size: 17px;
    margin: 22px 0 10px;
  }

  .article-body ul > li {
    padding-left: 20px;
  }

  .article-body ol > li {
    padding-left: 32px;
  }

  .article-body ol > li::before {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .article-body blockquote {
    padding: 14px 16px;
  }
}

/* ==========================================================================
   ИСПРАВЛЕНИЕ ТАБЛИЦ (.article-body table)
   ========================================================================== */

/* 1. Превращаем саму таблицу в блочный скролл-контейнер */
.article-body table {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-collapse: collapse !important;
  margin: 24px 0 !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-xs) !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
}

/* 2. Растягивание tbody */
.article-body table tbody {
  display: table !important;
  width: 100% !important;
  min-width: 580px; /* Минимальная ширина, чтобы текст не сминался в кашу при скролле */
}

/* 3. Оформление шапки */
.article-body table th {
  background: var(--surface-soft) !important;
  color: var(--text) !important;
  font-weight: 800 !important;
  font-size: 12.5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  text-align: left !important;
}

.article-body table th:last-child {
  border-right: none !important;
}

/* 4. Оформление ячеек */
.article-body table td {
  padding: 12px 16px !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  vertical-align: middle !important;
}

.article-body table td:last-child {
  border-right: none !important;
}

.article-body table tr:last-child td {
  border-bottom: none !important;
}

.article-body table tbody tr:hover td {
  background: rgba(109, 74, 255, 0.03) !important;
}

/* Акценты */
.article-body table td:first-child b,
.article-body table td:first-child strong {
  color: var(--primary) !important;
}

.article-body table td:nth-child(4) {
  font-weight: 700 !important;
  color: var(--text) !important;
}

/* 5. Полоса прокрутки для таблицы */
.article-body table::-webkit-scrollbar {
  height: 5px !important;
}

.article-body table::-webkit-scrollbar-track {
  background: var(--surface-soft) !important;
  border-radius: var(--radius-full) !important;
}

.article-body table::-webkit-scrollbar-thumb {
  background: var(--border-strong) !important;
  border-radius: var(--radius-full) !important;
}

.article-body table::-webkit-scrollbar-thumb:hover {
  background: var(--primary) !important;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И СМАРТФОНОВ (до 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Переводим таблицу в блочный скролл-режим, не ломая верстку страницы */
  .article-body table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
    margin: 20px 0 !important;
    border-radius: var(--radius-md) !important;
  }

  .article-body table th,
  .article-body table td {
    padding: 12px 14px !important;
    font-size: 13px !important;
  }

  /* Тонкий кастомный скроллбар при прокрутке таблицы */
  .article-body table::-webkit-scrollbar {
    height: 4px !important;
  }

  .article-body table::-webkit-scrollbar-track {
    background: var(--surface-soft) !important;
  }

  .article-body table::-webkit-scrollbar-thumb {
    background: var(--border-strong) !important;
    border-radius: var(--radius-full) !important;
  }

  .article-body table::-webkit-scrollbar-thumb:hover {
    background: var(--primary) !important;
  }
}

/* ==========================================================================
   СТИЛИЗАЦИЯ СИСТЕМНЫХ PUSH-УВЕДОМЛЕНИЙ DLE (#DLEPush / jGrowl)
   ========================================================================== */

/* 1. Главный контейнер очереди уведомлений */
#DLEPush.DLEPush {
  position: fixed !important;
  z-index: 99999 !important;
  font-family: var(--font-family) !important;
  pointer-events: none;
}

#DLEPush.top-right {
  top: 24px !important;
  right: 24px !important;
  bottom: auto !important;
  left: auto !important;
}

/* 2. Карточка уведомления */
.DLEPush-notification.wrapper {
  pointer-events: auto;
  position: relative;
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  min-width: 300px;
  max-width: 420px;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 16px 42px 16px 18px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  backdrop-filter: blur(10px) !important;
  color: var(--text) !important;
  box-sizing: border-box !important;
  animation: pushSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Пустые сервисные контейнеры DLE */
.DLEPush-notification:empty {
  display: none !important;
}

/* 3. Иконка уведомления */
.DLEPush-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: var(--radius-md) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.DLEPush-icon svg {
  width: 20px !important;
  height: 20px !important;
}

/* 4. Текстовая область */
.DLEPush-message {
  flex: 1 !important;
  min-width: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  color: var(--text-secondary) !important;
}

.DLEPush-message li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.DLEPush-header:not(:empty) {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  margin-bottom: 4px !important;
}

/* 5. Кнопка закрытия (крестик) */
.DLEPush-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 26px !important;
  height: 26px !important;
  background: var(--surface-soft) !important;
  border: 1px solid var(--border) !important;
  border-radius: 50% !important;
  color: var(--text-muted) !important;
  font-size: 16px !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: var(--transition) !important;
  outline: none !important;
}

.DLEPush-close:hover {
  background: var(--danger-soft) !important;
  border-color: rgba(232, 76, 91, 0.3) !important;
  color: var(--danger) !important;
  transform: scale(1.05);
}

/* ==========================================================================
   ЦВЕТОВЫЕ МОДИФИКАТОРЫ СТАТУСОВ (ОШИБКА, УСПЕХ, ИНФО)
   ========================================================================== */

/* Ошибка (push-error) */
.DLEPush-notification.push-error {
  border-left: 4px solid var(--danger) !important;
}

.DLEPush-notification.push-error .DLEPush-icon {
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
  border: 1px solid rgba(232, 76, 91, 0.2) !important;
}

/* Успешное действие (push-success) */
.DLEPush-notification.push-success {
  border-left: 4px solid var(--success) !important;
}

.DLEPush-notification.push-success .DLEPush-icon {
  background: var(--success-soft) !important;
  color: var(--success) !important;
  border: 1px solid rgba(24, 169, 87, 0.2) !important;
}

/* Информационное уведомление / Предупреждение */
.DLEPush-notification.push-info,
.DLEPush-notification:not(.push-error):not(.push-success) {
  border-left: 4px solid var(--primary) !important;
}

.DLEPush-notification.push-info .DLEPush-icon,
.DLEPush-notification:not(.push-error):not(.push-success) .DLEPush-icon {
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary-border) !important;
}

/* Анимация появления */
@keyframes pushSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ СМАРТФОНОВ
   ========================================================================== */
@media (max-width: 540px) {
  #DLEPush.top-right {
    top: 16px !important;
    right: 16px !important;
    left: 16px !important;
    width: auto !important;
  }

  .DLEPush-notification.wrapper {
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 14px 38px 14px 14px !important;
  }

  .DLEPush-message {
    font-size: 13px !important;
  }
}

/* ==========================================================================
   СТРАНИЦА СТАТИСТИКИ САЙТА (STATS.TPL)
   ========================================================================== */

.stats-page-card {
  width: 100%;
  max-width: 1040px;
  margin: 32px auto 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 1. Карточка шапки */
.stats-hero-header {
  text-align: center;
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.stats-hero-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, #0ea5e9 100%);
}

.stats-hero-header .badge {
  margin-bottom: 12px;
}

.stats-main-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.4px;
}

.stats-subtitle {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 660px;
  margin: 0 auto 28px;
}

/* Сетка интервалов активности */
.stats-period-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
}

.stats-period-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: var(--transition);
}

.stats-period-box:hover {
  background: var(--surface);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-xs);
}

.stats-period-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.period-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-day { background: #10b981; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); }
.dot-week { background: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
.dot-month { background: #8b5cf6; box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2); }

.period-name {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
}

.stats-period-val {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.stats-period-val b {
  color: var(--text);
  font-weight: 700;
}

.stats-period-val .sep {
  color: var(--text-muted);
  font-size: 11px;
}

/* 2. Основное тело статистики */
.stats-body-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Сетка карточек по категориям */
.stats-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
}

.stat-group-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.stat-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}

.stat-group-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-primary { background: var(--primary-soft); color: var(--primary); }
.icon-info { background: #e0f2fe; color: #0284c7; }
.icon-success { background: #dcfce7; color: #16a34a; }

.stat-group-head h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

/* Списки метрик */
.stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.stat-count {
  font-family: monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  background: var(--surface-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.count-success { color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; }
.count-warning { color: #d97706; background: #fffbeb; border-color: #fde68a; }
.count-danger { color: #dc2626; background: #fef2f2; border-color: #fecaca; }

.stat-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.stat-link-btn:hover {
  color: var(--primary-hover);
  transform: translateX(2px);
}

/* Технический баннер базы данных */
.stat-tech-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}

.stat-tech-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.stat-tech-left svg {
  color: var(--primary);
}

.stat-db-badge {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-border);
}

/* 3. Секция Топ Пользователей */
.stats-top-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

.stats-top-head {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.stats-top-head h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 6px 0 0;
}

/* Стилизация нативной таблицы {topusers} от DLE */
.stats-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stats-table-wrapper table.userstop {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: 13.5px !important;
  min-width: 600px;
}

.stats-table-wrapper table.userstop th {
  background: var(--surface-soft) !important;
  color: var(--text) !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border) !important;
  text-align: left !important;
}

.stats-table-wrapper table.userstop td {
  padding: 14px 16px !important;
  color: var(--text-secondary) !important;
  border-bottom: 1px solid var(--border) !important;
  vertical-align: middle !important;
  transition: background 0.15s ease !important;
}

.stats-table-wrapper table.userstop tr:hover td {
  background: rgba(109, 74, 255, 0.03) !important;
}

.stats-table-wrapper table.userstop tr:last-child td {
  border-bottom: none !important;
}

.stats-table-wrapper table.userstop a {
  color: var(--primary) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.stats-table-wrapper table.userstop a:hover {
  text-decoration: underline !important;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И МОБИЛЬНЫХ ЭКРАНОВ
   ========================================================================== */
@media (max-width: 900px) {
  .stats-period-grid,
  .stats-metrics-grid {
    grid-template-columns: 1fr;
  }

  .stats-hero-header,
  .stats-top-section {
    padding: 22px 18px;
    border-radius: var(--radius-lg);
  }

  .stats-main-title {
    font-size: 22px;
  }
}

/* ==========================================================================
   МИНИ-ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ (PROFILE_POPUP.TPL)
   ========================================================================== */

/* Всплывающее окно DLE для popup-профилей */
.ui-dialog.profile-popup-window {
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16) !important;
  overflow: hidden !important;
  padding: 0 !important;
  background: var(--surface) !important;
}

/* Карточка попапа */
.user-popup-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

/* Верхний блок: Аватар + Никнейм */
.user-popup-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.user-popup-avatar-box {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  padding: 2px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.user-popup-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 2px);
  display: block;
  background: #111420;
}

.user-popup-identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.user-popup-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-popup-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-popup-badge {
  font-size: 11px;
  padding: 2px 8px;
}

/* Параметры и метрики попапа */
.user-popup-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popup-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  padding: 6px 10px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: var(--transition);
}

.popup-detail-row:hover {
  background: var(--surface);
  border-color: var(--border);
}

.popup-detail-row .detail-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 600;
}

.popup-detail-row .detail-label svg {
  color: var(--text-muted);
}

.popup-detail-row .detail-val {
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
}

.popup-val-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.popup-links {
  font-size: 11px;
  color: var(--text-muted);
}

.popup-links a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}

.popup-links a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   СТИЛИЗАЦИЯ JQUERY UI ОКНА ПРОФИЛЯ DLE (.dle-popup-userprofile)
   ========================================================================== */

/* 1. Главная внешняя модальная обертка jQuery UI */
.ui-dialog.dle-popup-userprofile {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  padding: 0 !important;
  overflow: hidden !important;
  max-height: none !important; /* Сброс инлайн-лимита DLE */
  height: auto !important;
  font-family: var(--font-family) !important;
  z-index: 1250 !important;
  box-sizing: border-box !important;
  backdrop-filter: blur(12px) !important;
}

/* 2. Шапка модального окна */
.ui-dialog.dle-popup-userprofile .ui-dialog-titlebar {
  background: var(--surface) !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 16px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
  margin: 0 !important;
}

/* Заголовок ("Пользователь: xclusive") */
.ui-dialog.dle-popup-userprofile .ui-dialog-title {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  float: none !important;
  letter-spacing: -0.2px !important;
}

/* Кнопка закрытия окна (крестик) */
.ui-dialog.dle-popup-userprofile .ui-dialog-titlebar-close {
  position: static !important;
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: var(--surface-soft) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  outline: none !important;
  transition: var(--transition) !important;
}

.ui-dialog.dle-popup-userprofile .ui-dialog-titlebar-close:hover {
  background: var(--danger-soft) !important;
  border-color: rgba(232, 76, 91, 0.3) !important;
  color: var(--danger) !important;
  transform: scale(1.05) !important;
}

/* Скрытие дефолтной иконки-спрайта jQuery UI и замена на SVG */
.ui-dialog.dle-popup-userprofile .ui-dialog-titlebar-close .ui-button-icon {
  display: none !important;
}

.ui-dialog.dle-popup-userprofile .ui-dialog-titlebar-close::before {
  content: '' !important;
  display: block !important;
  width: 13px !important;
  height: 13px !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'><path d='M18 6L6 18M6 6l12 12'/></svg>") no-repeat center / contain !important;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'><path d='M18 6L6 18M6 6l12 12'/></svg>") no-repeat center / contain !important;
}

/* 3. Контентная область (#dleprofilepopup) */
.ui-dialog.dle-popup-userprofile .ui-dialog-content#dleprofilepopup {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
}

.ui-dialog.dle-popup-userprofile .user-popup-card {
  max-width: 100% !important;
  padding: 22px !important;
  box-shadow: none !important;
  border: none !important;
}

/* 4. Нижняя панель действий с кнопками */
.ui-dialog.dle-popup-userprofile .ui-dialog-buttonpane {
  background: var(--surface-soft) !important;
  border: none !important;
  border-top: 1px solid var(--border) !important;
  padding: 14px 22px !important;
  margin: 0 !important;
}

.ui-dialog.dle-popup-userprofile .ui-dialog-buttonset {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  float: none !important;
  flex-wrap: wrap !important;
}

/* Стилизация всех кнопок действий jQuery UI */
.ui-dialog.dle-popup-userprofile .ui-dialog-buttonset button.ui-button {
  margin: 0 !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-family) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
  transition: var(--transition) !important;
  line-height: 1.4 !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
  box-shadow: var(--shadow-xs) !important;
}

.ui-dialog.dle-popup-userprofile .ui-dialog-buttonset button.ui-button:hover {
  background: var(--surface-accent) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
  transform: translateY(-1px) !important;
}

/* Кнопка "Просмотр профиля" (Главная / Primary) */
.ui-dialog.dle-popup-userprofile .ui-dialog-buttonset button.ui-button:first-child {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(109, 74, 255, 0.28) !important;
}

.ui-dialog.dle-popup-userprofile .ui-dialog-buttonset button.ui-button:first-child:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  box-shadow: 0 6px 16px rgba(109, 74, 255, 0.38) !important;
}

/* Кнопка "Админцентр" (Акцентная/Danger) */
.ui-dialog.dle-popup-userprofile .ui-dialog-buttonset button.ui-button:last-child {
  border-color: rgba(232, 76, 91, 0.2) !important;
  color: var(--danger) !important;
}

.ui-dialog.dle-popup-userprofile .ui-dialog-buttonset button.ui-button:last-child:hover {
  background: var(--danger-soft) !important;
  border-color: rgba(232, 76, 91, 0.35) !important;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ СМАРТФОНОВ
   ========================================================================== */
@media (max-width: 640px) {
  .ui-dialog.dle-popup-userprofile {
    width: calc(100% - 24px) !important;
    left: 12px !important;
    right: 12px !important;
    max-width: none !important;
  }

  .ui-dialog.dle-popup-userprofile .ui-dialog-titlebar,
  .ui-dialog.dle-popup-userprofile .user-popup-card,
  .ui-dialog.dle-popup-userprofile .ui-dialog-buttonpane {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .ui-dialog.dle-popup-userprofile .ui-dialog-buttonset {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .ui-dialog.dle-popup-userprofile .ui-dialog-buttonset button.ui-button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}



/* ==========================================================================
   2. АДАПТИВНОСТЬ: СБОРКА В СТОЛБИК НА СМАРТФОНАХ (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .catalog-sort-bar {
    flex-direction: column; /* переводим весь блок в колонку */
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }

  .catalog-sort-bar form#news_set_sort {
    width: 100%;
  }

  /* Сборка кнопок в аккуратный столбик-сетку по 2 в ряд */
  .catalog-sort-bar ul.sort {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }

  .catalog-sort-bar ul.sort li {
    width: 100%;
  }

  .catalog-sort-bar ul.sort li a {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px 10px;
  }
}

/* На совсем узких смартфонах (до 420px) — строго в один столбик */
@media (max-width: 420px) {
  .catalog-sort-bar ul.sort {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   МИНИ-КАРТОЧКА СТАТЬИ/ГАЙДА (.mini-card-guide)
   ========================================================================== */

.mini-card.mini-card-guide {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-sizing: border-box;
  text-decoration: none;
  overflow: hidden;
  transition: var(--transition);
}

.mini-card.mini-card-guide:hover {
  background: var(--surface-soft);
  border-color: var(--primary-border);
  transform: translateY(-1px);
}

/* 1. Превью миниатюры */
.mini-guide-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #111420;
}

.mini-guide-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.mini-card.mini-card-guide:hover .mini-guide-thumb img {
  transform: scale(1.05);
}

/* 2. Текстовая область */
.mini-card-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mini-guide-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.mini-meta-item {
  color: var(--primary);
}

.mini-meta-dot {
  font-size: 8px;
  opacity: 0.6;
}

.mini-meta-date {
  font-weight: 600;
  color: var(--text-muted);
}

.mini-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.18s ease;
}

.mini-card.mini-card-guide:hover .mini-card-title {
  color: var(--primary);
}

/* 3. Круглая стрелка перехода */
.mini-arrow-btn {
  flex-shrink: 0;
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mini-card.mini-card-guide:hover .mini-arrow-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateX(2px);
}

/* ==========================================================================
   АДАПТИВНЫЕ СЦЕНАРИИ
   ========================================================================== */

/* Планшеты и компактные сайдбары (<= 640px) */
@media (max-width: 640px) {
  .mini-card.mini-card-guide {
    padding: 8px 10px;
    gap: 10px;
  }

  .mini-guide-thumb {
    width: 56px;
    height: 56px;
  }

  .mini-card-title {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .mini-arrow-btn {
    width: 26px;
    height: 26px;
  }
}

/* Узкие мобильные экраны (<= 380px) */
@media (max-width: 380px) {
  .mini-guide-thumb {
    width: 50px;
    height: 50px;
  }

  /* Скрываем стрелку, чтобы отдать 100% оставшегося места под заголовок */
  .mini-arrow-btn {
    display: none;
  }

  .mini-card-title {
    font-size: 12.5px;
    line-height: 1.3;
  }
}

/* ==========================================================================
   МИНИ-КАРТОЧКА ПРОМОКОДОВ (.mini-card-promo-hub)
   ========================================================================== */

.mini-card.mini-card-promo-hub {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-sizing: border-box;
  text-decoration: none;
  overflow: hidden;
  transition: var(--transition);
}

.mini-card.mini-card-promo-hub:hover {
  background: var(--surface-soft);
  border-color: var(--primary-border);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

/* 1. Иконка подарка */
.mini-card-icon.icon-gift {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mini-card.mini-card-promo-hub:hover .mini-card-icon.icon-gift {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.05);
}

/* 2. Текстовый блок (Ключевой фикс распирания: min-width: 0) */
.mini-card-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Мета-информация: бейдж количества и дата */
.mini-promo-hub-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  line-height: 1.3;
  white-space: nowrap;
}

.mini-online-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.mini-promo-hub-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Заголовок: предотвращение вылезания за пределы */
.mini-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.18s ease;
}

.mini-card.mini-card-promo-hub:hover .mini-card-title {
  color: var(--primary);
}

/* 3. Стрелка перехода */
.mini-arrow-btn {
  flex-shrink: 0;
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mini-card.mini-card-promo-hub:hover .mini-arrow-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateX(2px);
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И СМАРТФОНОВ
   ========================================================================== */

/* Экраны до 640px */
@media (max-width: 640px) {
  .mini-card.mini-card-promo-hub {
    padding: 10px 12px;
    gap: 10px;
  }

  .mini-card-icon.icon-gift {
    width: 38px;
    height: 38px;
  }

  .mini-card-icon.icon-gift svg {
    width: 17px;
    height: 17px;
  }

  .mini-card-title {
    font-size: 13px;
  }

  .mini-arrow-btn {
    width: 26px;
    height: 26px;
  }
}

/* Узкие экраны до 380px */
@media (max-width: 380px) {
  .mini-arrow-btn {
    display: none;
  }

  .mini-promo-hub-date {
    display: none;
  }

  .mini-card-title {
    font-size: 12.5px;
    -webkit-line-clamp: 2;
  }
}

/* Контейнер оглавления */
.rm-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);

  margin: 24px 0;
  overflow: hidden;
  font-family: var(--font-family);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.rm-toc:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* Шапка с заголовком и кнопкой */
.rm-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.rm-toc-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Акцентный маркер перед заголовком */
.rm-toc-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* Кнопка «Скрыть / Показать» */
.rm-toc-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.rm-toc-toggle:hover {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

.rm-toc-toggle:active {
  transform: scale(0.97);
}

/* Анимированное тело оглавления */
.rm-toc-body {
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.35s ease;
  max-height: 1200px;
  opacity: 1;
}

/* Состояние при скрытии */
.rm-toc.is-collapsed .rm-toc-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.rm-toc.is-collapsed .rm-toc-header {
  border-bottom-color: transparent;
}

/* Список пунктов */
.rm-toc-list {
  list-style: none;
  padding: 12px 18px 16px;
  margin: 0;
}

.rm-toc-item {
  position: relative;
  margin: 3px 0;
}

/* Уровни вложенности h2-h6 с тонкими направляющими */
.rm-toc-h2 {
  padding-left: 0;
  font-weight: 600;
}

.rm-toc-h3 {
  padding-left: 18px;
  border-left: 2px solid var(--surface-accent);
  margin-left: 6px;
}

.rm-toc-h4 {
  padding-left: 30px;
  border-left: 2px solid var(--surface-accent);
  margin-left: 6px;
}

.rm-toc-h5 {
  padding-left: 42px;
  border-left: 2px solid var(--surface-accent);
  margin-left: 6px;
}

.rm-toc-h6 {
  padding-left: 54px;
  border-left: 2px solid var(--surface-accent);
  margin-left: 6px;
}

/* Ссылки на секции */
.rm-toc-link {
  display: block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.5;
  transition: var(--transition);
}

.rm-toc-h2 > .rm-toc-link {
  color: var(--text);
}

.rm-toc-link:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateX(3px);
}