/* ==========================================================================
   CARTA NA MESA - Dark Gaming Editorial Theme & Game Badges
   ========================================================================== */

:root {
  --cg-bg-main: #0b0e17;
  --cg-bg-surface: #121624;
  --cg-bg-card: #151a2a;
  --cg-bg-card-hover: #1c2236;
  --cg-border-subtle: rgba(255, 255, 255, 0.08);
  --cg-border-card: rgba(255, 255, 255, 0.1);
  --cg-border-hover: rgba(139, 92, 246, 0.55);
  
  --cg-purple: #8b5cf6;
  --cg-purple-dark: #6d28d9;
  --cg-purple-glow: rgba(139, 92, 246, 0.3);
  
  --cg-text-title: #f8fafc;
  --cg-text-body: #cbd5e1;
  --cg-text-muted: #94a3b8;
  --cg-text-meta: #64748b;
}

/* Background geral com gradientes atmosféricos sutis de gaming */
html, body {
  background-color: var(--cg-bg-main) !important;
  color: var(--cg-text-body) !important;
}

body {
  background-image: 
    radial-gradient(circle at 10% 5%, rgba(124, 58, 237, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 90% 15%, rgba(56, 189, 248, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(168, 85, 247, 0.06) 0%, transparent 50%) !important;
  background-attachment: fixed !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Links & Headings */
a {
  color: inherit !important;
  text-decoration: none !important;
}
h1, h2, h3, h4, h5, h6 {
  color: var(--cg-text-title) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.gh-head {
  background-color: rgba(11, 14, 23, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid var(--cg-border-subtle) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
}

.gh-head-logo {
  color: #ffffff !important;
  font-weight: 900 !important;
  font-size: 2.2rem !important;
  letter-spacing: -0.03em !important;
  text-shadow: 0 0 25px rgba(139, 92, 246, 0.5) !important;
}

.gh-head .nav a {
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  font-size: 1.5rem !important;
  transition: all 0.2s ease !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
}
.gh-head .nav a:hover,
.gh-head .nav .nav-current a {
  color: #ffffff !important;
  background: rgba(139, 92, 246, 0.18) !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.25) !important;
}

.gh-search, .gh-burger {
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
  border: 1px solid var(--cg-border-subtle) !important;
  transition: all 0.2s ease !important;
}
.gh-search:hover, .gh-burger:hover {
  color: #ffffff !important;
  border-color: var(--cg-purple) !important;
  background: rgba(139, 92, 246, 0.2) !important;
}

/* ── TÍTULOS DE SEÇÕES (TOPICS) ─────────────────────────────── */
.gh-topic-name {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 2.4rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  color: #ffffff !important;
  margin-bottom: 24px !important;
  position: relative !important;
}
.gh-topic-name::before {
  content: "" !important;
  display: inline-block !important;
  width: 5px !important;
  height: 24px !important;
  background: linear-gradient(180deg, #a855f7 0%, #6366f1 100%) !important;
  border-radius: 4px !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.7) !important;
}
.gh-topic-name a {
  color: #ffffff !important;
  transition: color 0.2s ease !important;
}
.gh-topic-name a:hover {
  color: #c4b5fd !important;
}

.gh-topic-link {
  color: #a78bfa !important;
  font-weight: 700 !important;
  font-size: 1.45rem !important;
  transition: all 0.2s ease !important;
}
.gh-topic-link:hover {
  color: #ffffff !important;
  transform: translateX(4px) !important;
}

/* ── GRID DE TÓPICOS ────────────────────────────────────────── */
.gh-topic-grid .gh-topic-content {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 24px !important;
}

@media (min-width: 640px) {
  .gh-topic-grid .gh-topic-content {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }
}

@media (min-width: 1024px) {
  .gh-topic-grid .gh-topic-content {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px !important;
  }
}

/* ── CARDS PADRÃO DO GRID (NOT LARGE) ───────────────────────── */
.gh-topic-grid .gh-card {
  background: var(--cg-bg-card) !important;
  border: 1px solid var(--cg-border-card) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

.gh-topic-grid .gh-card:hover {
  transform: translateY(-5px) !important;
  border-color: var(--cg-border-hover) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 25px var(--cg-purple-glow) !important;
  background: var(--cg-bg-card-hover) !important;
}

.gh-topic-grid .gh-card-link {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  padding: 0 !important;
  gap: 0 !important;
  text-decoration: none !important;
  color: inherit !important;
}

/* Reset radical da imagem do Headline (que forçava 128px de largura e height 100%) */
.gh-topic-grid .gh-card-image,
.gh-card-image {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 16px 16px 0 0 !important;
  overflow: hidden !important;
  background: #080a11 !important;
  aspect-ratio: 16 / 9 !important;
}

/* Anula hacks de padding do tema headline original */
.gh-topic-grid .gh-card-image::before,
.gh-topic-grid .gh-card-image::after,
.gh-card-image::before,
.gh-card-image::after {
  display: none !important;
  content: none !important;
  padding: 0 !important;
  height: 0 !important;
}

.gh-topic-grid .gh-card-image img,
.gh-card-image img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s ease !important;
}

.gh-card:hover .gh-card-image img {
  transform: scale(1.04) !important;
}

/* Bloco de texto dos cards */
.gh-topic-grid .gh-card-wrapper,
.gh-card-wrapper {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  padding: 18px 20px 20px !important;
  margin: 0 !important;
  justify-content: flex-start !important;
  background: transparent !important;
}

.gh-topic-grid .gh-card-title,
.gh-card-title {
  color: var(--cg-text-title) !important;
  font-size: 1.75rem !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  margin: 8px 0 10px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  word-break: break-word !important;
  transition: color 0.2s ease !important;
}
.gh-card:hover .gh-card-title {
  color: #c4b5fd !important;
}

.gh-card-excerpt {
  color: var(--cg-text-muted) !important;
  font-size: 1.45rem !important;
  line-height: 1.55 !important;
  margin-bottom: 12px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.gh-topic-grid .gh-card-footer,
.gh-card-footer {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--cg-text-meta) !important;
  font-size: 1.25rem !important;
  font-weight: 500 !important;
  margin-top: auto !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.gh-card-author {
  color: #94a3b8 !important;
  font-weight: 600 !important;
}
.gh-card-date {
  color: var(--cg-text-meta) !important;
}

/* ── HERO / DESTAQUE PRINCIPAL (CARD LARGE) ─────────────────── */
.gh-topic-grid .gh-card.large {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  background: linear-gradient(145deg, #181d2f 0%, #101423 100%) !important;
  border: 1px solid rgba(139, 92, 246, 0.35) !important;
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.7), 0 0 35px rgba(124, 58, 237, 0.2) !important;
  border-radius: 20px !important;
  margin-bottom: 24px !important;
}
.gh-topic-grid .gh-card.large:hover {
  border-color: rgba(139, 92, 246, 0.75) !important;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.8), 0 0 50px rgba(124, 58, 237, 0.4) !important;
}

.gh-topic-grid .gh-card.large .gh-card-link {
  display: flex !important;
  flex-direction: column !important;
  padding: 20px !important;
  gap: 20px !important;
  height: auto !important;
}

@media (min-width: 900px) {
  .gh-topic-grid .gh-card.large .gh-card-link {
    display: grid !important;
    grid-template-columns: 56% 44% !important;
    gap: 32px !important;
    padding: 26px !important;
    align-items: center !important;
  }
}

.gh-topic-grid .gh-card.large .gh-card-image {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55) !important;
  flex: 0 0 auto !important;
}

.gh-topic-grid .gh-card.large .gh-card-wrapper {
  padding: 0 !important;
  justify-content: center !important;
  flex: 1 1 auto !important;
}

.gh-topic-grid .gh-card.large .gh-card-title {
  font-size: 2.8rem !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 10px 0 14px 0 !important;
  -webkit-line-clamp: 4 !important;
}

.gh-topic-grid .gh-card.large .gh-card-excerpt {
  font-size: 1.55rem !important;
  line-height: 1.6 !important;
  color: #cbd5e1 !important;
  margin: 0 0 16px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* ── BADGES & TAGS DE JOGOS (TCGS) ─────────────────────────── */
.gh-card-badge-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-bottom: 8px !important;
}

.gh-game-badge-inline {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
}

/* Badge flutuante desativada para manter as artes 100% visíveis */
.gh-floating-badge {
  display: none !important;
}

.gh-badge-highlight {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px 9px !important;
  border-radius: 6px !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  background: rgba(239, 68, 68, 0.22) !important;
  border: 1px solid rgba(239, 68, 68, 0.55) !important;
  color: #fca5a5 !important;
}

.gh-game-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

/* ── CORES ESPECÍFICAS DE CADA CARD GAME (BADGES & HOVERS) ─── */

/* 1. MAGIC: THE GATHERING (Planeswalker Amber / Orange) */
.gh-game-badge-inline.gh-game-magic,
.gh-game-badge-inline.gh-game-magic-the-gathering,
.gh-card[data-game*="magic"] .gh-game-badge-inline {
  background: rgba(234, 88, 12, 0.22) !important;
  border: 1px solid rgba(249, 115, 22, 0.55) !important;
  color: #fed7aa !important;
}
.gh-card[data-game*="magic"] .gh-game-dot {
  background-color: #f97316 !important;
  box-shadow: 0 0 8px #ea580c !important;
}
.gh-card[data-game*="magic"]:hover {
  border-color: rgba(249, 115, 22, 0.6) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 25px rgba(234, 88, 12, 0.25) !important;
}

/* 2. POKÉMON TCG (Pikachu Electric Yellow) */
.gh-game-badge-inline.gh-game-pokemon-tcg,
.gh-game-badge-inline.gh-game-pokemon,
.gh-card[data-game*="pokemon"] .gh-game-badge-inline {
  background: rgba(234, 179, 8, 0.22) !important;
  border: 1px solid rgba(250, 204, 21, 0.6) !important;
  color: #fef08a !important;
}
.gh-card[data-game*="pokemon"] .gh-game-dot {
  background-color: #facc15 !important;
  box-shadow: 0 0 8px #eab308 !important;
}
.gh-card[data-game*="pokemon"]:hover {
  border-color: rgba(250, 204, 21, 0.6) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 25px rgba(234, 179, 8, 0.25) !important;
}

/* 3. YU-GI-OH! (Millennium Gold) */
.gh-game-badge-inline.gh-game-yu-gi-oh,
.gh-game-badge-inline.gh-game-yugioh,
.gh-card[data-game*="yu-gi-oh"] .gh-game-badge-inline,
.gh-card[data-game*="yugioh"] .gh-game-badge-inline {
  background: rgba(217, 119, 6, 0.22) !important;
  border: 1px solid rgba(245, 158, 11, 0.55) !important;
  color: #fde68a !important;
}
.gh-card[data-game*="yu-gi-oh"] .gh-game-dot,
.gh-card[data-game*="yugioh"] .gh-game-dot {
  background-color: #f59e0b !important;
  box-shadow: 0 0 8px #d97706 !important;
}
.gh-card[data-game*="yu-gi-oh"]:hover,
.gh-card[data-game*="yugioh"]:hover {
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 25px rgba(217, 119, 6, 0.25) !important;
}

/* 4. ONE PIECE CARD GAME (Pirate Red) */
.gh-game-badge-inline.gh-game-one-piece-card-game,
.gh-game-badge-inline.gh-game-one-piece,
.gh-card[data-game*="one-piece"] .gh-game-badge-inline {
  background: rgba(239, 68, 68, 0.22) !important;
  border: 1px solid rgba(248, 113, 113, 0.55) !important;
  color: #fca5a5 !important;
}
.gh-card[data-game*="one-piece"] .gh-game-dot {
  background-color: #ef4444 !important;
  box-shadow: 0 0 8px #dc2626 !important;
}
.gh-card[data-game*="one-piece"]:hover {
  border-color: rgba(248, 113, 113, 0.6) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 25px rgba(239, 68, 68, 0.25) !important;
}

/* 5. FLESH AND BLOOD (Blood Ruby) */
.gh-game-badge-inline.gh-game-flesh-and-blood,
.gh-card[data-game*="flesh-and-blood"] .gh-game-badge-inline {
  background: rgba(244, 63, 94, 0.22) !important;
  border: 1px solid rgba(251, 113, 133, 0.55) !important;
  color: #fda4af !important;
}
.gh-card[data-game*="flesh-and-blood"] .gh-game-dot {
  background-color: #f43f5e !important;
  box-shadow: 0 0 8px #e11d48 !important;
}

/* 6. STAR WARS: UNLIMITED (Galactic Cyan) */
.gh-game-badge-inline.gh-game-star-wars-unlimited,
.gh-card[data-game*="star-wars"] .gh-game-badge-inline {
  background: rgba(6, 182, 212, 0.22) !important;
  border: 1px solid rgba(56, 189, 248, 0.55) !important;
  color: #a5f3fc !important;
}
.gh-card[data-game*="star-wars"] .gh-game-dot {
  background-color: #06b6d4 !important;
  box-shadow: 0 0 8px #0891b2 !important;
}

/* 7. DISNEY LORCANA (Enchanted Violet) */
.gh-game-badge-inline.gh-game-lorcana,
.gh-game-badge-inline.gh-game-disney-lorcana,
.gh-card[data-game*="lorcana"] .gh-game-badge-inline {
  background: rgba(139, 92, 246, 0.25) !important;
  border: 1px solid rgba(167, 139, 250, 0.55) !important;
  color: #ddd6fe !important;
}
.gh-card[data-game*="lorcana"] .gh-game-dot {
  background-color: #8b5cf6 !important;
  box-shadow: 0 0 8px #7c3aed !important;
}

/* 8. OUTROS TCGS / PADRÃO (Card Games Purple) */
.gh-game-badge-inline.gh-game-outros-tcgs,
.gh-game-badge-inline.gh-game-padrao {
  background: rgba(124, 58, 237, 0.22) !important;
  border: 1px solid rgba(167, 139, 250, 0.55) !important;
  color: #e9d5ff !important;
}
.gh-game-badge-inline.gh-game-outros-tcgs .gh-game-dot,
.gh-game-badge-inline.gh-game-padrao .gh-game-dot {
  background-color: #a855f7 !important;
  box-shadow: 0 0 8px #9333ea !important;
}

/* ── PÁGINA INDIVIDUAL DA MATÉRIA (POST) ─────────────────────── */
.gh-article-title {
  color: #ffffff !important;
  font-size: 3.8rem !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
}
.gh-article-excerpt {
  color: #94a3b8 !important;
  font-size: 1.85rem !important;
  line-height: 1.55 !important;
}
.gh-article-tag {
  background: rgba(139, 92, 246, 0.2) !important;
  border: 1px solid rgba(139, 92, 246, 0.5) !important;
  color: #c4b5fd !important;
  padding: 5px 14px !important;
  border-radius: 7px !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  display: inline-block !important;
  margin-bottom: 14px !important;
}

.gh-content {
  color: #e2e8f0 !important;
  font-size: 1.8rem !important;
  line-height: 1.7 !important;
}
.gh-content p {
  color: #e2e8f0 !important;
  margin-bottom: 2rem !important;
}
.gh-content h2, .gh-content h3, .gh-content h4 {
  color: #ffffff !important;
  margin-top: 3.5rem !important;
  margin-bottom: 1.5rem !important;
}
.gh-content blockquote {
  border-left: 4px solid var(--cg-purple) !important;
  background: rgba(139, 92, 246, 0.08) !important;
  padding: 18px 24px !important;
  border-radius: 0 10px 10px 0 !important;
  color: #f1f5f9 !important;
  font-style: italic !important;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.gh-foot {
  background-color: #06080e !important;
  border-top: 1px solid var(--cg-border-subtle) !important;
  margin-top: 90px !important;
}
.gh-foot a {
  color: #94a3b8 !important;
}
.gh-foot a:hover {
  color: #ffffff !important;
}
.gh-copyright {
  color: #64748b !important;
}

/* ── AJUSTES MOBILE ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .gh-topic-grid .gh-card.large .gh-card-title {
    font-size: 2.2rem !important;
  }
  .gh-topic-name {
    font-size: 2rem !important;
  }
}

/* ── LISTAS MINIMAIS SECUNDÁRIAS ─────────────────────────────── */
.gh-topic-minimal .gh-card {
  background: var(--cg-bg-surface) !important;
  border: 1px solid var(--cg-border-subtle) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  margin-bottom: 10px !important;
  transition: all 0.2s ease !important;
}
.gh-topic-minimal .gh-card:hover {
  background: var(--cg-bg-card-hover) !important;
  border-color: var(--cg-border-hover) !important;
  transform: translateX(4px) !important;
}
.gh-topic-minimal .gh-card-title {
  font-size: 1.55rem !important;
  margin: 0 !important;
}
.gh-topic-minimal .gh-card-link {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}
