@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=JetBrains+Mono&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #dce0f5;
  background: #070707;
  max-width: 800px;
  margin: 20px auto;
}

main {
  background: #111;
  border: 1px solid #1a1b26;
  border-radius: 8px;
  padding: 20px;
  margin: 0 20px;
  position: relative;
  z-index: 1;
}

/* VHS Effects */
body::before {
  content: "";
  position: fixed;
  inset: -100px 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.21) 1px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 9999;
  animation: vhs-scanline 8s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9998;
}

@keyframes vhs-scanline {
  to { transform: translateY(100px); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: #c0caf5;
}

h1 { 
  font-size: 2em;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, #677ddd 35%, #84ecf3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.5em;
}

h1 a {
  background: linear-gradient(135deg, #677ddd 35%, #84ecf3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 { 
  font-size: 1.5em;
  margin: 1.5em 0 0.5em;
  border-bottom: 1px solid #1a1b26;
  padding-bottom: 0.25em;
}

h3 { 
  font-size: 1.25em;
  margin: 1.25em 0 0.5em;
}

h4 { 
  font-size: 1.1em;
  margin: 1em 0 0.5em;
}

p { 
  margin: 0 0 0.5em;
}

strong { 
  color: #a9b1d6; 
  font-weight: 600; 
}

a { 
  color: #7aa2f7;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { 
  color: #7dcfff; 
}

/* Code */
code {
  font-family: 'JetBrains Mono', monospace;
  background: #16161e;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #9ece6a;
}

pre {
  font-family: 'JetBrains Mono', monospace;
  background: #16161e;
  padding: 15px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1em 0;
}

pre code {
  background: none;
  padding: 0;
}

/* Lists */
ul, ol { 
  margin: 0.3em 0 0.5em;
  padding-left: 1.6em;
}

li {
  margin: 0.25em 0;
}

/* Blockquote */
blockquote {
  border-left: 3px solid #bb9af7;
  padding-left: 15px;
  margin: 1em 0;
  color: #565f89;
}

hr {
  border: none;
  border-top: 1px solid #1a1b26;
  margin: 2em 0;
}

/* Article Lists */
.article-list, .page-list, .series-list {
  list-style: none;
  padding: 0;
  margin: 1em 0;
}

.article-list li, .page-list li, .series-list li {
  margin: 0.5em 0;
  padding: 12px;
  background: #16161e;
  border-radius: 6px;
  transition: background 0.2s;
}

.article-list li:hover, .page-list li:hover, .series-list li:hover {
  background: #1a1b26;
}

.article-date {
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  font-size: 0.875em;
}

.article-meta {
  text-align: center;
  padding: 15px;
  background: #16161e;
  border-radius: 6px;
  margin: 1em 0;
  font-size: 0.875em;
  color: #565f89;
}

/* Table of Contents */
.toc {
  background: #16161e;
  border-radius: 6px;
  padding: 15px;
  margin: 1em 0;
}

.toc h2 {
  font-size: 1.25em;
  margin: 0 0 0.5em;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li { 
  margin: 0.25em 0;
}

.toc-list .toc-h1 { padding-left: 0; }
.toc-list .toc-h2 { padding-left: 2em; }
.toc-list .toc-h3 { padding-left: 4em; }
.toc-list .toc-h4 { padding-left: 6em; }

/* Navigation */
.article-navigation {
  margin: 2em 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.article-navigation a {
  padding: 12px 16px;
  background: #16161e;
  border-radius: 6px;
  transition: background 0.2s;
}

.article-navigation a:hover {
  background: #1a1b26;
}

/* Categories */
.category-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-list li {
  background: #16161e;
  border-radius: 6px;
  padding: 10px 15px;
  transition: background 0.2s;
}

.category-list li:hover {
  background: #1a1b26;
}

/* Media */
figure {
  margin: 1em 0;
  max-width: 600px;
  text-align: center;
}

figure img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

figcaption {
  margin-top: 0.5em;
  font-size: 0.875em;
  color: #fff;
  font-style: italic;
}

.video-player {
  width: 100%;
  max-width: 600px;
  margin: 1em 0;
  border-radius: 6px;
  overflow: hidden;
  background: #16161e;
  aspect-ratio: 16 / 9;
}

.video-player iframe,
.video-player video {
  width: 100%;
  height: 100%;
  border: none;
}

/* Tag Icons */
[id^="tag_"]::before {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: currentColor;
  background-clip: unset;
  color: currentColor;
}

h1 [id^="tag_"]::before {
  -webkit-text-fill-color: currentColor;
  color: #dce0f5;
}

#tag_economia::before { content: "📈 "; }
#tag_grana::before { content: "💸 "; }
#tag_tecnologia::before { content: "💻 "; }
#tag_religiao::before { content: "☦️ "; }
#tag_culinaria::before { content: "🍲 "; }
#tag_academia::before { content: "🏋️‍♂️ "; }
#tag_filosofia::before { content: "🏛️ "; }
#tag_reclamacao::before { content: "🤬 "; }
#tag_internet::before { content: "🌐 "; }
#tag_vida::before { content: "⏳ "; }

/* Buttons */
.buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 1em 0;
}

.buttons img {
  max-height: 40px;
  width: auto;
}

/* Responsive */
@media (max-width: 768px) {
  body { 
    margin: 10px auto; 
  }
  
  main {
    margin: 0 10px;
    padding: 15px;
  }
  
  h1 { font-size: 1.75em; }
  h2 { font-size: 1.375em; }
  h3 { font-size: 1.125em; }
  
  .article-navigation {
    flex-direction: column;
  }
  
  .category-list {
    flex-direction: column;
  }
}