/* CryptoDashboard Wiki Styles - Coerente com o tema principal */

:root {
  --bg-1: #0b1020;
  --bg-2: #11172a;
  --primary: #5df2ff;
  --accent: #b67bff;
  --glow: rgba(93, 242, 255, 0.15);
  --text: #e9f4ff;
  --muted: #9cb5d3;
  --border: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background-color: #0b1020;
  background: radial-gradient(circle at 20% 20%, rgba(91, 192, 255, 0.15), transparent 25%),
              radial-gradient(circle at 80% 0%, rgba(182, 123, 255, 0.12), transparent 30%),
              linear-gradient(145deg, var(--bg-1), var(--bg-2));
  color: var(--text);
  overflow-x: hidden;
}

.grid-bg::before,
.grid-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  background-size: 120px 120px;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: screen;
  z-index: 0;
}

.grid-bg::before {
  background-image: linear-gradient(rgba(93, 242, 255, 0.15) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(182, 123, 255, 0.15) 1px, transparent 1px);
}

.grid-bg::after {
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.wiki-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.wiki-nav {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.wiki-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}

.wiki-nav .nav-link:hover {
  background: rgba(93, 242, 255, 0.08);
  transform: translateX(-5px);
  border-color: rgba(93, 242, 255, 0.3);
}

.wiki-content {
  background: var(--card);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: visible;
}

.wiki-content::after {
  content: '';
  position: absolute;
  inset: -40% auto auto -40%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(93, 242, 255, 0.14), transparent 60%);
  transform: rotate(8deg);
  pointer-events: none;
}

/* Typography */
.wiki-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary);
  text-shadow: 0 0 16px rgba(93, 242, 255, 0.35);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.wiki-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
  border-left: 4px solid var(--accent);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.wiki-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.wiki-content h4 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.wiki-content p {
  margin-bottom: 1.25rem;
  color: var(--muted);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* Links */
.wiki-content a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.wiki-content a:hover {
  border-bottom-color: var(--primary);
  text-shadow: 0 0 8px rgba(93, 242, 255, 0.5);
}

/* Lists */
.wiki-content ul,
.wiki-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  position: relative;
  z-index: 1;
}

.wiki-content li {
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.wiki-content li::marker {
  color: var(--primary);
}

/* Code */
.wiki-content code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0, 0, 0, 0.3);
  color: var(--primary);
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: 0.9em;
  border: 1px solid var(--border);
}

.wiki-content pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.wiki-content pre code {
  background: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  display: block;
  border: none;
  letter-spacing: 0;
  word-spacing: 0;
  white-space: pre;
  font-variant-ligatures: none;
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
  font-feature-settings: normal;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Code blocks with language */
.wiki-content pre code.language-sql,
.wiki-content pre code.language-python,
.wiki-content pre code.language-javascript,
.wiki-content pre code.language-bash,
.wiki-content pre code.language-json,
.wiki-content pre code.language-yaml,
.wiki-content pre code.language-nginx,
.wiki-content pre code.language-markdown {
  position: relative;
}

/* Blockquotes */
.wiki-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--muted);
  background: rgba(93, 242, 255, 0.05);
  padding: 1rem 1.5rem;
  border-radius: 0 12px 12px 0;
  position: relative;
  z-index: 1;
}

/* Tables */
.wiki-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.wiki-content th,
.wiki-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.wiki-content th {
  background: rgba(93, 242, 255, 0.1);
  color: var(--primary);
  font-weight: 600;
}

.wiki-content tr:last-child td {
  border-bottom: none;
}

.wiki-content tr:hover {
  background: rgba(93, 242, 255, 0.03);
}

/* Strong/Bold */
.wiki-content strong {
  color: var(--primary);
  font-weight: 600;
}

/* Emphasis/Italic */
.wiki-content em {
  color: var(--accent);
  font-style: italic;
}

/* Horizontal Rule */
.wiki-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* Special Elements */
.wiki-content .emoji {
  font-style: normal;
}

/* Info boxes */
.wiki-content .info-box {
  background: rgba(93, 242, 255, 0.1);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  position: relative;
  z-index: 1;
}

.wiki-content .warning-box {
  background: rgba(255, 100, 100, 0.1);
  border-left: 4px solid #ff6464;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  position: relative;
  z-index: 1;
}

.wiki-content .success-box {
  background: rgba(182, 123, 255, 0.1);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .wiki-page {
    padding: 32px 18px 72px;
  }

  .wiki-content {
    padding: 1.5rem;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.06);
  }

  .wiki-content::after {
    display: none;
  }

  .grid-bg::before,
  .grid-bg::after {
    opacity: 0.03;
  }

  .wiki-content h1 {
    font-size: 2rem;
  }

  .wiki-content h2 {
    font-size: 1.5rem;
  }

  .wiki-content h3 {
    font-size: 1.25rem;
  }

  .wiki-content pre {
    padding: 1rem;
    font-size: 0.8rem;
  }

  .wiki-content table {
    font-size: 0.875rem;
  }

  .wiki-content th,
  .wiki-content td {
    padding: 0.5rem;
  }
}

/* Scrollbar styling */
.wiki-content pre::-webkit-scrollbar {
  height: 8px;
}

.wiki-content pre::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.wiki-content pre::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.wiki-content pre::-webkit-scrollbar-thumb:hover {
  background: rgba(93, 242, 255, 0.8);
}

/* Navigation links at bottom of articles */
.wiki-nav-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.wiki-nav-bottom a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s ease;
  background: var(--card);
  font-weight: 600;
}

.wiki-nav-bottom a:hover {
  background: rgba(93, 242, 255, 0.08);
  transform: translateY(-2px);
  border-color: rgba(93, 242, 255, 0.3);
}
