/* ===== Atomia — тёмная тема, бирюзовый акцент, сдержанный «премиум» ===== */

/* Фирменное написание названия: «Atom» — светлым, «ia» — акцентом темы */
.brand-name { color: #fff; }
.brand-name .brand-ia { color: #fff; }

/* Атрибут hidden должен всегда скрывать элемент, даже если у него задан display */
[hidden] { display: none !important; }

:root {
  --bg: #0f1113;
  --bg-soft: #15181b;
  --card: #15181b;
  --card-hover: #1b1f23;
  --line: #24282d;
  --line-soft: #1c2024;
  --text: #e7e9eb;
  --muted: #8a9098;
  --accent: #2dd4bf;
  --accent-2: #14b8a6;
  --accent-dark: #0d9488;
  --on-accent: #05211c;
  --green: #4cc98a;
  --red: #f0736f;
  --orange: #2dd4bf;
  --grad: linear-gradient(135deg, #2dd4bf, #14b8a6);
  --radius: 10px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: #63e6d4; }
img { max-width: 100%; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px 40px; width: 100%; flex: 1 0 auto; }

/* ---------- Шапка ---------- */
.topbar {
  background: #14171a;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}
.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.logo img { height: 34px; width: auto; display: block; }
.top-nav { display: flex; gap: 2px; align-items: center; }
.top-nav a {
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: color .18s ease, background .18s ease;
}
.top-nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.top-nav a.active { color: #fff; background: rgba(255, 255, 255, .06); }

.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cart-btn {
  position: relative;
  color: #cfd3d7;
  font-size: 22px;
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  transition: color .18s ease, background .18s ease;
}
.cart-btn:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.bell-btn {
  position: relative;
  color: #cfd3d7;
  font-size: 22px;
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  transition: color .18s ease, background .18s ease;
}
.bell-btn:hover { color: #fff; background: rgba(255, 255, 255, .05); }

/* ---- Уведомления ---- */
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.notif-item.unread { border-color: rgba(45, 212, 191, .45); background: linear-gradient(0deg, rgba(45,212,191,.05), rgba(45,212,191,.05)), var(--card); }
.notif-ic { font-size: 22px; color: var(--accent); line-height: 1; padding-top: 2px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; color: var(--text); }
.notif-text { color: var(--muted); font-size: 14px; margin-top: 3px; }
.notif-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.notif-meta a { color: var(--accent); }
.bell-btn { -webkit-user-drag: none; }

/* ---- События ---- */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 26px; }
.event-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.event-media { height: 140px; background: #101316 center/cover no-repeat; }
.event-body { padding: 12px 14px 14px; }
.event-body h3 { margin: 0 0 6px; font-size: 16px; }
.event-body p { margin: 0; color: var(--muted); font-size: 14px; }
.event-when { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* ---- Форум ---- */
.forum-topic-list { display: flex; flex-direction: column; gap: 10px; }
.forum-topic {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; transition: border-color .18s ease;
}
.forum-topic:hover { border-color: #3a4046; }
.forum-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center;
  background: #1e2429; color: var(--accent); font-weight: 700; overflow: hidden;
}
.forum-avatar img { width: 100%; height: 100%; object-fit: cover; }
.forum-topic-main { flex: 1; min-width: 0; }
.forum-topic-title { font-weight: 600; }
.forum-topic-title a { color: var(--text); }
.forum-topic-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.forum-stats { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.forum-posts { display: flex; flex-direction: column; gap: 12px; }
.forum-post {
  display: flex; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.forum-post.reply { margin-left: 42px; border-left: 3px solid #24282d; }
.forum-post-body { flex: 1; min-width: 0; }
.forum-post-head { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.forum-post-text { color: var(--text); font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.forum-post-actions { display: flex; gap: 12px; margin-top: 8px; font-size: 13px; }
.forum-post-actions a, .forum-post-actions button { color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 13px; padding: 0; }
.forum-post-actions .liked { color: var(--red); }
.forum-reply-form { margin-top: 10px; display: none; }
.forum-reply-form.open { display: block; }
.forum-new { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.pill.pinned { background: rgba(45,212,191,.15); color: var(--accent); }
.pill.locked { background: #2a2f35; color: var(--muted); }

/* ---- Настройки уведомлений ---- */
.notif-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.notif-opt {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
}
.notif-opt input { width: auto; margin-top: 3px; }
.notif-opt span { display: flex; flex-direction: column; }
.notif-opt b { font-weight: 600; font-size: 14px; }
.notif-opt small { color: var(--muted); font-size: 12px; }
.cart-count {
  position: absolute;
  right: -2px;
  top: -2px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cfd3d7;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: color .18s ease, background .18s ease;
}
.user-btn:hover { color: #fff; background: rgba(255, 255, 255, .05); }

/* Поиск в шапке */
.search-form { position: relative; flex: 1; max-width: 460px; margin: 0 10px; }
.search-input {
  width: 100%;
  padding: 9px 40px 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1b1f23;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease, background .18s ease;
}
.search-input:focus { border-color: var(--accent); background: #1e2227; }
.search-input::placeholder { color: #70767d; }
.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8a9098;
  font-size: 21px;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  transition: color .18s ease;
}
.search-btn:hover { color: var(--accent); }

/* Настраиваемая шапка сайта (баннер) */
.site-banner {
  position: relative;
  background: var(--grad);
  color: #fff;
  text-align: center;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 24px;
  overflow: hidden;
}
.site-banner.has-image { background-size: cover; background-position: center; }
.site-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 10, .58);
}
.site-banner .sb-inner { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin: 0 auto; }
.site-banner h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 42px); font-weight: 700; letter-spacing: -.02em; }
.site-banner p { margin: 0; font-size: 16px; opacity: .9; }

/* ---------- Герой ---------- */
.hero {
  background: linear-gradient(180deg, #171a1e, var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 44px 0 38px;
  margin-bottom: 28px;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 38px); font-weight: 700; letter-spacing: -.02em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: var(--muted); font-size: 16px; margin: 0; max-width: 640px; }

/* ---------- Разделы ---------- */
.section-title {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  margin: 34px 0 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
}
.section-title::before {
  content: "";
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: nowrap; }
.section-head .section-title { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
.section-head .catalog-tools { flex: 0 1 auto; }
@media (max-width: 760px) {
  .section-head { flex-wrap: wrap; }
  .section-head .section-title { white-space: normal; }
}
.filter-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.chip {
  padding: 6px 14px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.chip:hover { border-color: #3a4046; color: #fff; }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.chip.active:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent); }

/* ---------- Карточки игр ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  cursor: pointer;
  position: relative;
}
.product-card:hover { transform: translateY(-4px); border-color: #333a41; box-shadow: var(--shadow); }
.product-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #0b0d0f; }
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.product-card:hover .product-media img { transform: scale(1.04); }
.product-media .badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(15, 17, 19, .82);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 5px;
  letter-spacing: .2px;
  backdrop-filter: blur(4px);
}
.product-media .badge.free { background: var(--accent); color: var(--on-accent); }
.product-media .badge.sale { background: var(--red); color: #1a0705; }
.product-media .badge.adult { background: var(--red); color: #fff; top: 10px; left: auto; right: 10px; }
.product-media .badge.removed { background: var(--red); color: #fff; top: auto; bottom: 10px; left: 10px; }

/* Компактная сетка карточек (библиотека в профиле) */
.lib-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.lib-grid .product-info { padding: 12px 13px 13px; gap: 8px; }
.lib-grid .product-title { font-size: 14px; }
.lib-grid .product-foot { justify-content: flex-end; }
.product-info { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.product-title { font-weight: 600; font-size: 16px; color: #fff; line-height: 1.3; letter-spacing: -.01em; }
.product-genre {
  color: var(--muted);
  font-size: 12px;
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 6px;
}
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; padding-top: 4px; }
.product-rating { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.product-rating .bx { color: var(--red); font-size: 16px; }
.product-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.owned-check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: #15181b;
  color: #4cc98a;
  font-size: 14px;
}
.card-price { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.card-price .price-old { font-size: 11px; }
.card-price .price-line { display: flex; align-items: baseline; gap: 6px; }
.sale-note { color: var(--red); font-size: 11px; font-weight: 700; }
.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 5px;
  letter-spacing: .2px;
  vertical-align: middle;
  white-space: nowrap;
}
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: #fff; font-weight: 500; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }

/* ---------- Цены ---------- */
.price { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.price-free { color: var(--green); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 12px; }
.price-row .badge.sale,
.badge.sale { background: var(--red); color: #1a0705; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 5px; letter-spacing: .2px; }
.sale-until { color: var(--red); font-size: 12px; margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.btn-buy {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: filter .16s ease;
}
.btn-buy:hover { filter: brightness(1.08); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, filter .16s ease, color .18s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); color: var(--on-accent); }
.btn-secondary { background: transparent; color: #fff; border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--card-hover); border-color: #3a4046; color: #fff; }
.btn-green { background: var(--green); color: #062015; }
.btn-green:hover { filter: brightness(1.08); color: #062015; }
.btn-danger { background: rgba(240, 115, 111, .12); color: var(--red); border: 1px solid rgba(240, 115, 111, .35); }
.btn-danger:hover { background: rgba(240, 115, 111, .22); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-primary.btn-block { background: var(--accent); color: var(--on-accent); }
.btn-primary.btn-block:hover { filter: brightness(1.08); color: var(--on-accent); }
.btn:disabled, .btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  filter: none;
}

/* ---------- Страница игры ---------- */
.breadcrumbs { color: var(--muted); font-size: 13px; margin: 22px 0 16px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: #fff; }
.game-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.game-main { min-width: 0; }
.game-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  position: relative;
}
.game-poster-box { position: relative; }
.game-poster-box img {
  width: 100%;
  border-radius: 8px;
  display: block;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: #0b0d0f;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.game-title { margin: 0 0 12px; font-size: 1.8rem; line-height: 1.2; color: #fff; letter-spacing: -.02em; }
.game-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.game-meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.game-meta b { color: #cfd3d7; font-weight: 500; }
.game-desc { color: #c4c8cc; font-size: 15px; margin: 0 0 16px; }
.game-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.game-genres .chip { cursor: default; }
.game-buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.game-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-panel .price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game-panel .price-row .price { font-size: 22px; }
.game-panel .meta-list { margin: 6px 0; font-size: 13px; color: var(--muted); }
.game-panel .meta-list div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.game-panel .meta-list b { color: var(--text); font-weight: 500; }
.wish-row { display: flex; gap: 8px; margin-top: 4px; }
.wish-row .btn { flex: 1; justify-content: center; }

/* Виджеты лайк / закладка */
.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--line);
  color: #cfd3d7;
  border-radius: 8px;
  padding: 8px 15px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.react-btn .bx { font-size: 18px; }
.react-btn:hover { border-color: #3a4046; color: #fff; }
.react-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.react-btn.on.fav { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent); }
.react-btn.on .bx-heart, .react-btn.on .bx-heart-broken { color: var(--on-accent); }

/* Лайк / закладка: правый верхний угол карточки game-hero */
.game-reactions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}
.reaction-form { margin: 0; }
.reaction-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: #15181b;
  border: 1px solid var(--line);
  color: #cfd3d7;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.reaction-btn .bx { font-size: 21px; }
.reaction-btn:hover { border-color: #3a4046; color: #fff; }
.reaction-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.reaction-btn.on .bx-heart { color: var(--on-accent); }
.reaction-count { font-size: 13px; font-weight: 700; }
.reaction-label { font-size: 13px; }

.demo-badge, .pill.demo {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  background: var(--line);
  color: var(--text);
  border: 1px solid var(--line);
}

/* Uiverse: С‡РµРєР±РѕРєСЃ-РіР°Р»РѕС‡РєР° (РґРµРјРѕ) */
.checkbox-wrapper-46 { display: flex; align-items: center; }
.checkbox-wrapper-46 input[type="checkbox"] { display: none; visibility: hidden; }
.checkbox-wrapper-46 .cbx { margin: 0; display: inline-flex; align-items: center; -webkit-user-select: none; user-select: none; cursor: pointer; }
.checkbox-wrapper-46 .cbx span { display: inline-block; vertical-align: middle; transform: translate3d(0,0,0); }
.checkbox-wrapper-46 .cbx span:first-child { position: relative; width: 18px; height: 18px; border-radius: 3px; transform: scale(1); vertical-align: middle; border: 1px solid #9098a9; transition: all 0.2s ease; }
.checkbox-wrapper-46 .cbx span:first-child svg { position: absolute; top: 3px; left: 2px; fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16px; stroke-dashoffset: 16px; transition: all 0.3s ease; transition-delay: 0.1s; transform: translate3d(0,0,0); }
.checkbox-wrapper-46 .cbx span:first-child:before { content: ""; width: 100%; height: 100%; background: #506eec; display: block; transform: scale(0); opacity: 1; border-radius: 50%; }
.checkbox-wrapper-46 .cbx span:last-child { padding-left: 8px; color: var(--text); font-size: 14px; line-height: 1.35; }
.checkbox-wrapper-46 .cbx:hover span:first-child { border-color: #506eec; }
.checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child { background: #506eec; border-color: #506eec; animation: wave-46 0.4s ease; }
.checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child svg { stroke-dashoffset: 0; }
.checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child:before { transform: scale(3.5); opacity: 0; transition: all 0.6s ease; }
@keyframes wave-46 { 50% { transform: scale(0.9); } }

/* Чекбоксы в фильтрах каталога */
.checkbox-wrapper-46.filter-check { margin: 8px 0; gap: 0; }
.checkbox-wrapper-46.filter-check .cbx span:last-child { color: var(--text); font-size: 14px; }

/* Чекбоксы уведомлений в настройках профиля */
.checkbox-wrapper-46.notif-opt { align-items: flex-start; }
.checkbox-wrapper-46.notif-opt .cbx { align-items: flex-start; width: 100%; }
.checkbox-wrapper-46.notif-opt .cbx span:first-child { flex-shrink: 0; margin-top: 2px; }
.checkbox-wrapper-46.notif-opt .cbx span:last-child { display: flex; flex-direction: column; padding-left: 10px; }

/* Чекбокс «Удалить» на превью скриншота */
.shot-remove .checkbox-wrapper-46 .cbx span:first-child { width: 15px; height: 15px; }
.shot-remove .checkbox-wrapper-46 .cbx span:first-child svg { top: 2px; left: 1px; width: 11px; height: 9px; }
.shot-remove .checkbox-wrapper-46 .cbx span:last-child { font-size: 12px; color: var(--muted); padding-left: 6px; }
/* Виджеты лайк / закладка (Uiverse, адаптировано под тёмную тему) */
.react-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }

.game-reactions .ui-like,
.game-reactions .ui-bookmark {
  --icon-size: 24px;
  --icon-circle-size: 35px;
  --icon-anmt-duration: .3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.game-reactions .ui-like {
  --icon-secondary-color: #9aa1a7;
  --icon-hover-color: #d3cdcd;
  --icon-primary-color: #e61a1a;
  --icon-circle-border: 1px solid var(--icon-primary-color);
}
.game-reactions .ui-bookmark {
  --icon-secondary-color: #9aa1a7;
  --icon-hover-color: #d8dde1;
  --icon-primary-color: gold;
  --icon-circle-border: 1px solid var(--icon-primary-color);
}
.game-reactions .ui-like input,
.game-reactions .ui-bookmark input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: none;
}

.game-reactions .ui-like .like,
.game-reactions .ui-bookmark .bookmark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-size);
  height: auto;
  fill: var(--icon-secondary-color);
  cursor: pointer;
  transform-origin: top;
  transition: .2s;
}

.game-reactions .like::after,
.game-reactions .bookmark::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: scale(0);
  box-shadow:
    0 30px 0 -4px var(--icon-primary-color),
    30px 0 0 -4px var(--icon-primary-color),
    0 -30px 0 -4px var(--icon-primary-color),
    -30px 0 0 -4px var(--icon-primary-color),
    -22px 22px 0 -4px var(--icon-primary-color),
    -22px -22px 0 -4px var(--icon-primary-color),
    22px -22px 0 -4px var(--icon-primary-color),
    22px 22px 0 -4px var(--icon-primary-color);
}
.game-reactions .like::before,
.game-reactions .bookmark::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: var(--icon-circle-border);
  opacity: 0;
}

.game-reactions .ui-like:hover .like,
.game-reactions .ui-bookmark:hover .bookmark { fill: var(--icon-hover-color); }

/* Заливка остаётся всегда, анимация — только при клике.
   После перезагрузки форма уже помечена is-on, поэтому эффект не повторяется. */
.game-reactions .ui-like input:checked + .like,
.game-reactions .ui-bookmark input:checked + .bookmark { fill: var(--icon-primary-color); }

.react-form:not(.is-on) .ui-like input:checked + .like::after,
.react-form:not(.is-on) .ui-bookmark input:checked + .bookmark::after {
  animation: uiCircles var(--icon-anmt-duration) cubic-bezier(.175, .885, .32, 1.275) forwards;
  animation-delay: var(--icon-anmt-duration);
}
.react-form:not(.is-on) .ui-like input:checked + .like {
  animation: uiLike var(--icon-anmt-duration) forwards;
  transition-delay: .3s;
}
.react-form:not(.is-on) .ui-bookmark input:checked + .bookmark {
  animation: uiBookmark var(--icon-anmt-duration) forwards;
  transition-delay: .3s;
}
.react-form:not(.is-on) .ui-like input:checked + .like::before,
.react-form:not(.is-on) .ui-bookmark input:checked + .bookmark::before {
  animation: uiCircle var(--icon-anmt-duration) cubic-bezier(.175, .885, .32, 1.275) forwards;
  animation-delay: var(--icon-anmt-duration);
}

@keyframes uiLike {
  50% { transform: scaleY(.6); }
  100% { transform: scaleY(1); }
}
@keyframes uiBookmark {
  50% { transform: scaleY(.6); }
  100% { transform: scaleY(1); }
}
@keyframes uiCircle {
  from { width: 0; height: 0; opacity: 0; }
  90% { width: var(--icon-circle-size); height: var(--icon-circle-size); opacity: 1; }
  to { opacity: 0; }
}
@keyframes uiCircles {
  from { transform: scale(0); }
  40% { opacity: 1; }
  to { transform: scale(.8); opacity: 0; }
}

/* ---------- Галерея ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.gallery a { border-radius: 8px; overflow: hidden; display: block; border: 1px solid var(--line); background: #0b0d0f; }
.gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; transition: transform .2s; }
.gallery a:hover img { transform: scale(1.04); }

/* ---------- Лента скриншотов/видео на странице игры ---------- */
.media-slider { position: relative; margin-top: 18px; }
.ms-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0b0d0f;
  outline: none;
  cursor: grab;
}
.ms-track:active { cursor: grabbing; }
.ms-track::-webkit-scrollbar { height: 0; display: none; }
.ms-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.ms-slide a { display: block; width: 100%; }
.ms-slide img, .ms-slide video {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  display: block;
  background: #000;
}
.ms-slide img { -webkit-user-drag: none; user-select: none; }
.ms-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #fff;
  font-size: 44px;
  line-height: 1;
  padding: 0 10px;
  cursor: pointer;
  z-index: 2;
  opacity: .8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .85);
  transition: opacity .2s, transform .15s;
}
.ms-nav:hover { opacity: 1; }
.ms-nav:active { transform: translateY(-50%) scale(.9); }
.ms-prev { left: 8px; }
.ms-next { right: 8px; }
.ms-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.ms-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: #3a4046; cursor: pointer; padding: 0; }
.ms-dot.on { background: var(--accent); }

/* ---------- Превью скриншотов при публикации ---------- */
.shots-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.shot-thumb { display: block; position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #0b0d0f; }
.shot-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.shot-remove { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 6px 8px; background: rgba(0,0,0,.35); }
.shot-remove input { accent-color: var(--accent); }

/* ---------- Комментарии ---------- */
.comments { margin-top: 34px; }
.comments h2 { font-size: 20px; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.comment-form textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  padding: 12px 14px;
  background: #131619;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #fff;
  font: inherit;
  font-size: 14px;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form .cf-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

.comment-list { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.comment {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.comment.hidden { opacity: .55; border-style: dashed; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.comment-author { color: #fff; font-weight: 600; font-size: 14px; }
.comment-author.admin::after { content: "админ"; margin-left: 6px; font-size: 10px; background: var(--accent); color: var(--on-accent); padding: 1px 6px; border-radius: 6px; vertical-align: middle; }
.comment-date { color: var(--muted); font-size: 12px; margin-left: auto; }
.comment-body { color: #d3d6da; font-size: 14px; white-space: pre-line; }
.comment-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: 13px; }
.comment-actions button, .comment-actions a {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; padding: 0;
}
.comment-actions button:hover, .comment-actions a:hover { color: var(--accent); }
.comment-actions .liked { color: var(--accent); }
.comment-replies { margin: 12px 0 0 22px; display: flex; flex-direction: column; gap: 12px; }
.reply-form { margin-top: 10px; display: none; }
.reply-form.open { display: block; }
.reply-form textarea { width: 100%; min-height: 60px; resize: vertical; padding: 10px 12px; background: #131619; border: 1px solid var(--line); border-radius: 8px; color: #fff; font: inherit; font-size: 13px; }

/* ---------- Алерты ---------- */
.alert { padding: 12px 16px; border-radius: 9px; margin: 14px 0; font-size: 14px; }
.alert-ok { background: rgba(76, 201, 138, .1); border: 1px solid rgba(76, 201, 138, .35); color: var(--green); }
.alert-error { background: rgba(240, 115, 111, .1); border: 1px solid rgba(240, 115, 111, .35); color: var(--red); }
.alert-note { background: transparent; border: 0; color: var(--muted); font-size: 13px; }

/* ---------- Формы ---------- */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 560px; }
.form-card h2 { margin: 0 0 18px; font-size: 20px; }
.form-group { margin-bottom: 16px; }
.form-group[hidden] { display: none; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #cfd3d7; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: #131619;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 14px;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-help { font-size: 13px; text-align: center; margin-top: 14px; color: var(--muted); }

/* Зона загрузки файла (drag & drop) */
.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  background: linear-gradient(180deg, #14171a 0%, #101316 100%);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, box-shadow .2s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(45, 212, 191, .05);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .08);
}
.dropzone .dz-icon {
  font-size: 32px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: rgba(45, 212, 191, .1);
  border: 1px solid rgba(45, 212, 191, .22);
}
.dropzone .dz-name { color: #fff; font-weight: 600; margin-top: 8px; word-break: break-all; }
.dropzone input[type=file] { display: none; }

/* Компактный выбор файла вместо нативной плашки браузера */
.file-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 11px 15px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #14171a 0%, #101316 100%);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.file-pick:hover, .file-pick.dragover, .file-pick:focus-within {
  border-color: var(--accent);
  background: rgba(45, 212, 191, .05);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .08);
}
.file-pick > .bx {
  font-size: 22px;
  color: var(--accent);
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(45, 212, 191, .1);
  border: 1px solid rgba(45, 212, 191, .2);
}
.file-pick .fp-body { min-width: 0; flex: 1 1 auto; }
.file-pick .fp-title { display: block; color: #f0f3f5; font-weight: 600; font-size: 13px; }
.file-pick .fp-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.file-pick .fp-name {
  flex: 0 1 auto;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
}
.file-pick .fp-name:empty { display: none; }
.file-pick input[type=file] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
@media (max-width: 560px) {
  .file-pick { flex-wrap: wrap; }
  .file-pick .fp-name { max-width: 100%; margin-left: 50px; }
}

/* ---------- Прогресс загрузки архива ---------- */
.up-bar { height: 8px; border-radius: 6px; background: #1a1e22; border: 1px solid var(--line); overflow: hidden; }
.up-fill { height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
.up-fill.done { background: var(--green); }
.up-fill.error { background: var(--red); }
.up-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; }
.up-meta #upPct { color: #fff; font-weight: 600; }
.up-meta .muted { color: var(--muted); }

/* ---------- Корзина ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.cart-item img { width: 96px; border-radius: 6px; aspect-ratio: 16/9; object-fit: cover; background: #0b0d0f; }
.cart-item .ci-info { flex: 1; }
.cart-item .ci-title { color: #fff; font-weight: 600; }
.cart-item .ci-price { color: var(--green); font-weight: 700; }
.cart-item .ci-remove { color: var(--muted); font-size: 20px; padding: 6px; }
.cart-item .ci-remove:hover { color: var(--red); }
.cart-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 16px; }
.cart-summary .total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; margin: 14px 0 4px; color: #fff; }
.cart-summary .total small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .bx { font-size: 56px; color: var(--line); }
.empty-state p { font-size: 16px; }

/* ---------- Оформление заказа ---------- */
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.pay-method { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: #131619; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: border-color .18s ease; }
.pay-method:hover { border-color: #3a4046; }
.pay-method input { margin-top: 3px; }
.pay-method b { color: #fff; }
.pay-method .pm-desc { font-size: 12px; color: var(--muted); }
.wallet-box { background: #131619; border: 1px dashed #3a4046; border-radius: 8px; padding: 12px; font-family: monospace; font-size: 13px; word-break: break-all; color: var(--accent); margin: 10px 0; }

/* ---------- Таблицы (админка, библиотека) ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.tbl th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
table.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.pill { padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.pill.pending { background: rgba(45, 212, 191, .13); color: var(--accent); }
.pill.approved { background: rgba(76, 201, 138, .13); color: var(--green); }
.pill.paid { background: rgba(76, 201, 138, .13); color: var(--green); }
.pill.declined, .pill.cancelled, .pill.deleted { background: rgba(240, 115, 111, .13); color: var(--red); }
.pill.draft { background: rgba(138, 144, 152, .14); color: #c4c8cc; }
.pill.adult { background: var(--red); color: #fff; }
.pill.hidden { background: rgba(138, 144, 152, .14); color: var(--muted); }
.pill.owner { background: var(--accent); color: var(--on-accent); }

/* ---------- Вики ---------- */
.wiki-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.wiki-nav { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 16px; }
.wiki-nav h3 { margin: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.wiki-nav h3:first-child { margin-top: 0; }
.wiki-nav a { display: block; padding: 7px 10px; border-radius: 7px; color: #c4c8cc; font-size: 14px; }
.wiki-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.wiki-nav a.active { background: var(--accent); color: var(--on-accent); }
.wiki-body { max-width: 760px; }
.wiki-body h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.wiki-body .wiki-upd { color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.wiki-body h2 { font-size: 19px; margin: 28px 0 10px; color: #fff; }
.wiki-body h3 { font-size: 16px; margin: 20px 0 8px; color: #fff; }
.wiki-body p { color: #c4c8cc; }
.wiki-body ul, .wiki-body ol { color: #c4c8cc; padding-left: 22px; }
.wiki-body li { margin: 6px 0; }
.wiki-body b, .wiki-body strong { color: #fff; }
.wiki-body pre { background: #0c0e10; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 10px 0; }
.wiki-body code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--accent); }
.wiki-body pre code { color: #c4c8cc; white-space: pre; }
.wiki-body img { border-radius: 8px; }
.wiki-dl { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Профиль ---------- */
.profile-banner {
  height: 200px;
  border-radius: var(--radius);
  background: var(--grad);
  background-size: cover;
  background-position: center;
  margin: 22px 0 20px;
  position: relative;
  overflow: hidden;
}
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.profile-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.profile-avatar {
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 700; color: var(--on-accent); margin-bottom: 14px;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-side h2 { margin: 0 0 4px; font-size: 20px; }
.profile-side .role { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.profile-side .bio { color: #c4c8cc; font-size: 13px; margin: 10px 0; white-space: pre-line; }
.profile-side .meta { color: var(--muted); font-size: 13px; margin: 12px 0; }
.profile-side .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.profile-main h1 { margin: 0 0 4px; font-size: 24px; }
.profile-main .lib-count { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

/* ---------- Библиотека ---------- */
.lib-item { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.lib-item img { width: 110px; border-radius: 6px; aspect-ratio: 16/9; object-fit: cover; background: #0b0d0f; }
.lib-item .li-info { flex: 1; }
.lib-item .li-title { color: #fff; font-weight: 600; }
.lib-item .li-meta { color: var(--muted); font-size: 12px; }

/* ---------- Футер ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 26px 0; color: var(--muted); font-size: 13px; background: #14171a; flex-shrink: 0; }
.site-footer .foot-inner { max-width: 1400px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: #c4c8cc; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Аватары ---------- */
.nav-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.nav-avatar-letter {
  background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.comment-avatar { object-fit: cover; }

/* ---------- Статистика профиля ---------- */
.profile-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.stat-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
  color: inherit; text-align: left; width: 100%;
  font: inherit; cursor: pointer; text-decoration: none;
  transition: border-color .15s, background .15s, transform .1s;
}
a.stat-card:hover, button.stat-card:hover { border-color: var(--accent); background: #1a1e22; }
.stat-card.active { border-color: var(--accent); background: #1a1e22; }
a.stat-card:active, button.stat-card:active { transform: translateY(1px); }
.stat-card > .bx { font-size: 26px; color: var(--accent); flex: 0 0 auto; }
.stat-card b { display: block; font-size: 20px; color: #fff; line-height: 1.1; }
.stat-card span { font-size: 12px; color: var(--muted); }

/* ---------- Модальные окна профиля ---------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; z-index: 1; width: 100%; max-width: 560px; max-height: 82vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.modal-box h2 { margin: 0 0 16px; display: flex; align-items: center; gap: 9px; font-size: 20px; }
.modal-box h2 > .bx { color: var(--accent); }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: #1a1e22; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.modal-close:hover { color: #fff; border-color: #3a4046; }
.modal-list { display: flex; flex-direction: column; gap: 6px; }
.modal-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px;
  background: #191d20; border: 1px solid var(--line); color: var(--text, #e6e8ea); text-decoration: none;
}
.modal-row:hover { border-color: var(--accent); }
.modal-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-row .row-go { color: var(--muted); }

.ach-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ach-card { display: flex; gap: 12px; padding: 12px; border-radius: 10px; background: #191d20; border: 1px solid var(--line); }
.ach-icon {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 10px; background: #101315;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ach-icon img { width: 100%; height: 100%; object-fit: cover; }
.ach-icon .bx { font-size: 26px; color: #f0c24a; }
.ach-body { min-width: 0; flex: 1; }
.ach-title { font-weight: 600; color: #fff; }
.ach-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ach-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.ach-meta .bx { font-size: 14px; }

.product-media .badge.moderation { background: #e0a33a; color: #1a1205; }
.product-media .badge.draft { background: #5a6169; color: #fff; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.mini-stats > div { background: #131619; border: 1px solid var(--line); border-radius: 9px; padding: 8px 4px; text-align: center; }
.mini-stats b { display: block; color: #fff; font-size: 18px; }
.mini-stats span { font-size: 11px; color: var(--muted); }

/* ---------- Публичная страница профиля ---------- */
.pub-page { --pub-accent: var(--accent); }
.pub-cover {
  height: 220px;
  border-radius: var(--radius);
  background: var(--grad);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  margin: 22px 0 -54px;
}
.pub-cover.has-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,14,0) 35%, rgba(10,12,14,.6));
}
.pub-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px 18px;
  margin-bottom: 22px;
}
.pub-avatar {
  width: 104px; height: 104px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 700;
  background: var(--pub-accent); color: #fff;
  border: 4px solid var(--card);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  overflow: hidden;
  margin-top: -46px;
  flex-shrink: 0;
}
.pub-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pub-identity { flex: 1; min-width: 200px; }
.pub-identity h1 { margin: 0 0 6px; font-size: 24px; }
.pub-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.pub-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  background: var(--pub-accent); color: #fff;
}
.pub-badge.soft { background: #23282d; color: #c4c8cc; }
.pub-status { margin: 8px 0 0; color: #c4c8cc; font-size: 14px; }
.pub-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pub-side { display: flex; flex-direction: column; gap: 16px; }
.pub-block { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.pub-block:last-child { border-bottom: 0; padding-bottom: 0; }
.pub-block-title {
  margin: 0 0 8px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.pub-block-title .bx { color: var(--pub-accent); font-size: 16px; }
.pub-side .bio { color: #c4c8cc; font-size: 13px; }
.pub-side .meta { color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.pub-side .meta a { color: #c4c8cc; word-break: break-all; }
.pub-side .meta a:hover { color: var(--pub-accent); }
.pub-side .mini-stats { grid-template-columns: repeat(2, 1fr); }
.pub-side .mini-stats b { color: var(--pub-accent); }
.pub-pin {
  display: flex; gap: 10px; align-items: center;
  padding: 8px; border-radius: 9px;
  background: #131619; border: 1px solid var(--line);
  color: #e6e8ea; font-size: 13px;
}
.pub-pin:hover { border-color: var(--pub-accent); }
.pub-pin img { width: 56px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.pub-sec-title { margin: 0 0 14px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.pub-sec-title .bx { color: var(--pub-accent, var(--accent)); }
.pub-page .ach-card:hover { border-color: var(--pub-accent); }
.pub-page .btn-primary { background: var(--pub-accent); border-color: var(--pub-accent); }
@media (max-width: 820px) {
  .pub-cover { height: 160px; margin-bottom: -40px; }
  .pub-head { align-items: flex-start; }
  .pub-avatar { width: 84px; height: 84px; font-size: 32px; margin-top: -38px; }
  .pub-head-actions { width: 100%; }
  .pub-grid { grid-template-columns: 1fr; }
}

/* ---------- Настройки: моя страница ---------- */
.accent-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.accent-row input[type="color"] {
  width: 52px; height: 42px; padding: 4px; cursor: pointer;
  background: #131619; border: 1px solid var(--line); border-radius: 8px;
}
.accent-row input[type="text"] { flex: 1; min-width: 140px; }
.page-preview-link { display: flex; gap: 8px; flex-wrap: wrap; }

.settings-avatar { display: flex; gap: 16px; align-items: flex-start; }
.settings-avatar .profile-avatar { margin-bottom: 0; }
.bio.muted { color: var(--muted); font-style: italic; }

/* ---------- Настройки профиля: разделы ---------- */
.settings-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; position: sticky; top: 84px;
}
.settings-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; color: #c4c8cc; font-size: 14px; line-height: 1.2;
}
.settings-nav a .bx { font-size: 18px; color: var(--muted); flex-shrink: 0; }
.settings-nav a:hover { background: #131619; color: #fff; }
.settings-nav a:hover .bx { color: var(--accent); }
.settings-nav a.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.settings-nav a.active .bx { color: var(--on-accent); }
.settings-nav a.settings-nav-admin { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: var(--accent); font-weight: 600; }
.settings-nav a.settings-nav-admin .bx { color: var(--accent); }
.settings-nav a.settings-nav-admin:hover { background: rgba(77, 107, 254, .12); color: #fff; }
.admin-settings-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 0 0 18px; border: 1px solid rgba(77, 107, 254, .45); border-radius: 12px; background: linear-gradient(135deg, rgba(77, 107, 254, .16), rgba(77, 107, 254, .04)); flex-wrap: wrap; }
.admin-settings-banner .asb-icon { width: 42px; height: 42px; flex: 0 0 42px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 22px; }
.admin-settings-banner .asb-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 180px; }
.admin-settings-banner .asb-text b { color: #fff; font-size: 14px; }
.admin-settings-banner .asb-text span { color: var(--muted); font-size: 12.5px; }
.profile-links { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.profile-link-row { display: flex; gap: 8px; align-items: center; }
.profile-link-row input { flex: 1; }

/* ---------- Редактор форматированного описания ---------- */
.rich-editor { border: 1px solid var(--line); border-radius: 10px; background: #131619; overflow: hidden; }
.rich-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #101214; }
.rich-toolbar button { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent; color: #c4c8cc; font: inherit; font-size: 14px; cursor: pointer; }
.rich-toolbar button:hover { background: #1c2024; color: #fff; }
.rich-toolbar button.active { background: var(--accent); color: var(--on-accent); }
.rich-toolbar button .bx { font-size: 17px; }
.rich-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.rich-spacer { flex: 1; }
.rich-html-toggle { font-size: 12px !important; gap: 4px; }
.rich-area { min-height: 170px; max-height: 520px; overflow: auto; padding: 14px 16px; color: #e6e8ea; font-size: 14px; line-height: 1.55; outline: none; }
.rich-area:focus { background: #15181b; }
.rich-area[data-placeholder]:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rich-area p { margin: 0 0 10px; }
.rich-area ul, .rich-area ol { margin: 0 0 10px; padding-left: 22px; }
.rich-area h3 { font-size: 17px; margin: 14px 0 8px; color: #fff; }
.rich-area blockquote { margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid var(--accent); color: #cfd3d7; }
.rich-area pre { background: #0d0f11; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; overflow: auto; }
.rich-source { display: block; width: 100%; min-height: 190px; padding: 14px 16px; border: 0; outline: none; resize: vertical; background: #0d0f11; color: #e6e8ea; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.5; }
.rich-source[hidden] { display: none; }
.rich-hint { padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; background: #101214; }
.rich-hint code { background: #1c2024; border-radius: 4px; padding: 1px 4px; }

/* ---------- Вывод форматированного описания ---------- */
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text p { margin: 0 0 10px; }
.rich-text h3 { font-size: 17px; color: #fff; margin: 18px 0 8px; }
.rich-text h4 { font-size: 15px; color: #fff; margin: 16px 0 8px; }
.rich-text ul, .rich-text ol { margin: 0 0 12px; padding-left: 22px; }
.rich-text li { margin: 0 0 4px; }
.rich-text blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--accent); background: #131619; color: #cfd3d7; }
.rich-text code { background: #131619; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
.rich-text pre { background: #0d0f11; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow: auto; margin: 0 0 12px; }
.rich-text pre code { background: none; border: 0; padding: 0; }
.rich-text a { color: var(--accent); text-decoration: underline; }
.settings-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.settings-panel > h2 { margin: 0 0 6px; font-size: 20px; }
.settings-panel .settings-sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.settings-panel .settings-actions { margin-top: 22px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 820px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Админка: пользователи ---------- */
.admin-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0 18px; max-width: 660px; }
.admin-search input { flex: 1; min-width: 200px; padding: 10px 14px; background: #131619; border: 1px solid var(--line); border-radius: 8px; color: #fff; font: inherit; }
.admin-search input:focus { outline: none; border-color: var(--accent); }
.admin-search select { padding: 10px 14px; background: #131619; border: 1px solid var(--line); border-radius: 8px; color: #fff; font: inherit; min-width: 200px; }
.admin-search select:focus { outline: none; border-color: var(--accent); }
.admin-log-note { color: var(--muted); font-size: 13px; margin: 8px 0 16px; }
.user-cell { display: flex; align-items: center; gap: 8px; }
.admin-user-card { display: flex; gap: 18px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.admin-user-card .profile-avatar { margin-bottom: 0; }
.admin-user-card .meta > div { margin: 4px 0; }
.admin-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.admin-actions-grid h3 { font-size: 16px; color: #fff; }

/* ---------- Общие списки/строки (вне панели игры) ---------- */
.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta-list { font-size: 13px; color: var(--muted); }
.meta-list div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.meta-list b { color: var(--text); font-weight: 500; }

/* ---------- Адаптив ---------- */
@media (max-width: 980px) {
  .game-layout, .cart-layout, .wiki-layout, .profile-grid { grid-template-columns: 1fr; }
  .search-form { order: 3; max-width: 100%; width: 100%; margin: 8px 0 0; }
  .topbar-inner { flex-wrap: wrap; }
  .top-nav { order: 2; }
}
@media (max-width: 640px) {
  .game-hero { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .top-nav { display: none; }
}

/* ---------- Дашборд статистики: волновые графики и инфографика ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.dash-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.dash-card h3 { margin: 0 0 4px; font-size: 15px; color: #fff; }
.dash-card .dash-sub { color: var(--muted); font-size: 12px; margin-bottom: 14px; }

.wave-chart { width: 100%; height: auto; display: block; overflow: visible; }
.wave-chart .grid-line { stroke: var(--line); stroke-width: 1; }
.wave-chart .axis-label { fill: var(--muted); font-size: 11px; }
.wave-chart .wave-area { fill: url(#waveGrad); }
.wave-chart .wave-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.wave-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.range-tabs { display: flex; gap: 3px; background: #131619; border: 1px solid var(--line); border-radius: 8px; padding: 3px; flex: 0 0 auto; }
.range-tabs a { padding: 4px 12px; border-radius: 6px; font-size: 12px; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .12s, background .12s; }
.range-tabs a:hover:not(.active) { color: #fff; }
.range-tabs a.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.wave-wrap { position: relative; }
.wave-guide { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; transition: opacity .1s; pointer-events: none; }
.wave-guide.on { opacity: .65; }
.wave-dot { fill: var(--accent); stroke: #0f1113; stroke-width: 2; opacity: 0; pointer-events: none; }
.wave-dot.on { opacity: 1; }
.wave-tip { position: absolute; top: 0; left: 0; background: #0b0d0f; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; line-height: 1.35; pointer-events: none; opacity: 0; transition: opacity .1s; white-space: nowrap; z-index: 5; box-shadow: 0 8px 20px rgba(0, 0, 0, .55); }
.wave-tip.on { opacity: 1; }
.wave-tip b { display: block; color: #fff; margin-bottom: 2px; }
.wave-tip span { display: block; color: var(--muted); }
.wave-tip .wt-rev { color: var(--accent); font-weight: 600; }

.dash-ring { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dash-ring > svg { flex: 0 0 auto; }
.ring-legend { flex: 1; min-width: 150px; font-size: 13px; }
.ring-legend .rl-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--muted); }
.ring-legend .dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

.dash-bars { margin-top: 4px; }
.dash-bar { margin: 12px 0; }
.dash-bar .db-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 6px; }
.dash-bar .db-top b { color: #fff; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bar .db-top span { color: var(--muted); flex: 0 0 auto; }
.dash-bar .db-track { height: 8px; background: #131619; border-radius: 6px; overflow: hidden; }
.dash-bar .db-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---- Улучшенная статистика для разработчика ---- */
.kpi-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; margin-top: 4px; padding: 1px 7px; border-radius: 20px; line-height: 1.5; }
.kpi-delta .bx { font-size: 13px; }
.kpi-delta.up { background: rgba(76, 201, 138, .13); color: var(--green); }
.kpi-delta.down { background: rgba(240, 115, 111, .13); color: var(--red); }
.kpi-delta.flat { background: rgba(138, 144, 152, .14); color: var(--muted); }
.stat-card .kpi-delta { align-self: flex-start; }

.chart-toggles { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chart-toggles button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line);
  background: #131619; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: color .12s, border-color .12s, background .12s;
}
.chart-toggles button:hover { color: #fff; border-color: var(--accent-2); }
.chart-toggles button.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.wave-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.wave-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.wave-legend .sw { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.wave-legend .sw.line { height: 3px; border-radius: 2px; }
.wave-legend .sw.rev { background: var(--accent); }
.wave-legend .sw.sold { background: #4a5560; }
.wave-legend .sw.prev { background: repeating-linear-gradient(90deg, #6b7280 0 3px, transparent 3px 6px); }
.wave-chart .wave-bar { fill: #3a434d; }
.wave-chart .wave-bar-hi { fill: var(--accent-2); opacity: .55; }
.wave-chart .wave-prev { fill: none; stroke: #6b7280; stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linejoin: round; }
.wave-chart .axis-label.right { fill: #6b7280; }
.wave-legend .sw.views { background: #5b9bff; }
.wave-legend .sw.dl { background: #c98a2b; }
.wave-chart .wave-area-ev { fill: url(#evGrad); }
.wave-chart .wave-line-ev { fill: none; stroke: #5b9bff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wave-chart .wave-bar-dl { fill: #c98a2b; opacity: .75; }
.ev-tip .wt-views { color: #5b9bff; font-weight: 600; }
.ev-tip .wt-dl { color: #c98a2b; font-weight: 600; }

.stat-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.stat-toolbar .st-left { color: var(--muted); font-size: 13px; }
.stat-toolbar .st-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-export {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: border-color .12s, color .12s;
}
.btn-export:hover { border-color: var(--accent); color: var(--accent); }

.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; min-height: 150px; }
.week-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-col .wc-val { font-size: 11px; color: var(--muted); font-weight: 600; }
.week-col .wc-track { width: 100%; height: 110px; background: #131619; border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.week-col .wc-fill { width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--accent), var(--accent-2)); min-height: 2px; transition: height .3s; }
.week-col.best .wc-fill { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.week-col .wc-day { font-size: 12px; color: var(--muted); }
.week-col.best .wc-day { color: #fbbf24; font-weight: 700; }

.conv-list .dash-bar .db-fill.conv { background: linear-gradient(90deg, #8b5cf6, #6d28d9); }
.conv-meta { font-size: 11px; color: var(--muted); }

.tbl-sortable th { cursor: pointer; user-select: none; white-space: nowrap; }
.tbl-sortable th:hover { color: #fff; }
.tbl-sortable th .sort-ic { opacity: .3; margin-left: 3px; font-size: 12px; }
.tbl-sortable th.sorted .sort-ic { opacity: 1; color: var(--accent); }

@media (max-width: 720px) {
  .week-grid { gap: 4px; }
  .week-col .wc-val { display: none; }
}
}

/* ---- Скрытый фильтр каталога ---- */
.catalog-tools { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.catalog-tools .filter-links { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; min-width: 0; align-items: center; }
.catalog-tools .chip { flex: 0 1 auto; min-width: 0; white-space: nowrap; padding: 6px 10px; }
.filter-toggle { position: relative; flex: 0 0 auto; }
.filter-toggle.btn {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 400;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-toggle.btn:hover { background: transparent; border-color: #3a4046; color: #fff; }
.filter-toggle.has-filters { border-color: var(--accent); color: #fff; }
@media (max-width: 900px) {
  .catalog-tools { gap: 6px; }
  .catalog-tools .filter-links { gap: 4px; }
  .catalog-tools .chip { padding: 5px 8px; font-size: 12px; }
  .filter-toggle.btn { padding: 5px 10px; font-size: 12px; }
}
@media (max-width: 620px) {
  .catalog-tools .chip { padding: 5px 7px; }
  .filter-toggle.btn span.filter-count + i, .filter-toggle.btn i { font-size: 14px; }
}
.filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  background: var(--accent); color: var(--on-accent);
  border-radius: 9px; font-size: 11px; font-weight: 700;
}

.filter-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 0 0 20px; animation: filter-drop .16s ease;
}
@keyframes filter-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.filter-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.filter-block { min-width: 0; }
.filter-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-price { display: flex; align-items: center; gap: 8px; }
.filter-price input {
  width: 100%; min-width: 0; padding: 8px 10px; background: #131619;
  border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit;
}
.filter-price input:focus { outline: none; border-color: var(--accent); }
.filter-price span { color: var(--muted); }
.filter-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--text); font-size: 14px; cursor: pointer; }
.filter-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.filter-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---- Достижения (редактор автора) ---- */
.ach-editor { margin-top: 10px; }
.ach-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.ach-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
}
.ach-item > i { font-size: 22px; color: var(--accent); flex: 0 0 auto; }
.ach-info { flex: 1; min-width: 0; }
.ach-name { color: #fff; font-weight: 600; }
.ach-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ach-desc { color: var(--muted); font-size: 13px; margin-top: 4px; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* ---- Одноразовое окно «Скачать лаунчер» (только на сайте) ---- */
.app-promo {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 8, 9, .72); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s ease; padding: 20px;
}
.app-promo.open { opacity: 1; }
.app-promo-card {
  position: relative; width: 100%; max-width: 440px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px 26px 22px; text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  transform: translateY(12px) scale(.98); transition: transform .2s ease;
}
.app-promo.open .app-promo-card { transform: none; }
.app-promo-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: 22px; cursor: pointer;
}
.app-promo-close:hover { background: var(--card-hover); color: #fff; }
.app-promo-icon {
  width: 66px; height: 66px; margin: 4px auto 16px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(45, 212, 191, .12); color: var(--accent); font-size: 34px;
}
.app-promo h2 { margin: 0 0 10px; font-size: 20px; color: #fff; }
.app-promo p { margin: 0 0 20px; color: #c4c8cc; font-size: 14px; line-height: 1.55; }
.app-promo-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.app-promo-note { margin-top: 14px; color: var(--muted); font-size: 12px; }

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

/* ===== Достижения игры (страница игры, Steam-подобный вид) ===== */
.achievements { margin-top: 28px; }
.achievements h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.achievements h2 .bx-trophy { color: var(--accent); }
.ach-count { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; }
.ach-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 6px 0; }
.ach-bar.overall { height: 8px; margin-bottom: 16px; }
.ach-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .4s ease; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ach-cell {
  display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); align-items: flex-start;
}
.ach-cell.is-unlocked { border-color: rgba(45, 212, 191, .45); box-shadow: 0 0 0 1px rgba(45, 212, 191, .12) inset; }
.ach-cell.is-locked .ach-icon { opacity: .55; filter: grayscale(1); }
.ach-icon {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: rgba(45, 212, 191, .12); color: var(--accent);
}
.ach-cell.is-unlocked .ach-icon { background: rgba(45, 212, 191, .2); }
.ach-body { min-width: 0; flex: 1; }
.ach-title { font-weight: 600; color: #fff; font-size: 14px; }
.ach-desc { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 3px; }
.ach-cond { color: var(--muted); font-size: 12px; margin-top: 6px; }
.ach-prog-num { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.ach-date { color: var(--accent); font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.ach-note { color: var(--muted); font-size: 12.5px; margin-top: 14px; line-height: 1.5; }
@media (max-width: 560px) { .ach-grid { grid-template-columns: 1fr; } }

/* ===== Выбор жанров (красивый список) ===== */
.genre-picker { position: relative; max-width: 520px; }
.genre-picker-field {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: #fff; font: inherit; text-align: left; cursor: pointer;
  transition: border-color .18s ease;
}
.genre-picker-field:hover { border-color: #3a4046; }
.genre-picker.is-open .genre-picker-field { border-color: var(--accent); }
.gp-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.gp-chip {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 7px;
  background: rgba(45, 212, 191, .14); color: var(--accent);
  font-size: 13px; line-height: 1.4;
}
.gp-placeholder { color: var(--muted); font-size: 14px; }
.gp-caret { color: var(--muted); transition: transform .18s ease; flex: 0 0 auto; }
.genre-picker.is-open .gp-caret { transform: rotate(180deg); }

.genre-picker-pop {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px);
  background: #16191c; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5); overflow: hidden;
}
.gp-search-wrap { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.gp-search-wrap i { color: var(--muted); font-size: 18px; }
.gp-search { flex: 1; background: none; border: 0; outline: none; color: #fff; font: inherit; font-size: 14px; }
.gp-search::placeholder { color: var(--muted); }
.gp-list { max-height: 260px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.gp-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 8px 10px; border: 0; border-radius: 8px;
  background: none; color: #d7dadd; font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.gp-opt:hover { background: var(--card-hover, #1d2126); color: #fff; }
.gp-opt-check { opacity: 0; color: var(--accent); font-size: 18px; flex: 0 0 auto; }
.gp-opt.is-on { color: #fff; }
.gp-opt.is-on .gp-opt-check { opacity: 1; }
.gp-opt.is-on .gp-opt-name { color: var(--accent); font-weight: 600; }
.gp-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.gp-count { color: var(--accent); font-weight: 700; }
.gp-add-toggle { margin-left: auto; background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 12.5px; }
.gp-add { display: flex; gap: 8px; padding: 0 12px 12px; }
.gp-add-input {
  flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: #fff; font: inherit; font-size: 13px; outline: none;
}
.gp-add-input:focus { border-color: var(--accent); }
.gp-add-btn {
  padding: 8px 14px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: var(--on-accent, #05211c); font: inherit; font-weight: 600; font-size: 13px;
}


/* ---------- Storefront polish ---------- */
.product-card { box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset; }
.product-card:hover {
  border-color: rgba(45, 212, 191, .45);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .5), 0 0 0 1px rgba(45, 212, 191, .14) inset;
}
.product-media::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .38));
  pointer-events: none;
}
.product-media .badge { z-index: 2; }
.product-genre { transition: color .18s ease, border-color .18s ease, background .18s ease; }
.product-card:hover .product-genre {
  border-color: rgba(45, 212, 191, .38);
  color: #c9f5ee;
  background: rgba(45, 212, 191, .06);
}
.btn { transition: transform .14s ease, filter .14s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(45, 212, 191, .2); }
.btn-buy { box-shadow: 0 4px 14px rgba(45, 212, 191, .18); }
.btn-buy:hover { box-shadow: 0 6px 18px rgba(45, 212, 191, .28); }
.price { font-variant-numeric: tabular-nums; }
.section-title { letter-spacing: -.015em; }
