/* Shared styles for docs.dtwhk.com */
:root {
  --primary: #6406D4;
  --bg: #f6f8fa;
  --border: #d0d7de;
  --text: #1f2328;
  --accent: #6406D4;
  --accent-light: #f3eaff;
  --accent-hover: #5305b0;
  --card-bg: #ffffff;
  --muted: #57606a;
  --warning-bg: #fff8c5;
  --warning-border: #d4a72c;
  --info-bg: #f3eaff;
  --info-border: #6406D4;
  --code-bg: #1b1f23;
  --code-text: #e6edf3;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* Header (auto-generated by lang.js) */
.header {
  background: linear-gradient(135deg, #1a0a3e 0%, #0d0620 100%);
  color: white;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-home {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.header-home:hover { opacity: 0.75; }

/* Page title with breadcrumb (guide pages) */
.page-title {
  margin-bottom: 1.5rem;
}
.page-title .breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.page-title .breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.page-title .breadcrumb a:hover {
  color: var(--accent);
}
.page-title .breadcrumb .sep {
  margin: 0 0.4rem;
  opacity: 0.5;
}
.page-title h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Language globe dropdown */
.lang-globe {
  position: relative;
  flex-shrink: 0;
}
.lang-globe-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lang-globe-btn:hover { background: rgba(255,255,255,0.2); }
.lang-globe-btn svg { width: 18px; height: 18px; }
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a0a3e;
  border: 1px solid #3d1a6e;
  border-radius: 8px;
  padding: 0.35rem 0;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 100;
}
.lang-globe.open .lang-dropdown { display: block; }
.lang-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #adbac7;
  padding: 0.45rem 1rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.lang-btn:hover { background: rgba(255,255,255,0.08); color: white; }
.lang-btn.active { color: var(--accent); font-weight: 600; }

/* Step cards */
.step {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.5rem 0;
  margin-bottom: 1rem;
}
.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}
.step-body {
  padding: 0 1.5rem 1.5rem;
}
.step-body p { margin-bottom: 0.75rem; }
.step-body p:last-child { margin-bottom: 0; }

/* Warning box */
.warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.warning strong { color: #9a6700; }
.warning .icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 1px;
}

/* Info box */
.info {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}
.info strong { color: var(--accent); }

/* Illustration */
.illustration {
  margin: 1rem 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f8f9fc;
}
.illustration svg {
  width: 100%;
  height: auto;
  display: block;
}
.illustration-caption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.5rem 0 0;
  font-style: italic;
}

/* URL block */
.url-block {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #eff1f3;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  word-break: break-all;
  margin: 0.5rem 0;
}
.url-block a { color: inherit; text-decoration: none; }
.url-block a:hover { text-decoration: underline; }

/* Code blocks */
pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1rem 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
}
pre .prompt { color: #c4a5ff; user-select: none; }
pre .comment { color: #8b949e; }
pre .output { color: #9ca3af; }
code {
  background: #eff1f3;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* Done section */
.done {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.done .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.done .check svg { width: 28px; height: 28px; color: var(--accent); }
.done h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.done p { color: var(--muted); font-size: 0.95rem; }
.done a { color: var(--accent); }

/* Tab navigation */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  background: none;
  border: none;
  padding: 0.7rem 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #57606a;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1;
}
.tab-btn:hover { color: var(--text); background: rgba(0,0,0,0.03); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.tab-num {
  background: #d0d7de;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.tab-btn.active .tab-num { background: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Step inside tab (attached to tab bar) */
.tab-content .step {
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-bottom: 0;
}

/* Nav buttons (prev/next inside tabs) */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 0 1.5rem 1.5rem;
}
.nav-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.nav-btn:hover { background: var(--accent-hover); }
.nav-btn:disabled { background: #d0d7de; cursor: not-allowed; }
.nav-btn.prev { background: #6e7781; }
.nav-btn.prev:hover { background: #57606a; }

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
  .header { padding: 0.5rem 1rem; }
  .page-title h1 { font-size: 1.25rem; }
  .container { padding: 1.5rem 1rem; }
  .step-body { padding: 0 1rem 1rem; }
  .step-header { padding: 1rem 1rem 0; }
  .tab-btn { padding: 0.6rem 0.7rem; font-size: 0.8rem; }
}
