/* ============================================================
   LIVE ACTIVITY — TABLE-STYLE LIST
   ============================================================ */

.home-activity {
  padding: 48px 0 36px;
}

/* "Таблица" оболочка */
.live-table {
  margin-top: 24px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.9), rgba(15,23,42,0.85));
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

/* Обёртка со скроллом для строк */
.live-table__scroll {
  margin-top: 6px;
  max-height: 280px;        /* ~5 строк по 50–55px каждая */
  overflow-y: auto;
  overflow-x: hidden;
}

/* Чуть укрощаем скроллбар под тёмную тему (по желанию) */
.live-table__scroll::-webkit-scrollbar {
  width: 6px;
}

.live-table__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.live-table__scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.live-table__scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.8);
}

/* На мобиле можно показать всё без скролла, чтобы не мучить юзера */
@media (max-width: 640px) {
  .live-table__scroll {
    max-height: none;
    overflow-y: visible;
  }
}

/* ---------------- HEADER ROW ---------------- */

.live-table__head {
  display: grid;
  grid-template-columns: 2.1fr 2fr 1fr 1fr 0.9fr 1.1fr;
  gap: 0;
  text-transform: uppercase;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(90deg, rgba(15,23,42,0.9), rgba(15,23,42,0.7));
}

.live-table__cell {
  display: flex;
  align-items: center;     /* по вертикали */
  justify-content: center; /* по горизонтали */

  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #94a3b8;
  font-weight: 600;
}

/* ---------------- BODY ---------------- */

.live-table__body {
  min-height: 72px;
}

/* Плейсхолдер, когда комнат нет */
.live-empty {
  padding: 28px 18px;
  text-align: center;
  font-size: 0.95rem;
  color: #94a3b8;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}

/* ---------------- ROW ---------------- */

.live-row {
  display: grid;
  grid-template-columns: 2.1fr 2fr 1fr 1fr 0.9fr 1.1fr;
  gap: 0;
  align-items: center;

  padding: 10px 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.9);

  background: rgba(15, 23, 42, 0.75);
  transition:
    background 0.18s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
  cursor: pointer;
}

.live-row:hover {
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.65);
}

.live-row .live-table__cell {
  font-size: 0.9rem;
  color: #e2e8f0;
}

/* ============================================================
   PACK INFO
   ============================================================ */

.live-table__cell--pack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.live-pack-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f9fafb;
}

.live-pack-meta {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.live-pack-category {
  white-space: nowrap;
}

.live-pack-difficulty {
  font-weight: 500;
}

.live-dot {
  opacity: 0.6;
}

/* ============================================================
   ROOM INFO
   ============================================================ */

.live-table__cell--room {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.live-room-name {
  font-size: 0.94rem;
  font-weight: 800;
  color: #e5e7eb;
}

.live-host {
  font-size: 0.8rem;
  color: #94a3b8;
}

.live-host-name {
  font-weight: 500;
}

/* ============================================================
   STATS CELLS
   ============================================================ */

.live-table__cell--players,
.live-table__cell--round,
.live-table__cell--final,
.live-table__cell--time {
  font-size: 0.88rem;
  color: #e2e8f0;
}

.live-stat {
  font-weight: 500;
}

.live-stat-final {
  font-weight: 500;
}

.live-stat-final::first-letter {
  text-transform: uppercase;
}

/* Updated time */
.live-live-ago {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ============================================================
   MOBILE / TABLET
   ============================================================ */

@media (max-width: 900px) {
  .live-table__head {
    display: none; /* прячем верхнюю строку */
  }

  .live-row {
    grid-template-columns: 1fr;
    row-gap: 6px;
    padding: 12px 14px;
  }

  .live-table__cell--pack,
  .live-table__cell--room {
    margin-bottom: 2px;
  }

  .live-table__cell--players,
  .live-table__cell--round,
  .live-table__cell--final,
  .live-table__cell--time {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    gap: 4px;
  }

  .live-table__cell--players::before,
  .live-table__cell--round::before,
  .live-table__cell--final::before,
  .live-table__cell--time::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
}

/* -------------------------------------
   BROWSE BY CATEGORY — GFF Overwatch Style
   ------------------------------------- */

.home-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

/* Основная карточка */
.home-category-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;

  background: rgba(15,23,42,0.96);
  box-shadow: 0 14px 36px rgba(15,23,42,0.85);

  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.home-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 54px rgba(15,23,42,1);
  border-color: rgba(249,115,22,0.55);
}

/* Картинка */
.home-category-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.home-category-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.home-category-card:hover .home-category-media img {
  transform: scale(1.07);
}

/* --- СВЕТЯЩИЙСЯ РАССЕКАЮЩИЙСЯ ФОН У ТАЙТЛА --- */
.home-category-label {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);

  padding: 7px 20px;
  border-radius: 999px;

  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;

  /* текст как на CTA-кнопках */
  color: var(--brand-contrast);

  /* тёмный чип + мягкое свечение внутрь (оранж + синий) */
  background:
    radial-gradient(circle at 0% 0%, var(--accent-blue-soft) 0, transparent 55%),
    radial-gradient(circle at 100% 100%, var(--brand-soft) 0, transparent 55%),
    rgba(15,23,42,0.96);

  border: 1px solid rgba(148,163,184,0.55);
  box-shadow:
    0 0 16px rgba(15,23,42,0.9),
    0 0 24px rgba(56,189,248,0.45),
    0 0 32px rgba(249,115,22,0.40);

  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    background 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

/* при hover свечение “гаснет” и чип становится спокойнее */
.home-category-card:hover .home-category-label {
  transform: translate(-50%, 6px);
  opacity: 0.9;

  background: rgba(15,23,42,0.92);
  border-color: rgba(148,163,184,0.4);
  box-shadow:
    0 0 10px rgba(15,23,42,0.9),
    0 0 14px rgba(56,189,248,0.15),
    0 0 18px rgba(249,115,22,0.18);
}

/* -------------------------------------
   POPULAR PACKS (stable, no jumps)
   ------------------------------------- */

/* Пока JS грузит данные/картинки — НЕ показываем и НЕ анимируем */
.gff-home-packs-loading .home-popular-packs .home-packs-grid {
  opacity: 0;
}

.gff-home-packs-loading .home-pack-card,
.gff-home-packs-loading .home-pack-media img {
  transition: none !important;
}

.gff-home-packs-loading .home-pack-card:hover {
  transform: none !important;
  box-shadow: 0 16px 42px rgba(15,23,42,0.96) !important;
}

/* Плавное появление грида */
.home-popular-packs .home-packs-grid {
  transition: opacity .25s ease;
}

/* Стабильная сетка (вместо auto-fit) */
.home-packs-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr; /* mobile */
}

@media (min-width: 640px) {
  .home-packs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .home-packs-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.home-pack-card {
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 0 0, rgba(56,189,248,0.16), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(249,115,22,0.18), transparent 60%),
    rgba(15,23,42,0.98);
  box-shadow: 0 16px 42px rgba(15,23,42,0.96);

  display: flex;
  flex-direction: column;

  cursor: pointer; /* весь блок кликабельный */
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-pack-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 58px rgba(15,23,42,1);
  border-color: rgba(248,250,252,0.55);
}

/* media box стабильный по высоте */
.home-pack-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(2,6,23,0.35); /* чтобы не было белого фона до img */
}

/* базовое состояние картинки */
.home-pack-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: none;
  transition: none; /* чтобы нигде не осталось зума */
}

/* на всякий случай гасим любые предыдущие правила с зумом */
.home-pack-card:hover .home-pack-media img {
  transform: none !important;
}

.home-pack-body {
  padding: 14px 16px 16px;
}

.home-pack-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
}

.home-pack-text {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #e5e7eb;
}

/* если ссылку View pack убрали — можно вообще удалить эти два правила */
.home-pack-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-orange);
  text-decoration: none;
}

.home-pack-link:hover {
  text-decoration: underline;
}