/* bitcoin.cc Theme System
   Light: warm, paper-like (inspired by nip98.com)
   Dark: GitHub-style dark with Bitcoin orange accent
*/

:root {
  --bg: #fafaf8;
  --bg-card: #f5f4f0;
  --bg-code: #f0efeb;
  --bg-hover: #eae8e3;
  --text: #2c2c2c;
  --text-secondary: #444;
  --text-dim: #666;
  --text-faint: #999;
  --accent: #f7931a;
  --accent-subtle: rgba(247, 147, 26, 0.08);
  --accent-border: rgba(247, 147, 26, 0.2);
  --link: #1a5276;
  --border: #ddd;
  --border-subtle: #eee;
  --success: #2d8a4e;
  --error: #c0392b;
  --warning: #b8860b;
  --code-text: #555;
  --raw-text: #2d6a4f;
  --badge-text: #fff;
  --font: Georgia, 'Times New Roman', serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Courier New', monospace;
  --radius: 4px;
  --line-height: 1.7;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-code: #0d1117;
  --bg-hover: #1c2028;
  --text: #e6edf3;
  --text-secondary: #c9d1d9;
  --text-dim: #8b949e;
  --text-faint: #484f58;
  --link: #58a6ff;
  --border: #30363d;
  --border-subtle: #21262d;
  --success: #3fb950;
  --error: #f85149;
  --warning: #d29922;
  --code-text: #c9d1d9;
  --raw-text: #7ee787;
  --badge-text: #0d1117;
  --radius: 6px;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 2rem;
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 900px; margin: 0 auto; }

header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

h1 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

h1 span { color: var(--accent); }
.header-left a { text-decoration: none; color: inherit; }
.tagline { color: var(--text-dim); font-size: 0.9rem; }

nav { display: flex; align-items: center; flex-wrap: wrap; }

nav a {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
}

nav a:hover { color: var(--text); }
nav a.active { color: var(--accent); }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-left: 1.5rem;
  line-height: 1;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

[data-theme="dark"] .theme-toggle .theme-light { display: inline; }
[data-theme="dark"] .theme-toggle .theme-dark { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .theme-light { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .theme-dark { display: inline; }

.intro {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.intro strong { color: var(--accent); }
.intro p { margin-bottom: 0.75rem; }
.intro p:last-child { margin-bottom: 0; }
.intro a { color: var(--link); text-decoration: none; }
.intro a:hover { text-decoration: underline; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--bg-code);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--code-text);
}

.highlight { color: var(--accent); }

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
}

footer a { color: var(--text-dim); text-decoration: none; }
footer a:hover { color: var(--text); }

.loading { text-align: center; padding: 3rem; color: var(--text-dim); }
