  * { margin: 0; padding: 0; box-sizing: border-box; }
body { height: 100%; background-color: #0d0d0d; font-family: 'Segoe UI', sans-serif; color: #fff; display: flex; flex-direction: column; }
header { background-color: #00ff66; padding: 10px 15px; border-bottom: 1px solid #00cc55; position: sticky; top: 0; z-index: 20; }
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icons-left {
  display: flex;
  align-items: center;
  gap: 15px;
}
    .logo-center { flex-grow: 1; display: flex; justify-content: center; }
    .logo { height: 30px; }
    .icons-right { display: flex; align-items: center; gap: 15px; }
    .icon-btn { width: 24px; height: 24px; cursor: pointer; filter: brightness(0); }
    .bottom-menu { position: sticky; top: 0px; background-color: #222; display: flex; justify-content: space-around; align-items: center; padding: 8px 0; border-top: 1px solid #333; border-bottom: 1px solid #333; z-index: 15; }
    .bottom-menu .menu-item img { width: 24px; height: 24px; filter: brightness(0) saturate(100%) invert(56%) sepia(96%) saturate(518%) hue-rotate(81deg) brightness(110%) contrast(101%); }
    .search-icon {
      background: none;
      padding: 0;
      border: none;
      border-radius: 0;
    }

    .conteudo-wrapper { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; height: calc(100vh - 120px); }
    .conteudo-scroll { flex: 1; overflow-y: auto; padding: 20px; position: relative; z-index: 1; /*max-height: calc(100vh - 180px);*/ /* subtrai altura do header + footer */}
    .categoria { margin-bottom: 40px; }
    .categoria h2 { font-size: 20px; margin-bottom: 10px; border-left: 4px solid #00ff88; padding-left: 10px; color: #00ff88; }
    .galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
    .jogo { background: #1a1a1a; border-radius: 12px; overflow: hidden; box-shadow: 0 0 10px rgba(0,255,136,0.1); transition: transform 0.2s; cursor: pointer; position: relative; }
    .jogo:hover { transform: scale(1.05); }
    .jogo img { width: 100%; height: 180px; object-fit: cover; }
    .info { padding: 10px; }
    .titulo { font-size: 16px; font-weight: bold; margin-bottom: 6px; }
    .views, .rate { font-size: 13px; color: #ccc; display: flex; align-items: center; justify-content: space-between; }
    .menu-lateral { position: absolute; top: 0; left: 0; transform: translateX(-100%); width: 100%; height: 100%; background-color: #111; z-index: 5; transition: transform 0.3s ease; overflow-y: auto; padding-top: 20px; padding-bottom: 60px; }
    .menu-lateral.aberto { transform: translateX(0); }
    .categoria-item { width: 100%; background-color: #222; color: #fff; border: 1px solid #00ff66; padding: 10px 12px 10px 16px; margin-bottom: 8px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; font-weight: bold; font-size: 15px; cursor: pointer; }
    .categoria-item:hover { background-color: #00ff66; color: #000; }
    .icone-direita { width: 18px; height: 18px; filter: invert(65%) sepia(83%) saturate(500%) hue-rotate(81deg) brightness(110%) contrast(101%); }
    .fundo-escuro { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 4; display: none; }
    .fundo-escuro.visivel { display: block; }
    footer { position: fixed; bottom: 0; width: 100%; z-index: 10; }
    .footer-status { background-color: #00ff66; color: #261212; font-weight: bold; font-size: 14px; padding: 8px 0; display: flex; justify-content: space-around; align-items: center; border-top: 2px solid #00cc55; }
    .footer-banner { background-color: #222; padding: 20px; display: flex; justify-content: center; align-items: center; }
    .banner-placeholder { width: 320px; height: 50px; background-color: #444; border-radius: 6px; display: flex; justify-content: center; align-items: center; color: #ccc; font-size: 13px; }
    
    @media (max-width: 600px) { .galeria { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
    .search-bar {
      display: none; /* Fica oculta inicialmente */
      background-color: #111;
      padding: 10px;
     /* position: sticky; */
      top: 108px;
      z-index: 15;
      align-items: center;
      justify-content: space-between;
    }
    
    .search-bar input {
      flex: 1;
      padding: 10px 15px;
      border-radius: 20px;
      border: none;
      outline: none;
      background-color: #222;
      color: #fff;
    }
    
    .search-bar button {
      margin-left: 10px;
      border: none;
      background-color: #00ff66;
      color: #000;
      border-radius: 50%;
      width: 36px;
      height: 36px;
      font-weight: bold;
      cursor: pointer;
    }


    .icon-wrapper {
      position: relative;
      display: inline-block;
    }
    
    .notificacao-badge {
      position: absolute;
      top: -6px;
      right: -6px;
      background-color: red;
      color: white;
      font-size: 11px;
      font-weight: bold;
      padding: 2px 5px;
      border-radius: 50%;
}

.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-conteudo {
  background: #111;
  color: #00ff66;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  max-width: 280px;
  box-shadow: 0 0 15px #00ff66;
  position: relative;
}

.popup-fechar {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
}

.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  transform: none;
  background: rgba(30, 30, 30, 0.7);
  border: none;
  border-radius: 50%;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  cursor: pointer;
  z-index: 2;
  font-size: 1.3em;
  color: #eb2727;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.favorite-btn .fa-trash {
  color: #e74c3c;
}

.favorite-btn.active .fa-trash,
.favorite-btn:hover .fa-trash {
  color: #ffffff;
}

.favorite-btn .heart {
  color: #eb2727;
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

#favoritos-galeria.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 1rem;
}
#favoritos-modal .jogo {
  background: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
#favoritos-modal .favorite-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  margin: 0 auto;
  cursor: pointer;
  font-size: 0.95em;
  display: flex;
  align-items: center;
  gap: 6px;
}
#favoritos-modal .favorite-btn:hover {
  background: #c0392b;
}
.jogo.fade-out {
  opacity: 0;
  transition: opacity 0.3s;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 12px 28px;
  border-radius: 25px;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s;
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
}

.categoria {
  transition: opacity 0.3s;
  opacity: 1;
}
.categoria.hide {
  opacity: 0;
  pointer-events: none;
}
