:root {
  --bg: #000;
  --muted: #bdbdbd;
  --accent: #ffffff;
  --link: #9be3ff;
  --maxw: 860px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: var(--bg);
  color: var(--accent);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;

  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 48px 36px;
}

.container {
  max-width: var(--maxw);
  width: 100%;
}

/* Navegação + banner */
.top-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  opacity: 0.9;
}

.top-nav a:hover {
  color: var(--link);
}

/* Banner responsivo com borda arredondada */
.banner-image {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  margin-top: 1rem;
  flex-basis: 100%;
  border-radius: 20px;
}

/* Títulos e textos */
h1 {
  font-size: 36px;
  margin: 0 0 22px 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

/* Container do GIF centralizado */
.gif-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
  /* Proteção adicional do container */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.main-gif {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  /* Otimizações para performance de GIF */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  will-change: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
  /* Proteções contra seleção e download */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  -user-drag: none;
  -webkit-touch-callout: none;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  max-width: 1000px;
  margin-bottom: 30px;
  white-space: pre-wrap;
}

/* Postagens */
.posts {
  margin: 18px 0 36px 0;
}

.post {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px 24px;
  padding: 12px 0;
  align-items: center;
  border-radius: 6px;
}

.post + .post {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.date {
  color: var(--muted);
  font-size: 14px;
}

.title {
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

.title:hover {
  color: var(--link);
}

/* Ações e footer */
.actions {
  display: flex;
  gap: 18px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 15px;
  align-items: center;
  justify-content: center;
}

.actions a {
  color: var(--muted);
  text-decoration: none;
}

.actions a:hover {
  color: var(--link);
}

footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.gif-credit {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.7;
}

.gif-credit a {
  color: var(--muted);
  text-decoration: none;
}

.gif-credit a:hover {
  color: var(--link);
  text-decoration: underline;
}

/* Acessibilidade */
a:focus {
  outline: 2px dashed rgba(155, 227, 255, 0.18);
  outline-offset: 3px;
}

.icon {
  display: inline-block;
  vertical-align: middle;
  height: 14px;
  width: 14px;
  margin-right: 6px;
  opacity: 0.9;
}

@media (max-width: 640px) {
  body {
    padding: 28px 18px;
  }

  h1 {
    font-size: 28px;
  }

  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
  }

  .top-nav a {
    font-size: 1.1rem;
  }

  .banner-image {
    max-height: 100px;
    margin-top: 0.75rem;
    border-radius: 20px;
  }

  .post {
    grid-template-columns: 1fr;
  }

  .date {
    order: 2;
    font-size: 13px;
  }
}
