/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Arial, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a192f 0%, #1f4068 100%);
  color: #e0e0e0;
}

/* Header flexível */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: rgba(17, 17, 17, 0.98);
  padding: 32px 20px 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  border-bottom: 2px solid #00aaff;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 6px #00aaff88);
}

.logo-text {
  font-family: 'Comic Neue', cursive, sans-serif;
  font-size: 2rem;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px #00aaff55;
}

/* Botão de menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #00aaff;
  font-size: 2rem;
  cursor: pointer;
}

/* Navegação */
nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

nav ul li a {
  color: #00aaff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 6px 18px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 rgba(0,170,255,0);
}

nav ul li a:hover,
nav ul li a:focus {
  background: #00aaff;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0,170,255,0.25);
  outline: none;
}

/* Conteúdo principal */
main {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 5rem;
}

main section {
  margin-bottom: 48px;
  background: rgba(20, 20, 30, 0.92);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  padding: 32px 24px;
  transition: box-shadow 0.3s;
}

main section:hover {
  box-shadow: 0 6px 32px rgba(0,0,0,0.25);
}

h1 {
  color: #00aaff;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

h2 {
  color: #00aaff;
  margin-bottom: 16px;
  font-size: clamp(1.4rem, 3vw, 1.7rem);
  border-left: 4px solid #00aaff;
  padding-left: 12px;
}

a {
  color: #00aaff;
  transition: color 0.2s;
}

a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Footer fixo */
footer {
  background: rgba(17, 17, 17, 0.98);
  text-align: center;
  padding: 18px 10px;
  position: fixed;
  bottom: 0;
  width: 100%;
  color: #aaa;
  font-size: 1rem;
  letter-spacing: 1px;
  border-top: 2px solid #00aaff;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.25);
}

/* Fade-in nas seções */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Botão Voltar ao Topo */
#backToTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(135deg, #00aaff 60%, #005577 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  font-size: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  z-index: 999;
  transition: background 0.2s, transform 0.2s;
}

#backToTop:hover {
  background: #0077aa;
  transform: scale(1.08);
}

/* Responsividade */
@media (max-width: 900px) {
  #backToTop {
    right: 24px;
    bottom: 80px;
  }
}

@media (max-width: 700px) {
  header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .nav-toggle {
    display: block;
  }

  nav {
    width: 100%;
    display: none;
  }

  nav.open {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 0;
  }

  nav ul li a {
    display: block;
    padding: 12px;
  }

  header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .logo {
    flex-direction: column;
    gap: 6px;
  }

  header h1 {
    font-size: 1.6rem;
  }

  main section {
    padding: 1.2rem;
  }

  #backToTop {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  footer {
    font-size: 0.85rem;
    padding: 10px 4px;
  }
}