body {
  margin: 0;
  font-family: Arial, sans-serif;
}

header, footer {
  background: #111;
  color: #fff;
  padding: 10px;
}

nav a {
  color: #fff;
  margin-right: 15px;
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
}

.ads {
  background: #eee;
  padding: 10px;
  text-align: center;
}

main {
  padding: 20px;
}

#filters button {
  margin-right: 5px;
  cursor: pointer;
}

#filters button.active {
  background: #111;
  color: #fff;
}

/* ===== Deck Filters ===== */

#filters {
  margin-bottom: 15px;
}

#filters .filter {
  padding: 6px 12px;
  margin-right: 6px;
  border: 2px solid #ccc;
  background: #f5f5f5;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Estado ativo */
#filters .filter.active {
  border-color: #000;
  box-shadow: 0 0 0 2px #000 inset;
}

/* Cores do Magic */
#filters .color-W.active { background: #fff; color: #000; }
#filters .color-U.active { background: #0070ff; color: #fff; }
#filters .color-B.active { background: #000; color: #fff; }
#filters .color-R.active { background: #d32f2f; color: #fff; }
#filters .color-G.active { background: #2e7d32; color: #fff; }

/* Hover */
#filters .filter:hover {
  opacity: 0.85;
}

.mana-filters {
  margin-bottom: 10px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  margin-right: 6px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  opacity: 0.5;
}

.badge.active {
  opacity: 1;
  outline: 2px solid #000;
}

.mana-W { background: #f8f4e6; }
.mana-U { background: #cce3f5; }
.mana-B { background: #c8c8c8; }
.mana-R { background: #f5c1b5; }
.mana-G { background: #cde8c3; }

.exact-filter {
  margin-bottom: 15px;
}

.post-excerpt {
  margin-bottom: 30px;
}

.post-excerpt p {
  color: #444;
  line-height: 1.6;
}

/* === Mana Icons === */
.mana {
  width: 22px;
  height: 22px;
  vertical-align: middle;
}

/* === Mana filter badges === */
.mana-filter {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  opacity: 0.35;
  transition: all 0.15s ease;
}

.mana-filter.active {
  opacity: 1;
  transform: scale(1.15);
}

.mana-filter:hover {
  opacity: 0.75;
}

/* === Card Popup === */
#card-popup {
  position: absolute;
  z-index: 9999;
  pointer-events: none;
  background: #000;
  padding: 4px;
  border-radius: 6px;
}

#card-popup img {
  width: 223px;
  height: auto;
  display: block;
}

#card-popup {
  position: absolute;
  z-index: 9999;
  pointer-events: none;
  background: #111;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
}

#card-popup img {
  width: 223px;
  height: auto;
  display: block;
}

.card-popup-text {
  font-size: 14px;
}

.card-art {
  width: 320px;
  max-width: 90%;
  height: auto;
  display: block;
  margin: 16px auto;
  border-radius: 10px;
}