:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
}

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

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

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 28px;
  background-image: url("/logo.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.back-link {
  color: var(--text-muted);
  font-size: 14px;
}

.back-link:hover {
  color: var(--text);
}

/* Content */
.content {
  padding: 48px 0 80px;
}

h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.notice {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Table of Contents */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 48px;
}

.toc-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.toc-list a {
  color: var(--text-muted);
  font-size: 14px;
}

.toc-list a:hover {
  color: var(--accent);
}

/* Sections */
section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}

p {
  margin-bottom: 16px;
  font-size: 16px;
}

ul {
  margin: 16px 0 16px 24px;
}

li {
  margin-bottom: 8px;
  font-size: 16px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-link:hover {
  color: var(--text);
}

.copyright {
  color: var(--text-muted);
  font-size: 14px;
}

/* Language Selector */
.lang-selector {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-select {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
}

.lang-select:focus {
  outline: none;
  border-color: var(--accent);
}

.lang-option {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  font-weight: 500;
}

.lang-option:hover {
  color: var(--text);
  background: var(--surface);
}

.lang-option.active {
  color: var(--accent);
  background: var(--surface);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }

  .toc-list {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
