:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent2: #3fb950;
  --accent3: #d2a8ff;
  --code-bg: #1c2128;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
.hero {
  text-align: center;
  padding: 5rem 2rem 4rem;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1a1e2e 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}
.container { max-width: 900px; margin: 0 auto; padding: 3rem 2rem; }

.section { margin-bottom: 4rem; }
.section h2 {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section h3 {
  font-size: 1.3rem;
  color: var(--accent3);
  margin: 1.5rem 0 0.7rem;
}
.section p { color: var(--text-muted); margin-bottom: 1rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card h4 {
  color: var(--accent2);
  margin-bottom: 0.5rem;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  overflow-x: auto;
  font-size: 0.9rem;
  margin: 1rem 0;
}
code {
  font-family: 'Fira Code', 'Cascadia Code', Consolas, monospace;
  color: var(--text);
}
.inline-code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.85em;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
th, td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
}
td { color: var(--text-muted); }

.step-list { counter-reset: steps; list-style: none; padding: 0; }
.step-list li {
  counter-increment: steps;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
}
.step-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.tip {
  background: rgba(63,185,80,0.1);
  border-left: 3px solid var(--accent2);
  padding: 1rem 1.2rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
  color: var(--text-muted);
}
.tip strong { color: var(--accent2); }

.warn {
  background: rgba(210,153,34,0.1);
  border-left: 3px solid #d29922;
  padding: 1rem 1.2rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
  color: var(--text-muted);
}

.book-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.1s;
}
.book-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.book-link h3 { color: var(--accent); margin-bottom: 0.3rem; }
.book-link p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }
.book-link .author { color: var(--accent3); font-size: 0.85rem; }

.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.back-link:hover { text-decoration: underline; }

footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer a { color: var(--accent); text-decoration: none; }
