/* GameMint Docs - Shared Styles */
:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-sidebar: #0e0e16;
  --border: #1e1e2e;
  --text: #e0e0e8;
  --text-muted: #8888a0;
  --text-heading: #ffffff;
  --accent: #a78bfa;
  --accent-dim: #7c5cbf;
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --code-bg: #1a1a2e;
  --sidebar-width: 260px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 2rem 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 10;
}

.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-logo a {
  color: var(--text-heading);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-logo span {
  color: var(--accent);
}

.sidebar-logo .subtitle {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 400;
  margin-top: 0.25rem;
  letter-spacing: 0;
}

/* Audience navigation */
.sidebar-audience {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.sidebar-audience a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.15rem;
  transition: all 0.15s;
}

.sidebar-audience a:hover {
  color: var(--text);
  background: rgba(167, 139, 250, 0.08);
}

.sidebar-audience a.active {
  color: var(--accent);
  background: rgba(167, 139, 250, 0.12);
  font-weight: 500;
}

/* Section links */
.sidebar-sections {
  padding: 0.5rem 1.5rem;
}

.sidebar-sections .section-label {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 0.75rem 0.35rem;
}

.sidebar-sections a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  transition: all 0.15s;
}

.sidebar-sections a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-sections a.active {
  color: var(--accent);
}

/* Main content */
.content {
  margin-left: var(--sidebar-width);
  flex: 1;
  max-width: 780px;
  padding: 3rem 3rem 6rem;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

h1 .badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(167, 139, 250, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

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

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

strong {
  color: var(--text-heading);
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Callout boxes */
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.callout.highlight {
  border-left: 3px solid var(--accent);
}

.callout.success {
  border-left: 3px solid var(--green);
}

.callout.warning {
  border-left: 3px solid var(--yellow);
}

.callout-title {
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Flow diagrams */
.flow {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre;
  color: var(--text-muted);
}

.flow .highlight {
  color: var(--accent);
  font-weight: 500;
}

.flow .green {
  color: var(--green);
}

.flow .red {
  color: var(--red);
}

.flow .yellow {
  color: var(--yellow);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.88rem;
}

th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

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

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

/* Code */
code {
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  color: var(--accent);
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

/* Stat cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .content {
    margin-left: 0;
    padding: 2rem 1.5rem 4rem;
  }
}

/* Mobile nav toggle */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  z-index: 20;
}

@media (max-width: 900px) {
  .mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .content {
    padding-top: 4rem;
  }
}

/* Scroll spy active state */
.sidebar-sections a.current {
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.04);
}
