:root,
[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f6f8fa;
  --surface-hover: #eaeef2;
  --border: #d1d9e0;
  --text: #1f2328;
  --text-muted: #656d76;
  --primary: #0969da;
  --primary-subtle: #ddf4ff;
  --danger: #cf222e;
  --success: #1a7f37;
  --warning: #9a6700;
  --code-bg: #f6f8fa;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-hover: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --primary: #58a6ff;
  --primary-subtle: #0d1117;
  --danger: #f85149;
  --success: #3fb950;
  --warning: #d29922;
  --code-bg: #161b22;
  color-scheme: dark;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s;
}

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

/* Main */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
  width: 100%;
}

footer {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
}

.btn-secondary:hover { background: var(--surface-hover); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Paste view */
.paste-view .paste-header { margin-bottom: 1.5rem; }
.paste-header h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }

.paste-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.paste-actions { display: flex; gap: 0.5rem; }

.burn-badge {
  background: var(--danger);
  color: #fff;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.e2ee-badge {
  background: var(--success);
  color: #fff;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.paste-content {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

.paste-content pre { margin: 0; font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.5; }
.paste-content code { font-family: var(--font-mono); font-size: 0.875rem; }

/* Error page */
.error-page { text-align: center; padding: 4rem 1rem; }
.error-page h1 { font-size: 2rem; margin-bottom: 1rem; }
.error-page p { color: var(--text-muted); margin-bottom: 2rem; }
.error { color: var(--danger); }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; }

.admin-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.admin-sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 4px;
  margin-bottom: 0.25rem;
}

.admin-sidebar a:hover,
.admin-sidebar a.active { color: var(--text); background: var(--surface-hover); }

.admin-content { min-width: 0; }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 500; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.875rem; }

/* Landing page */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero h1 span { color: var(--primary); }

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.15s;
}

.feature-card:hover { border-color: var(--primary); }

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.cli-section {
  margin: 3rem 0;
  text-align: center;
}

.cli-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cli-section > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.cli-demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
  overflow-x: auto;
}

.cli-demo pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text);
}

.cli-demo .cli-comment { color: var(--text-muted); }
.cli-demo .cli-cmd { color: var(--primary); }

.cta-section {
  text-align: center;
  padding: 3rem 1rem;
  margin: 2rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.cta-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cta-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
