/* Day-Light Doodle - estilo do site (tema escuro, azul e laranja pastel) */

:root {
  --fundo: #14161f;
  --fundo-alto: #1c1f2b;
  --borda: #2c3142;
  --texto: #e9e7e3;
  --texto-fraco: #9196ab;
  --azul: #9fb0e8;
  --azul-claro: #bcc7f2;
  --laranja: #f0a875;
  --laranja-claro: #f6c49c;
  --vermelho: #ff5a5a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: var(--fundo);
  /* dois brilhos bem fracos, um azul e um laranja */
  background-image: radial-gradient(60% 45% at 18% 0%, rgba(159, 176, 232, 0.1), transparent 70%),
    radial-gradient(55% 45% at 85% 100%, rgba(240, 168, 117, 0.08), transparent 70%);
  background-attachment: fixed;
  color: var(--texto);
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h2,
h3,
nav {
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* ---------- menu das duas categorias ---------- */

.menu {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
  padding: 30px 20px 26px;
  animation: descer 0.45s ease both;
}

.menu a {
  position: relative;
  display: inline-block;
  padding: 7px 24px;
  font-size: 22px;
  text-decoration: none;
  color: var(--texto);
  background: var(--fundo-alto);
  border: 2px solid var(--borda);
  border-radius: 999px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease,
    transform 0.18s ease;
}

.menu a:hover {
  color: var(--laranja-claro);
  border-color: var(--laranja);
  transform: translateY(-2px);
}

.menu a.ativo {
  color: var(--fundo);
  background: var(--azul);
  border-color: var(--azul);
}

.menu a.ativo:hover {
  color: var(--fundo);
  background: var(--azul-claro);
  border-color: var(--azul-claro);
}

/* bolinha vermelha de noticia nova */
.bolinha {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 13px;
  height: 13px;
  background: var(--vermelho);
  border-radius: 50%;
  z-index: 5;
  animation: pulsar 1.4s ease-in-out infinite;
}

.bolinha::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--vermelho);
  opacity: 0;
  animation: onda 1.4s ease-out infinite;
}

/* ---------- conteudo ---------- */

.conteudo {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 20px 70px;
}

/* ---------- pagina de download: so o cartucho ---------- */

.caixa-cartucho {
  display: block;
  width: min(540px, 100%);
  margin: 24px auto 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  animation: subir 0.55s 0.08s ease both;
}

.cartucho {
  position: relative;
  animation: flutuar 4.5s ease-in-out infinite;
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1),
    filter 0.28s ease;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
}

.caixa-cartucho:hover .cartucho,
.caixa-cartucho:focus-visible .cartucho {
  transform: translateY(-8px) rotate(-1.2deg) scale(1.02);
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 18px rgba(159, 176, 232, 0.28));
  animation-play-state: paused;
}

.caixa-cartucho.apertado .cartucho {
  transform: translateY(5px) scale(0.96) rotate(0.6deg);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}

.cartucho img {
  display: block;
  width: 100%;
  height: auto;
}

/* a tooltip que segue o mouse em cima do cartucho */
.tooltip {
  position: fixed;
  z-index: 20;
  max-width: 300px;
  padding: 9px 14px;
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
  color: var(--laranja-claro);
  background: var(--fundo-alto);
  border: 1px solid var(--borda);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55);
  /* o ponto (left/top) e o cursor: a tooltip fica centralizada e acima dele */
  transform: translate(-50%, calc(-100% - 16px));
  transform-origin: 50% 100%;
  pointer-events: none;
  animation: aparecer-dica 0.16s ease-out both;
}

/* a setinha embaixo, apontando pro cursor */
.tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--fundo-alto);
  border-right: 1px solid var(--borda);
  border-bottom: 1px solid var(--borda);
  transform: rotate(45deg);
}

/* o mesmo recado, mas fixo: so aparece em quem nao tem mouse */
.recado-fixo {
  display: none;
  margin: 20px 0 0;
  font-family: "Patrick Hand", "Comic Sans MS", cursive;
  font-size: 21px;
  line-height: 1.3;
  text-align: center;
  color: var(--laranja-claro);
}

/* ---------- pagina de news ---------- */

.lista-noticias {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.noticia {
  padding: 22px 26px;
  background: var(--fundo-alto);
  border: 1px solid var(--borda);
  border-left: 4px solid var(--azul);
  border-radius: 14px;
  animation: subir 0.5s ease both;
  animation-delay: calc(var(--i) * 0.09s + 0.08s);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.noticia:hover {
  transform: translateY(-3px);
  border-left-color: var(--laranja);
}

.noticia h3 {
  margin: 0;
  font-size: 27px;
  color: var(--azul-claro);
}

.noticia .data {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--texto-fraco);
}

.noticia p {
  margin: 0;
  white-space: pre-line;
}

.noticia figure {
  margin: 18px 0 0;
}

.noticia figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.noticia figcaption {
  margin-top: 7px;
  font-size: 14px;
  color: var(--texto-fraco);
  text-align: center;
}

.vazio {
  text-align: center;
  color: var(--texto-fraco);
  padding: 40px 0;
}

/* ---------- animacoes ---------- */

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes descer {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulsar {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

@keyframes aparecer-dica {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 6px)) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 16px)) scale(1);
  }
}

@keyframes onda {
  0% {
    opacity: 0.7;
    transform: scale(0.9);
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

/* quem prefere menos movimento nao ganha animacao nenhuma */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Em celular nao existe "passar o mouse", entao o recado fica fixo embaixo. */
@media (hover: none) {
  .tooltip {
    display: none;
  }
  .recado-fixo {
    display: block;
  }
}

/* ---------- telas pequenas ---------- */

@media (max-width: 520px) {
  .menu a {
    padding: 6px 18px;
    font-size: 19px;
  }
  .noticia {
    padding: 18px 18px;
  }
}
