/* ============================================================
   LudotecaBase — custom.css
   Paleta: Blue (#2563eb base, #1e40af deep, #3b82f6 accent)
   Sobre Pico.css classless v2
   ============================================================ */

/* --- Variables globales --- */
:root {
  --lb-primary: #2563eb;
  --lb-primary-dark: #1e40af;
  --lb-accent: #3b82f6;
  --lb-bg-light: #eff6ff;
  --lb-bg-dark: #1e293b;
  --lb-text: #0f172a;
  --lb-text-muted: #475569;
  --lb-border: #cbd5e1;
  --lb-success: #16a34a;
  --lb-warning: #d97706;
  --lb-radius: 8px;
  --lb-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* --- Reset / global --- */
body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--lb-text);
  background: #fff;
  line-height: 1.65;
}

a { color: var(--lb-primary); }
a:hover { color: var(--lb-primary-dark); }

/* --- Header / Nav --- */
.site-header {
  background: var(--lb-bg-dark);
  color: #f1f5f9;
  padding: .75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header a { color: #f1f5f9; text-decoration: none; }
.site-header a:hover { color: var(--lb-accent); }
.site-title { font-size: 1.3rem; font-weight: 700; }
.site-tagline { font-size: .8rem; color: var(--lb-text-muted); display: block; }

/* Hamburger (CSS-only, checkbox hack) */
.hamburger-toggle { display: none; }
.hamburger-btn {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #f1f5f9;
  background: none;
  border: none;
  padding: .25rem;
}
.main-nav { display: flex; gap: 1.25rem; align-items: center; }
.main-nav a { font-size: .9rem; font-weight: 500; }

@media (max-width: 768px) {
  .hamburger-btn { display: block; }
  .main-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    background: var(--lb-bg-dark);
    position: absolute;
    top: 100%;
    left: 0;
    padding: .5rem 1rem 1rem;
    border-top: 1px solid #334155;
  }
  .main-nav a { padding: .5rem 0; border-bottom: 1px solid #334155; display: block; }
  .hamburger-toggle:checked ~ .main-nav { display: flex; }
  .header-inner { flex-wrap: wrap; }
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Main content wrapper --- */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-size: .82rem;
  color: var(--lb-text-muted);
  margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--lb-primary); }
.breadcrumbs .sep { margin: 0 .35rem; }

/* --- Facts table --- */
.facts-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .92rem;
}
.facts-table th {
  text-align: left;
  width: 35%;
  padding: .5rem .75rem;
  background: var(--lb-bg-light);
  border: 1px solid var(--lb-border);
  color: var(--lb-text-muted);
  font-weight: 600;
}
.facts-table td {
  padding: .5rem .75rem;
  border: 1px solid var(--lb-border);
}

/* --- Complexity bar (1-5) --- */
.complexity-bar {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.complexity-bar .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 2px solid var(--lb-border);
  transition: background .2s;
}
.complexity-bar .dot.filled {
  background: var(--lb-primary);
  border-color: var(--lb-primary-dark);
}
.complexity-bar .label {
  margin-left: .5rem;
  font-size: .85rem;
  color: var(--lb-text-muted);
  font-weight: 500;
}

/* --- Mechanic tags --- */
.mechanic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .75rem 0;
}
.mechanic-tag {
  display: inline-block;
  background: var(--lb-bg-light);
  color: var(--lb-primary-dark);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .78rem;
  font-weight: 500;
}

/* --- Player recommendation --- */
.player-recommendation {
  background: var(--lb-bg-light);
  border-left: 4px solid var(--lb-primary);
  padding: .75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 var(--lb-radius) var(--lb-radius) 0;
  font-size: .9rem;
}
.player-recommendation strong { color: var(--lb-primary-dark); }
.player-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: .5rem;
  margin-top: .5rem;
}
.player-count-cell {
  text-align: center;
  padding: .4rem;
  border-radius: var(--lb-radius);
  font-size: .8rem;
  font-weight: 600;
}
.player-count-cell.best {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.player-count-cell.good {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}
.player-count-cell.ok {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* --- Price grid --- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.price-card {
  background: #fff;
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius);
  padding: 1rem;
  box-shadow: var(--lb-shadow);
  text-align: center;
}
.price-card .store-name {
  font-weight: 600;
  font-size: .85rem;
  color: var(--lb-text-muted);
  margin-bottom: .25rem;
}
.price-card .price-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--lb-primary-dark);
}
.price-card .price-currency {
  font-size: .85rem;
  color: var(--lb-text-muted);
}
.price-card .price-note {
  font-size: .75rem;
  color: var(--lb-text-muted);
  margin-top: .25rem;
}

/* --- Expansions list --- */
.expansions-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.expansions-list li {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--lb-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
}
.expansions-list li:last-child { border-bottom: none; }
.expansion-year {
  font-size: .78rem;
  color: var(--lb-text-muted);
  background: var(--lb-bg-light);
  padding: .15rem .5rem;
  border-radius: 999px;
}

/* --- Similar games grid --- */
.similar-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.similar-game-card {
  background: #fff;
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius);
  padding: .75rem;
  text-align: center;
  box-shadow: var(--lb-shadow);
  transition: transform .15s, box-shadow .15s;
}
.similar-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.similar-game-card img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--lb-radius) - 2px);
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: .5rem;
}
.similar-game-card .game-name {
  font-weight: 600;
  font-size: .85rem;
  color: var(--lb-text);
}
.similar-game-card .game-meta {
  font-size: .75rem;
  color: var(--lb-text-muted);
}

/* --- Category badge (in hub pages) --- */
.category-badge {
  display: inline-block;
  background: var(--lb-primary);
  color: #fff;
  border-radius: 999px;
  padding: .2rem .7rem;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
}
.category-badge:hover {
  background: var(--lb-primary-dark);
  color: #fff;
}

/* --- Rating display --- */
.rating-display {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.rating-display .rating-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--lb-primary-dark);
}
.rating-display .rating-max {
  font-size: .85rem;
  color: var(--lb-text-muted);
}
.rating-display .rating-votes {
  font-size: .78rem;
  color: var(--lb-text-muted);
  margin-left: .25rem;
}

/* --- Duration display --- */
.duration-display {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .9rem;
  color: var(--lb-text-muted);
}
.duration-display .icon { font-size: 1rem; }

/* --- Game hero / image --- */
.game-hero {
  text-align: center;
  margin: 1rem 0;
}
.game-hero img {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: var(--lb-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.game-hero figcaption {
  font-size: .75rem;
  color: var(--lb-text-muted);
  margin-top: .35rem;
}

/* --- Product slot (specs only, no affiliate links) --- */
.product-slot {
  background: #fff;
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius);
  padding: 1rem;
  margin: .75rem 0;
  box-shadow: var(--lb-shadow);
}
.product-slot .product-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--lb-text);
  margin-bottom: .35rem;
}
.product-slot .product-specs {
  font-size: .85rem;
  color: var(--lb-text-muted);
  line-height: 1.5;
}
.product-slot .product-price-ref {
  font-weight: 600;
  color: var(--lb-primary-dark);
  margin-top: .35rem;
  display: block;
}

/* --- Newsletter CTA --- */
.newsletter-cta {
  background: var(--lb-bg-light);
  border: 2px solid #bfdbfe;
  border-radius: var(--lb-radius);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}
.newsletter-cta h3 {
  color: var(--lb-primary-dark);
  margin: 0 0 .5rem;
  font-size: 1.1rem;
}
.newsletter-cta p {
  color: var(--lb-text-muted);
  font-size: .9rem;
  margin-bottom: 1rem;
}
.newsletter-cta input[type="email"] {
  padding: .5rem .75rem;
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius);
  font-size: .9rem;
  width: min(100%, 300px);
}
.newsletter-cta button {
  background: var(--lb-primary);
  color: #fff;
  border: none;
  padding: .5rem 1.25rem;
  border-radius: var(--lb-radius);
  font-weight: 600;
  cursor: pointer;
  font-size: .9rem;
  margin-top: .5rem;
}
.newsletter-cta button:hover {
  background: var(--lb-primary-dark);
}

/* --- FAQ section --- */
.faq-section details {
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius);
  margin-bottom: .5rem;
  overflow: hidden;
}
.faq-section summary {
  padding: .65rem .85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--lb-bg-light);
  font-size: .92rem;
}
.faq-section details[open] summary {
  border-bottom: 1px solid var(--lb-border);
}
.faq-section details p {
  padding: .65rem .85rem;
  margin: 0;
  font-size: .9rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--lb-bg-dark);
  color: #94a3b8;
  padding: 1.5rem 1rem;
  font-size: .8rem;
  text-align: center;
  margin-top: 3rem;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--lb-accent); }

/* --- Hub / listing pages --- */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.item-card {
  background: #fff;
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius);
  padding: 1rem;
  box-shadow: var(--lb-shadow);
  transition: transform .15s, box-shadow .15s;
}
.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.item-card h3 { margin: 0 0 .35rem; font-size: 1rem; }
.item-card h3 a { text-decoration: none; color: var(--lb-text); }
.item-card .card-meta {
  font-size: .8rem;
  color: var(--lb-text-muted);
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .facts-table th, .facts-table td {
    display: block;
    width: 100%;
  }
  .facts-table th {
    border-bottom: none;
  }
  .price-grid {
    grid-template-columns: 1fr;
  }
  .similar-games {
    grid-template-columns: repeat(2, 1fr);
  }
  .game-hero img {
    max-width: 200px;
  }
}

/* --- Utility classes --- */
.text-muted { color: var(--lb-text-muted); }
.text-small { font-size: .82rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
