:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: #e0e0e0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --link: #2563eb;
}

[data-theme="dark"] {
  --bg: #282c34;
  --bg-alt: #21252b;
  --text: #abb2bf;
  --text-muted: #8895a7;
  --border: #3e4451;
  --accent: #61afef;
  --accent-hover: #82c0f5;
  --link: #61afef;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  transition: background 0.2s, color 0.2s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

code {
  background: var(--bg-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: "Fira Code", "Cascadia Code", monospace;
}

pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875em;
}

/* 코드블록 복사 버튼 */
.code-wrapper {
  position: relative;
}
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #aaa;
  font-size: 0.80rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  font-family: inherit;
  line-height: 1.4;
}
.code-wrapper:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
.copy-btn.copied { color: #4ade80; }
