/* Frases - Estilo Web 1.0 */
.cabecalho-frases {
  text-align: center;
  padding: 20px 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
}

.cabecalho-frases h2 {
  color: #666;
  font-size: 20px;
  margin: 0 0 8px 0;
  font-weight: bold;
  font-family: 'Georgia', serif;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cabecalho-frases p {
  color: #444;
  font-size: 13px;
  margin: 0;
  font-style: italic;
  font-family: 'Georgia', serif;
}

.colecao-frases {
  margin-bottom: 25px;
}

.frase-item {
  background: #000;
  padding: 25px 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
}

.frase-item:last-child {
  border-bottom: none;
}

.frase-texto {
  color: #ccc;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
  font-style: italic;
  font-family: 'Georgia', serif;
}

.frase-autor {
  color: #999;
  font-size: 13px;
  text-align: right;
  font-weight: normal;
  font-family: 'Georgia', serif;
  margin-top: 8px;
}

.info-frases {
  margin: 25px 0;
  padding: 15px;
  background: #000;
  border-top: 1px solid #333;
}

.info-frases h3 {
  color: #666;
  font-size: 13px;
  margin: 0 0 10px 0;
  font-family: 'Georgia', serif;
  font-weight: bold;
}

.filtros-frases-secao,
.estatisticas-frases,
.frase-aleatoria-secao,
.sobre-frases {
  margin-bottom: 20px;
}

.filtros-frases {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filtro-btn {
  background: none;
  border: 1px solid #333;
  color: #444;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  font-family: 'Georgia', serif;
}

.filtro-btn:hover {
  color: #666;
  border-color: #444;
}

.filtro-btn.active {
  color: #666;
  border-color: #444;
  background: #000;
}

.estatisticas-frases p,
.sobre-frases p {
  color: #444;
  font-size: 12px;
  font-family: 'Georgia', serif;
  line-height: 1.6;
  margin: 0 0 5px 0;
}

.frase-aleatoria {
  margin: 12px 0;
  padding: 15px;
  background: #000;
}

.frase-texto-pequeno {
  color: #bbb;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
  font-style: italic;
  font-family: 'Georgia', serif;
}

.frase-autor-pequeno {
  color: #999;
  font-size: 11px;
  text-align: right;
  font-family: 'Georgia', serif;
}

.btn-nova-frase {
  background: none;
  border: 1px solid #333;
  color: #999;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Georgia', serif;
}

.btn-nova-frase:hover {
  color: #bbb;
  border-color: #444;
}

/* Overlay para blur do conteúdo */
.conteudo-blur {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 9998;
  pointer-events: none;
}

.conteudo-blur.ativo {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Modal de aviso */
.aviso-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.aviso-modal.visivel {
  opacity: 1;
  visibility: visible;
}

.aviso-backdrop {
  position: absolute;
  inset: 0;
  background: #000;
  cursor: pointer;
}

.aviso-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aviso-modal.visivel .aviso-container {
  transform: scale(1) translateY(0);
}

.aviso-caixa {
  background: #000;
  border: 1px solid #333;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 0 0 1px #111 inset,
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
}

.aviso-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
  border-bottom: 1px solid #222;
  margin-bottom: 16px;
}

.aviso-header h3 {
  color: #666;
  font-size: 15px;
  margin: 0;
  font-family: 'Georgia', serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.aviso-fechar {
  background: none;
  border: none;
  color: #444;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
  font-family: Arial, sans-serif;
}

.aviso-fechar:hover {
  color: #666;
  transform: scale(1.1);
}

.aviso-conteudo {
  padding: 0 20px 16px;
}

.aviso-conteudo p {
  color: #444;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 12px 0;
  font-family: 'Georgia', serif;
}

.aviso-detalhes {
  margin-top: 8px;
  padding: 8px 12px;
  background: #000;
  border-left: 2px solid #333;
}

.aviso-detalhes small {
  color: #555;
  font-size: 11px;
  font-family: 'Georgia', serif;
  font-style: italic;
}

.aviso-botoes {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 20px 20px;
  border-top: 1px solid #222;
}

.btn-aviso {
  background: none;
  border: 1px solid #333;
  color: #444;
  padding: 8px 16px;
  font-size: 11px;
  cursor: pointer;
  font-family: 'Georgia', serif;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-aviso span {
  position: relative;
  z-index: 1;
}

.btn-aviso::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.btn-aviso:hover::before {
  transform: scaleX(1);
}

.btn-aviso:hover {
  color: #666;
  border-color: #444;
  transform: translateY(-1px);
}

.btn-primario {
  border-color: #444;
  color: #666;
}

.btn-primario:hover {
  border-color: #666;
  color: #777;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-secundario:hover {
  color: #555;
}

/* Prevenir scroll quando modal está ativo */
body.modal-ativo {
  overflow: hidden;
  height: 100vh;
}

/* Estados de filtro */
.frase-item.oculto {
  display: none;
}

/* Responsividade melhorada */
@media (max-width: 768px) {
  .cabecalho-frases h2 {
    font-size: 18px;
  }

  .cabecalho-frases p {
    font-size: 12px;
  }

  .frase-item {
    padding: 20px 15px;
    margin-bottom: 18px;
  }

  .frase-texto {
    font-size: 15px;
    line-height: 1.7;
  }

  .frase-autor {
    font-size: 12px;
  }

  .frase-aleatoria {
    padding: 12px;
  }

  .frase-texto-pequeno {
    font-size: 12px;
    line-height: 1.5;
  }

  .filtros-frases {
    justify-content: center;
  }

  /* Modal responsivo para tablets */
  .aviso-container {
    padding: 15px;
  }

  .aviso-caixa {
    width: min(480px, 95%);
    margin: 0 auto;
  }

  .aviso-header {
    padding: 14px 18px 0;
  }

  .aviso-header h3 {
    font-size: 14px;
  }

  .aviso-fechar {
    font-size: 18px;
    padding: 6px 10px;
  }

  .aviso-conteudo {
    padding: 0 18px 14px;
  }

  .aviso-conteudo p {
    font-size: 12px;
    line-height: 1.5;
  }

  .aviso-detalhes {
    padding: 10px 14px;
  }

  .aviso-detalhes small {
    font-size: 10px;
  }

  .aviso-botoes {
    padding: 14px 18px 18px;
    gap: 12px;
  }

  .btn-aviso {
    padding: 10px 18px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .cabecalho-frases {
    padding: 15px 10px;
  }

  .frase-item {
    padding: 18px 12px;
    margin-bottom: 16px;
  }

  .cabecalho-frases h2 {
    font-size: 16px;
  }

  .frase-texto {
    font-size: 14px;
    line-height: 1.6;
  }

  .frase-autor {
    font-size: 11px;
  }

  .frase-aleatoria {
    padding: 10px;
  }

  .frase-texto-pequeno {
    font-size: 11px;
  }

  /* Modal otimizado para celulares */
  .aviso-container {
    padding: 10px;
    align-items: flex-end;
  }

  .aviso-caixa {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid #333;
    max-height: 85vh;
    box-shadow:
      0 -10px 40px rgba(0, 0, 0, 0.9),
      0 0 0 1px rgba(255, 255, 255, 0.03);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .aviso-modal.visivel .aviso-caixa {
    transform: translateY(0);
  }

  .aviso-header {
    padding: 16px 16px 0;
    border-bottom: 1px solid #222;
    margin-bottom: 14px;
  }

  .aviso-header h3 {
    font-size: 13px;
    letter-spacing: 0.5px;
  }

  .aviso-fechar {
    font-size: 20px;
    padding: 4px 8px;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .aviso-conteudo {
    padding: 0 16px 14px;
  }

  .aviso-conteudo p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 14px;
  }

  .aviso-detalhes {
    padding: 12px 14px;
    margin-top: 10px;
    border-left: 3px solid #333;
    background: #000;
  }

  .aviso-detalhes small {
    font-size: 11px;
    line-height: 1.5;
  }

  .aviso-botoes {
    padding: 16px 16px 20px;
    gap: 10px;
    border-top: 1px solid #222;
    flex-direction: column;
  }

  .btn-aviso {
    padding: 12px 20px;
    font-size: 12px;
    width: 100%;
    min-height: 44px;
    text-align: center;
    border-radius: 0;
  }

  .btn-primario {
    order: -1;
  }

  .btn-secundario {
    border-color: #444;
  }

  /* Melhor contraste no mobile */
  .conteudo-blur {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

/* Melhorias extras para alta densidade de pixels */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .aviso-fechar {
    border: 1px solid transparent;
  }

  .aviso-fechar:hover {
    border-color: #444;
  }

  .btn-aviso {
    border-width: 1px;
  }
}

/* Melhorias de acessibilidade e contraste */
@media (max-width: 768px) {
  .aviso-caixa {
    border: 2px solid #444;
  }

  .aviso-header h3 {
    color: #888;
  }

  .aviso-conteudo p {
    color: #666;
  }

  .btn-aviso {
    border: 2px solid #555;
    color: #777;
    font-weight: 500;
  }

  .btn-aviso:hover,
  .btn-aviso:focus {
    color: #999;
    border-color: #666;
    outline: 2px solid #333;
    outline-offset: 2px;
  }

  .btn-primario {
    border-color: #666;
    color: #999;
    background: rgba(255, 255, 255, 0.02);
  }

  .btn-primario:hover,
  .btn-primario:focus {
    border-color: #777;
    color: #bbb;
    background: rgba(255, 255, 255, 0.05);
  }

  .aviso-fechar:hover,
  .aviso-fechar:focus {
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    outline: 2px solid #333;
    outline-offset: 2px;
  }
}

/* Estados de pressão para dispositivos tácteis */
@media (hover: none) and (pointer: coarse) {
  .btn-aviso:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.1);
  }

  .aviso-fechar:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
  }

  /* Evitar hover em dispositivos tácteis */
  .btn-aviso:hover {
    color: inherit;
    border-color: inherit;
    transform: none;
  }

  .aviso-fechar:hover {
    color: inherit;
    transform: none;
  }
}

/* Orientação paisagem em celulares */
@media (max-width: 768px) and (orientation: landscape) {
  .aviso-container {
    align-items: center;
    padding: 15px;
  }

  .aviso-caixa {
    max-height: 90vh;
    width: min(600px, 95%);
    transform: scale(0.9) translateY(20px);
  }

  .aviso-modal.visivel .aviso-caixa {
    transform: scale(1) translateY(0);
  }

  .aviso-botoes {
    flex-direction: row;
    justify-content: flex-end;
  }

  .btn-aviso {
    width: auto;
    min-width: 120px;
  }

  .btn-primario {
    order: 0;
  }
}
