/* assets/css/style.css */
:root {
  --bg: #0f1724;
  --card: #0b1220;
  --accent: #06b6d4;
  --muted: #94a3b8;
  --text: #e6eef6;
}

body {
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  background: linear-gradient(180deg, #071027 0%, #071632 100%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 28px auto;
  padding: 20px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: -18px;
}

.logo .png {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;

}

.search {
  flex: 1;
  min-width: 300px;
}

input.searchbar {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Main Content */
main {
  min-height: 60vh;
}

.small-muted {
  font-size: 14px;
  color: var(--muted);
}

/* ========== NOVOS ESTILOS ========== */

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 30px 0 40px 0;
  background: linear-gradient(135deg, rgba(6,182,212,0.1) 0%, rgba(139,92,246,0.1) 100%);
  border-radius: 20px;
  margin: 5px 0 40px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.hero-badge {
  font-size: 14px;
  background: rgba(6,182,212,0.2);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 600;
}

.hero-title {
  font-size: 3em;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2em;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 30px auto;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Stats Section */
.stats-section {
  text-align: center;
  margin: 60px 0;
}

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

.stat-item {
  padding: 20px;
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
}

/* Cards Melhorados */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.card {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: left 0.5s ease;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.category-badge {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  line-height: 1.4;
}

.prompt-box {
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #f8fafc;
  line-height: 1.4;
  max-height: 120px;
  overflow: hidden;
}

/* Buttons Melhorados */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #062024;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 14px;
  transition: all 0.2s;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  padding: 12px 24px;
  font-size: 16px;
}

.btn-donate {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  padding: 12px 24px;
  font-size: 16px;
}

.btn-popup {
  background: white;
  color: var(--accent);
  width: 100%;
  margin-top: 10px;
}

/* Tags */
.tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.tag:hover {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent);
  transform: translateY(-1px);
}

.meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 50;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(880px, 95%);
  background: var(--card);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 90vh;
  overflow-y: auto;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.fav {
  margin-left: auto;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  transition: color 0.2s;
}

.fav:hover {
  color: gold;
}

/* Popup de Conversão */
.conversion-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  padding: 0;
  border-radius: 12px;
  max-width: 300px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 1000;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.5s ease;
}

.conversion-popup.active {
  transform: translateX(0);
  opacity: 1;
}

.popup-content {
  padding: 20px;
  position: relative;
}

.popup-close {
  background: none;
  border: none;
  color: white;
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.popup-content h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
}

.popup-content p {
  margin: 0 0 15px 0;
  font-size: 14px;
  opacity: 0.9;
}

/* Forms */
form {
  margin-top: 16px;
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

input, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  margin-bottom: 16px;
  box-sizing: border-box;
}

/* NOVO: Estilo para o GIF flutuante */
.robo-flutuante {
  position: fixed;
  bottom: 20px; /* 20 pixels do fundo */
  right: 20px; /* 20 pixels da direita */
  width: 150px; /* Tamanho ajustado para não ser invasivo */
  height: auto;
  z-index: 1001; /* Garante que fique acima de outros popups e elementos fixos */
  cursor: pointer;
  transition: transform 0.3s ease;
}

.robo-flutuante:hover {
  transform: scale(1.05);
}

/* --- NOVO: ESTILO PARA BOLHA DE FALA DO MASCOTE --- */
.speech-bubble {
  position: fixed;
  bottom: 230px; /* Posiciona acima do mascote (ajustar conforme o tamanho do seu GIF) */
  right: 20px;
  width: 200px;
  background: white;
  color: var(--card); /* Cor escura do seu tema */
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  z-index: 1002; /* Maior que o mascote (1001) */
}

/* Cria a ponta (triângulo) da bolha de fala */
.speech-bubble::after {
  content: '';
  position: absolute;
  right: 20px;
  bottom: -10px; /* Alinha a ponta com a parte inferior da bolha */
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid white; /* A cor da ponta deve ser a mesma do background */
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search {
    min-width: auto;
    margin-left: 0;
  }
  
  .nav-links {
    justify-content: center;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-title {
    font-size: 2em;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .conversion-popup {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  /* Ajuste responsivo para o GIF em telas menores */
  .robo-flutuante {
    width: 100px; /* Reduz o tamanho em telas menores */
    bottom: 10px;
    right: 10px;
  }
  
  /* Ajuste responsivo para a bolha de fala em telas menores */
  .speech-bubble {
    width: 150px; /* Reduz o tamanho da bolha */
    bottom: 130px; /* Posiciona acima do mascote de 100px */
    right: 10px; /* Alinha com o mascote ajustado */
    font-size: 13px;
  }
#btnVoltarAoTopo {
  display: none; /* Esconde o botão por padrão */
  position: fixed; /* Fixa o botão na tela */
  bottom: 20px; /* Distância da parte inferior */
  right: 30px; /* Distância da lateral direita */
  display: none;    /* Esconde o botão por padrão */
  z-index: 999; /* Garante que fique acima de outros elementos */
  border: none;
  outline: none;
  background-color: #f59e0b; /* Cor de fundo */
  color: white; /* Cor da seta */
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1; /* Centraliza o ícone */
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.show {
    display: block !important;
}
/* Classe para mostrar o botão */
.show {
    display: block !important;
    opacity: 1;
}
  
  .speech-bubble::after {
    right: 15px; /* Ajusta a posição da ponta */
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8em;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: 2em;
  }
#btnTopo 
{
  /* Posição Fixa: Fica no mesmo lugar na tela */
  position: fixed;
  bottom: 20px; /* 20px da parte inferior */
  right: 30px; /* 30px da direita */

  /* Estilização */
  display: none; /* Escondido por padrão (aparecerá com JS) */
  z-index: 99; /* Garante que fique acima de outros elementos */
  border: none;
  outline: none;
  background-color: #007bff; /* Cor principal (ajuste conforme seu tema) */
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 10px;
  font-size: 18px;
  opacity: 0.7; /* Transparência leve */
  transition: opacity 0.3s;
}

#btnTopo:hover {
  opacity: 1; /* Fica opaco ao passar o mouse */
}
}