:root {
  --bg: #0a0a0a;
  --bg-2: #121212;
  --panel: #181818;
  --panel-hover: #1f1f1f;
  --accent: #ffffff;
  --text: #e5e5e5;
  --text-muted: #a0a0a0;
  --text-dark: #666666;
  --border: #2a2a2a;
  --border-light: #333333;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
  --radius: 12px;
  --max-width: 1200px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Inter",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #333;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.8;
  transition: 0.2s ease;
}

.copy-btn:hover {
  opacity: 1;
}

.pre-wrapper {
  position: relative;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #333;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
}

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

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 32px 100px;
}

/* Hero Section */
.hero {
  margin-bottom: 80px;
  padding: 60px 48px;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--panel) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.btn.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn.primary:hover {
  background: var(--text);
}

/* Sections */
section {
  margin-bottom: 80px;
}

h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-title {
  position: relative;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.section-lead {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 32px;
  max-width: 800px;
}

/* Flow Diagram */
.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.step {
  position: relative;
  padding: 24px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.step:hover {
  background: var(--panel-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
}

.step strong {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Badges */
.badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.badge {
  padding: 8px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.panel:hover {
  background: var(--panel-hover);
  border-color: var(--border-light);
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent);
}

.panel p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.list-compact {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}

.list-compact li {
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.list-compact li::before {
  content: "→";
  margin-right: 8px;
  color: var(--text-dark);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  color: var(--text-muted);
  font-size: 15px;
}

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

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-gap {
  margin-top: 32px;
}

/* Code Blocks */
pre,
code {
  font-family: "Fira Code", "Courier New", monospace;
  font-size: 14px;
}

code {
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text);
  font-weight: 500;
}

pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin-top: 16px;
  line-height: 1.6;
}

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

/* Footer */
.footer {
  margin-top: 120px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dark);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .shell {
    padding: 40px 20px 60px;
  }

  .hero {
    padding: 40px 28px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-sub {
    font-size: 16px;
  }

  .cta-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .flow {
    grid-template-columns: 1fr;
  }

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

  h2 {
    font-size: 28px;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}
