/* scratch-sync - Minimal styling inspired by rustup.rs */
/* Dark theme only */

:root {
  --bg: #0d1117;
  --bg-code: #161b22;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-code: #e6e6e6;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
  --border: #30363d;
  --success: #3fb950;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

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

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 { font-size: 2.5rem; margin-top: 0; }
h2 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

.tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Navigation */
nav {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

nav a {
  margin-right: 1.5rem;
  font-weight: 500;
}

/* Code blocks */
pre {
  background: var(--bg-code);
  color: var(--text-code);
  padding: 1rem 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1rem 0;
  position: relative;
}

code {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.9rem;
}

p code, li code {
  background: var(--bg-code);
  color: var(--text-code);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Copy button */
.code-block {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--text-code);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.copy-btn:hover {
  opacity: 1;
  background: rgba(255,255,255,0.2);
}

.copy-btn.copied {
  color: var(--success);
}

/* Platform tabs */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
}

.tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-bottom: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: 6px 6px 0 0;
  margin-right: -1px;
}

.tab.active {
  background: var(--bg-code);
  color: var(--text-code);
  border-color: var(--bg-code);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content pre {
  margin-top: 0;
  border-radius: 0 6px 6px 6px;
}

/* Steps list */
.steps {
  list-style: none;
  counter-reset: step;
}

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

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.feature h3 {
  margin-top: 0;
  font-size: 1rem;
}

.feature p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  margin-right: 1.5rem;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
}

/* Warning/Note boxes */
.note {
  background: rgba(9, 105, 218, 0.1);
  border-left: 4px solid var(--accent);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
}

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

/* Diagram */
.diagram {
  background: var(--bg-code);
  color: var(--text-code);
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: pre;
  margin: 1rem 0;
}
