/* Janela "Novidades" (changelog) */
#changelog { position: fixed; inset: 0; z-index: 44; display: grid; place-items: center; padding: 20px; background: rgba(10, 10, 12, .8); backdrop-filter: blur(6px); animation: fade-in .15s; }
#changelog.hidden { display: none; }
.cl-card {
  position: relative; width: min(880px, 100%); height: min(640px, 100%); display: grid; grid-template-columns: 220px minmax(0, 1fr);
  background: var(--bg-main); border: 1px solid var(--divider); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  animation: pop-in .18s ease-out;
}
.cl-close { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #fff; transition: background .12s; }
.cl-close:hover { background: rgba(0, 0, 0, .6); }

/* Linha do tempo das versões */
.cl-versions { display: flex; flex-direction: column; gap: 2px; padding: 22px 12px; background: var(--bg-sidebar); border-right: 1px solid var(--divider); overflow-y: auto; position: relative; }
.cl-versions-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--text-muted); padding: 0 10px 10px; }
.cl-version { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: var(--interactive); text-align: left; transition: background .12s, color .12s; }
.cl-version:hover { background: var(--hover); color: var(--text-strong); }
.cl-version.active { background: var(--hover-strong); color: var(--text-strong); }
/* traço vertical ligando as bolinhas */
.cl-version:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 30px; bottom: -12px; width: 2px; background: var(--divider); }
.cl-dot { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; background: var(--bg-sidebar); border: 2px solid #5b5d66; }
.cl-version.active .cl-dot { border-color: var(--brand); background: var(--brand); }
.cl-dot.current { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(130, 119, 250, .18); }
.cl-version-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.cl-version-text strong { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.cl-version-text small { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-badge { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; padding: 2px 6px; border-radius: 4px; background: var(--brand); color: #fff; }

/* Conteúdo */
.cl-body { overflow-y: auto; padding-bottom: 28px; }
.cl-hero { position: relative; overflow: hidden; padding: 34px 32px 26px; background: var(--bg-panel); border-bottom: 1px solid var(--divider); box-shadow: inset 0 3px 0 var(--brand); }
.cl-hero-glow { display: none; }
.cl-hero-top { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cl-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--text-strong); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.cl-pill::before { content: ''; width: 13px; height: 13px; background: var(--brand); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 2 3 7 7 3-7 3-3 7-3-7-7-3 7-3Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 2 3 7 7 3-7 3-3 7-3-7-7-3 7-3Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.cl-date { font-size: 12.5px; color: var(--text-muted); }
.cl-hero h2 { position: relative; margin: 0 0 8px; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; color: var(--text-strong); }
.cl-hero p { position: relative; margin: 0; max-width: 560px; font-size: 15px; line-height: 1.5; color: var(--interactive); }
.cl-section { padding: 22px 32px 0; }
/* Título colorido com a linha que se estende, como no changelog do Discord */
.cl-section h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.cl-section h3::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.cl-section.new h3 { color: #4fd192; }
.cl-section.improved h3 { color: #a79ffd; }
.cl-section.fixed h3 { color: #f5a65b; }
.cl-section ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.cl-section li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.5; color: var(--text); }
.cl-section li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.cl-section.new li::before { background: #4fd192; opacity: 1; }
.cl-section.improved li::before { background: #a79ffd; opacity: 1; }
.cl-section.fixed li::before { background: #f5a65b; opacity: 1; }
.cl-footnote { margin: 26px 32px 0; padding-top: 16px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--text-muted); }

/* Link no rodapé das configurações */
#settings .settings-nav-bottom .settings-version { display: block; justify-content: flex-start; width: 100%; }
.settings-version { background: none; border: 0; padding: 8px 10px 0; font-size: 10.5px; color: var(--text-muted); text-align: left; cursor: pointer; }
.settings-version:hover { color: var(--text-strong); }
.settings-version:hover u { color: var(--brand); }

@media (max-width: 700px) {
  #changelog { padding: 0; }
  .cl-card { height: 100%; border-radius: 0; border: 0; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  /* A faixa de abas termina antes do X (a sombra só pinta o fundo e a divisória atrás dele), com um degradê
     na borda direita indicando que há mais versões. */
  .cl-versions { flex-direction: row; overflow-x: auto; margin-right: 52px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--divider); gap: 6px;
    box-shadow: 52px 0 0 var(--bg-sidebar), 52px 1px 0 var(--divider); scrollbar-width: none; }
  .cl-versions::-webkit-scrollbar { display: none; }
  .cl-versions::after { content: ''; position: sticky; right: -10px; flex: 0 0 28px; margin: -10px -10px -10px -28px; background: linear-gradient(to right, transparent, var(--bg-sidebar)); pointer-events: none; }
  .cl-versions-title, .cl-version::after, .cl-version-text small { display: none; }
  .cl-version { width: auto; flex-shrink: 0; padding: 8px 12px; gap: 8px; }
  .cl-close { top: 10px; right: 10px; }
  .cl-hero { padding: 24px 20px 20px; }
  .cl-hero h2 { font-size: 24px; }
  .cl-section { padding: 18px 20px 0; }
  .cl-footnote { margin: 22px 20px 0; }
}

/* Versão marco (1.0): topo em gradiente da marca e confete por cima de tudo. */
.cl-hero.celebrate {
  background:
    radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, #6d5dfc 30%, transparent), transparent 60%),
    radial-gradient(80% 140% at 100% 0%, color-mix(in srgb, #c64cf0 26%, transparent), transparent 60%),
    var(--bg-panel);
  box-shadow: inset 0 3px 0 #c64cf0;
}
.cl-hero.celebrate h2 { font-size: 38px; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cl-hero.celebrate .cl-pill { background: var(--brand-gradient); border-color: transparent; color: #fff; }
.cl-hero.celebrate .cl-pill::before { background: #fff; }
.confetti-layer { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; perspective: 600px; }
.confetti-layer i { position: absolute; display: block; margin: -5px 0 0 -5px; will-change: transform, opacity; }
@media (max-width: 700px) { .cl-hero.celebrate h2 { font-size: 30px; } }
