/* ===== Lumine Design System (Vercel-inspired) ===== */

:root {
  /* Background */
  --bg: #000000;
  --bg-card: #0a0a0a;
  --bg-hover: #111111;
  --bg-code: #0d0d0d;

  /* Border */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.12);

  /* Text */
  --text: #fafafa;
  --text-2: #a1a1a1;
  --text-3: #666666;

  /* Accent */
  --accent: #0070f3;
  --accent-hover: #3291ff;
  --accent-subtle: rgba(0, 112, 243, 0.12);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Roboto Mono', 'Consolas', monospace;

  /* Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;

  /* Transition */
  --transition: 0.15s ease;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --bg-card: #ffffff;
    --bg-hover: #f5f5f5;
    --bg-code: #f5f5f5;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.14);
    --border-strong: rgba(0, 0, 0, 0.12);
    --text: #171717;
    --text-2: #666666;
    --text-3: #999999;
    --accent: #0070f3;
    --accent-hover: #0761d1;
    --accent-subtle: rgba(0, 112, 243, 0.08);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

p {
  color: var(--text-2);
  line-height: 1.7;
}

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

a:hover {
  color: var(--text-2);
}

/* Inline code */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text);
}

pre code {
  background: none;
  padding: 0;
  border: none;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  overflow-x: auto;
}

/* Lists */
ul, ol {
  color: var(--text-2);
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

li strong {
  color: var(--text);
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* ===== Container ===== */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ===== Badge ===== */
.badge {
  display: inline-block;
  padding: 0.1em 0.5em;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-mono);
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: transparent;
  vertical-align: middle;
}

/* ===== Card ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color var(--transition);
}

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

.card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ===== Code Block (Terminal Style) ===== */
.code-block {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0.5rem 0 0.75rem;
  transition: border-color var(--transition);
}

.code-block:hover {
  border-color: var(--border-hover);
}

.code-block pre {
  padding: 0.85rem 1rem;
  margin: 0;
  background: none;
}

.code-block .copy-btn {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.code-block .copy-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.code-block .copy-btn.copied {
  color: #22c55e;
}

/* ===== Table ===== */
.table-wrapper {
  overflow-x: auto;
  margin: 0.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th {
  padding: 0.6rem 0.85rem;
  text-align: left;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--bg-hover);
}

/* ===== Prose (Legal/Content Pages) ===== */
.prose {
  max-width: 680px;
  line-height: 1.8;
  letter-spacing: 0.005em;
}

.prose h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose > p:first-of-type {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 2rem;
}

.prose h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
}

.prose h2:first-of-type {
  margin-top: 1.5rem;
}

.prose p {
  margin-bottom: 1rem;
  text-align: justify;
}

.prose ul {
  margin: 0.5rem 0 1rem 1.25rem;
}

.prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.prose a {
  color: var(--accent);
  transition: color var(--transition);
}

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

/* ===== Alert ===== */
.alert {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-3);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

.alert-header {
  margin-bottom: 0.5rem;
}

.alert li {
  color: var(--text-2);
}

/* ===== Button ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--text);
  color: var(--bg);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn:hover {
  opacity: 0.8;
  color: var(--bg);
}

/* ===== Note ===== */
.note {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-top: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-code);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.65rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1.25rem;
  }

  .prose {
    line-height: 1.75;
  }

  .prose h1 {
    font-size: 1.5rem;
  }

  .prose h2 {
    font-size: 1.05rem;
    margin-top: 2rem;
  }

  .prose p {
    text-align: left;
  }

  .code-block pre {
    padding: 0.75rem 0.85rem;
    font-size: 0.78rem;
  }

  th, td {
    padding: 0.5rem 0.65rem;
  }
}
