body {
  font-family: Arial, sans-serif;
  background: #0f0f0f;
  color: white;
  margin: 0;
}

/* ACESSIBILIDADE: foco visível para navegação por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #00ff88;
  outline-offset: 2px;
}

/* UTILITÁRIO: usado por JS para esconder elementos (ex: dropdown de busca) */
.hidden {
  display: none !important;
}

/* HEADER */
header {
  text-align: center;
  padding: 20px;
  position: relative;
}

.lang-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #00ff88;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.lang-toggle:hover {
  background: #00ff88;
  color: black;
}

.subtitle {
  font-size: 14px;
  opacity: 0.7;
  margin: 0;
}

/* TEXTOS DE INTRODUÇÃO / SEO */
.intro-text,
.seo-text {
  padding: 20px;
  font-size: 14px;
  opacity: 0.85;
  line-height: 1.6;
}

.intro-text {
  padding: 10px 20px;
  font-size: 13px;
}

.seo-text h2 {
  color: #00ff88;
  font-size: 16px;
}

/* CONTROLS */
.controls {
  padding: 10px;
  text-align: center;
  position: relative;
}

input {
  padding: 10px;
  width: 80%;
  max-width: 400px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: none;
}

/* DROPDOWN */
#dropdown {
  background: #111;
  border: 1px solid #333;
  width: 80%;
  max-width: 400px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  border-radius: 8px;
  overflow: hidden;
}

.dropdown-item {
  padding: 10px;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #00ff88;
  color: black;
}

/* ESTADO VAZIO (filtro sem resultados) */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  opacity: 0.7;
  font-size: 14px;
}

/* TAGS */
#tagsContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.tag {
  display: inline-block;
  background: #222;
  color: white;
  padding: 6px 10px;
  margin: 5px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

.tag:hover {
  background: #00ff88;
  color: black;
}

.tag.active {
  background: #00ff88;
  color: black;
}

/* TAGS SELECIONADAS */
#selectedTags {
  margin-top: 10px;
}

.selected-tag {
  display: inline-block;
  background: #00ff88;
  color: black;
  padding: 5px 10px;
  margin: 5px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

/* BOTÃO LIMPAR */
#clearFilters {
  margin-top: 10px;
  padding: 8px 12px;
  border: none;
  background: #222;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

#clearFilters:hover {
  background: #00ff88;
  color: black;
}

/* FAVORITOS */
.fav-filter button {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: #222;
  color: white;
  cursor: pointer;
}

.fav-filter button.active {
  background: #00ff88;
  color: black;
}

/* CARDS */
#cardsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  padding: 15px;
}

.card {
  background: #1a1a1a;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: #111;
}

.card h3 {
  margin: 10px 0 5px;
}

.card p {
  font-size: 14px;
  opacity: 0.8;
}

/* TAGS NO CARD */
.tags {
  margin: 10px 0;
}

.tags span {
  font-size: 12px;
  margin: 2px;
  background: #333;
  padding: 3px 6px;
  border-radius: 5px;
}

/* BOTÕES */
.actions {
  margin-top: 10px;
}

.main-btn {
  display: block;
  background: #00ff88;
  color: black;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  margin-bottom: 6px;
}

.fav-btn {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s;
}

.fav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* LOAD MORE */
#loadMoreBtn {
  display: block;
  margin: 20px auto;
  padding: 12px 24px;
  min-height: 44px;
  border: none;
  border-radius: 6px;
  background: #00ff88;
  color: black;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s;
}

#loadMoreBtn:hover {
  opacity: 0.85;
}

/* BOTÕES DE CONTROLE */
.buttons {
  margin-top: 10px;
}

.buttons button {
  margin: 5px;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 6px;
  border: none;
  background: #222;
  color: white;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.buttons button:hover {
  background: #00ff88;
  color: black;
}

.btn.secondary {
  background: transparent;
  border: 1px solid #00ff88;
  color: #00ff88;
}

.lazy-img {
  filter: blur(3px);
  transition: filter 0.3s ease;
}

.lazy-img.loaded {
  filter: blur(0);
}

#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  
  background: #111;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  
  transition: all 0.3s ease;
  z-index: 9999;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 🔥 BADGE DE DESTAQUE */
.badge {
  background: gold;
  color: black;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 6px;
  font-weight: bold;
}

/* 🔥 TAGS ESPECIAIS */
/* ⚡ RÁPIDO */
.tag.fast {
  background: #00ff88;
  color: #000;
}

/* 🐢 DEMORADO */
.tag.slow {
  background: #ff6b6b;
  color: #000;
}

/* 😌 FÁCIL (bem sutil) */
.tag.easy {
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.footer {
  background: #0a0a0a;
  color: #aaa;
  padding: 30px 15px;
  margin-top: 40px;
  border-top: 1px solid #222;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.footer-section h3,
.footer-section h4 {
  color: #00ff88;
}

.footer-section a {
  display: block;
  color: #aaa;
  text-decoration: none;
  margin: 5px 0;
}

.footer-section a:hover {
  color: #00ff88;
}

/* Itens de comunidade ainda não ativos (evita link "morto" para "#") */
.footer-disabled {
  display: block;
  color: #666;
  margin: 5px 0;
  cursor: default;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  opacity: 0.7;
}
/* =========================
   📱 MEDIA QUERIES
========================= */
@media (max-width: 480px) {
  #cardsContainer {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .buttons button {
    flex: 1 1 calc(50% - 10px);
    min-width: 120px;
  }

  input {
    width: 95%;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  #cardsContainer {
    grid-template-columns: repeat(2, 1fr);
  }
}
