:root {
  /* Нижняя граница «шапки» приложения (под неё кладём backdrop уведомлений/языка, чтобы не перекрывать аватар) */
  --kazik-backdrop-top: calc(
    12px + var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 56px) + 56px
  );
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1a1a1a;
  --text: #f5f5f5;
  --text-muted: #9e9e9e;
  --accent: #e53935;
  --accent-dark: #b71c1c;
  --border: rgba(255,255,255,.08);
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,.3);
  /* Game card (premium) — только для .gc-card */
  --gc-card-0: #0F1620;
  --gc-card-1: #0B1119;
  --gc-stroke: rgba(255,255,255,.08);
  --gc-text-0: #F3F6FB;
  --gc-gold-0: #F7D66A;
  --gc-gold-1: #C9A74A;
  --gc-shadow-0: 0 18px 60px rgba(0,0,0,.55);
  --gc-shadow-1: 0 8px 26px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Отступ сверху: safe area (вырез, статус-бар) + хедер Telegram (название, закрыть, троеточие) */
.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 16px 32px;
  padding-top: calc(
    12px + var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 56px)
  );
}

/* Header: одна строка — логотип слева, аватар и язык справа */
.header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 14px;
  border-bottom: 1px solid var(--border);
}

.header .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header-lang-wrap,
.avatar-notifications-wrap {
  position: relative;
}

/* Поддержка старой структуры (header-row-1/2) на других страницах */
.header-row-1 {
  display: flex;
  align-items: center;
}

.header-row-2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 12px;
}

.header-row-2 .header-left:empty {
  display: none;
}

.header-row-2 .header-right {
  margin-left: auto;
}

/* На мобильных: только бургер, категории скрыты. На 900px+: только категории, бургер скрыт. */
.header-nav {
  display: none !important;
}

.header-menu-btn {
  display: flex;
}

/* Figma mobile: бургер — 3 полоски, крупная круглая кнопка */
.icon-btn.header-menu-btn--figma,
.header-menu-btn--figma {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 12px;
  background: var(--bg-elevated);
  border: none;
  min-width: 52px;
  min-height: 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.icon-btn.header-menu-btn--figma:hover,
.header-menu-btn--figma:hover {
  background: #252525;
}

.header-menu-btn--figma span {
  width: 28px;
  height: 5px;
  background: #e8a84a;
  border-radius: 2.5px;
  display: block;
}

.header-back {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.header-back:hover {
  color: var(--text);
}

.header-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  padding: 6px 8px;
  border-radius: 6px;
}

.header-link:hover {
  color: var(--text);
}

.header-link--active {
  color: var(--text);
  font-weight: 600;
}

.header-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.header-search-wrap:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.header-search-label {
  display: none;
  font-size: 13px;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .header-menu-btn {
    display: none !important;
  }

  .header-nav {
    display: flex !important;
    align-items: center;
    gap: 4px;
    margin-left: 20px;
  }

  .header-search-label {
    display: inline;
  }
}

/* Бургер-меню: полноэкранная панель слева */
.burger-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

/* Попап поиска: размытый фон, центрированное окно */
.search-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 40px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.search-popup {
  width: 100%;
  max-width: 520px;
  background: rgba(26, 26, 32, 0.95);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  padding: 24px;
}

.search-popup-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 16px;
}

.search-popup-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.search-popup-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.search-popup-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.search-popup-input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  box-sizing: border-box;
}

.search-popup-input::placeholder {
  color: var(--text-muted);
}

.search-popup-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.search-popup-list {
  max-height: 360px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 8px;
}

.search-popup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}

.search-popup-item:last-child {
  margin-bottom: 0;
}

.search-popup-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-popup-item-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-popup-item-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-popup-item-logo--placeholder {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
}

.search-popup-item-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-popup-item-pills {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
}

.search-popup-pill {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
}

.search-popup-pill--percent {
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

.search-popup-pill--fs {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
}

.search-popup-pill--text {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.search-popup-empty {
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Мобильная версия попапа поиска */
@media (max-width: 767px) {
  .search-popup-overlay {
    padding: 0;
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    align-items: flex-end;
  }

  .search-popup {
    max-width: none;
    width: 100%;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .search-popup-header {
    margin-bottom: 12px;
  }

  .search-popup-title {
    font-size: 18px;
  }

  .search-popup-close {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .search-popup-input {
    padding: 14px 16px;
    font-size: 16px;
    margin-bottom: 12px;
    min-height: 48px;
  }

  .search-popup-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    -webkit-overflow-scrolling: touch;
  }

  .search-popup-item {
    padding: 14px 12px;
    min-height: 56px;
  }

  .search-popup-item-logo {
    width: 44px;
    height: 44px;
  }

  .search-popup-item-name {
    font-size: 15px;
  }

  .search-popup-pill {
    font-size: 11px;
    padding: 4px 6px;
  }
}

.burger-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  background: var(--bg);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.burger-panel.is-open {
  transform: translateX(0);
}

.burger-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.burger-close:hover {
  background: #252525;
}

.burger-content {
  padding: 60px 24px 24px;
}

.burger-section-title {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}

.burger-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 28px;
}

.burger-link {
  display: block;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.burger-link:hover {
  color: var(--accent);
}

.burger-link--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.burger-social {
  display: flex;
  gap: 16px;
}

.burger-social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.burger-social-link:hover {
  background: #252525;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: #252525;
}

.logo {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 20px;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.logo img,
.logo-img {
  height: 24px;
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-dot {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 2px;
}

.star-badge {
  font-size: 14px;
  color: var(--text-muted);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.avatar--img {
  padding: 0;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.avatar-wrap {
  position: relative;
  touch-action: manipulation;
}

.avatar-wrap .avatar {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Бейдж — визуально поверх аватарки, но клики должны попадать в .avatar (обработчик висит на нём).
   Иначе тапы по «красному кружку» не считаются — из 5 нажатий срабатывает только попадание мимо бейджа. */
.avatar-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  border: 2px solid var(--bg-page, #0f0f0f);
  box-sizing: border-box;
  display: none;
  pointer-events: none;
}

.avatar-notification-badge.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Notifications dropdown — popup при клике на аватарку */
/* Важно: не перекрываем шапку (лого + аватар). Иначе при открытом списке уведомлений
   полноэкранный backdrop перехватывает тапы по аватарке — «из 5 нажатий срабатывает одно»,
   серия из 10 тапов для админ-режима ломается (чётные тапы закрывают меню, не увеличивая счётчик). */
.notifications-dropdown-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9997;
  background: transparent;
  display: none;
  top: var(--kazik-backdrop-top);
}

.notifications-dropdown-backdrop.is-visible {
  display: block;
}

.notifications-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 280px;
  max-width: 90vw;
  max-height: 70vh;
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notifications-dropdown[hidden] {
  display: none !important;
}

.notifications-dropdown__title {
  padding: 14px 16px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.notifications-dropdown__list {
  overflow-y: auto;
  padding: 0 0 12px;
}

.notifications-dropdown__empty {
  padding: 24px 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.notifications-dropdown__item {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.notifications-dropdown__item:first-child {
  border-top: none;
}

.notifications-dropdown__item-text {
  font-size: 15px;
  color: #fff;
}

.notifications-dropdown__item-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.notifications-dropdown__item--special {
  cursor: pointer;
}

.notifications-dropdown__item--special .notifications-dropdown__item-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.notifications-dropdown__item--special .notifications-dropdown__item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.notifications-dropdown__item--special .notifications-dropdown__item-text {
  font-weight: 700;
}

/* Код-слова (только для админов) в popup уведомлений */
.notifications-dropdown__code-words {
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notifications-dropdown__code-words[hidden] {
  display: none !important;
}

.notifications-dropdown__code-words-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.code-words-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.code-words-grid--recovery {
  margin-bottom: 16px;
}

.code-words-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-words-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.code-words-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  box-sizing: border-box;
}

.code-words-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.code-words-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
}

.code-words-save-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent, #f59e0b);
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.code-words-save-btn:hover {
  opacity: 0.9;
}

/* Popup восстановления админа по код-словам (10 кликов на аватар) */
.admin-recovery-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-recovery-overlay[hidden] {
  display: none !important;
}

.admin-recovery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.admin-recovery-panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.admin-recovery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-recovery-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.admin-recovery-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
}

.admin-recovery-close:hover {
  color: #fff;
}

.admin-recovery-body {
  padding: 20px 18px;
}

.admin-recovery-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 12px;
}

.admin-recovery-message {
  font-size: 13px;
  margin: 0 0 12px;
  min-height: 18px;
}

.admin-recovery-message.is-error {
  color: #e57373;
}

.admin-recovery-message.is-success {
  color: #81c784;
}

.admin-recovery-submit {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  background: var(--accent, #f59e0b);
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.admin-recovery-submit:hover {
  opacity: 0.9;
}

/* Popup специального уведомления (промокод) */
.notification-promo-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.notification-promo-overlay[hidden] {
  display: none !important;
}

.notification-promo-overlay {
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

.notification-promo-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.notification-promo-panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.notification-promo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notification-promo-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.notification-promo-icon {
  font-size: 22px;
}

.notification-promo-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
}

.notification-promo-close:hover {
  color: #fff;
}

.notification-promo-body {
  padding: 20px 18px;
}

.notification-promo-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  margin: 0 0 16px;
}

.notification-promo-code-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-bottom: 16px;
}

.notification-promo-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}

.notification-promo-code {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.notification-promo-copy-inline {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.notification-promo-copy-inline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Иконка копирования как в бейджиках игр */
.notification-promo-code-wrap .game-card-copy-icon {
  width: 20px;
  height: 20px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.notification-promo-code-wrap .game-card-copy-icon::before,
.notification-promo-code-wrap .game-card-copy-icon::after {
  content: "";
  position: absolute;
  border: 2px solid #8e8e95;
  border-radius: 3px;
  background: transparent;
}

.notification-promo-code-wrap .game-card-copy-icon::before {
  width: 11px;
  height: 11px;
  top: 5px;
  left: 6px;
}

.notification-promo-code-wrap .game-card-copy-icon::after {
  width: 11px;
  height: 11px;
  top: 2px;
  left: 2px;
  background: #1a1a1d;
}

.notification-promo-btn-open {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(180deg, #ffde33 0%, #f5c500 100%);
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 10px;
}

.notification-promo-btn-open:hover {
  opacity: 0.95;
}

.notification-promo-btn-copy {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.notification-promo-btn-copy:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Language dropdown — popup при клике на иконку языка, привязан к правому краю */
.lang-dropdown-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9997;
  background: transparent;
  display: none;
  top: var(--kazik-backdrop-top);
}

.lang-dropdown-backdrop.is-visible {
  display: block;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 200px;
  max-width: 90vw;
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lang-dropdown[hidden] {
  display: none !important;
}

.lang-dropdown__title {
  padding: 14px 16px 12px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.lang-dropdown__list {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 12px 16px;
  gap: 6px;
}

.lang-dropdown__slider {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 46px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-dropdown__list.to-ru .lang-dropdown__slider {
  transform: translateY(calc(46px + 6px));
}

.lang-dropdown__list[data-lang-index] .lang-dropdown__slider {
  transform: translateY(calc((46px + 6px) * var(--lang-index, 0)));
}

.lang-dropdown__item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}

.lang-dropdown__item:hover {
  color: #f5f5f5;
}

.lang-dropdown__flag {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
}

.lang-btn-flag {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

.lang-dropdown__label {
  flex: 1;
  font-size: 15px;
}

/* Hero — космическая тема */
.hero--cosmic {
  position: relative;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
}

.hero-cosmic-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0d0221 0%, #1a0a2e 25%, #2d1b4e 50%, #1a0a2e 75%, #0d0221 100%);
  background-size: 100% 100%;
}

.hero-cosmic-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(139, 0, 255, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 0, 100, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(0, 100, 255, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

.hero-cosmic-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,0.4) 0%, transparent 50%),
    radial-gradient(1.5px 1.5px at 60px 80px, rgba(255,255,255,0.3) 0%, transparent 50%),
    radial-gradient(1px 1px at 100px 50px, rgba(255,255,255,0.5) 0%, transparent 50%),
    radial-gradient(1.5px 1.5px at 150px 120px, rgba(255,255,255,0.35) 0%, transparent 50%),
    radial-gradient(1px 1px at 200px 90px, rgba(255,255,255,0.4) 0%, transparent 50%);
  background-size: 220px 180px;
  opacity: 0.8;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
}

.hero-title-accent {
  color: #ffd54f;
  text-shadow: 0 0 12px rgba(255, 213, 79, 0.6);
}

.hero-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 480px;
}

.hero-category-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero-category-btn:hover {
  transform: translateY(-2px);
}

.hero-category-btn--casino {
  background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
  box-shadow: 0 0 20px rgba(66, 99, 255, 0.5), 0 0 40px rgba(66, 99, 255, 0.25);
}

.hero-category-btn--bets {
  background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 100%);
  box-shadow: 0 0 20px rgba(244, 67, 54, 0.5), 0 0 40px rgba(244, 67, 54, 0.25);
}

.hero-category-btn--poker {
  background: linear-gradient(135deg, #e65100 0%, #ff9800 100%);
  box-shadow: 0 0 20px rgba(255, 152, 0, 0.5), 0 0 40px rgba(255, 152, 0, 0.25);
}

.hero-category-btn--providers {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.5), 0 0 40px rgba(76, 175, 80, 0.25);
}

.hero-category-btn--slots {
  background: linear-gradient(135deg, #6a1b9a 0%, #ad1457 100%);
  box-shadow: 0 0 20px rgba(233, 30, 99, 0.5), 0 0 40px rgba(233, 30, 99, 0.25);
}

/* Promo Roulette — карусель рекламных блоков вместо hero */
.promo-roulette {
  margin-bottom: 28px;
  padding: 0 0 24px;
}

.promo-roulette-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.promo-roulette-wrap {
  overflow: hidden;
}

.promo-roulette-track {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
}

.promo-roulette-track::-webkit-scrollbar {
  display: none;
}

.promo-roulette #promo-blocks-container,
.promo-roulette #promo-blocks-container-games,
.promo-roulette #promo-blocks-container-sports {
  display: flex;
  gap: 16px;
  padding: 0 5%;
  min-height: 0;
}

.promo-roulette .promo-block {
  flex: 0 0 92%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  min-height: 150px;
  aspect-ratio: 5 / 3;
  border-radius: 20px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.promo-roulette .promo-block[href="#"] {
  cursor: default;
}

.promo-roulette .promo-block-bg {
  pointer-events: none;
}

.promo-roulette-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0 16px;
}

.promo-roulette-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: #333;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.promo-roulette-dot:hover {
  background: #444;
}

/* ПК (768px+): макс 3 блока видны, при 4+ — карусель (скрыто справа, смена по таймеру) */
@media (min-width: 768px) {
  .promo-roulette {
    padding: 20px 0 28px;
  }
  .promo-roulette-wrap {
    overflow: visible;
    padding: 32px 0;
  }
  .promo-roulette-track {
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
  }
  .promo-roulette #promo-blocks-container,
  .promo-roulette #promo-blocks-container-games,
  .promo-roulette #promo-blocks-container-sports {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 0 30px;
    min-width: 100%;
    margin: 30px 0;
    box-sizing: border-box;
  }
  .promo-roulette .promo-block {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    aspect-ratio: 5 / 3;
    transition: transform 0.4s ease;
    transform: scale(1);
    transform-origin: center;
    overflow: hidden;
    border-radius: 20px;
  }
  .promo-roulette .promo-block-bg {
    border-radius: 20px;
  }
  .promo-roulette .promo-block:has(.promo-block-bg[style*="background-image"]) {
    background: transparent;
  }
  .promo-roulette .promo-block--active {
    transform: scale(1.1);
  }

  /* При 4+ блоках: карусель — только 3 видны, остальные скрыты справа */
  .promo-roulette--desktop-carousel .promo-roulette-wrap {
    overflow: hidden;
    padding: 40px 0;
  }
  .promo-roulette--desktop-carousel .promo-roulette-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .promo-roulette--desktop-carousel .promo-roulette-track::-webkit-scrollbar {
    display: none;
  }
  .promo-roulette--desktop-carousel .promo-roulette-track {
    container-type: inline-size;
  }
  .promo-roulette--desktop-carousel #promo-blocks-container,
  .promo-roulette--desktop-carousel #promo-blocks-container-games,
  .promo-roulette--desktop-carousel #promo-blocks-container-sports {
    justify-content: flex-start;
    min-width: min-content;
    width: max-content;
  }
  .promo-roulette--desktop-carousel .promo-block {
    flex: 0 0 calc((100cqw - 56px) / 3);
    width: calc((100cqw - 56px) / 3);
    min-width: 0;
    scroll-snap-align: center;
  }
}

/* Минималистичный блок быстрых ссылок между рекламой и играми */
.mini-links {
  padding: 12px 1% 20px;
  margin-bottom: 8px;
  max-width: 100%;
}

.mini-links-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.mini-links-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mini-links-carousel::-webkit-scrollbar {
  display: none;
}

.mini-link {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}

.mini-link:hover {
  opacity: 0.85;
}

.quick-links-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.quick-links-edit-overlay[hidden] {
  display: none !important;
}

.quick-links-edit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.quick-links-edit-panel {
  position: relative;
  background: var(--bg-page);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.quick-links-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.quick-links-edit-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.quick-links-edit-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-links-edit-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.quick-links-edit-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.promo-edit-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.promo-edit-tab {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.promo-edit-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.promo-edit-tab.is-active {
  background: rgba(255, 193, 7, 0.25);
  color: #ffc107;
}

.quick-links-edit-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

/* Game detail popup */
.game-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.game-popup-overlay[hidden] {
  display: none !important;
}

.game-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.game-popup-panel {
  position: relative;
  background: var(--bg-page);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0 16px 20px;
  box-sizing: border-box;
}

.game-popup-card {
  position: relative;
  margin: 12px 0 16px;
}

.game-popup-card.casino-popup {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(48, 48, 48, 0.96) 0%, rgba(35, 35, 35, 0.97) 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  padding: 10px 12px 12px;
}

.game-popup-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.game-popup-edit-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.game-popup-edit-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.game-popup-delete-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #e57373;
  background: rgba(229, 115, 115, 0.12);
  border: 1px solid rgba(229, 115, 115, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.game-popup-delete-btn:hover {
  background: rgba(229, 115, 115, 0.2);
  border-color: rgba(229, 115, 115, 0.5);
}

.game-popup-card .popup-close {
  position: relative;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: #4a4a4a;
  color: #fff;
  font-size: 22px;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  padding: 0;
}

.game-popup-card .popup-close:hover {
  background: #5a5a5a;
}

.game-popup-card .popup-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 130px;
  margin-bottom: 6px;
}

.game-popup-card .game-thumb {
  flex: 0 0 47px;
  width: 47px;
  height: 47px;
  margin-top: 8px;
  border-radius: 9px;
  background: #4b4b4b;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
}

.game-popup-card .game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-popup-card .game-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
}

.game-popup-card .badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.game-popup-card .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.2px;
}

.game-popup-card .badge.yellow {
  background: #cfae08;
  color: #fff;
}

.game-popup-card .badge.green {
  background: #4f9a61;
  color: #fff;
}

.game-popup-card .badge.purple {
  background: #74609d;
  color: #fff;
}

.game-popup-card .badge.promo {
  background: #5a4d9e;
  color: #e8e5ff;
}

.game-popup-card .game-title {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.game-popup-card .field {
  width: 100%;
  border-radius: 10px;
  background: #202123;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.game-popup-card .about-block {
  padding: 8px 12px 10px;
  margin-top: 12px;
}

.game-popup-card .field-label {
  display: block;
  font-size: 13px;
  line-height: 1.2;
  color: #9c9c9c;
  margin-bottom: 4px;
  font-weight: 500;
}

.game-popup-card .field-value {
  font-size: 30px;
  line-height: 1.05;
  color: #f3f3f3;
  font-weight: 500;
  letter-spacing: 0.1px;
  word-break: break-word;
}

.game-popup-card .about-block .field-value {
  font-size: 15px;
  line-height: 1.35;
  white-space: normal;
}

.game-popup-card .promo-row {
  margin-top: 6px;
  height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.game-popup-card .promo-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.game-popup-card .promo-title {
  font-size: 14px;
  font-weight: 700;
  color: #bdbdbd;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.game-popup-card .promo-code {
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
  color: #f2f2f2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-popup-card .copy-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: #a8a8a8;
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.game-popup-card .copy-wrap:hover:not(:disabled) {
  color: #ccc;
}

.game-popup-card .copy-wrap:disabled {
  opacity: 0.5;
  cursor: default;
}

.game-popup-card .copy-icon {
  position: relative;
  width: 16px;
  height: 16px;
}

.game-popup-card .copy-icon::before,
.game-popup-card .copy-icon::after {
  content: "";
  position: absolute;
  border: 1.5px solid #9f9f9f;
  border-radius: 2px;
  background: transparent;
}

.game-popup-card .copy-icon::before {
  width: 8px;
  height: 8px;
  left: 5px;
  top: 3px;
}

.game-popup-card .copy-icon::after {
  width: 8px;
  height: 8px;
  left: 2px;
  top: 6px;
}

.game-popup-card .play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background: #ffd100;
  color: #111;
  text-decoration: none;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.game-popup-card .play-btn:hover {
  background: #ffda33;
}

@media (max-width: 360px) {
  .game-popup-card .game-title {
    font-size: 22px;
  }
  .game-popup-card .promo-row .promo-code {
    font-size: 24px;
  }
}

.other-games {
  width: 100%;
  min-width: 0;
  margin: 0 0 20px;
  border-radius: 21px;
  background: linear-gradient(180deg, #2d2d2d 0%, #262626 100%);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  padding: 14px 12px 12px;
}

.other-games__title {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: #b8b8b8;
}

.other-games__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 18px;
  row-gap: 8px;
  min-width: 0;
}

.game-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
}

.game-item__thumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #444;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
}

.game-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-item__content {
  min-width: 0;
  padding-top: 1px;
}

.game-item__name {
  margin: 0;
  font-size: 16px;
  line-height: 1.05;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-item__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  color: #a8a8a8;
  text-decoration: none;
  white-space: nowrap;
}

.game-item__link:hover {
  color: #c8c8c8;
}

.game-item__arrow {
  font-size: 14px;
  line-height: 1;
  transform: translateY(-0.5px);
  color: #9f9f9f;
}

@media (max-width: 360px) {
  .other-games {
    margin: 0 0 16px;
    padding: 13px 11px 11px;
  }

  .other-games__grid {
    column-gap: 14px;
  }

  .game-item {
    gap: 10px;
  }

  .game-item__thumb {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .game-item__name {
    font-size: 15px;
  }

  .game-item__link {
    font-size: 13px;
  }
}

.mini-link-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  overflow: hidden;
}

.mini-link-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-link-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini-link-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.mini-link-action {
  font-size: 12px;
  color: #888;
}

/* Category toggle — переключатель Игры | Спорт */
/* Мобильный: фикс. внизу экрана */
.category-toggle--mobile {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 100;
  display: flex;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  margin: 0;
  border: 1px solid rgba(255,255,255,0.08);
  gap: 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

/* Общие стили только для слайдера и кнопок — контейнеры стилизуются отдельно */

/* Десктопный: скрыт на мобилке, под разделителем (block-head), по центру */
.category-toggle--desktop {
  position: relative;
  display: none;
  margin: 16px auto 20px;
  max-width: 200px;
  padding: 6px;
  align-self: center;
  background: #1a1a1a;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  gap: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

body.has-category-toggle .app {
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.category-toggle-slider {
  position: absolute;
  top: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 8px;
  width: calc(50% - 8px);
  background: #444;
  border-radius: 8px;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-toggle-slider.to-sports {
  transform: translateX(100%);
}

.category-toggle-btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #9e9e9e;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.category-toggle-btn:hover {
  color: #f5f5f5;
}

.category-toggle-btn.is-active {
  color: #fff;
}

/* ПК: мобильный переключатель скрыт, десктопный — под разделителем, по центру, ПК-вид */
@media (min-width: 768px) {
  .category-toggle--mobile {
    display: none !important;
  }
  body.has-category-toggle .app {
    padding-bottom: 32px;
  }
  .block--games .block-head {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
  }
  .block--games .block-head + .category-toggle--desktop {
    margin-top: 16px;
  }
  .category-toggle--desktop {
    display: flex;
  }
  .category-toggle--desktop .category-toggle-slider {
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: calc(50% - 6px);
  }
  .category-toggle--desktop .category-toggle-btn {
    flex: 0 1 auto;
    min-width: 80px;
    padding: 8px 16px;
    font-size: 13px;
  }
}

.category-panel[hidden] {
  display: none !important;
}

.promo-roulette-dot.is-active {
  width: 36px;
  background: #333;
  overflow: hidden;
  position: relative;
}

.promo-roulette-dot.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: #f0c14b;
  border-radius: 4px;
  animation: promo-roulette-fill 5s linear forwards;
}

@keyframes promo-roulette-fill {
  from { width: 0; }
  to { width: 100%; }
}

@media (max-width: 767px) {
  .promo-roulette .promo-block {
    flex: 0 0 94%;
    min-height: 140px;
  }
}

/* ========== Figma mobile (max 767px) ========== */
@media (max-width: 767px) {
  .header-menu-btn--figma {
    min-width: 52px;
    min-height: 52px;
    width: 52px;
    height: 52px;
  }

  .header-search-wrap {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
  }
  .header-search-wrap:hover {
    border: none;
    background: transparent;
  }
  .header-search-wrap .icon-btn {
    background: transparent;
  }
  .header-search-wrap .icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .star-badge {
    font-size: 16px;
  }

  .avatar {
    width: 33px;
    height: 33px;
    background: #fff;
  }

  .logo img {
    height: 22px;
  }

  .hero--cosmic {
    min-height: 530px;
    border-radius: 0;
  }

  .hero-cosmic-bg {
    background: linear-gradient(180deg, #0A0A0A 4%, rgba(10, 10, 10, 0) 23%), linear-gradient(160deg, #0d0221 0%, #1a0a2e 50%, #2d1b4e 100%);
  }

  .hero-cosmic-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #0A0A0A 4%, rgba(10, 10, 10, 0) 23%),
      url("/images/ChatGPT Image Feb 24, 2026, 08_48_47 PM.png") center/cover no-repeat;
  }

  .hero-inner {
    padding: 100px 20px 24px;
    align-items: flex-start;
    text-align: left;
  }

  .hero-title {
    font-size: 28px;
    font-family: "Exo 2", sans-serif;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
  }

  .hero-title-accent {
    font-size: 28px;
    font-family: "Exo 2", sans-serif;
    font-weight: 600;
    color: #FF9924;
    display: block;
    margin: 0 0 24px;
  }

  @media (min-width: 400px) {
    .hero-title,
    .hero-title-accent {
      font-size: 36px;
    }
  }

  .hero-category-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
    max-width: none;
  }

  .hero-category-btn {
    position: relative;
    padding: 0;
    height: 50px;
    width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-family: "Exo 2", sans-serif;
    font-weight: 400;
    border-radius: 34px;
  }

  .hero-category-btn--casino {
    background: linear-gradient(0deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.2) 100%), linear-gradient(45deg, #0F092C 0%, #331D92 50%, #0F092C 100%);
    border: 1px solid #5C4AFF;
    box-shadow: 0 0 24px #26166E, 0 0 48px rgba(38, 22, 110, 0.6);
  }

  .hero-category-btn--bets {
    background: linear-gradient(0deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.2) 100%), linear-gradient(135deg, #8E0000 0%, #FF0000 50%, #8E0000 100%);
    border: 1px solid #FF8787;
    box-shadow: 0 0 24px #C20000, 0 0 48px rgba(194, 0, 0, 0.6);
  }

  .hero-category-btn--poker {
    background: linear-gradient(0deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.2) 100%), linear-gradient(135deg, #844700 0%, #FF8800 50%, #844700 100%);
    border: 1px solid #FFCA8E;
    box-shadow: 0 0 24px #C46900, 0 0 48px rgba(196, 105, 0, 0.6);
  }

  .hero-category-btn--providers {
    background: linear-gradient(0deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.2) 100%), linear-gradient(45deg, #10280D 0%, #3A8E2F 50%, #10280D 100%);
    border: 1px solid #81CC77;
    box-shadow: 0 0 24px #2B6A23, 0 0 48px rgba(43, 106, 35, 0.6);
  }

  .hero-category-btn--slots {
    grid-column: 1;
    background: linear-gradient(0deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.2) 100%), linear-gradient(135deg, #82006A 0%, #FF00D0 50%, #82006A 100%);
    border: 1px solid #FFA9EF;
    box-shadow: 0 0 24px #C2019F, 0 0 48px rgba(194, 1, 159, 0.6);
  }

  .block {
    border-top: 2px solid #2F2F2F;
    padding-top: 20px;
  }

  /* Мобильная версия: кнопка «Редактировать» приоритетнее названия категории */
  .block-head {
    gap: 10px;
    flex-wrap: nowrap;
  }
  .block-title {
    font-size: 32px;
    font-family: "Exo 2", sans-serif;
    font-weight: 400;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 0;
  }
  .block-head-right,
  .block-head > .carousel-nav {
    flex-shrink: 0;
  }
  .block-edit-btn {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 20px;
  }

  /* То же для категорий на странице Казино (Народный топ, ТОП-10) */
  .casino-top-head {
    gap: 10px;
    flex-wrap: nowrap;
  }
  .casino-top-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 0;
    margin-bottom: 0;
  }
  .casino-top-head-right {
    flex-shrink: 0;
  }
  .casino-top-edit-btn {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 20px;
  }

  .game-card,
  .block--large .game-card {
    flex: 0 0 210px;
    background: #1C1C1C;
    border-radius: 30px;
  }

  .game-card-img,
  .block--large .game-card-img {
    height: 140px !important;
    background: #D9D9D9 !important;
    border-radius: 30px 30px 0 0;
    color: #000 !important;
    font-size: 20px;
    font-family: "Exo 2", sans-serif;
  }

  .game-card-name {
    font-size: 16px;
    font-family: "Exo 2", sans-serif;
    padding: 12px 16px 4px;
  }

  .game-card-meta {
    font-size: 12px;
    font-family: "Exo 2", sans-serif;
    padding: 0 16px 16px;
  }

  .game-card-meta .bonus-pct { color: #57BB84; }
  .game-card-meta .bonus-fs { color: #B39DDB; }
  .game-card-meta .bonus-plus { color: #fff; }

  .nav-btn {
    width: 30px;
    height: 30px;
    background: #2C2C2C;
    border: 0.5px solid #636363;
  }

  /* Промо-блоки: 3 прямоугольника на всю ширину друг под другом */
  #promo-blocks-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
    min-height: 200;
  }
  #promo-blocks-container .promo-block--1,
  #promo-blocks-container .promo-block--2,
  #promo-blocks-container .promo-block--3 {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
  }

  .promo-block {
    min-height: 80px;
    border-radius: 10px;
  }

  .promo-block .promo-block-bg {
    border-radius: 10px;
  }

  .promo-block .promo-block-bg:not([style*="background-image"]) {
    background: #D9D9D9 !important;
  }

  .promo-block:has(.promo-block-bg:not([style*="background-image"])) .promo-block-title,
  .promo-block:has(.promo-block-bg:not([style*="background-image"])) .promo-block-action {
    color: #000 !important;
    font-size: 14px;
    font-family: "Exo 2", sans-serif;
  }
  .promo-block:has(.promo-block-bg:not([style*="background-image"])) .promo-block-action {
    font-size: 11px;
  }

  .footer-logo img {
    height: 24px;
  }

  .footer-tagline,
  .footer-link {
    color: #7C7C7C !important;
    font-size: 20px;
  }

  .footer-nav-title {
    display: none;
  }

  .footer-18 {
    width: 70px;
    height: 70px;
    font-size: 20px;
    background: #FF0000;
    border-radius: 6px;
  }

  .footer-admin-btn {
    background: #252525 !important;
    border: 1px solid #535353 !important;
    font-size: 14px;
  }
}

@media (min-width: 600px) {
  .hero--cosmic {
    min-height: 320px;
  }
  .hero-title {
    font-size: 30px;
  }
  .hero-category-buttons {
    gap: 12px;
  }
  .hero-category-btn {
    padding: 14px 24px;
    font-size: 10px;
  }
}

@media (min-width: 768px) {
  .hero-cosmic-bg::before {
    content: none;
  }
}

/* ========== Figma PC (min 768px) — промежуточный экран 768–899 теперь использует ПК-версию из Figma ========== */
@media (min-width: 768px) {
  .app {
    max-width: 1440px;
  }

  .logo img {
    height: 27px;
  }

  .header-search-wrap {
    width: 133px;
    min-width: 133px;
    height: 33px;
    background: #282828;
    border-radius: 16.5px;
    border: none;
  }

  .header-search-wrap .header-search-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
  }

  .avatar {
    width: 33px;
    height: 33px;
    background: #fff;
    border: none;
  }

  .star-badge {
    font-size: 16px;
  }

  .hero--cosmic {
    min-height: 700px;
    margin-bottom: 0;
  }

  .hero-cosmic-bg {
    background: linear-gradient(180deg, #0A0A0A 4%, rgba(10, 10, 10, 0) 23%),
      url("/images/ChatGPT Image Feb 24, 2026, 08_48_47 PM.png") center/cover no-repeat;
  }

  .hero-inner {
    padding: 160px 65px 40px;
    align-items: flex-start;
    text-align: left;
  }

  .hero-title {
    font-size: 64px;
    font-family: "Exo 2", sans-serif;
    font-weight: 400;
    color: #fff;
    margin: 0 0 0;
    line-height: 1.2;
    max-width: 653px;
  }

  .hero-title-accent {
    font-size: 64px;
    font-family: "Exo 2", sans-serif;
    font-weight: 400;
    background: linear-gradient(180deg, rgba(255, 153, 36, 0.91), rgba(246, 255, 0, 0.87));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin: 0 0 30px;
  }

  .hero-category-buttons {
    display: grid;
    grid-template-columns: 280px 280px;
    gap: 20px 40px;
    max-width: none;
  }

  .hero-category-btn {
    position: relative;
    padding: 0;
    height: 68px;
    width: 270px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-family: "Exo 2", sans-serif;
    font-weight: 400;
    border-radius: 34px;
  }

  .hero-category-btn::before {
    content: "";
    position: absolute;
    inset: -5px;
    filter: blur(12px);
    border-radius: 39px;
    z-index: -1;
  }

  .hero-category-btn--casino::before { background: #26166e; }
  .hero-category-btn--bets::before { background: #c20000; }
  .hero-category-btn--poker::before { background: #c46900; }
  .hero-category-btn--providers::before { background: #2b6a23; }
  .hero-category-btn--slots::before { background: #c2019f; }

  .hero-category-btn--casino {
    background: linear-gradient(0deg, rgba(0,0,0,0.2), rgba(0,0,0,0.2)), linear-gradient(45deg, #0f092c 0%, #331d92 50%, #0f092c 100%);
    border: 1px solid #5c4aff;
    box-shadow: none;
  }

  .hero-category-btn--bets {
    background: linear-gradient(0deg, rgba(0,0,0,0.2), rgba(0,0,0,0.2)), linear-gradient(135deg, #8e0000 0%, #ff0000 50%, #8e0000 100%);
    border: 1px solid #ff8787;
    box-shadow: none;
  }

  .hero-category-btn--poker {
    background: linear-gradient(0deg, rgba(0,0,0,0.2), rgba(0,0,0,0.2)), linear-gradient(135deg, #844700 0%, #ff8800 50%, #844700 100%);
    border: 1px solid #ffca8e;
    box-shadow: none;
  }

  .hero-category-btn--providers {
    background: linear-gradient(0deg, rgba(0,0,0,0.2), rgba(0,0,0,0.2)), linear-gradient(45deg, #10280d 0%, #3a8e2f 50%, #10280d 100%);
    border: 1px solid #81cc77;
    box-shadow: none;
  }

  .hero-category-btn--slots {
    grid-column: 1;
    background: linear-gradient(0deg, rgba(0,0,0,0.2), rgba(0,0,0,0.2)), linear-gradient(135deg, #82006a 0%, #ff00d0 50%, #82006a 100%);
    border: 1px solid #ffa9ef;
    box-shadow: none;
  }

  .block {
    border-top: 2px solid #2f2f2f;
    padding-top: 24px;
    margin-bottom: 24px;
  }

  .block-title {
    font-size: 40px;
    font-family: "Exo 2", sans-serif;
    font-weight: 400;
  }

  .game-card,
  .block--large .game-card {
    flex: 0 0 310px;
    background: #1c1c1c;
    border-radius: 30px;
    min-height: 273px;
  }

  .game-card-img,
  .block--large .game-card-img {
    height: 191px !important;
    background: #d9d9d9 !important;
    border-radius: 30px 30px 0 0;
    color: #000 !important;
    font-size: 28px;
    font-family: "Exo 2", sans-serif;
  }

  .game-card.slot .game-card-img {
    height: 191px !important;
  }

  .game-card-name,
  .block--large .game-card-name {
    font-size: 24px;
    font-family: "Exo 2", sans-serif;
    padding: 16px 20px 4px;
  }

  .game-card-meta,
  .block--large .game-card-meta {
    font-size: 14px;
    font-family: "Exo 2", sans-serif;
    padding: 0 20px 24px;
  }

  .game-card-meta .bonus-pct,
  .block--large .game-card-meta .bonus-pct { color: #57bb84; }
  .game-card-meta .bonus-fs,
  .block--large .game-card-meta .bonus-fs { color: #b39ddb; }
  .game-card-meta .bonus-plus,
  .block--large .game-card-meta .bonus-plus { color: #fff; }

  .nav-btn {
    width: 40px;
    height: 40px;
    background: #2c2c2c;
    border: 0.5px solid #636363;
  }

  .carousel {
    gap: 50px;
  }

  #promo-blocks-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .promo-block {
    min-height: 242px;
    border-radius: 30px;
  }

  .promo-block .promo-block-bg {
    border-radius: 30px;
  }

  .promo-block .promo-block-bg:not([style*="background-image"]) {
    background: #d9d9d9 !important;
  }

  .promo-block:has(.promo-block-bg:not([style*="background-image"])) .promo-block-title,
  .promo-block:has(.promo-block-bg:not([style*="background-image"])) .promo-block-action {
    color: #000 !important;
    font-size: 18px;
    font-family: "Exo 2", sans-serif;
  }
  .promo-block:has(.promo-block-bg:not([style*="background-image"])) .promo-block-action {
    font-size: 13px;
  }

  .footer-logo img {
    height: 27px;
  }

  .footer-tagline,
  .footer-link {
    color: #7c7c7c !important;
    font-size: 20px;
  }

  .footer-nav-title {
    display: none;
  }

  .footer-18 {
    width: 70px;
    height: 70px;
    font-size: 20px;
    background: #ff0000;
    border-radius: 6px;
  }

  .footer-admin-btn {
    background: #252525 !important;
    border: 1px solid #535353 !important;
    font-size: 14px;
  }
}

/* Categories grid */
/* Мобилки (скрин 2): компактные кнопки в 2 колонки, иконка + название + стрелка */
/* Мобильная версия: 1 столбец на всю ширину */
.categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

@media (min-width: 600px) and (max-width: 899px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

.category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s, transform .15s;
}

.category-card:hover {
  background: var(--bg-elevated);
}

.category-card[data-cat="casino"] { background: linear-gradient(135deg, #1a237e 0%, #283593 100%); }
.category-card[data-cat="bets"]  { background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%); }
.category-card[data-cat="poker"] { background: linear-gradient(135deg, #4a148c 0%, #6a1b9a 100%); }
.category-card[data-cat="providers"] { background: linear-gradient(135deg, #5d4037 0%, #795548 100%); }
.category-card[data-cat="slots"] { background: linear-gradient(135deg, #880e4f 0%, #ad1457 100%); }
.category-card[data-cat="news"]  { background: linear-gradient(135deg, #37474f 0%, #455a64 100%); }

.category-desc {
  display: none;
}

.category-icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Иконка: по умолчанию запрашиваем PNG (не display:none, иначе браузер может не грузить), скрываем через opacity до загрузки */
.category-icon-wrap .category-icon-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.category-icon-wrap .category-icon-img.icon-loaded {
  opacity: 1;
  position: static;
  pointer-events: auto;
}

.category-icon-wrap .category-icon-img.icon-loaded ~ .category-icon {
  display: none;
}

.category-icon {
  font-size: 24px;
}

.category-name {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
}

.category-arrow {
  font-size: 18px;
  opacity: .8;
  flex-shrink: 0;
}

/* Широкий экран: карточки 3 колонки, крупная иконка, название и описание по центру, без стрелки */
@media (min-width: 768px) {
  .categories {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .category-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 18px;
    min-height: 200px;
    box-shadow: var(--shadow);
  }

  .category-card:hover {
    transform: translateY(-2px);
  }

  .category-icon-wrap {
    margin-bottom: 10px;
  }

  .category-icon-wrap .category-icon-img,
  .category-icon-wrap .category-icon-img.icon-loaded {
    width: 72px;
    height: 72px;
  }

  .category-icon {
    font-size: 48px;
  }

  .category-name {
    font-size: 18px;
    margin-bottom: 2px;
    flex: none;
    width: 100%;
  }

  .category-desc {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,.85);
    line-height: 1.35;
    margin-bottom: auto;
    flex: 1;
    width: 100%;
  }

  .category-card .category-arrow {
    display: none;
  }
}

/* Block + Carousel */
.block {
  margin-bottom: 28px;
}

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

.block-head-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Скрытие блоков отключено — кнопка и плейсхолдер не используются */
.block-visibility-btn,
.block-hidden-placeholder {
  display: none !important;
}
.block-visibility-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.block-visibility-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.block-visibility-btn.block-visibility-btn--hidden {
  opacity: 0.6;
}

.block-edit-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.block-edit-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

button.block-edit-btn {
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
}

.block--hidden-for-admin .block-hidden-placeholder {
  display: flex;
}

.block-hidden-placeholder {
  display: none;
  position: absolute;
  inset: 0;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 600;
  z-index: 2;
}

.block-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.carousel-nav {
  display: flex;
  gap: 6px;
}

.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(30, 30, 30, 0.9);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-btn:hover {
  background: rgba(50, 50, 50, 0.95);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.carousel-wrap {
  overflow: hidden;
  position: relative;
}

/* Слева: градиент появляется, когда пользователь прокрутил вправо (.scrolled) — можно листать обратно */
.carousel-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(to right, var(--bg), transparent);
  pointer-events: none;
  transition: opacity 0.25s ease;
  opacity: 0;
  z-index: 1;
}

.carousel-wrap.scrolled::before {
  opacity: 1;
}

/* Справа: градиент — индикатор «есть куда прокрутить». В конце списка скрывается (.at-end) */
.carousel-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100%;
  background: linear-gradient(to right, rgba(10,10,10,0) 0%, rgba(10,10,10,0.8) 50%, var(--bg) 100%);
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.carousel-wrap.at-end::after {
  opacity: 0;
}

@media (max-width: 767px) {
  .carousel-wrap::before { width: 20px; }
  .carousel-wrap::after { width: 25px; }
}

.carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* padding 8px сверху/снизу — как у ТОП-10, чтобы анимация translateY не обрезалась */
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
  height: 6px;
}

.carousel::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: 3px;
}

.carousel::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

/* Game cards — светлая верхняя часть (изображение), тёмная нижняя (название + бонус) */
.game-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  background: #2a2a2a;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-2px);
}

.game-card-img {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #333;
  text-align: center;
  padding: 8px;
  background: #5a5a5a;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.game-card-img:has(img) {
  padding: 0;
}

.game-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.game-card.slot .game-card-img {
  height: 120px;
}

.game-card-name {
  font-weight: 700;
  font-size: 14px;
  padding: 10px 12px 4px;
  color: #fff;
}

.game-card-provider {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 12px 4px;
}

.game-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 12px 12px;
}

.game-card-meta .bonus {
  color: #8bc34a;
}

/* Блок Игры: вертикальный список с новым дизайном карточек */
.block--games .block-head .carousel-nav {
  display: none;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

/* ПК: 2 колонки, порядок 1 2 / 3 4 / 5 6 */
@media (min-width: 768px) {
  .games-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* Карточки игр — дизайн Promo Card */
.games-list .game-card-v2 {
  width: 100%;
  border-radius: 24px;
  background: #1c1c1f !important;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}

.games-list .game-card-v2:hover {
  transform: translateY(-2px);
}

.games-list .game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 14px;
  min-height: 112px;
}

.games-list .game-card-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.games-list .game-card-left-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.games-list .game-card-countries {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 2px;
}

.games-list .game-card-thumb {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  background: #2c2c2f !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.games-list .game-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.games-list .game-card-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.games-list .game-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  flex-wrap: nowrap;
}

.games-list .game-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.games-list .game-card-badge--fs {
  background: #f0d000 !important;
  color: #2f2a00 !important;
}

.games-list .game-card-badge--pct {
  background: #315c2e !important;
  color: #b8ffad !important;
}

.games-list .game-card-badge--promo {
  background: #5a4d9e !important;
  color: #e8e5ff !important;
}

.games-list .game-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #f4f4f5;
  line-height: 1.1;
  margin: 0;
}

.games-list .game-card-action-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 16px;
  background: #ffd400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}

.games-list .game-card-action-btn::before {
  content: "";
  position: absolute;
  right: 100%;
  top: -12px;
  bottom: -12px;
  width: 72px;
  background: linear-gradient(to right, transparent 0%, rgba(28,28,31,0.7) 35%, #1c1c1f 65%);
  pointer-events: none;
}

.games-list .game-card-action-btn:hover {
  background: #ffde33;
  opacity: 0.95;
}

.games-list .game-card-action-btn svg {
  width: 24px;
  height: 24px;
}

.games-list .game-card-bottom {
  height: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 14px;
  background: #1a1a1d;
}

.games-list .game-card-promo-left {
  color: #b6b6bc;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.games-list .game-card-promo-center {
  text-align: center;
  color: #f4f4f6;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
}

.games-list .game-card-copy-btn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  color: #a7a7ad;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.games-list .game-card-copy-btn:hover {
  color: #fff;
}

.games-list .game-card-copy-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.games-list .game-card-copy-icon {
  width: 20px;
  height: 20px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.games-list .game-card-copy-icon::before,
.games-list .game-card-copy-icon::after {
  content: "";
  position: absolute;
  border: 2px solid #8e8e95;
  border-radius: 3px;
  background: transparent;
}

.games-list .game-card-copy-icon::before {
  width: 11px;
  height: 11px;
  top: 5px;
  left: 6px;
}

.games-list .game-card-copy-icon::after {
  width: 11px;
  height: 11px;
  top: 2px;
  left: 2px;
  background: #1a1a1d;
}

/* Карточки провайдеров: логотип сверху (цветной фон или картинка), снизу — название, мета, флаг */
.provider-card-link {
  flex: 0 0 180px;
  scroll-snap-align: start;
}

.provider-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .15s;
  display: flex;
  flex-direction: column;
}

.provider-card:hover {
  transform: translateY(-2px);
}

.provider-card-logo {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.95);
  text-align: center;
  padding: 8px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.provider-card-logo img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
}

.provider-card-name-overlay {
  text-shadow: 0 0 8px rgba(0,0,0,.8), 0 1px 3px rgba(0,0,0,.9);
}

.provider-card-info {
  padding: 10px 12px 12px;
  background: #2a2a2a;
  position: relative;
  min-height: 72px;
}

.provider-card-name {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.provider-card-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.provider-card-flag {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 16px;
  line-height: 1;
}

/* Страница провайдеров: сетка карточек */
.providers-page-content {
  padding: 24px 16px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.providers-page-content .block-title {
  margin-bottom: 24px;
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.providers-grid-card {
  flex: none;
}

/* Блок "Народный топ" — примерно в 1.3 раза больше, чем "ТОП-10 Слотов" */
.block--large .block-title {
  font-size: 28px;
}

.block--large .carousel-nav .nav-btn {
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.block--large .carousel {
  gap: 18px;
  padding: 8px 0 10px 0;
}

.block--large .game-card {
  flex: 0 0 260px;
}

.block--large .game-card-img {
  height: 143px;
  font-size: 14px;
}

/* «Самые популярные»: квадратная иконка без обрезания (высота = ширина) */
[data-section-id="most-popular"].block--large .game-card-img {
  aspect-ratio: 1 / 1;
  height: auto !important;
}

.block--large .game-card-name {
  font-size: 16px;
  padding: 12px 14px 6px;
}

.block--large .game-card-meta {
  font-size: 13px;
  padding: 0 14px 14px;
}

/* Секция Новости: главный материал слева, блок «Последние» справа */
.block-news {
  margin-bottom: 32px;
}

.block-news > .block-title {
  margin-bottom: 16px;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 899px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

.news-main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.news-main-img {
  width: 100%;
  flex: 1;
  min-height: 180px;
  background: var(--bg-elevated);
}

.news-main-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #f9a825;
  color: #000;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
}

.news-main-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  padding: 14px 16px 6px;
  line-height: 1.35;
}

.news-main-title a {
  color: var(--text);
  text-decoration: none;
}

.news-main-date {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 16px 16px;
}

.news-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.news-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
  flex-shrink: 0;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 520px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.news-list::-webkit-scrollbar {
  width: 6px;
}

.news-list::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: 3px;
}

.news-list::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.news-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.news-item-img {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  background: var(--bg-elevated);
  border-radius: 8px;
}

.news-item-content {
  min-width: 0;
}

.news-item-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 4px;
}

.news-item-title:hover {
  color: var(--accent);
}

.news-item-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* Рекламное пространство: 3 блока в ряд (ПК) / два квадрата слева, третий прямоугольник на высоту обоих (мобильные). Сетка на контейнере, т.к. блоки подставляются скриптом внутрь #promo-blocks-container */
.block-sep {
  border-top: 2px solid #2F2F2F;
  margin-top: 32px;
  padding: 0;
  min-height: 0;
}

.promo {
  margin-top: 32px;
  margin-bottom: 32px;
  padding-top: 24px;
}

#promo-blocks-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Мобильная версия: 3 прямоугольника на всю ширину друг под другом */
@media (max-width: 899px) {
  #promo-blocks-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
    min-height: 200;
  }

  .promo-block--1,
  .promo-block--2,
  .promo-block--3 {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
  }

  .promo-block {
    min-height: 80px;
  }

  .promo-block-content {
    min-height: 80px;
    padding: 12px 16px;
  }

  .promo-block-title {
    font-size: 14px;
  }

  .promo-block-action {
    font-size: 11px;
  }
}

.promo-block {
  position: relative;
  display: block;
  min-height: 140px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.promo-block:hover {
  transform: translateY(-2px);
}

.promo-block-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.promo-block-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.promo-block-content {
  position: relative;
  z-index: 1;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 140px;
}

.promo-block-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.promo-block-action {
  font-size: 11px;
  color: rgba(255,255,255,.85);
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

/* Однотонный фон по умолчанию (как у категорий). Чтобы залить картинкой: задайте .promo-block-bg { background-image: url(...) } или вставьте <img> внутрь .promo-block-bg */
.promo-block--1 .promo-block-bg {
  background: linear-gradient(135deg, #bf360c 0%, #e65100 50%, #ff9800 100%);
}

.promo-block--2 .promo-block-bg {
  background: linear-gradient(135deg, #4a148c 0%, #6a1b9a 50%, #7b1fa2 100%);
}

.promo-block--3 .promo-block-bg {
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #1976d2 100%);
}

/* Если в .promo-block-bg задана картинка (или вставлен img), градиент перекрывается картинкой */
.promo-block-bg[style*="background-image"] {
  background-size: cover;
  background-position: center;
}

/* Футер */
.footer {
  margin-top: 40px;
  padding: 32px 0 24px;
  background: #111;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 32px 48px;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 0;
  padding-right: 100px; /* отступ только для навигации, не для sep/disclaimer */
}

@media (max-width: 699px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-right: 16px; /* на мобильной симметричный отступ */
  }
}

.footer-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 22px;
}

.footer-logo img,
.footer-logo-img {
  height: 27px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-logo-dot {
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 2px;
}

.footer-tagline {
  margin: 8px 0 14px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}

.footer-social {
  display: none;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.footer-social-link:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.2);
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--text);
}

.footer-sep {
  height: 1px;
  background: var(--border);
  margin: 24px 0 20px;
}

.footer-bottom {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.footer-18 {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(229, 57, 53, 0.4);
}

.footer-disclaimer {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Кнопка «добавить проект» — только для админов, ниже футера */
.footer-admin {
  padding: 12px 16px 24px;
  background: #111;
  text-align: center;
}

.footer-admin[aria-hidden="false"] {
  display: block !important;
}

.footer-admin-btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(40, 40, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.footer-admin-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
}

.project-admin-actions {
  padding: 16px;
  background: #111;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-admin-actions[aria-hidden="false"] {
  display: flex !important;
}

.project-admin-btn {
  display: inline-block;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.project-admin-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.3);
}

.project-admin-btn--danger {
  color: #ff6b6b;
  border-color: rgba(255,107,107,.3);
}

.project-admin-btn--danger:hover {
  color: #ff4444;
  border-color: rgba(255,68,68,.5);
  background: rgba(255,68,68,.08);
}

.project-admin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== Страница проекта (шаблон) ========== */
.project-page .app {
  max-width: 1100px;
}

.project-hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  margin: 24px 0 32px;
  padding: 24px 0;
}

@media (max-width: 799px) {
  .project-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 899px) {
  .project-hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .project-hero-back-desktop {
    display: none;
  }
  .project-hero-back-mobile {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
  }
  .project-hero-brand {
    position: relative;
    width: 100%;
    min-width: 0;
    padding-right: 96px;
  }
  .project-hero-visual {
    width: 100%;
  }
}

.project-hero-left {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.project-hero-back {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0;
}

.project-hero-back-mobile {
  display: none;
}

.project-hero-back:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.project-hero-brand {
  position: relative;
  z-index: 1;
}

.project-hero-logo,
.project-sidebar-logo {
  max-width: 80px;
  max-height: 56px;
  object-fit: contain;
  display: block;
  margin-bottom: 8px;
}

.project-sidebar-logo {
  max-width: 48px;
  max-height: 36px;
}

.project-hero-name {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.project-hero-category {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  background: #2e7d32;
  color: #fff;
  border-radius: 20px;
}

.project-hero-visual {
  margin-top: 0;
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
  border-radius: var(--radius-lg);
  opacity: 0.9;
}

.project-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 16px;
}

.project-sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.project-sidebar-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.project-rating {
  font-size: 20px;
  font-weight: 700;
  color: #ffc107;
  margin-bottom: 14px;
}

.project-features {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.project-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.project-feature-icon {
  font-size: 16px;
}

.project-bonus {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.project-bonus-title {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.project-bonus-text {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text);
}

.project-promo-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  background: #1565c0;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.project-promo-btn:hover {
  background: #1976d2;
}

.project-promo-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.project-service-btn {
  display: block;
  text-align: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  margin-bottom: 12px;
  transition: background 0.2s, border-color 0.2s;
}

.project-service-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.project-cta {
  display: block;
  text-align: center;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  background: #1565c0;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.project-cta:hover {
  background: #1976d2;
}

.project-desc {
  margin: 32px 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.project-desc-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.project-desc-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 20px;
  white-space: pre-line;
}

.project-fact {
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

.project-fact-title {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}

.project-fact-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.project-meta-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--border);
}

.project-meta-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.project-meta-value {
  font-size: 14px;
  color: var(--text);
}

.project-flag,
.project-payment {
  display: inline-block;
  margin-right: 8px;
  font-size: 18px;
}

.project-reviews {
  margin: 32px 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.project-reviews-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.project-reviews-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.project-reviews-score {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.project-reviews-sort {
  padding: 6px 12px;
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

.project-reviews-stars {
  color: #ffc107;
  font-size: 18px;
}

.project-reviews-count {
  font-size: 14px;
  color: var(--text-muted);
}

.project-review-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.project-review-prompt {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text);
}

.project-review-stars-input {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 24px;
  color: #666;
}

.project-review-stars-input span:hover {
  color: #ffc107;
}

.project-review-comment {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  margin-bottom: 12px;
}

.project-review-submit {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  background: #1565c0;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.project-review-list {
  min-height: 40px;
}

.project-related {
  margin: 32px 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.project-related-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.project-related-carousel-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.project-related-carousel {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
  padding: 4px 0;
}

.project-related-card {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  position: relative;
}

.project-related-card:hover {
  border-color: rgba(255,255,255,.2);
}

.project-related-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  background: #2e7d32;
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
}

.project-related-logo {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-muted);
}

.project-related-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.project-related-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  text-align: center;
}

.project-related-offer {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: center;
}

.project-related-play {
  font-size: 12px;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border-radius: 6px;
}

/* ========== Страница провайдера (шаблон) ========== */
.provider-page .app {
  max-width: 1100px;
}

.provider-hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 799px) {
  .provider-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.provider-hero-wrap {
  margin: 24px 0 32px;
  padding: 24px 0;
}

.provider-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background .2s, border-color .2s;
}

.provider-back:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

@media (min-width: 800px) {
  .provider-hero {
    grid-template-areas: "banner panel";
  }
  .provider-hero-banner { grid-area: banner; }
  .provider-info-panel { grid-area: panel; }
}

.provider-hero-banner {
  min-height: 180px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.provider-hero-banner-text {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  color: rgba(255,255,255,.95);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.provider-info-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.provider-info-panel--compact {
  position: sticky;
  top: 16px;
}

.provider-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.provider-info-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.provider-info-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: #2e7d32;
  color: #fff;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.provider-info-rating {
  margin: 0;
  font-size: 15px;
  color: #ffc107;
}

.provider-info-reviews {
  font-size: 13px;
  color: #42a5f5;
}

.provider-info-rtp {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.provider-info-meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.provider-info-play {
  display: block;
  text-align: center;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  background: #1565c0;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  margin-top: auto;
}

.provider-info-play:hover {
  background: #1976d2;
  color: #fff;
}

.provider-main {
  max-width: 100%;
}

.provider-page-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  justify-content: center;
  background: #111;
  margin-top: 24px;
  border-radius: 12px;
}

.provider-admin-btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(40, 40, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-family: inherit;
}

.provider-admin-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
}

.provider-admin-btn--danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

.provider-admin-btn--danger:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.6);
}

.provider-content {
  min-width: 0;
}

.provider-section {
  margin-bottom: 32px;
}

.provider-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.provider-section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.provider-overview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
}

.provider-overview-wrap {
  position: relative;
}

.provider-overview-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.provider-overview.expanded .provider-overview-text {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
}

.provider-overview-fade {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56px;
  height: 1.6em;
  background: linear-gradient(to right, transparent, var(--bg-card) 45%);
  pointer-events: none;
}

.provider-overview.expanded .provider-overview-fade {
  display: none;
}

@media (max-width: 767px) {
  .provider-overview-fade { width: 28px; }
}

.provider-overview-more {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 1.6em;
  padding: 0 0 0 6px;
  margin: 0;
  background: var(--bg-card);
  border: none;
  color: #42a5f5;
  font-size: 14px;
  line-height: 1.6em;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.provider-overview-more:hover {
  text-decoration: underline;
}

.provider-overview.expanded .provider-overview-more {
  position: static;
  margin-top: 8px;
  background: none;
  padding-left: 0;
}

/* Форма «Добавить проект» */
.project-form-page .header {
  margin-bottom: 24px;
}

.project-form-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.project-form-hint {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.project-form {
  max-width: 640px;
}

.project-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.project-form-label {
  font-size: 14px;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.project-form-label .required {
  color: var(--accent);
}

.project-form-input,
.project-form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.project-form-select {
  cursor: pointer;
  appearance: auto;
}

.project-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.project-form-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-form-provider-select-wrap {
  margin-top: 8px;
}

.project-form-provider-select-wrap .project-form-label {
  margin-bottom: 6px;
}

.project-form-check-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.project-form-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.project-form-checkbox-box {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-form-checkbox:checked + .project-form-checkbox-box {
  background: #1565c0;
  border-color: #1565c0;
}

.project-form-checkbox:checked + .project-form-checkbox-box::after {
  content: "✓";
  color: #fff;
  font-size: 14px;
}

.project-form-input-inline {
  flex: 1;
  min-width: 0;
}

.project-form-countries-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-form-check-wrap--inline {
  margin-bottom: 4px;
}

.project-form-countries-fields {
  display: flex;
  flex-direction: column;
  padding: 2px 0;
}

.project-form-countries-fields > .project-form-input:first-child {
  margin-bottom: 12px;
}

.project-form-countries-add {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.project-form-countries-add .project-form-select {
  flex: 1;
  min-width: 0;
}

.project-form-countries-add .project-form-btn-add {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .project-form-countries-fields {
    padding: 4px 0;
  }
  .project-form-countries-fields > .project-form-input:first-child {
    margin-bottom: 16px !important;
  }
  .project-form-countries-add {
    gap: 12px;
    padding-top: 4px;
  }
  .project-form-countries-add .project-form-select {
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
  }
  .project-form-countries-add .project-form-btn-add {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }
}

.project-form-btn-add {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.project-form-btn-add:hover {
  background: rgba(21, 101, 192, 0.15);
  border-color: #1565c0;
}

.project-form-drop {
  min-height: 140px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 20px;
  position: relative;
}

.project-form-drop.is-dragover {
  border-color: #1565c0;
  background: rgba(21, 101, 192, 0.08);
}

.project-form-drop.has-file {
  border-style: solid;
  border-color: rgba(255,255,255,.15);
}

.project-form-file {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.project-form-drop-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.project-form-drop-name {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
}

.project-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.project-form-submit {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  background: #1565c0;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.project-form-submit:hover {
  background: #1976d2;
}

.project-form-cancel {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.project-form-cancel:hover {
  color: var(--text);
}

.project-form-message {
  margin-top: 16px;
  font-size: 14px;
}

/* ========== Страница Казино ========== */
.casino-page .app {
  max-width: 980px;
}

.casino-hero {
  margin: 24px 0 32px;
}

.casino-hero-title {
  margin: 0 0 12px;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.casino-hero-desc {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

.casino-hero-edit-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.casino-hero-edit-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.casino-categories-btn {
  padding: 10px 18px;
  font-size: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

.casino-promo {
  margin: 24px 0 40px;
}

.casino-promo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  width: 100%;
}

.casino-promo-track {
  display: flex;
  width: 100%;
  transition: transform 0.3s ease;
  will-change: transform;
}

.casino-promo-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: block;
  position: relative;
  min-height: calc(234px * 7 / 6);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-sizing: border-box;
}

.casino-promo-slide-img {
  width: 100%;
  height: calc(257px * 7 / 6);
  object-fit: cover;
  display: block;
}

.casino-promo-slide-inner {
  position: absolute;
  left: 20px;
  bottom: 20px;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.casino-promo-slide--placeholder .casino-promo-slide-inner {
  position: relative;
  background: linear-gradient(135deg, #e65100 0%, #ff9800 100%);
  padding: 24px;
  min-height: calc(187px * 7 / 6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.casino-promo-slide-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.casino-bonus-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.casino-bonus-pill--percent {
  background: #166D3D;
  color: #fff;
}

.casino-bonus-pill--fs {
  background: #80709E;
  color: #fff;
}

.casino-bonus-pill--text {
  background: rgba(255,255,255,.15);
  color: #fff;
  font-weight: 500;
}

.casino-promo-cta {
  display: inline-block;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  background: #1565c0;
  color: #fff;
  border-radius: 8px;
}

/* Кнопки прокрутки слайдера — в правом нижнем углу, дизайн как у категорий */
.casino-promo-prev,
.casino-promo-next {
  position: absolute;
  bottom: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(30, 30, 30, 0.9);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.casino-promo-prev:hover,
.casino-promo-next:hover {
  background: rgba(50, 50, 50, 0.95);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.casino-promo-prev { right: 56px; }
.casino-promo-next { right: 14px; }

.casino-promo-dots {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.casino-promo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.casino-promo-dot.is-active {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.35);
}

.casino-top--block {
  margin-top: 32px;
}

.casino-top-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.casino-top-head-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Увеличенный отступ между рекламным блоком и ТОП-10 на странице Казино */
.casino-page #section-promo-blocks.promo {
  margin-bottom: 48px;
}
.casino-page .casino-top--top10 {
  margin-top: 80px;
}

.casino-top--top10 .casino-top-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.casino-top-edit-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.casino-top-edit-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.casino-top-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

/* 3 колонки, по 2 карточки в каждой (заполнение по колонкам). Карточка «Игры» — минимум 280px по ширине */
.casino-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  gap: 16px;
}

/* Народный топ: горизонтальная прокрутка, видно 3 колонки × 2 ряда, градиентное затухание */
.casino-top-wrap {
  overflow: hidden;
  position: relative;
  /* фиксированная высота = 2 ряда карточек (~85px) + 5% для анимации при наведении */
  height: calc((85px * 2 + 16px) * 1.05);
}

.casino-top-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(to right, var(--bg), transparent);
  pointer-events: none;
  transition: opacity 0.25s ease;
  opacity: 0;
  z-index: 1;
}

.casino-top-wrap.scrolled::before {
  opacity: 1;
}

.casino-top-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.casino-top-wrap.at-end::after {
  opacity: 0;
}

@media (max-width: 767px) {
  .casino-top-wrap::before { width: 15px; }
  .casino-top-wrap::after { width: 15px; }
}

.casino-top-wrap .casino-top-grid {
  grid-template-columns: unset;
  grid-template-rows: 1fr 1fr;
  grid-auto-columns: 280px;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.casino-top-wrap .casino-top-grid::-webkit-scrollbar {
  height: 6px;
}

.casino-top-wrap .casino-top-grid::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: 3px;
}

.casino-top-wrap .casino-top-grid::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.casino-top-wrap .casino-top-card {
  scroll-snap-align: start;
  min-width: 0;
}

@media (max-width: 700px) {
  .casino-top-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: row;
  }
  .casino-top-wrap .casino-top-grid {
    grid-template-rows: 1fr 1fr;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 16px) / 2);
  }
}

/* Узкие экраны: одна колонка, чтобы карточки не сжимались ниже 280px */
@media (max-width: 599px) {
  .casino-top-grid {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
  }
  .casino-top-wrap .casino-top-grid {
    grid-auto-columns: 100%;
  }
}

.casino-top-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr;
  gap: 12px 14px;
  align-items: center;
  padding: 12px 14px;
  min-width: 280px;
  min-height: 54px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}

.casino-top-card:hover {
  border-color: rgba(255,255,255,.2);
}

.casino-top-card-logo {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.casino-top-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.casino-top-card-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.casino-top-card-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

.casino-top-card-bonus {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.casino-top-card-bonus .casino-bonus-pill {
  font-size: 11px;
  padding: 3px 8px;
}

.casino-top-card-play {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.casino-top-card:hover .casino-top-card-play {
  filter: brightness(1.1);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.45);
}

.casino-empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
  padding: 24px;
  text-align: center;
}

/* ТОП-10: одна строка, видно 4 карточки, остальные — горизонтальная прокрутка + градиентное затухание */
.casino-top10-wrap {
  overflow: hidden;
  position: relative;
  /* фиксированная высота = карточка 300px + 8px сверху/снизу для анимации при наведении */
  height: calc(300px + 16px);
}

.casino-top10-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(to right, var(--bg), transparent);
  pointer-events: none;
  transition: opacity 0.25s ease;
  opacity: 0;
  z-index: 1;
}

.casino-top10-wrap.scrolled::before {
  opacity: 1;
}

.casino-top10-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.casino-top10-wrap.at-end::after {
  opacity: 0;
}

@media (max-width: 767px) {
  .casino-top10-wrap::before { width: 15px; }
  .casino-top10-wrap::after { width: 15px; }
}

.casino-top10-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}

.casino-top10-grid::-webkit-scrollbar {
  height: 6px;
}

.casino-top10-grid::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: 3px;
}

.casino-top10-grid::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.t10-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 300px;
  padding: 20px 16px 18px;
  border-radius: 22px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.t10-card-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.2;
  pointer-events: none;
  color: #888;
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
}

/* 1 место: золотой мерцающий фон, большая «1» */
.t10-card--1 {
  background:
    radial-gradient(ellipse 80% 80% at 50% 0%, rgba(255, 220, 100, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 100% 100% at 30% 50%, rgba(255, 215, 0, 0.25) 0%, transparent 50%),
    linear-gradient(165deg, #c9a227 0%, #b8860b 35%, #8b6914 100%);
  box-shadow: 0 0 60px rgba(201, 162, 39, 0.25), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.t10-card--1 .t10-card-bg {
  color: rgba(255, 255, 255, 0.35);
  opacity: 1;
  font-size: 9rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* 2 место: серебристо-серый */
.t10-card--2 {
  background: linear-gradient(165deg, #4a5568 0%, #2d3748 50%, #1a202c 100%);
}

.t10-card--2 .t10-card-bg {
  color: rgba(255, 255, 255, 0.12);
}

/* 3 место: бронза/оранжевый */
.t10-card--3 {
  background: linear-gradient(165deg, #c2410c 0%, #9a3412 50%, #7c2d12 100%);
}

.t10-card--3 .t10-card-bg {
  color: rgba(255, 255, 255, 0.2);
}

/* 4–10: тёмный нейтральный */
.t10-card--4 .t10-card-bg,
.t10-card--5 .t10-card-bg,
.t10-card--6 .t10-card-bg,
.t10-card--7 .t10-card-bg,
.t10-card--8 .t10-card-bg,
.t10-card--9 .t10-card-bg,
.t10-card--10 .t10-card-bg {
  color: rgba(255, 255, 255, 0.08);
}

.t10-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.t10-card-rating {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
  z-index: 1;
}

.t10-star {
  color: #fff;
}

.t10-score {
  color: #fff;
}

.t10-card-icon-wrap {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}

.t10-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.t10-card-icon-wrap span {
  font-size: 28px;
  font-weight: 700;
  color: #666;
}

.t10-card-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: #fff;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}

.t10-card-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  z-index: 1;
}

.t10-card-pills--bonus .casino-bonus-pill {
  font-size: 12px;
  padding: 6px 12px;
}

.t10-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.t10-pill--yellow {
  background: #facc15;
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.35);
}

.t10-pill--dark {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.t10-card-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.t10-card:hover .t10-card-cta {
  filter: brightness(1.1);
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.5);
}

.t10-card-cta-arrow {
  opacity: 0.95;
  transition: transform 0.2s ease;
}

.t10-card:hover .t10-card-cta-arrow {
  transform: translateX(4px);
}

.gc-card {
  position: relative;
  display: block;
  border-radius: 26px;
  padding: 18px;
  color: var(--gc-text-0);
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(59,166,255,.18) 0%, rgba(59,166,255,0) 55%),
    radial-gradient(120% 140% at 100% 20%, rgba(245,78,160,.14) 0%, rgba(245,78,160,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.02) 100%),
    linear-gradient(180deg, var(--gc-card-0) 0%, var(--gc-card-1) 100%);
  border: 1px solid var(--gc-stroke);
  box-shadow: var(--gc-shadow-0);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
}

.gc-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 26px;
  background: linear-gradient(135deg,
    rgba(247,214,106,.30),
    rgba(59,166,255,.16),
    rgba(53,208,127,.16),
    rgba(247,214,106,.18)
  );
  opacity: .35;
  pointer-events: none;
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  padding: 1px;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.gc-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 6px 14px 6px;
}

.gc-icon-wrap {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 20px;
  background:
    radial-gradient(120% 120% at 20% 15%, rgba(255,255,255,.22), rgba(255,255,255,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--gc-shadow-1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gc-icon {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  object-fit: cover;
  transform: translateZ(0);
}

.gc-icon-wrap span {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-muted);
}

.gc-meta {
  min-width: 0;
}

.gc-title {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: .2px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gc-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gc-sub--pills .casino-bonus-pill {
  font-size: 12px;
  padding: 5px 10px;
}

.gc-pill {
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(15,22,32,.95);
  background: linear-gradient(180deg, var(--gc-gold-0), var(--gc-gold-1));
  box-shadow: 0 8px 18px rgba(247,214,106,.18);
}

.gc-pill--ghost {
  color: var(--gc-text-0);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: none;
}

.gc-rating {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 22px rgba(0,0,0,.30);
  font-weight: 700;
  font-size: 12px;
}

.gc-star {
  color: var(--gc-gold-0);
  text-shadow: 0 6px 18px rgba(247,214,106,.25);
}

.gc-score {
  color: var(--gc-text-0);
}

.gc-cta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--gc-text-0);
  font-weight: 800;
  letter-spacing: .2px;
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, rgba(59,166,255,.22), rgba(59,166,255,.08)),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
  pointer-events: none;
}

.gc-cta-arrow {
  opacity: .9;
  transform: translateX(0);
  transition: transform .22s ease, opacity .22s ease;
}

@media (hover: hover) {
  .gc-card {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  }
  .gc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 70px rgba(0,0,0,.60);
    border-color: rgba(255,255,255,.14);
  }
  .gc-card:hover .gc-cta-arrow {
    transform: translateX(4px);
    opacity: 1;
  }
}

@media (max-width: 420px) {
  .gc-card {
    border-radius: 22px;
  }
  .gc-icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: 18px;
  }
  .gc-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
}

/* --- Страница редактирования «Народный топ» (админ): блоки как на макете --- */
.folk-edit-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  padding: 20px;
}

.folk-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.folk-edit-header .logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
}

.folk-edit-back {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}

.folk-edit-back:hover {
  color: var(--text);
}

.folk-edit-main {
  max-width: 1200px;
  margin: 0 auto;
}

.folk-edit-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.folk-edit-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.folk-edit-form {
  max-width: 600px;
}

.folk-edit-field {
  margin-bottom: 20px;
}

.folk-edit-field .project-form-label {
  margin-bottom: 6px;
}

.folk-edit-actions {
  margin-bottom: 24px;
}

.folk-edit-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-elevated);
  color: var(--text);
}

.folk-edit-btn--primary {
  background: #1a56db;
  border-color: #1a56db;
  color: #fff;
}

.folk-edit-btn--primary:hover:not(:disabled) {
  background: #2563eb;
}

.folk-edit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.folk-edit-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .folk-edit-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .folk-edit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.folk-edit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: grab;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.folk-edit-card:active {
  cursor: grabbing;
}

.folk-edit-card--dragging {
  opacity: 0.6;
}

.folk-edit-card--drag-over {
  box-shadow: 0 0 0 2px var(--border);
}

.quick-link-edit-card {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.quick-link-edit-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.quick-link-edit-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.quick-link-edit-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-link-edit-fields .project-form-input {
  padding: 8px 12px;
  font-size: 14px;
}

.quick-link-edit-del {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.quick-link-edit-del:hover {
  background: rgba(255, 80, 80, 0.2);
  color: #ff5050;
}

.folk-edit-grid--quick-links {
  grid-template-columns: 1fr;
  max-width: 560px;
}

.folk-edit-grid--promo-blocks {
  grid-template-columns: 1fr;
  max-width: 100%;
}

.promo-block-edit-card {
  flex-direction: column;
  align-items: stretch;
  cursor: default;
}

.promo-block-edit-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1a1a;
}

.promo-block-edit-preview {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.promo-block-edit-preview--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #252525;
}

.promo-block-edit-preview--empty span {
  font-size: 32px;
  color: rgba(255,255,255,0.3);
}

.promo-block-edit-file {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.promo-block-edit-url {
  margin-top: 8px;
  font-size: 12px;
}

.promo-block-edit-link-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 4px;
}

.promo-block-edit-link {
  margin-top: 0;
}

@media (min-width: 600px) {
  .folk-edit-grid--quick-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Прозрачный хэндл для touch: перехватывает касания, предотвращает выделение текста */
.touch-drag-handle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.touch-drag-handle:active {
  cursor: grabbing;
}

.folk-edit-logo {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.folk-edit-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.folk-edit-logo span {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
}

.folk-edit-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.folk-edit-pct {
  font-size: 14px;
  font-weight: 600;
  color: #81c784;
}

.folk-edit-fs {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(103, 58, 183, 0.4);
  color: #b39ddb;
}

.folk-edit-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
  margin: 0;
}

/* --- Режим редактирования порядка секций на странице Казино --- */
body.layout-edit-mode {
  padding-bottom: 90px;
}

body.layout-edit-mode .category-toggle {
  display: none;
}

#layoutEditOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 5;
  pointer-events: auto;
}

.layout-edit-section {
  cursor: grab;
  outline: 2px dashed rgba(37, 99, 235, 0.5);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.layout-edit-section:active {
  cursor: grabbing;
}

.layout-edit-section.layout-edit-dragging {
  opacity: 0.7;
  outline-color: rgba(37, 99, 235, 0.9);
}

.layout-edit-section.layout-edit-drag-over {
  outline-color: #2563eb;
  outline-width: 3px;
}

#layoutEditToolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: #111;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.layout-edit-btn {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.layout-edit-btn--save {
  background: #1a56db;
  border-color: #1a56db;
  color: #fff;
}

.layout-edit-btn--save:hover:not(:disabled) {
  background: #2563eb;
}

.layout-edit-btn--save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.layout-edit-btn--back {
  color: var(--text-muted);
}

.layout-edit-btn--back:hover {
  color: var(--text);
}
