:root {
  --bg-main: #09090b;
  --bg-sidebar: #0c0c0e;
  --bg-card: #121215;
  --bg-code: #16161a;
  
  --border-color: #27272a;
  --border-focus: #3f3f46;

  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  --accent-rgb: 255, 255, 255;
  --accent: #ffffff;
  
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', monospace;

  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
}

.brand {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: var(--border-color);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 0 16px;
  overflow-y: auto;
}

.nav-group {
  margin-bottom: 24px;
}

.nav-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 8px;
  padding-left: 8px;
}

.nav-item {
  display: block;
  padding: 6px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 500;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-lang {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  transition: border-color 0.15s ease;
}

.btn-lang:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
}

.lang-code {
  font-family: var(--font-mono);
  font-weight: 600;
}

.github-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 4px 12px;
  transition: color 0.15s ease;
}

.github-link:hover {
  color: var(--text-main);
}

/* Content Area */
.content {
  margin-left: var(--sidebar-width);
  flex: 1;
  max-width: 820px;
  padding: 60px 48px;
}

.doc-section {
  margin-bottom: 80px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero-lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 28px 0 12px 0;
}

.body-text {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.caption-text {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 8px;
}

/* Grid & Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
}

.feature-header {
  margin-bottom: 8px;
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 4px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Callouts */
.callout {
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.callout-label {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.callout.info .callout-label { color: #60a5fa; }
.callout.warning .callout-label { color: #facc15; }

.callout p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Lists */
.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.spec-list li {
  padding-left: 16px;
  border-left: 2px solid var(--border-color);
  color: var(--text-muted);
}

.spec-list strong {
  color: var(--text-main);
  display: block;
}

/* Config Grid */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.config-box {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
}

.config-box h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.config-box p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Prompts */
.prompt-examples {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.prompt-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 6px;
}

.prompt-card p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Code Blocks */
.code-wrapper {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 12px 0;
  overflow: hidden;
}

.code-wrapper pre {
  padding: 16px;
  overflow-x: auto;
}

.code-wrapper code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #e4e4e7;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

/* Footer */
.footer {
  margin-top: 100px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive UI */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .content {
    margin-left: 0;
    padding: 32px 20px;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }
}