@charset "UTF-8";

/* Fonte Inter como fallback */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* Fonte principal: BlackFang (arquivos em Resultado/assets/fonts/) */
@font-face {
  font-family: 'BlackFang';
  src: url('../fonts/Blackfang.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Fonte ChocolateAdventure */
@font-face {
  font-family: 'ChocolateAdventure';
  src: url('../fonts/ChocolateAdventure.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Fonte SwirlyCanalope */
@font-face {
  font-family: 'SwirlyCanalope';
  src: url('../fonts/SwirlyCanalope.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Fonte Melasthi */
@font-face {
  font-family: 'Melasthi';
  src: url('../fonts/Melasthi.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Fonte Ice Cold Solid */
@font-face {
  font-family: 'IceColdSolid';
  src: url('../fonts/Ice-Cold-Solid.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Fonte Amore Christmas */
@font-face {
  font-family: 'AmoreChristmas';
  src: url('../fonts/Amore-Christmas.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #050505;
  --card-bg: #ffffff;
  --card-border: #2f2f2f;
  --muted: #777777;
  --accent: #111111;
  --font-app: 'BlackFang', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root.dark {
  --bg: #050505;
  --fg: #f9f9f9;
  --card-bg: #111111;
  --card-border: #444444;
  --muted: #aaaaaa;
  --accent: #f9f9f9;
}

/* Variações de fonte controladas por data-font no :root */
:root[data-font='blackfang'] {
  --font-app: 'BlackFang', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root[data-font='chocolate'] {
  --font-app: 'ChocolateAdventure', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root[data-font='swirly'] {
  --font-app: 'SwirlyCanalope', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root[data-font='melasthi'] {
  --font-app: 'Melasthi', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root[data-font='icecold'] {
  --font-app: 'IceColdSolid', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root[data-font='amore'] {
  --font-app: 'AmoreChristmas', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root[data-font='inter'] {
  --font-app: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root[data-font='system'] {
  --font-app: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-app);
  font-size: 1.05rem;
  background-color: var(--bg);
  color: var(--fg);
  overflow-y: auto; /* garante rolagem vertical quando necessário */
}

/* Em modo escuro: fundo escuro com pattern.png por cima e gradiente RGB animado */
:root.dark body {
  background-color: #050505;
  background-image:
    url('../pattern.png'),
    linear-gradient(120deg,
      rgba(255, 0, 0, 0.45),
      rgba(255, 127, 0, 0.45),
      rgba(255, 255, 0, 0.45),
      rgba(0, 255, 0, 0.45),
      rgba(0, 255, 255, 0.45),
      rgba(0, 0, 255, 0.45),
      rgba(139, 0, 255, 0.45),
      rgba(255, 0, 255, 0.45),
      rgba(255, 0, 0, 0.25)
    );
  background-repeat: repeat, no-repeat;
  background-size: 130px 130px, 300% 300%;
  background-attachment: fixed, fixed;
  animation: rgb-border-shift 32s linear infinite;
}

/* Em modo claro: pattern colorido com gradiente RGB animado (versão mais suave do dark) */
:root:not(.dark) body {
  background-color: #fdfdfd;
  background-image:
    url('../pattern.png'),
    linear-gradient(120deg,
      rgba(255, 0, 0, 0.35),
      rgba(255, 127, 0, 0.35),
      rgba(255, 255, 0, 0.35),
      rgba(0, 255, 0, 0.35),
      rgba(0, 255, 255, 0.35),
      rgba(0, 0, 255, 0.35),
      rgba(139, 0, 255, 0.35),
      rgba(255, 0, 255, 0.35),
      rgba(255, 0, 0, 0.25)
    );
  background-repeat: repeat, no-repeat;
  background-size: 130px 130px, 300% 300%;
  background-attachment: fixed, fixed;
  animation: rgb-border-shift 32s linear infinite;
}

/* Garante Inter também em controles e links, mesmo se algum navegador não herdar do body */
button,
input,
textarea,
select,
a,
label {
  font-family: inherit;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1280px; /* aproxima do container tailwind em telas grandes */
  margin: 0 auto;
  padding-inline: 1rem; /* px-4 */
}

.header {
  border-bottom: 1px solid var(--card-border);
  background-color: var(--card-bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem; /* equivale a p-4 vertical na nav do Next, sem afetar laterais */
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.brand-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info,
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.main {
  flex: 1;
  padding-block: 1.5rem 3rem; /* espaço extra até o rodapé, como na página Next */
}

.intro {
  text-align: center;
  margin: 2.5rem 0 2rem; /* similar ao my-8 do título da página Next */
}

.title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 0.15rem; /* quase colado com o subtítulo */
}

.subtitle {
  color: var(--muted);
  margin: 0; /* remove margem extra padrão do parágrafo */
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 1.5rem;
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Quando o usuário está logado, usamos apenas uma coluna central (similar ao max-w-2xl mx-auto) */
.content.content-single {
  max-width: 42rem;
  margin: 2rem auto 3rem; /* distância do título ao primeiro card, similar ao py-8 do PostPage */
  display: block;
}

.content.content-single .left-column {
  max-width: 100%;
}

/* Tela de autenticação (/?tab=login ou register) centralizada, similar ao max-w-sm mx-auto */
.content-auth {
  max-width: 32rem;          /* popup maior */
  margin: 2.5rem auto 3rem;  /* centralizado abaixo do título */
}

/* Deixa o cabeçalho do card de autenticação maior e centralizado */
#auth-card .card-header {
  align-items: center;
  text-align: center;
}

#auth-card .card-header h2 {
  font-size: 1.6rem;         /* parecido com text-2xl */
}

#auth-card .card-header p {
  margin-top: 0.25rem;
}

@media (max-width: 840px) {
  .content {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Afa sta o cabeçalho das bordas laterais em tablets/celulares grandes */
  .header {
    margin-inline: 0;
  }
}

/* Ajustes específicos para telas pequenas (mobile) */
@media (max-width: 640px) {
  .header-inner {
    flex-wrap: nowrap;
    row-gap: 0;
    column-gap: 0.4rem;
    padding-block: 0.4rem; /* afasta do topo/baixo, ainda fino */
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-icon {
    width: 18px;
    height: 18px;
  }

  .brand-title {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-right {
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 0.35rem;
  }

  .user-info span {
    font-size: 0.75rem;
  }

  /* Botões do cabeçalho menores em mobile */
  .header .btn {
    height: 1.7rem;
    padding: 0 0.55rem;
    font-size: 0.7rem;
  }

  .header .btn-icon {
    width: 28px;
    height: 28px;
  }

  #theme-toggle svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .main {
    padding-block: 1rem 2rem;
  }

  .intro {
    margin: 1.25rem 0 1rem;
  }

  .title {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .content-auth {
    max-width: 22rem;
    margin: 1.25rem auto 1.75rem;
  }

  #auth-card .card-header {
    padding: 1.1rem;
  }

  #auth-card .card-header h2 {
    font-size: 1.2rem;
  }

  #auth-card .card-header p {
    font-size: 0.85rem;
  }

  .tabs {
    margin-top: 0.5rem;
  }

  .tab-button {
    padding: 0.35rem 0.4rem;
    font-size: 0.8rem;
  }

  .auth-form {
    margin-top: 0.5rem;
  }

  .input,
  .textarea {
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
  }

  .textarea {
    min-height: 80px;
  }

  .btn {
    height: 1.8rem;
    padding: 0 0.65rem;
    font-size: 0.75rem;
  }

  .content.content-single {
    margin: 0.75rem auto 1.2rem;
  }

  .posts-list {
    margin-top: 0.6rem;
    gap: 0.5rem;
  }

  .card {
    border-radius: 0.5rem;
  }

  .card-header {
    padding: 0.75rem;
  }

  .card-header h2,
  .card-header h3 {
    font-size: 0.9rem;
  }

  .card-body {
    padding: 0 0.75rem 0.8rem;
  }

  .card-footer {
    padding: 0 0.75rem 0.75rem;
  }

  .content.content-single .textarea {
    min-height: 55px;
  }

  .post-card .card-header {
    padding: 0.6rem 0.75rem 0.3rem;
  }

  .post-card .card-body {
    padding: 0 0.75rem 0.45rem;
  }

  .post-card .card-footer {
    padding: 0 0.75rem 0.6rem;
  }

  body {
    font-size: 0.9rem;
  }

  .left-column {
    gap: 0.75rem;
  }

  #post-form .textarea {
    min-height: 50px;
    font-size: 0.8rem;
  }

  #post-form .btn {
    height: 1.7rem;
    padding: 0 0.6rem;
    font-size: 0.7rem;
  }

  .posts-list .card-body,
  .posts-list .card-body p {
    font-size: 0.85rem;
  }

  /* Rodapé um pouco mais compacto em mobile */
  .footer-inner {
    padding-block: 0; /* usa a altura total para centralizar, como no desktop */
  }

  .footer-link {
    font-size: 0.9rem;  /* mesmo tamanho do desktop para manter padrão */
    line-height: 1;
  }

  .font-selector-wrapper {
    left: 0.45rem;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    padding: 0.04rem;
  }

  .font-selector {
    font-size: 0.55rem;
    padding: 0 0.9rem 0 0.4rem;
    max-width: 30vw;          /* menor em largura para não invadir o centro */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .db-indicator-wrapper {
    right: 0.6rem;
  }
}

.card {
  background-color: var(--card-bg);            /* bg-card */
  border-radius: 0.75rem;                     /* rounded-xl */
  border: 1px solid var(--card-border);       /* border */
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.35),
              0 4px 6px -4px rgba(0,0,0,0.25); /* shadow */
}

.card-header {
  display: flex;
  flex-direction: column;                     /* flex flex-col */
  gap: 0.375rem;                              /* space-y-1.5 */
  padding: 1.5rem;                            /* p-6 */
}

.card-header h2,
.card-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;                           /* font-semibold */
}

.card-body {
  padding: 0 1.5rem 1.5rem;                   /* p-6 pt-0 */
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-footer {
  display: flex;                              /* flex items-center */
  align-items: center;
  padding: 0 1.5rem 1.5rem;                   /* p-6 pt-0 */
}

/* Lista de posts com espaçamento vertical como space-y-4 */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem; /* separa lista do formulário de nova mensagem, como no PostPage */
}

/* Versão mais "achatada" dos cards de posts (feed) */
.post-card .card-header {
  padding: 0.9rem 1.3rem 0.4rem;
}

.post-card .card-body {
  padding: 0 1.3rem 0.5rem;
}

.post-card .card-footer {
  padding: 0 1.3rem 0.8rem;
}

.text-muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.text-small {
  font-size: 0.85rem;
}

form {
  margin: 0;
}

.form-group {
  margin-bottom: 0.75rem;
}

.input,
.textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid var(--card-border);
  background-color: transparent;
  color: var(--fg);
  outline: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
}

.input:focus,
.textarea:focus {
  border-color: var(--accent);
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;                 /* h-9 */
  padding: 0 1rem;                  /* px-4 */
  border-radius: 0.5rem;            /* rounded-md/lg */
  border: 1px solid var(--card-border); /* border-input */
  background-color: var(--bg);      /* bg-background */
  cursor: pointer;
  font-weight: 700;                 /* text-base font-bold */
  font-size: 0.95rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-outline {
  background-color: var(--bg);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
}

.btn:hover,
.btn-outline:hover {
  background-color: var(--card-border);  /* hover:bg-accent */
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.footer {
  border-top: 1px solid var(--card-border);
  background-color: var(--card-bg);
  position: relative; /* para ancorar o indicador e o seletor de fonte */
  height: 2.4rem; /* altura levemente maior e fixa */
}

/* Header, footer, cards e botões escurecidos no tema claro, mantendo o contorno RGB da classe .rgb-border */
:root:not(.dark) .header,
:root:not(.dark) .footer,
:root:not(.dark) .card,
:root:not(.dark) .btn,
:root:not(.dark) .tab-button {
  --card-bg: rgba(36, 36, 44, 0.96); /* define o fundo interno usado por .rgb-border */
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 100%;
  padding-block: 0; /* usa a altura total do footer para centralizar */
  max-width: 42rem; /* max-w-2xl */
  margin: 0 auto;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;              /* maior e fixo em qualquer fonte */
  line-height: 1;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.db-indicator-wrapper {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%); /* centraliza verticalmente no rodapé */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;              /* espessura do aro RGB ao redor do ponto */
  border-radius: 999px;      /* deixa o wrapper circular */
}

/* Garante que a classe .rgb-border não troque o posicionamento absoluto do wrapper */
.db-indicator-wrapper.rgb-border {
  position: absolute;
}

.font-selector-wrapper {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.7rem;           /* altura fixa do balão */
  padding: 0.08rem;         /* espessura entre borda RGB e conteúdo */
  border-radius: 999px;     /* forma de pílula para o aro RGB */
}

/* Garante que a classe .rgb-border não troque o posicionamento absoluto do seletor de fonte */
.font-selector-wrapper.rgb-border {
  position: absolute;
}

.font-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.font-toggle-btn:focus,
.font-toggle-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.font-toggle-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.font-selector {
  display: inline-block;
  height: 100%;                 /* segue a altura fixa do wrapper */
  padding: 0 1.5rem 0 0.75rem;  /* apenas horizontal, para não variar a altura */
  border-radius: 999px;
  border: none;
  background-color: transparent;
  font-size: 0.7rem;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; /* fonte estável, não muda com o app */
  line-height: 1;
  cursor: pointer;
  width: auto;
  min-width: 0;
  max-width: 50vw;              /* limita o crescimento lateral em telas menores */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: linear-gradient(120deg,#ff0000,#ff7f00,#ffff00,#00ff00,#00ffff,#0000ff,#8b00ff,#ff00ff,#ff0000);
  background-size: 300% 300%;
  animation: rgb-text-shift var(--rgb-duration, 6s) linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.45);
  outline: none;
  box-shadow: none;
}

.font-selector:focus,
.font-selector:focus-visible {
  outline: none;
  box-shadow: none;
}

.font-selector-wrapper::after {
  content: '▾';
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-55%);
  pointer-events: none;
  font-size: 0.7rem;
  line-height: 1;
  background-image: linear-gradient(120deg,#ff0000,#ff7f00,#ffff00,#00ff00,#00ffff,#0000ff,#8b00ff,#ff00ff,#ff0000);
  background-size: 300% 300%;
  animation: rgb-text-shift var(--rgb-duration, 6s) linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:root.dark .font-selector {
  background-color: transparent;
}

.font-selector option {
  background-color: var(--card-bg);
  color: #ff0000;
  animation: theme-toggle-rgb 4s linear infinite; /* reutiliza animação de cor RGB */
}

.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background-color: #888888;
}

.indicator-loading {
  animation: pulse 1s ease-in-out infinite;
}

.indicator-ok {
  background-color: #22c55e;
}

.indicator-error {
  background-color: #ef4444;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Tabs de autenticação */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tab-button {
  flex: 1;
  padding: 0.45rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background-color: transparent;
  cursor: pointer;
  font-size: 0.9rem;
}

.tab-active {
  border-color: var(--accent);
}

.auth-form {
  margin-top: 0.75rem;
}

/* Toast simples */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background-color: #111827;
  color: #f9fafb;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.toast.visible {
  opacity: 1;
  pointer-events: auto;
}

.toast-success {
  background-color: #166534;
}

.toast-error {
  background-color: #b91c1c;
}

/* Ícones de tema (sun/moon) inspirados no ThemeToggle do Next */
#theme-toggle svg {
  width: 1.4rem;   /* ligeiramente maior */
  height: 1.4rem;
  display: block;  /* evita desalinhamento vertical */
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Animação RGB específica para o ícone de tema usando currentColor */
@keyframes theme-toggle-rgb {
  0%   { color: #ff0000; }
  20%  { color: #ff7f00; }
  40%  { color: #ffff00; }
  60%  { color: #00ff00; }
  80%  { color: #0000ff; }
  100% { color: #ff0000; }
}

#theme-toggle {
  animation: theme-toggle-rgb 4s linear infinite;
}

#theme-toggle .icon-sun,
#theme-toggle .icon-moon {
  position: absolute;
  inset: 0;          /* centraliza dentro do botão */
  margin: auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Estado padrão: sol visível, lua escondida à direita/menor */
#theme-toggle .icon-sun {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

#theme-toggle .icon-moon {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}

/* Em modo dark: animação invertida (sol some, lua aparece) */
:root.dark #theme-toggle .icon-sun {
  transform: rotate(-90deg) scale(0);
  opacity: 0;
}

:root.dark #theme-toggle .icon-moon {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

/* Efeito camaleão RGB (texto) e bordas RGB, baseado no globals.css original */
@keyframes rgb-text-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes rgb-border-shift {
  0% {
    background-position: 0% 50%, 0% 50%;
  }
  50% {
    background-position: 100% 50%, 100% 50%;
  }
  100% {
    background-position: 0% 50%, 0% 50%;
  }
}

/* Moldura RGB animada usando dois backgrounds: um sólido interno e um degradê externo */
.rgb-border {
  position: relative;
  border: 1px solid transparent;
  background-image:
    linear-gradient(var(--card-bg), var(--card-bg)),
    linear-gradient(120deg,#ff0000,#ff7f00,#ffff00,#00ff00,#00ffff,#0000ff,#8b00ff,#ff00ff,#ff0000);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 300% 300%;
  animation: rgb-border-shift 4s linear infinite;
}

.rgb-text,
p,
span,
h1,
h2,
h3,
h4,
h5,
h6,
a:not(.rgb-border),
label,
button:not(.btn-full):not(.tab-button):not(.rgb-border),
small,
strong,
em {
  background-image: linear-gradient(120deg,#ff0000,#ff7f00,#ffff00,#00ff00,#00ffff,#0000ff,#8b00ff,#ff00ff,#ff0000);
  background-size: 300% 300%;
  animation: rgb-text-shift var(--rgb-duration, 6s) linear infinite;
  animation-delay: var(--rgb-delay, 0s);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 500;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.45);
}

p:nth-of-type(3n) {
  --rgb-duration: 4s;
  --rgb-delay: -1s;
}

p:nth-of-type(3n + 1) {
  --rgb-duration: 5s;
  --rgb-delay: -2s;
}

p:nth-of-type(3n + 2) {
  --rgb-duration: 7s;
}

span:nth-of-type(2n) {
  --rgb-duration: 4.5s;
  --rgb-delay: -0.5s;
}

div:nth-of-type(4n) {
  --rgb-duration: 8s;
}

.no-gradient,
.no-gradient * {
  background-image: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  animation: none !important;
  color: var(--fg) !important;
}

/* Barra de rolagem com efeito RGB (WebKit / Blink) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--bg), var(--bg)),
    linear-gradient(120deg,#ff0000,#ff7f00,#ffff00,#00ff00,#00ffff,#0000ff,#8b00ff,#ff00ff,#ff0000);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 300% 300%;
  animation: rgb-border-shift 4s linear infinite;
}

/* Firefox */
html,
body {
  scrollbar-width: thin;
  scrollbar-color: #ff7f00 transparent;
}
