/* =============================================================================
   server.minegamers.pro - Emerald Core Dark Design System
   Zero External Dependencies • Self-Contained • Responsive & Accessible
   ============================================================================= */

:root {
  --bg-main: #070a10;
  --bg-surface: #0c121e;
  --bg-card: #111a2e;
  --bg-card-hover: #16223d;
  --bg-glass: rgba(17, 26, 46, 0.75);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-soft: rgba(16, 185, 129, 0.12);
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);

  --accent-cyan: #06b6d4;
  --accent-cyan-light: #22d3ee;
  --accent-cyan-soft: rgba(6, 182, 212, 0.12);

  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(16, 185, 129, 0.35);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.2);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-emerald-light);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #6ee7b7;
  text-decoration: underline;
}

code, pre {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Top Telemetry Bar ---------------------------------------------------- */
.top-telemetry-bar {
  background: #05080e;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  padding: 7px 0;
  color: var(--text-secondary);
}

.top-telemetry-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.telemetry-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  margin-right: 6px;
}

.pulse-dot.pulse {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.top-telemetry-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-telemetry-right a {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.top-telemetry-right a:hover {
  color: var(--accent-emerald-light);
}

/* --- Header & Navigation -------------------------------------------------- */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-tag {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald-light);
  border: 1px solid var(--border-accent);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent-emerald-light);
  background: var(--accent-emerald-soft);
  border: 1px solid var(--border-accent);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-emerald);
  color: #062b1b;
  border-color: var(--accent-emerald-light);
}

.btn-primary:hover {
  background: #059669;
  color: #fff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

.btn-cyan {
  background: var(--accent-cyan);
  color: #04242e;
  border-color: var(--accent-cyan-light);
}

.btn-cyan:hover {
  background: #0891b2;
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.ip-pill-btn {
  background: #09101c;
  border: 1px solid var(--border-accent);
  color: var(--accent-emerald-light);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.ip-pill-btn:hover {
  background: #111d33;
}

/* --- Badges --------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.badge-emerald {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald-light);
  border: 1px solid var(--border-accent);
}

.badge-cyan {
  background: var(--accent-cyan-soft);
  color: var(--accent-cyan-light);
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.badge-orange {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* --- Hero Section --------------------------------------------------------- */
.hero-section {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.12) 0%, transparent 60%);
}

.hero-content {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 14px 0 16px;
  color: #ffffff;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* --- Cards & Grid Layouts ------------------------------------------------- */
.section {
  padding: 54px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  max-width: 680px;
  margin-top: 6px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.2s ease;
  position: relative;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.14);
}

.card-emerald:hover {
  border-color: var(--border-accent);
}

/* --- Metrics Grid --------------------------------------------------------- */
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  line-height: 1.1;
}

.metric-sub {
  font-size: 0.82rem;
  color: var(--accent-emerald-light);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Nodes Table ---------------------------------------------------------- */
.nodes-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.nodes-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.nodes-table th {
  background: #080d16;
  padding: 14px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-subtle);
}

.nodes-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nodes-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* --- Console / Terminal View ---------------------------------------------- */
.console-wrapper {
  background: #04070c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.console-header {
  background: #0a0f19;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.console-dots {
  display: flex;
  gap: 6px;
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.console-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.console-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e2e8f0;
  max-height: 380px;
  overflow-y: auto;
}

.console-line {
  margin-bottom: 4px;
}

.console-ts {
  color: var(--text-muted);
}

.console-green {
  color: var(--accent-emerald-light);
}

.console-cyan {
  color: var(--accent-cyan-light);
}

.console-yellow {
  color: var(--accent-orange);
}

/* --- Code Block & Copy Button --------------------------------------------- */
.code-block-wrapper {
  background: #04070c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 18px 0;
  overflow: hidden;
}

.code-header {
  background: #0b111c;
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.copy-code-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--accent-emerald-light);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-code-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
}

.code-block-wrapper pre {
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: #e2e8f0;
  line-height: 1.55;
}

/* --- Article Layout ------------------------------------------------------- */
.article-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.article-toc {
  position: sticky;
  top: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.article-toc h3 {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.article-toc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}

.article-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 34px;
}

.article-content h2 {
  font-size: 1.45rem;
  margin: 28px 0 12px;
  color: #ffffff;
}

.article-content p {
  margin-bottom: 16px;
  color: #cbd5e1;
  line-height: 1.7;
}

.article-content ul, .article-content ol {
  margin: 0 0 18px 24px;
  color: #cbd5e1;
  line-height: 1.75;
}

.callout-box {
  background: var(--accent-emerald-soft);
  border-left: 4px solid var(--accent-emerald);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
  font-size: 0.92rem;
  color: #f1f5f9;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* --- Tabs & Forms --------------------------------------------------------- */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-emerald-light);
  border-bottom-color: var(--accent-emerald);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #070c16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-emerald);
}

.form-result {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
}

.form-result.show {
  display: block;
  background: var(--accent-emerald-soft);
  border: 1px solid var(--border-accent);
  color: #ecfdf5;
}

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: #05080e;
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-col h4 {
  font-size: 0.9rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-emerald-light);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --- Responsive Adjustments ----------------------------------------------- */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { position: static; margin-bottom: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 16px 20px;
    gap: 8px;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
}

