/* Base para o conteúdo do artigo */
.article-content {
  font-family: 'Calibre', 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-light);
  background-color: var(--surface-light);
  max-width: 768px;
  margin: 0 auto;
  border-radius: 12px;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Títulos */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  font-weight: bold;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-light);
  position: relative;
}

.article-content h1 { 
  font-size: 2.5rem; 
  line-height: 1.2;
}

.article-content h2 { 
  font-size: 2rem; 
  padding-bottom: 0.1rem;
}

.article-content h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-light), var(--purple-light));
  border-radius: 3px;
}

.article-content h3 { 
  font-size: 1.5rem; 
  color: var(--text-muted-light);
}

.article-content h4 { font-size: 1.25rem; }
.article-content h5 { font-size: 1.125rem; }
.article-content h6 { font-size: 1rem; }

/* Parágrafos */
.article-content p {
  margin-bottom: 1.25rem;
}

/* Links */
.article-content a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.article-content a:hover {
  color: var(--purple-light);
}

.article-content a:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--purple-light);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-content a:hover:after {
  width: 100%;
}

/* Listas */
/* Estilo aprimorado para listas */
.article-content ul,
.article-content ol {
  padding-left: 1.75rem;
  margin: 2rem 0;
  position: relative;
}

.article-content ul {
  list-style: none;
}

.article-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.article-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  transform: translateY(-50%);
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-light), var(--purple-light));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-content ol {
  list-style: none;
  counter-reset: custom-counter;
}

.article-content ol li {
  counter-increment: custom-counter;
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.article-content ol li::before {
  content: counter(custom-counter);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-light);
  font-weight: 600;
  font-size: 0.9em;
  background: var(--surface-dark-light);
  border-radius: 4px;
  padding: 0.1em 0.5em;
  line-height: 1.4;
}

/* Efeitos de hover e interação */
.article-content li:hover {
  transform: translateX(4px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Listas aninhadas */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
  margin: 0.75rem 0 0.75rem 1rem;
  padding-left: 1.5rem;
}

.article-content ul ul li::before {
  background: var(--text-muted-light);
  width: 0.4rem;
  height: 0.4rem;
}

.article-content ol ol li::before {
  background: var(--surface-dark-light);
  color: var(--text-muted-light);
  font-weight: 500;
}

/* Dark mode */
body.dark .article-content ul li::before {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark .article-content ol li::before {
  background: var(--surface-dark-dark);
  color: var(--accent-dark);
}

body.dark .article-content ul ul li::before {
  background: var(--text-muted-dark);
}

body.dark .article-content ol ol li::before {
  background: var(--surface-dark-dark);
  color: var(--text-muted-dark);
}

/* Efeito especial para listas importantes */
.article-content .highlight-list li::before {
  background: var(--accent-light);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

body.dark .article-content .highlight-list li::before {
  background: var(--accent-dark);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
}

/* Blockquote */
.article-content blockquote {
  border-left: 4px solid var(--accent-light);
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-muted-light);
  background-color: var(--surface-dark-light);
  border-radius: 0 8px 8px 0;
  position: relative;
  overflow: hidden;
}

.article-content blockquote:before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 4rem;
  color: var(--accent-light);
  opacity: 0.1;
  line-height: 1;
  font-family: serif;
}

/* Código inline */
.article-content code {
  background-color: var(--surface-dark-light);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: var(--text-light);
}

/* Pre (bloco de código) */
.article-content pre {
  background-color: var(--surface-dark-light);
  color: var(--text-light);
  padding: 1.75rem;
  overflow-x: auto;
  border-radius: 12px;
  margin: 2.5rem 0;
  font-family: 'Fira Code', 'Courier New', monospace;
  border-left: 4px solid var(--accent-light);
  box-shadow: 
    0 6px 12px -2px rgba(0, 0, 0, 0.08),
    0 4px 8px -2px rgba(0, 0, 0, 0.03);
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.6;
  font-size: 0.95em;
}

/* Efeito hover sutil */
.article-content pre:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 24px -4px rgba(0, 0, 0, 0.12),
    0 6px 12px -3px rgba(0, 0, 0, 0.05);
}



/* Barra de rolagem personalizada */
.article-content pre::-webkit-scrollbar {
  height: 8px;
}

.article-content pre::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: 4px;
}

.article-content pre::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  margin: 0 1rem;
}

/* Código interno */
.article-content pre code {
  display: block;
  background: transparent;
  padding: 0;
  border-radius: 0;
  color: inherit;
  white-space: pre;
  overflow: visible;
}

/* Dark mode */
body.dark .article-content pre {
  background-color: var(--surface-dark-dark);
  box-shadow: 
    0 6px 12px -2px rgba(0, 0, 0, 0.15),
    0 4px 8px -2px rgba(0, 0, 0, 0.08);
}

body.dark .article-content pre::-webkit-scrollbar-thumb {
  background: var(--accent-dark);
}

/* Destaque de linha (opcional) */
.article-content pre mark {
  background: rgba(255, 255, 0, 0.15);
  display: block;
  margin: 0 -1.75rem;
  padding: 0 1.75rem;
}

/* Responsividade */
@media (max-width: 768px) {
  .article-content pre {
    padding: 1.25rem;
    margin: 2rem 0;
    border-radius: 8px;
  }
  
  .article-content pre::before {
    right: 0.5rem;
    font-size: 0.65em;
  }
}

/* Tabelas */
/* Tabelas modernas e elegantes */
.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  font-size: 0.95rem;
  background-color: var(--surface-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-content table:hover {
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

.article-content th,
.article-content td {
  padding: 1rem 1.25rem;
  text-align: left;
  transition: background-color 0.2s ease;
}

.article-content th {
  background-color: var(--surface-dark-light);
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.article-content tr:not(:last-child) td {
  border-bottom: 1px solid var(--surface-dark-light);
}

.article-content tr:hover td {
  background-color: rgba(59, 130, 246, 0.03);
}

.article-content tr:first-child th:first-child {
  border-top-left-radius: 12px;
}

.article-content tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

.article-content tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}

.article-content tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

/* Zebra striping opcional */
.article-content.striped tr:nth-child(even) td {
  background-color: var(--surface-dark-light);
}

/* Dark mode adjustments */
body.dark .article-content table {
  background-color: var(--surface-dark);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.2),
    0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

body.dark .article-content th {
  background-color: var(--surface-dark-dark);
  color: var(--text-dark);
}

body.dark .article-content tr:hover td {
  background-color: rgba(96, 165, 250, 0.05);
}

body.dark .article-content.striped tr:nth-child(even) td {
  background-color: var(--surface-dark-dark);
}

/* Imagens */
.article-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-content img:hover {
  transform: translateY(-4px);
}

/* Figcaption */
.article-content figure {
  margin: 2rem 0;
  text-align: center;
}

.article-content figcaption {
  font-size: 0.875rem;
  color: var(--text-muted-light);
  margin-top: 0.5rem;
}

/* Iframes e vídeos responsivos */
.article-content iframe,
.article-content video {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;
  border: none;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Horizontal rule */
.article-content hr {
  border: none;
  border-top: 1px solid var(--surface-dark-light);
  margin: 2rem 0;
  position: relative;
}

.article-content hr:after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 20%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-light), var(--purple-light));
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .article-content h1 {
    font-size: 2rem;
  }
  
  .article-content h2 {
    font-size: 1.75rem;
  }
  
  .article-content h3 {
    font-size: 1.25rem;
  }
}

/* Special classes for article content */
.article-content .highlight {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  border-left: 3px solid var(--accent-light);
}

.article-content .footnotes {
  font-size: 0.875rem;
  color: var(--text-muted-light);
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface-dark-light);
}

/* Estilo para a tag mark */
/* Estilo moderno e minimalista para marcação de texto */
.article-content mark {
  background-color: transparent;
  color: inherit;
  position: relative;
  z-index: 1;
  font-weight: 500;
  padding: 0 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.article-content mark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    var(--accent-light) 0%,
    var(--purple-light) 100%
  );
  opacity: 0.15;
  border-radius: 3px;
  z-index: -1;
  transform: skewX(-5deg);
  transition: opacity 0.3s ease;
}

/* Efeito hover sutil */
.article-content mark:hover::before {
  opacity: 0.25;
}

/* Dark mode adjustments */
body.dark .article-content mark::before {
  background: linear-gradient(
    120deg,
    var(--accent-dark) 0%,
    var(--purple-dark) 100%
  );
  opacity: 0.25;
}

body.dark .article-content mark:hover::before {
  opacity: 0.35;
}

/* Estilo alternativo para destaques mais intensos */
.article-content mark.strong {
  font-weight: 600;
  color: var(--accent-light);
}

.article-content mark.strong::before {
  opacity: 0.3;
  background: linear-gradient(
    120deg,
    var(--accent-light) 0%,
    var(--pink-light) 100%
  );
}

body.dark .article-content mark.strong {
  color: var(--accent-dark);
}

body.dark .article-content mark.strong::before {
  background: linear-gradient(
    120deg,
    var(--accent-dark) 0%,
    var(--pink-dark) 100%
  );
  opacity: 0.4;
}