/* ============================================================
   THE CRAB GAMES — CENTRAL DE CANAIS
   Identidade Visual Premium (v4.1 revisado)
   Layout TCG 2025 – Light/Dark Mode – Sidebar Mobile Fix
   Última revisão: 2025-12-10
============================================================ */

/* ============================================================
   TOKENS DE DESIGN — PALETA GLOBAL
============================================================ */
:root {
  --tcg-max-width: 1280px;

  /* LIGHT MODE */
  --tcg-bg: #f4f5f6;
  --tcg-surface: #ffffff;
  --tcg-surface-soft: #f0f1f3;

  --tcg-text: #1a1a1a;
  --tcg-text-soft: #6b7280;
  --tcg-text-muted: #999;

  --tcg-border: #e2e3e8;

  --tcg-accent: #006633;
  --tcg-accent-dark: #004d26;
  --tcg-accent-light: rgba(0, 102, 51, 0.15);

  --tcg-radius: 12px;
  --tcg-shadow-card: 0px 4px 12px rgba(0,0,0,.08);
  --tcg-shadow-hover: 0px 18px 32px rgba(0,102,51,.22);

  --tcg-transition: .22s ease;
}

/* ============================================================
   DARK MODE — Foxiz + Single Canal compatível
============================================================ */
body.dark-mode #tcg-canais-page,
[data-theme="dark"] #tcg-canais-page {
  --tcg-bg: #0f1115;
  --tcg-surface: #16191d;
  --tcg-surface-soft: #1d2126;

  --tcg-text: #e5e7eb;
  --tcg-text-soft: #9ea5af;
  --tcg-text-muted: #6e7580;

  --tcg-border: #2d3137;

  --tcg-accent: #00c370;
  --tcg-accent-dark: #00a25c;
  --tcg-accent-light: rgba(0,195,112,.18);

  --tcg-shadow-card: 0px 6px 20px rgba(0,0,0,.38);
  --tcg-shadow-hover: 0px 24px 40px rgba(0,195,112,.28);
}

/* ============================================================
   WRAPPER GERAL
============================================================ */
#tcg-canais-page {
  background: var(--tcg-bg);
  color: var(--tcg-text);
  padding: 40px 16px 80px;
  font-family: "Inter", "Montserrat", sans-serif;
  transition: var(--tcg-transition);
}

.tcg-canais-container {
  max-width: var(--tcg-max-width);
  margin: 0 auto;
}

/* ============================================================
   TÍTULO DA PÁGINA
============================================================ */
.tcg-canais-header {
  text-align: left;
  margin-bottom: 30px;
}

.tcg-canais-header h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  color: var(--tcg-accent);
  margin-bottom: 6px;
}

.tcg-canais-header p {
  font-size: 18px;
  color: var(--tcg-text-soft);
}

/* ============================================================
   GRID PRINCIPAL (Sidebar + Results)
============================================================ */
.tcg-grid-wrapper {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 32px;
}

@media (max-width: 880px) {
  .tcg-grid-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ============================================================
   SIDEBAR — Desktop sticky / Mobile padrão
============================================================ */
.tcg-sidebar {
  position: sticky;
  top: 20px;

  background: var(--tcg-surface);
  border: 1px solid var(--tcg-border);
  border-radius: var(--tcg-radius);
  padding: 22px;
  box-shadow: var(--tcg-shadow-card);
}

/* MOBILE FIX → filtro deixa de ser sticky */
@media (max-width: 880px) {
  .tcg-sidebar {
    position: static !important;
    top: auto !important;
  }
}

.tcg-sidebar-form label {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
  color: var(--tcg-text-soft);
}

.tcg-sidebar-form input,
.tcg-sidebar-form select {
  width: 100%;
  padding: 11px 12px;
  background: var(--tcg-surface-soft);
  border-radius: 8px;
  border: 1.6px solid var(--tcg-border);
  color: var(--tcg-text);
  outline: none;
  transition: .2s;
}

.tcg-sidebar-form input:focus,
.tcg-sidebar-form select:focus {
  border-color: var(--tcg-accent);
}

.tg-sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 800;
  font-size: 15px;
}

.tg-sidebar-title i {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--tcg-accent-light);
  color: var(--tcg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tcg-btn {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: var(--tcg-transition);
  letter-spacing: .5px;
  border: none;
}

.tcg-btn-primary {
  background: var(--tcg-accent);
  color: #fff;
}

.tcg-btn-primary:hover {
  background: var(--tcg-accent-dark);
}

.tcg-btn-secondary {
  background: transparent;
  color: var(--tcg-text-soft);
  border: 2px solid var(--tcg-border);
}

.tcg-btn-secondary:hover {
  border-color: var(--tcg-accent);
  color: var(--tcg-accent);
}

/* ============================================================
   GRID DE RESULTADOS
============================================================ */
.tcg-results {
  min-height: 400px;
}

.tcg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

@media (max-width: 1100px) {
  .tcg-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .tcg-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ============================================================
   CARD — estilo premium TCG
============================================================ */
.tcg-card {
  background: var(--tcg-surface);
  border: 1px solid var(--tcg-border);
  border-radius: var(--tcg-radius);
  overflow: hidden;
  box-shadow: var(--tcg-shadow-card);
  transition: var(--tcg-transition);
}

.tcg-card:hover {
  transform: translateY(-4px);
  border-color: var(--tcg-accent);
  box-shadow: var(--tcg-shadow-hover);
}

.tcg-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

/* Thumb */
.tcg-card-thumb {
  aspect-ratio: 16/9;
  background: var(--tcg-surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tcg-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: .35s ease;
}

.tcg-card:hover .tcg-card-thumb img {
  transform: scale(1.05);
}

/* Body */
.tcg-card-body {
  padding: 14px 16px 18px;
}

.tcg-card-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--tcg-text);
}

.tcg-card-meta {
  font-size: 12px;
  color: var(--tcg-accent);
  font-weight: 700;
  text-transform: uppercase;
}

/* ============================================================
   LOAD MORE
============================================================ */
.tcg-loadmore-box {
  text-align: center;
  margin-top: 32px;
}

.tcg-btn-load {
  padding: 12px 26px;
  border-radius: 10px;
  background: transparent;
  border: 2px solid var(--tcg-accent);
  color: var(--tcg-accent);
  font-weight: 900;
  cursor: pointer;
  transition: .18s;
  letter-spacing: .5px;
}

.tcg-btn-load:hover {
  background: var(--tcg-accent);
  color: #fff;
  transform: translateY(-3px);
}

.tcg-btn-load:disabled {
  cursor: not-allowed;
  opacity: .5;
}

/* ============================================================
   EMPTY STATE
============================================================ */
.tcg-empty {
  padding: 40px;
  border: 2px dashed var(--tcg-border);
  text-align: center;
  border-radius: var(--tcg-radius);
  color: var(--tcg-text-soft);
  font-weight: 600;
  grid-column: 1 / -1;
}
