/* ============================================
   CoreSplit Wiki — Minecraft 26.2 Fabric Mod
   Design: Terminal // Industrial // Pixel
   ============================================ */

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

:root {
  --bg-root: #06060b;
  --bg-surface: #0e0e18;
  --bg-card: #161625;
  --bg-card-hover: #1c1c30;
  --bg-sidebar: #0a0a14;
  --bg-code: #0d0d1a;
  --border-subtle: #1e1e35;
  --border-glow: #2a5a3a;
  --text-primary: #e4e8f0;
  --text-secondary: #8b90a0;
  --text-muted: #555a6a;
  --accent-green: #4ade80;
  --accent-green-dim: #338a52;
  --accent-cyan: #22d3ee;
  --accent-cyan-dim: #1a8a9a;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #a78bfa;
  --shadow-green: 0 0 20px rgba(74, 222, 128, 0.08);
  --shadow-cyan: 0 0 20px rgba(34, 211, 238, 0.06);
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --font-display: 'Press Start 2P', monospace;
  --font-body: 'JetBrains Mono', 'Consolas', monospace;
  --sidebar-width: 260px;
  --header-height: 56px;
  --transition-fast: 120ms ease;
  --transition-smooth: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border-glow) var(--bg-root);
}

body {
  font-family: var(--font-body);
  background: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-root); }
::-webkit-scrollbar-thumb {
  background: var(--border-glow);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-green-dim); }

/* === BACKGROUND TEXTURE === */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(74, 222, 128, 0.3) 2px,
      rgba(74, 222, 128, 0.3) 3px
    );
}

/* === LANGUAGE SWITCHER === */
.sidebar-lang {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-lang-label {
  font-size: 0.6rem;
  font-family: var(--font-display);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  display: block;
}

.lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-btn {
  flex: 1;
  padding: 5px 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.55rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.lang-btn:hover {
  border-color: var(--accent-green-dim);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.lang-btn.active {
  background: rgba(74, 222, 128, 0.1);
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.15);
}

/* === SIDEBAR === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition-smooth);
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-green-dim), var(--accent-green));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.55rem;
  color: var(--bg-root);
  line-height: 1;
  text-align: center;
  image-rendering: pixelated;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.2);
  position: relative;
  overflow: hidden;
}

.sidebar-logo::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: var(--accent-green);
  line-height: 1.4;
  letter-spacing: 0.05em;
}

.sidebar-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
}

.sidebar-section {
  margin-bottom: 0.5rem;
}

.sidebar-section-title {
  padding: 0.5rem 1.25rem;
  font-size: 0.6rem;
  font-family: var(--font-display);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.25rem;
  margin: 0 0.5rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
  border-left: 2px solid transparent;
}

.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(74, 222, 128, 0.06);
  color: var(--accent-green);
  border-left-color: var(--accent-green);
}

.sidebar-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.sidebar-footer a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.sidebar-footer a:hover {
  color: var(--accent-cyan);
}

.sidebar-version {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  color: var(--accent-green);
  font-size: 0.6rem;
  font-family: var(--font-display);
  margin-top: 0.4rem;
}

/* === MAIN CONTENT === */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
}

/* === MOBILE HEADER === */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 99;
  align-items: center;
  padding: 0 1rem;
}

.mobile-brand {
  font-family: var(--font-display);
  font-size: 0.55rem;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.mobile-brand-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-green);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-green);
}

.menu-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.2rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

.menu-toggle:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* === SIDEBAR OVERLAY === */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 98;
}

/* === PAGE CONTENT === */
.page {
  max-width: 860px;
  padding: 3rem 2.5rem 4rem;
  animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === HERO (Homepage) === */
.hero {
  padding: 3.5rem 2.5rem 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 10px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  font-size: 0.6rem;
  font-family: var(--font-display);
  color: var(--accent-green);
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent-green);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 30px rgba(74, 222, 128, 0.2);
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hero-meta-item .val {
  color: var(--text-primary);
  font-weight: 500;
}

/* === STAT BARS === */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all var(--transition-smooth);
}

.stat-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-green);
  transform: translateY(-1px);
}

.stat-label {
  font-size: 0.65rem;
  font-family: var(--font-display);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent-green);
  line-height: 1.3;
}

.stat-unit {
  font-size: 0.55rem;
  color: var(--accent-green-dim);
}

/* === PAGE HEADER === */
.page-header {
  padding: 2.5rem 2.5rem 0;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 600px;
}

/* === TYPOGRAPHY === */
h2 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin: 2.5rem 0 0.75rem;
  letter-spacing: 0.05em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

h2:first-of-type { margin-top: 0; }

h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
  border-bottom: 1px solid transparent;
}

a:hover {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}

/* === CODE === */
code {
  font-family: var(--font-body);
  font-size: 0.8rem;
  background: var(--bg-code);
  color: var(--accent-amber);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 0.75rem 0;
  position: relative;
}

pre::before {
  content: '>_';
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.6rem;
  font-family: var(--font-display);
  color: var(--text-muted);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* === BLOCKQUOTE === */
blockquote {
  border-left: 2px solid var(--accent-green);
  background: rgba(74, 222, 128, 0.04);
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

blockquote strong {
  color: var(--accent-green);
}

/* === LISTS === */
ul, ol {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.83rem;
}

li { margin-bottom: 0.35rem; }
li::marker { color: var(--accent-green-dim); }

/* === TABLES === */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

thead {
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-glow);
}

th {
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: var(--accent-cyan);
  padding: 0.7rem 1rem;
  text-align: left;
  letter-spacing: 0.05em;
}

td {
  padding: 0.6rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(74, 222, 128, 0.02); }

/* === CARDS === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-smooth);
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-green);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 0.6rem;
  display: block;
}

.card h3 {
  font-size: 0.85rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card p {
  font-size: 0.78rem;
  margin: 0;
  color: var(--text-muted);
}

/* === COMPATIBILITY TABLE === */
.compat-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

.badge-ok {
  background: rgba(74, 222, 128, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.badge-warn {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-info {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

/* === STEPS === */
.steps { counter-reset: step; list-style: none; padding: 0; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
}

.steps li::before {
  content: '0' counter(step);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--accent-green);
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  line-height: 1;
}

.steps li strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

/* === ALERT / CALLOUT === */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  font-size: 0.8rem;
  border: 1px solid;
}

.alert-info {
  background: rgba(34, 211, 238, 0.05);
  border-color: rgba(34, 211, 238, 0.2);
  color: var(--accent-cyan);
}

.alert-warn {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
}

.alert-success {
  background: rgba(74, 222, 128, 0.05);
  border-color: rgba(74, 222, 128, 0.2);
  color: var(--accent-green);
}

/* === FAQ === */
.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.6rem;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-glow);
}

.faq-q {
  width: 100%;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 500;
  padding: 0.9rem 1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition-fast);
}

.faq-q:hover { background: var(--bg-card-hover); }

.faq-arrow {
  font-size: 0.7rem;
  color: var(--accent-green);
  transition: transform var(--transition-smooth);
  flex-shrink: 0;
}

.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth), padding var(--transition-smooth);
  background: var(--bg-root);
}

.faq-item.open .faq-a {
  max-height: 500px;
  padding: 0 1rem 0.9rem;
}

.faq-a p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

/* === FOOTER === */
.site-footer {
  padding: 1.5rem 2.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-footer a {
  color: var(--text-secondary);
  border-bottom: 1px dotted var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.visible {
    display: block;
  }

  .mobile-header {
    display: flex;
  }

  .main {
    margin-left: 0;
    padding-top: var(--header-height);
  }

  .hero {
    padding: 2rem 1.25rem 1.5rem;
  }

  .hero h1 {
    font-size: 0.9rem;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 1rem 1.25rem;
  }

  .page {
    padding: 1.5rem 1.25rem 2.5rem;
  }

  .page-header {
    padding: 1.5rem 1.25rem 0;
  }

  .page-header h1 {
    font-size: 0.8rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }

  h2 {
    font-size: 0.65rem;
  }

  pre {
    font-size: 0.7rem;
  }

  .sidebar-lang {
    padding: 0.5rem 1rem;
  }

  .lang-btn {
    font-size: 0.5rem;
    padding: 4px 0;
  }
}
