
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Times New Roman", Times, serif;
  background: #f5f0e8;
  color: #000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
}

body.tema-escuro {
  background: #1a1a1a;
  color: #fff;
}

/* ========== HEADER ========== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

.logo {
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.btn-tema {
  padding: 0.4rem 1rem;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.9rem;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  cursor: pointer;
  transition: all 0.3s;
}

body.tema-escuro .btn-tema {
  background: #fff;
  color: #000;
  border: 1px solid #fff;
}

/* ========== APP HEADER ========== */
.app-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.header-esquerda {
  display: flex;
  align-items: center;
}

.header-direita {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-app {
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.btn-correspondencia {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem;
}

body.tema-escuro .btn-correspondencia {
  filter: invert(1);
}

.icone-perfil {
  width: 40px;
  height: 40px;
  border: 1px solid #000;
  background: #ddd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  overflow: hidden;
}

body.tema-escuro .icone-perfil {
  border: 1px solid #fff;
  background: #444;
}

.icone-perfil img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-hamburguer {
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: "Times New Roman", Times, serif;
  padding: 0.3rem;
}

body.tema-escuro .menu-hamburguer {
  color: #fff;
}

/* ========== LINHAS DIVISÓRIAS ========== */
.linha-divisoria {
  display: flex;
  flex-direction: column;
  height: 6px;
}

.linha-preta {
  flex: 1;
  background: #000;
  transition: background 0.3s;
}

.linha-vermelha {
  flex: 1;
  background: #cc0000;
}

body.tema-escuro .linha-preta {
  background: #fff;
}

/* ========== NAVEGAÇÃO ========== */
.nav-botoes {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.8rem;
  flex-wrap: wrap;
}

.nav-btn {
  padding: 0.4rem 1.5rem;
  font-family: "Times New Roman", Times, serif;
  font-size: 1rem;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  cursor: pointer;
  transition: all 0.3s;
}

.nav-btn:hover {
  background: #333;
}

.nav-btn.ativo {
  background: #cc0000;
  border-color: #cc0000;
}

body.tema-escuro .nav-btn {
  background: #fff;
  color: #000;
  border: 1px solid #fff;
}

body.tema-escuro .nav-btn:hover {
  background: #ccc;
}

body.tema-escuro .nav-btn.ativo {
  background: #cc0000;
  color: #fff;
  border-color: #cc0000;
}

/* ========== CORPO ========== */
.corpo {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 3rem 1rem;
}

.bloco-acao {
  text-align: center;
}

.bloco-acao p {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.btn-acao {
  padding: 0.6rem 2rem;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.1rem;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-acao:hover {
  background: #333;
}

body.tema-escuro .btn-acao {
  background: #fff;
  color: #000;
  border: 1px solid #fff;
}

body.tema-escuro .btn-acao:hover {
  background: #ccc;
}

/* ========== CONTEÚDO ========== */
.conteudo {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

.secao-pagina {
  display: none;
}

.secao-pagina.ativa {
  display: block;
}

.titulo-secao {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ========== LISTA DE AMIGOS ========== */
.lista-amigos {
  margin-bottom: 2rem;
}

.amigo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid #000;
  margin-bottom: 0.5rem;
  background: #fff;
}

body.tema-escuro .amigo-item {
  background: #2a2a2a;
  border: 1px solid #fff;
}

.amigo-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.amigo-avatar {
  width: 35px;
  height: 35px;
  border: 1px solid #000;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  overflow: hidden;
  cursor: pointer;
}

body.tema-escuro .amigo-avatar {
  border: 1px solid #fff;
  background: #444;
}

.amigo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.amigo-nome {
  cursor: pointer;
}

.amigo-nome:hover {
  text-decoration: underline;
}

.btn-remover {
  padding: 0.3rem 0.8rem;
  font-family: "Times New Roman", Times, serif;
  background: #cc0000;
  color: #fff;
  border: 1px solid #cc0000;
  cursor: pointer;
}

/* ========== BOTÃO ADICIONAR ========== */
.btn-adicionar-amigos {
  display: block;
  margin: 0 auto;
  padding: 0.6rem 2rem;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.1rem;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-adicionar-amigos:hover {
  background: #333;
}

body.tema-escuro .btn-adicionar-amigos {
  background: #fff;
  color: #000;
  border: 1px solid #fff;
}

body.tema-escuro .btn-adicionar-amigos:hover {
  background: #ccc;
}

/* ========== RODAPÉ ========== */
.rodape {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/* ========== OVERLAY ========== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 100;
}

/* ========== POPUPS ========== */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  background: #f5f0e8;
  border: 2px solid #000;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
}

body.tema-escuro .popup {
  background: #1a1a1a;
  border: 2px solid #fff;
}

.popup h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.popup .fechar {
  position: absolute;
  right: 0.8rem;
  top: 0.3rem;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: "Times New Roman", Times, serif;
  color: #000;
}

body.tema-escuro .popup .fechar {
  color: #fff;
}

.popup label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}

.input-campo {
  display: block;
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  font-family: "Times New Roman", Times, serif;
  font-size: 1rem;
  border: 1px solid #000;
  background: #fff;
}

body.tema-escuro .input-campo {
  background: #333;
  color: #fff;
  border: 1px solid #fff;
}

.input-campo:focus {
  outline: 1px solid #cc0000;
}

.campo-senha-wrap {
  position: relative;
  margin-bottom: 1rem;
}
.campo-senha-wrap .input-campo {
  margin-bottom: 0;
  padding-right: 2.4rem;
}
.btn-olho {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  color: #555;
  -webkit-tap-highlight-color: transparent;
}
.btn-olho:hover { color: #000; }
body.tema-escuro .btn-olho { color: #aaa; }
body.tema-escuro .btn-olho:hover { color: #fff; }

/* O Edge injeta o próprio ícone de "mostrar senha" dentro do campo — sem
   isso aqui, ele briga com o nosso botão pelo mesmo espaço/clique. */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

.btn-enviar {
  width: 100%;
  padding: 0.6rem;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.1rem;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  cursor: pointer;
  margin-top: 0.5rem;
}

body.tema-escuro .btn-enviar {
  background: #fff;
  color: #000;
  border: 1px solid #fff;
}

/* ========== POPUP PESQUISA ========== */
.popup-pesquisa-conteudo {
  background: #f5f0e8;
  border: 2px solid #000;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
}

body.tema-escuro .popup-pesquisa-conteudo {
  background: #1a1a1a;
  border: 2px solid #fff;
}

.popup-pesquisa-conteudo h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.input-pesquisa {
  width: 100%;
  padding: 0.5rem;
  font-family: "Times New Roman", Times, serif;
  font-size: 1rem;
  border: 1px solid #000;
  margin-bottom: 1rem;
}

body.tema-escuro .input-pesquisa {
  background: #333;
  color: #fff;
  border: 1px solid #fff;
}

.btn-pesquisar-popup {
  width: 100%;
  padding: 0.5rem;
  font-family: "Times New Roman", Times, serif;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  cursor: pointer;
}

body.tema-escuro .btn-pesquisar-popup {
  background: #fff;
  color: #000;
  border: 1px solid #fff;
}

.resultado-pesquisa {
  margin-top: 1rem;
  border-top: 1px solid #000;
  padding-top: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

body.tema-escuro .resultado-pesquisa {
  border-top: 1px solid #fff;
}

.resultado-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #ddd;
}

body.tema-escuro .resultado-item {
  border-bottom: 1px solid #444;
}

.btn-adicionar {
  padding: 0.3rem 0.8rem;
  font-family: "Times New Roman", Times, serif;
  background: #008000;
  color: #fff;
  border: 1px solid #008000;
  cursor: pointer;
}

/* ========== MENSAGENS ========== */
.msg-erro {
  color: #cc0000;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.msg-sucesso {
  color: #008000;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

body.tema-escuro .msg-erro {
  color: #ff4444;
}

body.tema-escuro .msg-sucesso {
  color: #44ff44;
}

/* ========== TROCAR POPUP ========== */
.trocar-popup {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.trocar-popup a {
  color: #000;
}

body.tema-escuro .trocar-popup a {
  color: #fff;
}

/* ========== EM BREVE ========== */
.em-breve {
  text-align: center;
  font-size: 1.2rem;
  padding: 3rem;
  border: 1px dashed #000;
}

body.tema-escuro .em-breve {
  border: 1px dashed #fff;
}

/* ========== MENU LATERAL ========== */
.menu-lateral {
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  background: #f5f0e8;
  border-left: 2px solid #000;
  z-index: 300;
  padding: 2rem 1.5rem;
  transform: translateX(100%);
  transition: transform 0.3s;
}

.menu-lateral.aberto {
  transform: translateX(0);
}

body.tema-escuro .menu-lateral {
  background: #1a1a1a;
  border-left: 2px solid #fff;
}

.menu-lateral .fechar-menu {
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  margin-bottom: 2rem;
  font-family: "Times New Roman", Times, serif;
}

body.tema-escuro .menu-lateral .fechar-menu {
  color: #fff;
}

.menu-lateral a {
  display: block;
  padding: 0.5rem 0;
  color: #000;
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid #ccc;
}

body.tema-escuro .menu-lateral a {
  color: #fff;
  border-bottom: 1px solid #444;
}

/* ========== CHAT SOCIAL ========== */
.msg-minha {
  background: #e0e0e0;
  padding: 0.6rem;
  border: 1px solid #000;
  word-break: break-word;
}

body.tema-escuro .msg-minha {
  background: #3a3a3a;
  border: 1px solid #fff;
}

.msg-outro {
  background: #fff;
  padding: 0.6rem;
  border: 1px solid #000;
  word-break: break-word;
}

body.tema-escuro .msg-outro {
  background: #2a2a2a;
  border: 1px solid #fff;
}

/* ========== SEM AMIGOS ========== */
.sem-amigos {
  text-align: center;
  color: #888;
  padding: 2rem;
}

/* ========== FLAPPY BIRD ========== */
.link-voltar {
  display: inline-block;
  margin-bottom: 1rem;
  color: #000;
  text-decoration: none;
  font-size: 0.95rem;
}

.link-voltar:hover {
  text-decoration: underline;
}

body.tema-escuro .link-voltar {
  color: #fff;
}

.flappy-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.flappy-tela {
  position: relative;
  width: 360px;
  max-width: 100%;
  border: 2px solid #000;
  background: #f5f0e8;
  line-height: 0;
}

body.tema-escuro .flappy-tela {
  border: 2px solid #fff;
  background: #1a1a1a;
}

.flappy-tela canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: pointer;
}

.flappy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flappy-overlay-caixa {
  text-align: center;
  padding: 1.5rem;
}

.flappy-instrucao {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.flappy-fim-titulo {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.flappy-fim-pontos {
  color: #fff;
  font-size: 1.1rem;
  margin-top: 1rem;
}

.flappy-fim-erro {
  color: #ff6666;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  max-width: 260px;
}

.flappy-placar {
  position: absolute;
  top: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  pointer-events: none;
}

.flappy-podio {
  width: 360px;
  max-width: 100%;
}

.flappy-podio-titulo {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  text-align: center;
}

/* Lista unificada do 1º ao 10º */
.flappy-ranking-lista {
  width: 100%;
  border-collapse: collapse;
}

.flappy-ranking-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #ddd;
  overflow: hidden;
}

body.tema-escuro .flappy-ranking-item {
  border-bottom: 1px solid #444;
}

/* Coluna da posição — largura fixa para não empurrar o nome */
.flappy-ranking-pos {
  flex-shrink: 0;
  width: 2.2rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: bold;
}

/* Quadrados coloridos para top 3 */
.flappy-ranking-pos.ouro {
  background: #f5c518;
  color: #000;
  padding: 0.15rem 0.3rem;
  border: 1px solid #c9a800;
}

.flappy-ranking-pos.prata {
  background: #b8b8b8;
  color: #000;
  padding: 0.15rem 0.3rem;
  border: 1px solid #909090;
}

.flappy-ranking-pos.bronze {
  background: #cd7f32;
  color: #fff;
  padding: 0.15rem 0.3rem;
  border: 1px solid #a0632a;
}

/* Nome — ocupa o espaço restante com truncamento */
.flappy-ranking-nome {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  cursor: pointer;
}

.flappy-ranking-nome:hover {
  text-decoration: underline;
}

/* Pontuação — alinhada à direita, não encolhe */
.flappy-ranking-pontos {
  flex-shrink: 0;
  font-weight: bold;
  font-size: 0.9rem;
  text-align: right;
}

.flappy-minha-posicao {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #888;
  padding: 0.4rem;
  border-top: 1px solid #ddd;
}

body.tema-escuro .flappy-minha-posicao {
  border-top: 1px solid #444;
}

/* ========== UTILITÁRIOS ========== */
.hidden {
  display: none !important;
}

small {
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
}

body.tema-escuro small {
  color: #aaa;
  }
