/* Changelog public + shared BBCode rendering */

.changelog-hero {
  margin-bottom: 1rem;
}

.changelog-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: start;
  gap: 1.25rem;
}

.changelog-main {
  min-width: 0;
  grid-column: 1;
}

.changelog-card {
  padding: 1.15rem 1.25rem 1.4rem;
}

.changelog-aside {
  grid-column: 2;
  width: 170px;
  max-width: 170px;
  position: sticky;
  top: 1rem;
  padding: 0.85rem 0.8rem 1rem;
  box-sizing: border-box;
  align-self: start;
}

.changelog-aside-title {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--brand);
  letter-spacing: 0.02em;
}

.changelog-socials {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.changelog-socials li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.changelog-socials a {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none !important;
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.changelog-socials a:hover {
  color: #fff !important;
  background: rgba(224, 164, 58, 0.12);
  border-color: var(--line);
}

.changelog-aside .social-ico {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  max-width: 22px;
  max-height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  color: #fff;
  overflow: hidden;
}

.changelog-aside .social-ico svg {
  width: 13px !important;
  height: 13px !important;
  max-width: 13px;
  max-height: 13px;
  display: block;
  fill: currentColor;
}

.changelog-aside .social-ico.instagram {
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 45%, #8134af 100%);
}

.changelog-aside .social-ico.tiktok {
  background: #111;
  border: 1px solid #333;
}

.changelog-aside .social-ico.youtube {
  background: #ff0033;
}

.changelog-aside .social-ico.discord {
  background: #5865f2;
}

.changelog-years {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.changelog-year-list {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.changelog-year-list li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.changelog-year-link {
  display: block;
  text-decoration: none !important;
  color: var(--text-soft) !important;
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.25;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.changelog-year-link:hover {
  color: #fff !important;
  background: rgba(224, 164, 58, 0.12);
  border-color: var(--line);
}

.changelog-year-link.is-active {
  color: #1a140c !important;
  background: var(--brand);
  border-color: var(--brand);
}

.changelog-launcher {
  width: min(1100px, calc(100% - 1.5rem));
  margin: 1rem auto 1.5rem;
}

.changelog-meta {
  color: var(--text-soft);
  font-size: 0.86rem;
  margin: 0 0 0.85rem;
}

body.changelog-embed {
  background:
    radial-gradient(circle at 14% 6%, rgba(224, 164, 58, 0.12), transparent 32%),
    linear-gradient(150deg, #12100d 0%, #1a1713 100%);
}

/* No launcher, mantém sempre duas colunas (changelog | redes). */
body.changelog-embed .changelog-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 170px !important;
}

body.changelog-embed .changelog-aside {
  grid-column: 2 !important;
  width: 170px !important;
  max-width: 170px !important;
  position: sticky;
}

.bbcode-body {
  line-height: 1.75;
  color: #ebdfd0 !important;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.bbcode-body strong {
  font-weight: 700;
  color: #fff7ea !important;
}

.bbcode-body em {
  font-style: italic;
  color: #ebdfd0 !important;
}

.bb-u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bb-center { text-align: center; }
.bb-left { text-align: left; }
.bb-right { text-align: right; }

.bb-hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
  opacity: 1;
}

.bb-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.75rem 0;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.bb-quote {
  margin: 0.85rem 0;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--brand);
  background: rgba(14, 12, 9, 0.55);
  border-radius: 0 10px 10px 0;
  color: var(--text-soft);
}

.bb-quote cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.bb-code {
  margin: 0.85rem 0;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e0c09;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  color: #ebdfd0 !important;
}

.bb-list {
  margin: 0.55rem 0 0.55rem 1.15rem;
  padding: 0;
}

.bb-list li {
  margin: 0.2rem 0;
}

.bbcode-body a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bbcode-body a:hover {
  color: #f3bb58;
}

@media (max-width: 860px) {
  /* Só empilha no site completo; o launcher (?launcher=1) mantém colunas. */
  body:not(.changelog-embed) .changelog-layout {
    grid-template-columns: 1fr;
  }

  body:not(.changelog-embed) .changelog-aside {
    position: static;
    width: 100%;
    max-width: none;
    grid-column: 1;
  }

  body:not(.changelog-embed) .changelog-main {
    grid-column: 1;
    width: 100%;
  }
}
