/* ===== RESET E BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

/* ===== COMPONENTES PRINCIPAIS ===== */

/* Vídeo de Fundo */
#video-de-fundo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  object-fit: cover;
  object-position: center center;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 20vh;
  background-color: rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
  color: aqua;
  padding: 0 40px;
}

header h1 {
  font-size: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  animation: glow 2s ease-in-out infinite alternate;
  margin: 0;
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px aqua;
  }
  to {
    text-shadow: 0 0 20px aqua, 0 0 30px aqua;
  }
}

/* Navegação */
nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  justify-content: center;
  margin: 0;
}

nav a {
  color: aqua;
  text-decoration: none;
  font-size: 1.2rem;
  padding: 10px 20px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

nav a:hover {
  background-color: rgba(0, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Indicador de seção ativa na navegação */
nav a.ativo {
  background-color: rgba(0, 255, 255, 0.3);
  border: 1px solid aqua;
  font-weight: bold;
}

/* Seções */
section {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  margin: 20px;
  border-radius: 10px;
  color: white;
  margin-bottom: 40px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 255, 255, 0.1);
}

/* Espaçamento automático dentro das seções */
section p {
  margin-bottom: 15px;
}

section p:last-child {
  margin-bottom: 0;
}

section div {
  margin-bottom: 25px;
}

section div:last-child {
  margin-bottom: 0;
}

section ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

section li {
  margin-bottom: 8px;
  line-height: 1.5;
}

section li:last-child {
  margin-bottom: 0;
}

section pre {
  margin: 20px 0;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  border-left: 3px solid aqua;
}

section code {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}

h2 {
  color: aqua;
  padding: 15px 0;
  margin: 20px 0;
  text-align: center;
}

/* Footer */
footer > p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: small;
  text-align: center;
}

/* ===== ESTILOS ESPECÍFICOS ===== */

/* Tags HTML */
.tags-fechamento li {
  font-weight: bold;
}

.tags-sem-fechamento li {
  font-style: italic;
}

.atributos {
  font-style: italic;
  font-weight: bold;
}

/* Botão Voltar ao Topo */
#botao-topo {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(0, 255, 255, 0.8);
  color: black;
  border: 2px solid aqua;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

#botao-topo:hover {
  background-color: aqua;
  transform: scale(1.1);
  box-shadow: 0 0 15px aqua;
}

#botao-topo.mostrar {
  opacity: 1;
  visibility: visible;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    height: auto;
    padding: 20px;
    gap: 15px;
  }
  
  header h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    text-align: center;
  }
  
  nav ul {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }
  
  nav a {
    font-size: 1rem;
    padding: 8px 15px;
  }
  
  section {
    margin: 10px;
    padding: 15px;
  }
  
  section h2 {
    font-size: 1.5rem;
  }
  
  #botao-topo {
    width: 45px;
    height: 45px;
    bottom: 15px;
    right: 15px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 15px;
  }
  
  nav ul {
    gap: 5px;
  }
  
  nav a {
    font-size: 0.9rem;
    padding: 6px 12px;
  }
  
  section {
    margin: 5px;
    padding: 12px;
  }
}