/* ==========================================================================
   Страницы профиля и магазина.
   Цвета берём из современной темы сайта (--panel-bg, --mc-accent и остальные
   переменные из styles.css), поэтому отдельной палитры здесь нет — только
   раскладка и те детали, которых на главной не было.
   ========================================================================== */

.page {
  max-width: var(--max-width, 1120px);
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.page-title {
  margin: 0 0 4px;
  font-family: var(--font-headings, 'Inter', sans-serif);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  color: var(--text-heading, #fff);
  letter-spacing: -0.02em;
}

.page-sub {
  margin: 0 0 26px;
  color: var(--text-muted, #94a3b8);
  font-size: 14.5px;
}

.panel {
  background: var(--panel-bg, rgba(14, 18, 27, 0.88));
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius, 16px);
  padding: 20px;
}

.panel + .panel { margin-top: 16px; }

.panel-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading, #fff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.muted { color: var(--text-muted, #94a3b8); font-size: 13px; }

/* --- состояния загрузки и ошибок --- */
.state-box {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-muted, #94a3b8);
}

.state-box b { display: block; color: #fff; font-size: 17px; margin-bottom: 6px; }

/* ==========================================================================
   ПРОФИЛЬ: СОВРЕМЕННЫЙ ДИЗАЙН (GITHUB + DASHAMAIL AESTHETICS)
   ========================================================================== */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 960px) {
  .profile-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* --- Левая карточка профиля --- */
.side-card {
  position: sticky;
  top: 92px;
  background: var(--panel-bg, rgba(14, 18, 27, 0.88));
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
}

@media (max-width: 960px) {
  .side-card { position: static; }
}

/* --- Аватар со стеком: основное фото, миниатюра скина внизу слева, статус внизу справа (media_1788558497782.png) --- */
.avatar-container {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 20px;
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
}

.avatar-main {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  /* Та же обводка, что у миниатюры со скином: тёмное кольцо цвета подложки,
     а не белое — иначе два круга рядом смотрятся из разных наборов. */
  border: 4px solid #0d1117;
  background: #161b22;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.avatar-container:hover .avatar-main {
  border-color: #1d2532;
  transform: scale(1.015);
}

.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.avatar-container:hover .avatar-upload-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Миниатюра игрового скина Minecraft (перекрывает основной аватар внизу слева, media_1788558497782.png) */
.avatar-badge-wrap {
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid #0d1117;
  background: #161b22;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  z-index: 4;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-container:hover .avatar-badge-wrap {
  transform: scale(1.06);
}

.avatar-badge {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

/* Индикатор онлайн-статуса (внизу справа, media_1788558497782.png) */
.status-light {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3.5px solid #0d1117;
  background: #f85149;
  box-shadow: 0 0 14px rgba(248, 81, 73, 0.75);
  cursor: help;
  z-index: 4;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.status-light.is-online {
  background: #3fb950;
  box-shadow: 0 0 14px rgba(63, 185, 80, 0.85);
}

.status-light.is-discord {
  background: #e3b341;
  box-shadow: 0 0 12px rgba(227, 179, 65, 0.85);
}

/* Имя, подстрочник и био */
.profile-display-name {
  margin: 0 0 2px;
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  word-break: break-word;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.profile-subline {
  font-size: 16px; font-weight: 400; color: #8b949e; margin-bottom: 12px;
  word-break: break-word;
}

.profile-bio-clean {
  margin: 0 0 16px;
  font-size: 14px; line-height: 1.5; color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-bio-clean.empty {
  color: #64748b;
  font-style: italic;
  font-size: 13.5px;
}

/* Кнопка во всю ширину */
.profile-actions-row {
  margin: 0 0 14px;
}

.btn-full {
  width: 100%;
  padding: 7px 16px; border-radius: 6px; background: #21262d; border: 1px solid rgba(240, 246, 252, 0.1);
  color: #c9d1d9;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.18s ease;
}

.btn-full:hover {
  background: #30363d;
  border-color: #8b949e;
  color: #ffffff;
}

.btn-full.btn-accent {
  background: linear-gradient(135deg, var(--mc-accent, #b9dc68), var(--mc-emerald, #4ade80));
  border-color: transparent;
  color: #07090e;
  font-weight: 700;
}

.btn-full.btn-accent:hover {
  filter: brightness(1.08);
}

/* Статистика подписчиков (русский язык, SVG) */
.profile-followers-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #8b949e;
  margin-bottom: 14px;
}

.profile-followers-row .icon-users {
  color: #8b949e;
  flex-shrink: 0;
}

.profile-followers-row b {
  color: #ffffff;
  font-weight: 700;
}

.profile-followers-row .dot-sep {
  color: #484f58;
}

/* Разделитель */
.profile-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 16px 0 14px;
}

/* Заголовок достижений */
.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.profile-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

/* Сетка круглых достижений */
.achievements-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.achievement-badge {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  user-select: none;
}

.achievement-badge:hover {
  transform: translateY(-3px) scale(1.08);
}

/* Полученный значок */
.achievement-badge.earned {
  background: radial-gradient(circle at 35% 35%, rgba(185, 220, 104, 0.2) 0%, #0d121c 80%);
  border: 2px solid #b9dc68;
  box-shadow: 0 4px 16px rgba(185, 220, 104, 0.35);
}

.achievement-badge.earned svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.achievement-badge.badge-grass {
  border-color: #4ade80;
  box-shadow: 0 4px 16px rgba(74, 222, 128, 0.4);
}
.achievement-badge.badge-future {
  border-color: #38bdf8;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}
.achievement-badge.badge-wolf {
  border-color: #facc15;
  box-shadow: 0 4px 16px rgba(250, 204, 21, 0.4);
}
.achievement-badge.badge-platinum {
  border-color: #c084fc;
  box-shadow: 0 4px 16px rgba(192, 132, 252, 0.45);
}
.achievement-badge.badge-iamrich {
  border-color: #fbbf24;
  background: radial-gradient(circle at 35% 35%, rgba(251, 191, 36, 0.3) 0%, #171106 80%);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.5);
}
.achievement-badge.badge-rockstar {
  border-color: #f43f5e;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.4);
}
.achievement-badge.badge-groundhog {
  border-color: #fb923c;
  box-shadow: 0 4px 16px rgba(251, 146, 60, 0.4);
}
.achievement-badge.badge-monopoly {
  border-color: #34d399;
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.4);
}
.achievement-badge.badge-farlands {
  border-color: #818cf8;
  box-shadow: 0 4px 16px rgba(129, 140, 248, 0.4);
}
.achievement-badge.badge-clutch {
  border-color: #ef4444;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}
.achievement-badge.badge-demiurge {
  border-color: #e879f9;
  box-shadow: 0 4px 20px rgba(232, 121, 249, 0.5);
}

/* Плашка множителя */
.badge-pill-counter {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: #f7a885;
  color: #111111;
  font-size: 10.5px;
  font-weight: 800;
  font-family: Inter, sans-serif;
  border-radius: 999px;
  padding: 1px 6px;
  border: 2px solid #0e121b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  line-height: 1.2;
  z-index: 5;
}

/* Секретный значок под вопросительным знаком (?) */
.achievement-badge.secret {
  background: radial-gradient(circle at 40% 40%, #161c28 0%, #080b11 85%);
  border: 2px dashed rgba(255, 255, 255, 0.18);
  color: #64748b;
}

.achievement-badge.secret:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #94a3b8;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.achievement-badge.secret .secret-qmark {
  font-size: 24px;
  font-weight: 800;
  font-family: Inter, sans-serif;
  color: #64748b;
  text-shadow: 0 0 8px rgba(100, 116, 139, 0.4);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.achievement-badge.secret:hover .secret-qmark {
  color: #cbd5e1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* Блок загрузки аватара в модалке */
.avatar-edit-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 18px;
}

.avatar-edit-preview-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar-edit-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--mc-accent, #b9dc68);
  background: #111622;
  display: block;
}

.avatar-edit-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar-hint {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-subtle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Общие кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main, #cbd5e1);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  text-decoration: none;
}

.btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn-accent {
  background: linear-gradient(135deg, var(--mc-accent, #b9dc68), var(--mc-emerald, #4ade80));
  border-color: transparent;
  color: #07090e;
  font-weight: 700;
}

.btn-accent:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--mc-accent, #b9dc68), var(--mc-emerald, #4ade80)); }

.socials-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.1));
  color: var(--text-main, #cbd5e1);
  text-decoration: none;
}

.social-chip:hover { border-color: var(--mc-accent, #b9dc68); color: #fff; }

/* --- вкладки сезонов --- */
.season-tabs {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.season-tab {
  padding: 8px 16px;
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  border-bottom: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted, #94a3b8);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.season-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }

/* Активный сезон крупнее остальных — как на макете. */
.season-tab.active {
  padding: 12px 22px;
  font-size: 17px;
  color: #07090e;
  background: linear-gradient(135deg, var(--mc-accent, #b9dc68), var(--mc-emerald, #4ade80));
  border-color: transparent;
}

.stat-row {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.stat-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm, 10px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
}

.stat-box b {
  display: block;
  font-size: 19px;
  color: var(--text-heading, #fff);
  line-height: 1.2;
}

.stat-box span {
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- инвентарь как в игре --- */
.inv-wrap {
  display: inline-block;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  max-width: 100%;
  overflow-x: auto;
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(9, 52px);
  gap: 4px;
}

.inv-grid.armor { grid-template-columns: repeat(4, 52px); margin-bottom: 10px; }
.inv-grid.hotbar { margin-top: 10px; }

.inv-slot {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  overflow: hidden;
}

.inv-slot.filled {
  background: rgba(185, 220, 104, 0.1);
  border-color: rgba(185, 220, 104, 0.28);
}

/* Иконка предмета — кусок общего атласа (assets/items.png). */
.inv-icon, .goods-icon {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  background-repeat: no-repeat;
}

.goods-name {
  font-size: 10.5px;
  line-height: 1.15;
  text-align: center;
  color: #dbeafe;
  word-break: break-word;
  max-height: 100%;
  overflow: hidden;
}

.inv-name {
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
  color: #dbeafe;
  word-break: break-word;
  max-height: 100%;
  overflow: hidden;
}

.inv-count {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

/* --- карточки-разделы --- */
.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.link-tile {
  display: block;
  padding: 18px;
  border-radius: var(--radius, 16px);
  background: var(--panel-bg, rgba(14, 18, 27, 0.88));
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.link-tile:hover {
  border-color: var(--panel-border-hover, rgba(185, 220, 104, 0.35));
  transform: translateY(-2px);
}

.link-tile h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading, #fff);
}

.link-tile p { margin: 0; font-size: 13.5px; color: var(--text-muted, #94a3b8); line-height: 1.5; }

/* --- рейтинги --- */
.rating-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

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

.rating-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm, 10px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.06));
  font-size: 13.5px;
  color: var(--text-main, #cbd5e1);
  text-decoration: none;
}

.rating-row:hover { border-color: rgba(185, 220, 104, 0.3); }
.rating-row .place { color: var(--text-muted, #94a3b8); font-family: 'VT323', monospace; font-size: 18px; }
.rating-row .value { color: var(--mc-accent, #b9dc68); font-weight: 700; }
.rating-row.me { border-color: rgba(185, 220, 104, 0.45); background: rgba(185, 220, 104, 0.07); }

/* --- форма правки профиля --- */
.form-grid { display: grid; gap: 12px; }

.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 5px;
}

.field input, .field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-sm, 10px);
  padding: 10px 13px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  resize: vertical;
}

.field input:focus, .field textarea:focus { border-color: var(--mc-accent, #b9dc68); }

.socials-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

/* ==========================================================================
   МАГАЗИН
   ========================================================================== */
.shop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.points-box {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius, 16px);
  background: var(--panel-bg, rgba(14, 18, 27, 0.88));
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
}

.points-value {
  font-family: 'VT323', monospace;
  font-size: 44px;
  line-height: 1;
  color: var(--mc-accent, #b9dc68);
}

.points-label { font-size: 12.5px; color: var(--text-muted, #94a3b8); }

/* Списание уезжает вверх и тает — видно, что покупка прошла. */
.points-spend {
  position: absolute;
  right: 22px;
  top: 8px;
  font-family: 'VT323', monospace;
  font-size: 24px;
  color: #f87171;
  opacity: 0;
  pointer-events: none;
}

.points-spend.run { animation: pointsFly 1.5s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes pointsFly {
  0% { opacity: 0; transform: translateY(6px); }
  18% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-34px); }
}

.shop-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

#goods-search {
  margin: 0 0 12px;
  /* Firefox рисует своё поле поиска с крестиком и внутренними отступами. */
  appearance: none;
  -webkit-appearance: none;
}

.goods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.goods-slot {
  position: relative;
  /* Не aspect-ratio: в Firefox сетка с ним даёт дробные высоты и рваный ряд. */
  height: 96px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 10px 6px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  color: #dbeafe;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.goods-slot:hover { border-color: rgba(185, 220, 104, 0.5); background: rgba(185, 220, 104, 0.08); }
.goods-slot.picked {
  border-color: var(--mc-accent, #b9dc68);
  background: rgba(185, 220, 104, 0.16);
  transform: translateY(-2px);
}

.goods-slot.poor { opacity: 0.45; }

/* Закрытое: видно, что предмет есть, но добыть его надо самому. */
.goods-slot.locked {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  cursor: not-allowed;
}

.goods-slot.locked .goods-icon { filter: grayscale(1) brightness(0.35); }
.goods-slot.locked .goods-price, .goods-slot.locked .goods-count { color: #3f4756; }
.goods-slot.locked .goods-name { color: #3f4756; }
.goods-slot.locked:hover { border-color: rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.03); }

.goods-price {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--mc-accent, #b9dc68);
}

.goods-count {
  position: absolute;
  right: 5px;
  top: 4px;
  font-family: 'VT323', monospace;
  font-size: 15px;
  color: #fff;
  opacity: 0.75;
}

.buy-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 22px 0 6px;
}

.buy-info { font-size: 13.5px; color: var(--text-muted, #94a3b8); }

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

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm, 10px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.07));
  font-size: 13.5px;
  color: var(--text-main, #cbd5e1);
}

.order-status { font-size: 12px; font-weight: 700; }
.order-status.ok { color: #86efac; }
.order-status.pending { color: #fcd34d; }
.order-status.error, .order-status.expired, .order-status.no-points { color: #fca5a5; }

.toast-line {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  border-radius: var(--radius-pill, 999px);
  background: #0d111a;
  border: 1px solid rgba(185, 220, 104, 0.4);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 999;
}

.toast-line.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Гостевой баннер */
.guest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(14, 18, 27, 0.9);
  border: 1px solid rgba(185, 220, 104, 0.25);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.guest-banner-icon {
  color: #b9dc68;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.guest-banner-text {
  font-size: 14px;
  color: #cbd5e1;
  flex-grow: 1;
}
.guest-banner-text strong {
  color: #ffffff;
}

/* ==========================================================================
   Дерево достижений.

   Показываем ровно ту же карту, что в игре: столбец, строка и связь
   с родителем приходят из самой сборки. Списком это не заменить — по нему
   не видно, что открывать следующим, а именно за этим на страницу и заходят.
   ========================================================================== */

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

.feats-sync { margin: 0; font-size: 13px; }

.feats-tools { display: flex; gap: 8px; }

.feats-map {
  position: relative;
  overflow: auto;
  max-height: 460px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  /* Клетка под узлами: сразу видно, что это карта, а не облако значков. */
  background-color: rgba(7, 10, 16, 0.55);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 58px 58px, 58px 58px;
}

.feats-canvas { position: relative; }

/* Линии лежат под клетками и не ловят курсор — иначе подсказка мигала бы
   при каждом движении мыши между узлами. */
.feats-lines { position: absolute; left: 0; top: 0; pointer-events: none; }

.feat-line { stroke: rgba(255, 255, 255, 0.14); stroke-width: 2; }
.feat-line.done { stroke: rgba(185, 220, 104, 0.45); }

.feat-cell {
  position: absolute;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.1));
  background: rgba(20, 26, 36, 0.9);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.feat-cell:hover,
.feat-cell:focus-visible { transform: scale(1.12); outline: none; }

.feat-cell b { color: var(--text-muted, #94a3b8); font-size: 18px; }

/* Полученное — в цвете и с подсветкой; следующее по очереди — обычное;
   недоступное — приглушённое, но всё-таки видимое: это цель, а не тайна. */
.feat-cell.earned {
  border-color: rgba(185, 220, 104, 0.6);
  background: rgba(52, 74, 33, 0.55);
  box-shadow: 0 0 0 1px rgba(185, 220, 104, 0.18), 0 6px 18px -8px rgba(185, 220, 104, 0.5);
}

.feat-cell.open { border-color: rgba(255, 255, 255, 0.22); }

.feat-cell.locked { opacity: 0.42; }
.feat-cell.locked .feat-icon { filter: grayscale(1) brightness(0.7); }

/* Особые достижения игра рисует другой рамкой — повторяем. */
.feat-cell.special { border-radius: 22px; }

.feat-icon {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  background-repeat: no-repeat;
}

.feats-tip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  min-height: 24px;
  font-size: 14px;
}

.feats-tip b { color: var(--text-heading, #fff); }
.feats-tip .muted { font-size: 13px; }

.feat-state {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.12));
}

.feat-state.done { color: #b9dc68; border-color: rgba(185, 220, 104, 0.4); }
.feat-state.next { color: #38bdf8; border-color: rgba(56, 189, 248, 0.35); }
.feat-state.locked { color: var(--text-muted, #94a3b8); }


/* ==========================================================================
   МОДЕРАЦИЯ ГАЛЕРЕИ — панель оператора в своём профиле
   ========================================================================== */
.mod-queue {
  display: grid;
  gap: 12px;
}

/* Кадр слева, подпись в середине, кнопки справа: решение принимают по самой
   картинке, поэтому она крупная и всегда на виду. */
.mod-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-sm, 10px);
  background: rgba(255, 255, 255, 0.03);
}

.mod-shot {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.mod-meta h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-heading, #fff);
}

.mod-meta p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-main, #cbd5e1);
}

.mod-meta .muted { font-size: 12px; }

.mod-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-link-box {
  margin-top: 16px;
  border-top: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  padding-top: 14px;
}

.mod-link-box summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-heading, #fff);
}

.mod-hint {
  margin: 8px 0 12px;
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .mod-item { grid-template-columns: 1fr; }
  .mod-actions { flex-direction: row; }
}

/* ==========================================================================
   ВЫБОР ТЕМЫ
   ========================================================================== */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.theme-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 12px 14px;
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-sm, 10px);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main, #cbd5e1);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-chip:hover { background: rgba(255, 255, 255, 0.08); }

/* Выбранную тему отмечаем рамкой её же цвета: подпись «активна» заняла бы
   строку, а плиток всего четыре и разница видна сразу. */
.theme-chip.is-active {
  border-color: var(--mc-accent, #b9dc68);
  background: rgba(255, 255, 255, 0.1);
}

.theme-chip b {
  grid-column: 2;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-heading, #fff);
}

.theme-chip i {
  grid-column: 2;
  font-style: normal;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}

.theme-dot {
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.theme-dot-random {
  background: conic-gradient(#d96b1e 0deg 120deg, #8e2020 120deg 240deg, #1f5c2e 240deg 360deg);
}
