/* =========================================
   RESET E ESTRUTURA (Rodapé Fixo + Fonte Base)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  background-color: #f8f9fa;
  color: #333;
  padding-top: 70px;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.main-content {
  flex: 1; /* Empurra o rodapé para baixo */
}

/* =========================================
   TIPOGRAFIA PADRONIZADA (SEO & UX)
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  color: #2c3e50;
  margin-top: 0;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

h3, .panel-title {
  font-size: 16px !important;
  font-weight: 600;
  color: #34495e;
  line-height: 1.4;
}

.panel-title a {
  text-decoration: none;
  color: #333;
  display: block;
}
.panel-title a:hover { color: #3498db; }

p {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 15px;
}

label {
  font-weight: 600;
  font-size: 13px;
  color: #444;
  margin-top: 10px;
  margin-bottom: 5px;
}

@media (max-width: 767px) {
  h2 { font-size: 20px; }
  p { font-size: 14px; }
}

/* =========================================
   NAVBAR & LOGO H1 (RESTAURADO PARA O PADRÃO ANTERIOR)
   ========================================= */
.navbar-default {
  background-color: #fff;
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  min-height: 60px;
}

.navbar-brand {
  height: 60px;
  padding: 15px 15px;
  display: flex;
  align-items: center;
}

/* ESTILO DO H1 DENTRO DO MENU */
h1.logo-h1 {
  font-size: 18px !important;    /* Tamanho ideal Desktop */
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  color: #2c3e50;
  font-weight: 700;
  display: inline-block;
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

@media (min-width: 768px) {
    h1.logo-h1 { max-width: 100%; }
}

.navbar-nav > li > a {
  padding-top: 20px;
  padding-bottom: 20px;
  font-weight: 600;
  color: #555;
}
.navbar-nav > li.active > a {
  background-color: #f0f2f5 !important;
  color: #3498db !important;
  border-radius: 4px;
}
.navbar-toggle { margin-top: 13px; }

/* Ajuste Mobile do H1 (Para não quebrar) */
@media (max-width: 767px) {
  h1.logo-h1 {
    font-size: 13px !important;  /* Tamanho ideal Mobile */
    max-width: 75vw;
    letter-spacing: -0.5px;
  }
  .navbar-brand { padding-left: 10px; padding-top: 18px; }
  .navbar-toggle { margin-right: 10px; }
}

/* =========================================
   FORMULÁRIOS & BOTÕES GERAIS
   ========================================= */
.form-control {
  height: 42px;
  font-size: 15px;
  border-radius: 6px;
  box-shadow: none;
  border: 1px solid #ced4da;
}

.btn {
  border-radius: 6px;
  font-weight: 700;
  padding: 12px 25px;
  font-size: 15px;
  text-transform: uppercase;
  margin-top: 15px;
  transition: all 0.3s;
}

.input_intervalo {
  width: 48%;
  display: inline-block;
  margin-right: 2%;
}
.input_intervalo:last-child { margin-right: 0; }

@media (max-width: 480px) {
  .input_intervalo { width: 100%; margin-right: 0; margin-bottom: 10px; }
}

/* =========================================
   CABEÇALHO DOS RESULTADOS E BOTÕES DE AÇÃO
   ========================================= */
.result-header {
  display: flex;
  align-items: center;            
  justify-content: space-between; 
  margin-top: 40px;
  margin-bottom: 25px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  flex-wrap: nowrap;              
}

.result-header h2 {
  margin: 0 !important;           
  padding: 0;
  font-size: 22px;
  line-height: 1.2;               
  text-align: left;
}

.print-btn-wrapper {
  margin-left: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botões de Ação Unificados */
.btn-print, .btn-copy-all {
  border: none;
  font-weight: 700;
  padding: 0 20px;
  border-radius: 6px;
  text-transform: uppercase;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  line-height: 1;
  margin: 0 !important;
  color: #fff;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s;
}

.btn-print { background-color: #5bc0de; }
.btn-print:hover { background-color: #31b0d5; color: #fff; }

.btn-copy-all { background-color: #f39c12; }
.btn-copy-all:hover { background-color: #e67e22; color: #fff; }

.btn-copy-all.success {
  background-color: #27ae60 !important;
  border-color: #27ae60 !important;
  cursor: default;
}

@media (max-width: 767px) {
  .result-header {
    flex-direction: column;
    text-align: center;
  }
  .result-header h2 {
    margin-bottom: 15px !important;
    text-align: center;
    font-size: 18px;
  }
  .print-btn-wrapper { 
    width: 100%; 
    flex-direction: column;
    margin-left: 0;
  }
  .btn-print, .btn-copy-all { width: 100%; }
}

/* =========================================
   CARTÃO INTERATIVO (UX PERFEITA) - CORRIGIDO
   ========================================= */
.all_jogos {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.jogo-item {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease-in-out;
  overflow: hidden;
  
  /* Remove "pisca" nativo do mobile */
  -webkit-tap-highlight-color: transparent; 
  user-select: none;
}

/* --- DICA "CLIQUE PARA COPIAR" (APENAS DESKTOP) --- */
@media (hover: hover) {
  .jogo-item:not(.copied):hover::after {
    content: 'Clique para copiar';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .jogo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #3498db;
  }
}

/* --- ESTADO "COPIADO" (IGUAL AO BOTÃO) --- */
.jogo-item.copied {
  border-color: #27ae60 !important;
  background-color: #27ae60 !important; /* FUNDO VERDE SÓLIDO */
  transform: none !important;
  box-shadow: none !important;
}

/* Esconde números quando copiado */
.jogo-item.copied .num_jogo,
.jogo-item.copied .bolas-wrapper {
  opacity: 0; 
  transition: opacity 0.1s;
}

/* MENSAGEM DE SUCESSO (Branca e Centralizada) */
.jogo-item.copied::after {
  content: '✔ COPIADO!';
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  z-index: 10;
  opacity: 1 !important;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.num_jogo {
  font-weight: 700;
  font-size: 14px;
  color: #bdc3c7;
  margin-right: 15px;
  min-width: 30px;
  border: none;
  margin-bottom: 0;
  text-align: left;
}

.bolas-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.all_jogos .row_jogo {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-radius: 50%;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.15);
  margin: 0;
}

/* --- VERSÃO DESKTOP (3 COLUNAS - ID NA MESMA LINHA) --- */
@media (min-width: 992px) { 
  .all_jogos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .jogo-item {
    flex-direction: row; 
    justify-content: center;
    padding: 25px 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  }

  .num_jogo {
    width: auto;
    margin-right: 15px;
    margin-bottom: 0;
    border: none;
    padding: 0;
  }
  
  .bolas-wrapper {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .all_jogos .row_jogo {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .jogo-item { padding: 12px; }
}

#toast-notification { display: none !important; }

/* =========================================
   RODAPÉ
   ========================================= */
.site-footer {
  background-color: #fff;
  border-top: 1px solid #e5e5e5;
  padding: 25px 0;
  margin-top: 10px;
  color: #777;
  width: 100%;
}

.copyright-text {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  color: #888;
}

.legal-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.legal-links li {
  display: inline-block;
  margin-left: 20px;
}
.legal-links a {
  font-size: 12px;
  color: #888;
  text-decoration: none;
  font-weight: 500;
}
.legal-links a:hover { color: #337ab7; text-decoration: underline; }

@media (min-width: 768px) {
  .text-left-desk { text-align: left; }
  .text-right-desk { text-align: right; }
}

@media (max-width: 767px) {
  .site-footer { padding: 30px 0; }
  .text-left-desk, .text-right-desk { text-align: center; }
  .copyright-text {
    margin-bottom: 15px;
    display: block;
    padding: 0 10px;
  }
  .legal-links li { display: block; margin: 8px 0; }
  .legal-links li a { display: block; padding: 5px 0; }
}

/* =========================================
   SEÇÃO DE CONTEÚDO SEO
   ========================================= */
.content-section {
  margin-top: 40px;
  margin-bottom: 10px;
  padding: 0 10px;
}
.seo-text-container {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: max-height 0.5s ease;
}
.seo-text-container.expanded {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}
.btn-read-more {
  background: transparent;
  border: 1px solid #3498db;
  color: #3498db;
  border-radius: 20px;
  padding: 8px 25px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 20px;
  cursor: pointer;
  outline: none;
}
.btn-read-more:hover { background-color: #3498db; color: #fff; }
.faq-section hr { margin-top: 10px; margin-bottom: 30px; border-top: 1px solid #eee; }

/* =========================================
   IMPRESSÃO HÍBRIDA (INTELIGENTE)
   ========================================= */
@media print {
  @page {
    size: landscape; 
    margin: 4mm;
  }

  .navbar, .site-footer, form, .faq-section, 
  .content-section, .print-btn-wrapper, .btn, hr, .page-title, #toast-notification {
    display: none !important;
  }

  body, .main-content {
    background-color: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    color: #000 !important;
    height: auto !important;
  }

  .col-md-12, .row, .container {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    float: none !important;
  }

  .result-header {
    display: block !important;
    text-align: center !important;
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    border: none !important;
  }
  .result-header h2 {
    font-size: 14px !important;
    text-align: center !important;
    margin: 0 !important;
    color: #000 !important;
    text-transform: uppercase;
    font-weight: bold;
  }

  .all_jogos {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0; 
  }

  /* --- JOGO PADRÃO (5 COLUNAS) --- */
  .jogo-item {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    
    width: 19.6% !important; 
    margin: 0 0.1% 2px 0.1% !important;
    
    border: 1px solid #999 !important;
    border-radius: 6px !important;
    padding: 2px 2px !important;
    background-color: #fff !important;
    
    height: auto !important;
    min-height: 26px !important;
    
    break-inside: avoid;
    page-break-inside: avoid;
    box-sizing: border-box !important;
    
    overflow: visible !important; 
  }

  /* --- JOGO LARGO (ATIVADO SE > 8 NÚMEROS) --- */
  .jogo-item.jogo-largo {
    width: 32.8% !important; 
  }

  .jogo-item .num_jogo {
    display: inline-block !important;
    font-size: 10px !important;
    color: #000 !important;
    margin: 0 4px 0 0 !important;
    border: none !important;
    padding: 0 !important;
    font-weight: bold !important;
    min-width: 15px;
    text-align: right;
    flex-shrink: 0; 
  }

  .jogo-item .bolas-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1px !important;
  }

  .row_jogo {
    background: none !important;      
    color: #000 !important;           
    border: 1px solid #000 !important; 
    box-shadow: none !important;      
    font-weight: bold !important;
    
    width: 19px !important;       
    height: 19px !important;
    line-height: 17px !important; 
    font-size: 10px !important;   
    
    margin: 0 !important;
    border-radius: 50% !important;
    text-align: center !important;
    display: inline-block !important;
  }
  
  br { display: none !important; }
}

/* =========================================
   POPUP DE COOKIES (Desktop & Mobile)
   ========================================= */
.cookie-banner {
  display: none; /* Oculto por padrão, o JS vai mostrar */
  position: fixed;
  z-index: 10000; /* Fica acima de tudo */
  background-color: #1a1a1a; /* Fundo escuro (Charcoal) */
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  
  /* Animação de entrada */
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* Classe para mostrar o banner */
.cookie-banner.show {
  display: block;
  opacity: 1;
}

.cookie-content {
  padding: 25px;
}

.cookie-banner h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.cookie-banner p {
  margin: 0 0 20px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #ccc;
}

.cookie-banner a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

.cookie-banner a:hover {
  color: #3498db;
}

/* Botão "Concordo" */
#accept-cookies-btn {
  background-color: #000; /* Botão preto */
  color: #fff;
  border: none;
  padding: 10px 30px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: inline-block;
}

#accept-cookies-btn:hover {
  background-color: #333;
}

/* --- VERSÃO DESKTOP (Caixa no Canto) --- */
@media (min-width: 768px) {
  .cookie-banner {
    bottom: 20px;
    right: 20px;
    width: 320px;
    border-radius: 8px;
  }
}

/* --- VERSÃO MOBILE (Barra no Rodapé) --- */
@media (max-width: 767px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 0; /* Sem bordas arredondadas no mobile */
  }
  
  .cookie-content {
    padding: 20px;
    text-align: left;
  }
  
  #accept-cookies-btn {
    width: 100%; /* Botão grande no celular para facilitar o toque */
    padding: 12px;
  }
}