/* =========================================================
   O REINO MÍSTICO DOS COGUMELOS
   Tema escuro de floresta noturna com brilho bioluminescente
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Uncial+Antiqua&family=Cinzel:wght@500;700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap");

:root {
  /* Cores */
  --noite: #0b0812;
  --noite-2: #150f22;
  --musgo: #0f1f1a;
  --cartao: rgba(28, 20, 44, 0.78);
  --cartao-borda: rgba(196, 160, 255, 0.18);

  --texto: #e9e1d2;          /* pergaminho claro: leitura confortável no escuro */
  --texto-suave: #b8abc9;
  --brilho: #7df5c6;         /* verde bioluminescente */
  --esporo: #c79bff;         /* violeta mágico */
  --chapeu: #e5573f;         /* vermelho de amanita */
  --ouro: #f2c46d;

  /* Fontes */
  --fonte-titulo: "Uncial Antiqua", "Cinzel", Georgia, serif;
  --fonte-sub: "Cinzel", Georgia, serif;
  --fonte-texto: "Lora", Georgia, "Times New Roman", serif;

  --raio: 18px;
  --sombra: 0 18px 40px rgba(0, 0, 0, 0.55);

  /* Ícones estilizados (SVG embutido) */
  --icone-cogumelo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M6 31C6 16 18 5 32 5s26 11 26 26c0 2.5-2 4-4.5 4h-43C8 35 6 33.5 6 31z' fill='%23e5573f'/%3E%3Cpath d='M6 31C6 16 18 5 32 5c-9 4-16 14-16 30h-5.5C8 35 6 33.5 6 31z' fill='%23b8382a'/%3E%3Ccircle cx='21' cy='19' r='4' fill='%23fdf0d5'/%3E%3Ccircle cx='38' cy='13' r='3' fill='%23fdf0d5'/%3E%3Ccircle cx='46' cy='25' r='3.5' fill='%23fdf0d5'/%3E%3Ccircle cx='31' cy='27' r='2.5' fill='%23fdf0d5'/%3E%3Cpath d='M24 35h16l-1.5 21c-.2 2.5-3 3.5-6.5 3.5s-6.3-1-6.5-3.5z' fill='%23f3e4c6'/%3E%3Cpath d='M24 35h5l-.8 24c-1.8-.5-3-1.4-3.2-3z' fill='%23d9c39c'/%3E%3C/svg%3E");
  --icone-cogumelo-roxo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M6 31C6 16 18 5 32 5s26 11 26 26c0 2.5-2 4-4.5 4h-43C8 35 6 33.5 6 31z' fill='%239b5de5'/%3E%3Cpath d='M6 31C6 16 18 5 32 5c-9 4-16 14-16 30h-5.5C8 35 6 33.5 6 31z' fill='%236a35b8'/%3E%3Ccircle cx='21' cy='19' r='4' fill='%23f3e8ff'/%3E%3Ccircle cx='38' cy='13' r='3' fill='%23f3e8ff'/%3E%3Ccircle cx='46' cy='25' r='3.5' fill='%23f3e8ff'/%3E%3Ccircle cx='31' cy='27' r='2.5' fill='%23f3e8ff'/%3E%3Cpath d='M24 35h16l-1.5 21c-.2 2.5-3 3.5-6.5 3.5s-6.3-1-6.5-3.5z' fill='%23f3e4c6'/%3E%3Cpath d='M24 35h5l-.8 24c-1.8-.5-3-1.4-3.2-3z' fill='%23d9c39c'/%3E%3C/svg%3E");
  --icone-brilho: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.6 7.4L22 11l-7.4 2.6L12 21l-2.6-7.4L2 11l7.4-2.6z' fill='%23c79bff'/%3E%3Cpath d='M19.5 16l.9 2.4 2.4.9-2.4.9-.9 2.4-.9-2.4-2.4-.9 2.4-.9z' fill='%237df5c6'/%3E%3C/svg%3E");
  --icone-pergaminho: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2c46d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3h11a2 2 0 0 1 0 4h-2v12a2 2 0 0 1-2 2H6a2 2 0 0 1 0-4h2z'/%3E%3Cpath d='M11 9h4M11 13h4'/%3E%3C/svg%3E");
  --icone-livro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237df5c6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5c3-1.5 7-1.5 10 1 3-2.5 7-2.5 10-1v14c-3-1.5-7-1.5-10 1-3-2.5-7-2.5-10-1z'/%3E%3Cpath d='M12 6v14'/%3E%3C/svg%3E");
  --icone-lupa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237df5c6' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3Cpath d='M8 9.5a3 3 0 0 1 3-2.5' /%3E%3C/svg%3E");
  --icone-lua: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237df5c6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8.5 8.5 0 1 1 9.5 4a7 7 0 0 0 10.5 10.5z'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fonte-texto);
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--texto);
  background-color: var(--noite);
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(199, 155, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 35% at 90% 10%, rgba(125, 245, 198, 0.10), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 105%, rgba(125, 245, 198, 0.14), transparent 70%),
    linear-gradient(180deg, var(--noite) 0%, var(--noite-2) 45%, var(--musgo) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
}

/* Esporos flutuantes */
body::before {
  content: "";
  position: fixed;
  inset: -50% 0 0 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(125, 245, 198, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 30% 70%, rgba(199, 155, 255, 0.8), transparent),
    radial-gradient(2px 2px at 55% 40%, rgba(242, 196, 109, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 75% 85%, rgba(125, 245, 198, 0.7), transparent),
    radial-gradient(2.5px 2.5px at 88% 15%, rgba(199, 155, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 42% 92%, rgba(125, 245, 198, 0.6), transparent),
    radial-gradient(2px 2px at 65% 60%, rgba(199, 155, 255, 0.5), transparent);
  background-size: 420px 420px;
  animation: esporos 40s linear infinite;
  opacity: 0.7;
}

/* Silhueta de cogumelos no rodapé da tela */
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background:
    var(--icone-cogumelo) no-repeat 4% 100% / 110px,
    var(--icone-cogumelo) no-repeat 11% 100% / 60px,
    var(--icone-cogumelo) no-repeat 92% 100% / 90px,
    var(--icone-cogumelo) no-repeat 98% 100% / 50px;
  filter: brightness(0.35) saturate(0.6) drop-shadow(0 0 12px rgba(125, 245, 198, 0.4));
}

@keyframes esporos {
  from { transform: translateY(0); }
  to   { transform: translateY(420px); }
}

header,
main {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--esporo);
  color: var(--noite);
}

/* ---------- Cabeçalho ---------- */

header {
  text-align: center;
  padding: 4.5rem 1.25rem 3rem;
}

header h1 {
  font-family: var(--fonte-titulo);
  font-weight: 400;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 1.25;
  margin: 0 auto 2rem;
  max-width: 20ch;
  color: #f6eedd;
  background: linear-gradient(180deg, #fbf3e2 0%, var(--ouro) 55%, #d9894a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.01em;
}

header h1::before {
  content: "";
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto 1.25rem;
  background: var(--icone-cogumelo) center / contain no-repeat;
  filter: drop-shadow(0 0 18px rgba(229, 87, 63, 0.6)) drop-shadow(0 0 30px rgba(229, 87, 63, 0.3));
  animation: flutuar 5s ease-in-out infinite;
}

@keyframes flutuar {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-10px) rotate(3deg); }
}

/* ---------- Navegação ---------- */

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.3rem;
  font-family: var(--fonte-sub);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--texto);
  text-decoration: none;
  background: rgba(21, 15, 34, 0.75);
  border: 1px solid rgba(125, 245, 198, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, color 0.25s;
}

nav a::before {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--icone-livro) center / contain no-repeat;
}

nav li:nth-child(2) a::before { background-image: var(--icone-lupa); }
nav li:nth-child(3) a::before { background-image: var(--icone-lua); }

nav a:hover,
nav a:focus-visible {
  color: var(--brilho);
  border-color: var(--brilho);
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(125, 245, 198, 0.35);
}

/* Botão neon do menu (O Reino Fungi) */
nav a.botao-neon {
  color: var(--brilho);
  border-color: var(--brilho);
  text-shadow: 0 0 6px var(--brilho), 0 0 14px rgba(125, 245, 198, 0.7);
  box-shadow:
    0 0 8px var(--brilho),
    0 0 24px rgba(125, 245, 198, 0.5),
    inset 0 0 10px rgba(125, 245, 198, 0.35);
}

/* Variação azul do botão neon (iNaturalist) */
nav a.botao-neon.neon-azul {
  color: #3fc8ff;
  border-color: #3fc8ff;
  text-shadow: 0 0 6px #3fc8ff, 0 0 14px rgba(63, 200, 255, 0.7);
  box-shadow:
    0 0 8px #3fc8ff,
    0 0 24px rgba(63, 200, 255, 0.5),
    inset 0 0 10px rgba(63, 200, 255, 0.35);
}

/* Variação vermelha do botão neon (Cogumelos que brilham) */
nav a.botao-neon.neon-vermelho {
  color: var(--chapeu);
  border-color: var(--chapeu);
  text-shadow: 0 0 6px var(--chapeu), 0 0 14px rgba(229, 87, 63, 0.7);
  box-shadow:
    0 0 8px var(--chapeu),
    0 0 24px rgba(229, 87, 63, 0.5),
    inset 0 0 10px rgba(229, 87, 63, 0.35);
}

/* ---------- Conteúdo ---------- */

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 10rem;
}

section h2 {
  font-family: var(--fonte-sub);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-align: center;
  color: var(--ouro);
  margin: 1rem 0 2.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-shadow: 0 0 18px rgba(242, 196, 109, 0.35);
}

section h2::before,
section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ouro), transparent);
  opacity: 0.6;
}

section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 2rem;
}

section > h2 {
  grid-column: 1 / -1;
}

/* Bloco "Curiosidades gerais" centralizado */
.curiosidades-centro ul {
  grid-column: 1 / -1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
  list-style-position: inside;
}

/* ---------- Cartões das espécies ---------- */

article {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1.5rem;
  background:
    linear-gradient(160deg, rgba(199, 155, 255, 0.08), transparent 40%),
    var(--cartao);
  border: 1px solid var(--cartao-borda);
  border-radius: var(--raio);
  box-shadow: var(--sombra);
  backdrop-filter: blur(8px);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

article:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 245, 198, 0.5);
  box-shadow: var(--sombra), 0 0 34px rgba(125, 245, 198, 0.18);
}

/* Selo de cogumelo no canto do cartão */
article::before {
  content: "";
  position: absolute;
  top: -16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--icone-cogumelo) center / 28px no-repeat, var(--noite-2);
  border: 1px solid rgba(242, 196, 109, 0.5);
  box-shadow: 0 0 16px rgba(229, 87, 63, 0.35);
  transition: transform 0.4s ease;
}

article:hover::before {
  transform: rotate(-12deg) scale(1.1);
}

article h3 {
  order: 1;
  font-family: var(--fonte-sub);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.35;
  color: #f6eedd;
  margin: 1rem 0 0.75rem;
  padding-right: 2.5rem;
}

article h3 strong {
  display: block;
  font-family: var(--fonte-texto);
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--brilho);
}

article img {
  order: 0;
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: calc(var(--raio) - 6px) calc(var(--raio) - 6px) 60px 60px / calc(var(--raio) - 6px) calc(var(--raio) - 6px) 22px 22px;
  border: 1px solid rgba(199, 155, 255, 0.25);
  background: var(--noite-2);
  filter: saturate(1.05) contrast(1.05);
  transition: filter 0.35s ease;
}

article:hover img {
  filter: saturate(1.2) contrast(1.08) brightness(1.05);
}

article p {
  order: 2;
  margin: 0 0 1rem;
  color: var(--texto);
}

/* Caixa de curiosidade */
article p:has(> strong:first-child) {
  position: relative;
  padding: 0.9rem 1rem 0.9rem 2.9rem;
  background: rgba(199, 155, 255, 0.08);
  border-left: 3px solid var(--esporo);
  border-radius: 0 12px 12px 0;
  color: var(--texto);
}

article p:has(> strong:first-child)::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.05rem;
  width: 22px;
  height: 22px;
  background: var(--icone-brilho) center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(199, 155, 255, 0.7));
}

article p > strong:first-child {
  font-family: var(--fonte-sub);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--esporo);
}

/* Fonte */
article p:last-child {
  margin: auto 0 0;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(242, 196, 109, 0.25);
  font-size: 0.88rem;
  color: var(--texto-suave);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

article p:last-child::before {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--icone-pergaminho) center / contain no-repeat;
}

/* ---------- Links ---------- */

main a {
  color: var(--ouro);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s, color 0.3s;
}

main a:hover,
main a:focus-visible {
  color: var(--brilho);
  background-size: 100% 1px;
}

a:focus-visible {
  outline: 2px solid var(--brilho);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Formulário ---------- */

/* Avistamento e login lado a lado, com a mesma largura e a mesma altura
   (um embaixo do outro em telas estreitas) */
.formularios {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 2rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.formularios form {
  max-width: none;
  width: 100%;
  margin: 0;
}

@media (max-width: 900px) {
  .formularios {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
}

/* Login: campos um embaixo do outro */
form.form-login {
  grid-template-columns: 1fr;
}

/* Senha com o botão "Mostrar" ao lado */
.senha-com-botao {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
}

.senha-com-botao input {
  flex: 1;
  min-width: 0;
}

form button.mostrar-senha {
  margin: 0;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brilho);
  background: transparent;
  border: 1px solid rgba(125, 245, 198, 0.45);
  box-shadow: none;
}

form button.mostrar-senha:hover {
  transform: none;
  border-color: var(--brilho);
  box-shadow: 0 0 12px rgba(125, 245, 198, 0.35);
}

/* O bloco: cartão de vidro escuro com laterais bem arredondadas */
form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 2rem;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  align-content: center;
  margin: 1.2rem auto 0;
  padding: 2.4rem 2.6rem 2.6rem;
  background: rgba(21, 15, 34, 0.72);
  border: 1px solid rgba(229, 87, 63, 0.6);
  border-radius: 48px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 0 1px rgba(125, 245, 198, 0.08),
    0 0 28px rgba(125, 245, 198, 0.18),
    inset 0 0 24px rgba(199, 155, 255, 0.08),
    var(--sombra);
}

/* Título "Envie seu avistamento" dentro do formulário, centralizado */
form > h3 {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
}

/* A descrição e o botão ocupam a largura toda */
form > div:has(textarea),
form > button {
  grid-column: 1 / -1;
}

form > button {
  justify-self: center;
}

form label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--fonte-sub);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texto-suave);
}

/* Campos: só uma linha vermelha embaixo, que brilha ao focar */
form input,
form textarea {
  display: block;
  width: 100%;
  padding: 0.55rem 0.2rem;
  font-family: var(--fonte-texto);
  font-size: 1rem;
  color: var(--texto);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--chapeu);
  border-radius: 0;
  color-scheme: dark;
  transition: border-color 0.25s, box-shadow 0.25s;
}

/* A caixa de descrição ganha contorno vermelho completo e cantos arredondados */
form textarea {
  margin-top: 0.45rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--chapeu);
  border-radius: 20px;
  resize: vertical;
  text-transform: none;
  letter-spacing: normal;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--brilho);
  box-shadow: 0 6px 12px -8px var(--brilho);
}

form textarea:focus {
  box-shadow: 0 0 16px rgba(125, 245, 198, 0.35);
}

/* Validação: campo certo fica verde, campo com erro brilha em vermelho */
form input.campo-ok,
form textarea.campo-ok {
  border-color: var(--brilho);
}

form input[aria-invalid="true"],
form textarea[aria-invalid="true"] {
  border-color: #ff6b5a;
  border-bottom-width: 2px;
  box-shadow: 0 6px 12px -8px #ff6b5a;
}

form textarea[aria-invalid="true"] {
  border-width: 2px;
  box-shadow: 0 0 14px rgba(255, 107, 90, 0.35);
}

/* Mensagem de erro embaixo do campo */
.erro-campo {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #ff8f7d;
}

.erro-campo:empty {
  display: none;
}

.erro-campo::before {
  content: "⚠ ";
}

/* Contador de caracteres da descrição */
.contador {
  margin: 0.3rem 0 0;
  text-align: right;
  font-size: 0.8rem;
  color: var(--texto-suave);
}

.contador.contador-pouco {
  color: #ff8f7d;
}

/* Campo-armadilha anti-robô: fica fora da tela, só robôs preenchem */
.armadilha {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Mensagem geral (agradecimento ou aviso de erro) */
.status-formulario {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  font-family: var(--fonte-sub);
  font-size: 0.95rem;
  color: var(--brilho);
  text-shadow: 0 0 8px rgba(125, 245, 198, 0.5);
}

.status-formulario:empty {
  display: none;
}

.status-formulario.status-erro {
  color: #ff8f7d;
  text-shadow: none;
}

form button:disabled {
  cursor: default;
}

/* Rótulo acende quando o campo dele está em uso */
form div:focus-within label {
  color: var(--brilho);
  text-shadow: 0 0 8px rgba(125, 245, 198, 0.6);
}

/* Lista de anos ao lado do campo de data (criada pelo script.js) */
.data-com-ano {
  display: flex;
  gap: 0.8rem;
}

.data-com-ano input {
  flex: 1;
  min-width: 0;
}

form select.seletor-ano {
  flex: 0 0 auto;
  padding: 0.55rem 0.2rem;
  font-family: var(--fonte-texto);
  font-size: 1rem;
  color: var(--texto);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--chapeu);
  border-radius: 0;
  color-scheme: dark;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}

form select.seletor-ano option {
  background: var(--noite);
  color: var(--texto);
}

form select.seletor-ano:focus {
  outline: none;
  border-color: var(--brilho);
  box-shadow: 0 6px 12px -8px var(--brilho);
}

@media (max-width: 600px) {
  form {
    grid-template-columns: 1fr;
    aspect-ratio: auto;
    padding: 1.8rem 1.4rem 2rem;
    border-radius: 32px;
  }
}

/* ---------- Botão (teste 1) ---------- */

form button {
  position: relative;
  overflow: visible;
  margin-top: 1rem;
  padding: 0.85rem 1.8rem;
  font-family: var(--fonte-sub);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--noite);
  background: linear-gradient(135deg, var(--brilho), var(--esporo));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(125, 245, 198, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(199, 155, 255, 0.6);
}

form button:active {
  transform: translateY(0) scale(0.96);
}

form button:focus-visible {
  outline: 2px solid var(--ouro);
  outline-offset: 4px;
}

form button.enviado {
  background: linear-gradient(135deg, var(--ouro), var(--chapeu));
}

/* Esporos criados pelo script.js */
.esporo {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 8px currentColor;
  animation: soltar-esporo 0.8s ease-out forwards;
}

@keyframes soltar-esporo {
  from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  to   { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}

/* Botão "Voltar ao topo": cogumelo fixo no canto inferior direito */
.voltar-topo {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  width: 56px;
  height: 56px;
  padding: 10px;
  color: #ff2a2a;
  background: rgba(21, 15, 34, 0.75);
  border: 2px solid #ff2a2a;
  border-radius: 50%;
  cursor: pointer;
  box-shadow:
    0 0 6px #ff2a2a,
    0 0 16px rgba(255, 30, 30, 0.8),
    0 0 32px rgba(255, 0, 0, 0.55),
    inset 0 0 10px rgba(255, 42, 42, 0.5);
  /* Começa escondido; o script.js mostra a partir do meio da página */
  visibility: hidden;
  opacity: 0;
  transform: translateY(24px) scale(0.6);
  transition: transform 0.35s, box-shadow 0.25s, opacity 0.35s, visibility 0.35s;
}

.voltar-topo.visivel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: neon-vermelho 4s ease-in-out 0.4s infinite;
}

/* O cogumelo em si brilha como tubo de neon */
.voltar-topo svg {
  display: block;
  width: 100%;
  height: 100%;
  filter:
    brightness(1.3)
    drop-shadow(0 0 2px #ff6b6b)
    drop-shadow(0 0 5px #ff2a2a)
    drop-shadow(0 0 10px #ff0000);
}

.voltar-topo:hover,
.voltar-topo:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    0 0 8px #ff2a2a,
    0 0 24px rgba(255, 30, 30, 0.9),
    0 0 48px rgba(255, 0, 0, 0.7),
    inset 0 0 14px rgba(255, 42, 42, 0.6);
}

/* Contorno branco fino no cogumelo, para dar contraste com o vermelho */
.voltar-topo svg path {
  stroke: #ffffff;
  stroke-width: 0.7;
  stroke-linejoin: round;
  paint-order: stroke;
}

/* Pintas do chapéu brancas */
.voltar-topo svg circle {
  fill: #ffffff;
}

/* Pulsa de leve e dá uma piscadinha, como letreiro de neon */
@keyframes neon-vermelho {
  0%, 100% { opacity: 1; }
  45%      { opacity: 0.85; }
  48%      { opacity: 0.45; }
  50%      { opacity: 1; }
  52%      { opacity: 0.6; }
  54%      { opacity: 1; }
}

.voltar-topo:focus-visible {
  outline: 2px solid var(--ouro);
  outline-offset: 4px;
}

/* ---------- Área do Micólogo (area.html) ---------- */

.painel {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 2.4rem 2.6rem;
  background: rgba(21, 15, 34, 0.72);
  border: 1px solid rgba(229, 87, 63, 0.6);
  border-radius: 48px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 0 28px rgba(125, 245, 198, 0.18),
    inset 0 0 24px rgba(199, 155, 255, 0.08),
    var(--sombra);
}

.painel h2.painel-titulo {
  display: block;
  margin: 0 0 1rem;
}

.painel h2.painel-titulo::before,
.painel h2.painel-titulo::after {
  content: none;
}

#nick-usuario {
  color: var(--brilho);
  text-shadow: 0 0 10px rgba(125, 245, 198, 0.6);
}

.painel-botoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.8rem;
}

.painel-link,
.painel-sair {
  padding: 0.7rem 1.4rem;
  font-family: var(--fonte-sub);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.painel-link {
  color: var(--noite);
  background: linear-gradient(135deg, var(--brilho), var(--esporo));
  border: none;
}

.painel-sair {
  color: var(--chapeu);
  background: transparent;
  border: 1px solid var(--chapeu);
}

.painel-link:hover,
.painel-sair:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(125, 245, 198, 0.35);
}

/* Mantém a cor do link-botão (os links do site mudam de cor no hover) */
.painel-link:hover,
.painel-link:focus-visible {
  color: var(--noite);
}

/* Rodapé centralizado */
footer {
  text-align: center;
}

/* Mini cogumelos que sobem da base da página como bolhas de sabão */
.cogumelo-bolha {
  position: fixed;
  bottom: -40px;
  z-index: 30;
  padding: 4px;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.35), transparent 40%);
  filter: drop-shadow(0 0 6px currentColor);
  opacity: 0;
  animation: subir-bolha 8s ease-out forwards;
}

.cogumelo-bolha svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes subir-bolha {
  0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
  10%  { opacity: 0.85; }
  35%  { transform: translate(var(--balanco), calc(var(--subida) * 0.35)) scale(1); }
  65%  { transform: translate(calc(var(--balanco) * -1), calc(var(--subida) * 0.65)) scale(1.05); opacity: 0.6; }
  100% { transform: translate(var(--balanco), var(--subida)) scale(1.5); opacity: 0; }
}

/* Cogumelinhos que nascem ao passar o cursor em "O Reino Fungi" */
.cogumelinho {
  position: fixed;
  width: 14px;
  height: 14px;
  color: var(--brilho);
  pointer-events: none;
  z-index: 50;
  filter: drop-shadow(0 0 4px currentColor);
  transform: translate(-50%, -50%) scale(0);
  animation: brotar-cogumelinho 1.2s ease-out forwards;
}

.cogumelinho svg,
.cogumelo-gigante svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes brotar-cogumelinho {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  30%  { transform: translate(-50%, -80%) scale(1.1); opacity: 1; }
  70%  { transform: translate(-50%, -90%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -120%) scale(0.6); opacity: 0; }
}

/* Cogumelo gigante que surge ao clicar em "O Reino Fungi" */
.cogumelo-gigante {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(70vw, 70vh);
  height: min(70vw, 70vh);
  color: var(--brilho);
  pointer-events: none;
  z-index: 100;
  filter: drop-shadow(0 0 30px currentColor);
  transform: translate(-50%, -50%) scale(1);
  animation: surgir-gigante 1.2s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}

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

/* ---------- Responsivo ---------- */

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  header {
    padding: 3rem 1rem 2rem;
  }

  header h1::before {
    width: 70px;
    height: 70px;
  }

  nav a {
    width: 100%;
    justify-content: center;
  }

  nav li {
    width: 100%;
  }

  main {
    padding: 0 1rem 8rem;
  }

  article {
    padding: 1rem 1.1rem 1.25rem;
  }

  article img {
    height: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
