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

:root {
  --bg: #0d1117;
  --surface: 31353b;
  --border: #484c51;
  --border-light: #30363d;
  --text: #e6edf3;
  --muted: #b5b9c0;
  --accent: #58a6ff;
  --accent-dim: #1f4068;
  --green: #33e44b;
  --green-dim: #1a3a22;
  --orange: #d29922;
  --tag-bg: #21262d;
  --code-bg: #161b22;
  --main-width: 1100px;
  --mono: 'Helvetica', sans-serif;
  --sans: 'Helvetica', sans-serif;
  --code: 'Monaco', 'Courier', serif;
}

html {
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  padding: 1rem;
}

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

a:hover {
  text-decoration: underline;
}

a.github {
  text-decoration: none;
  font-weight: 700;
  display: flex
}

a.github:hover {
  text-decoration: underline;
}

a.github img {
  width: 17px;
  height: 16px;
  margin-top: 2px;
  margin-right: 3px
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: .5rem
}

code {
  border-radius: 10px;
  font-size: 12px;
  overflow: auto
}

p code {
  padding: 5px 8px
}

/* HEADER */
header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.header-inner {
  max-width: var(--main-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.header-logo .icon {
  width: 22px;
  height: 22px;
  fill: var(--muted);
}

.header-sep {
  color: var(--border-light);
  font-size: 18px;
}

.header-repo {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

#example-output {
  color: #fff;
  border-radius: 10px;
  display: inline-block;
}

#example-output * {
  font-size: .75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--sans);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: var(--surface);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}

.btn:hover {
  background: var(--border);
  text-decoration: none;
}

.btn-primary {
  background: #238636;
  border-color: #2ea043;
  color: #fff;
}

.btn-primary:hover {
  background: #2ea043;
}

/* HERO */
.hero {
  max-width: var(--main-width);
  margin: 0 auto;
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-title {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.5px;
}

.hero-title span {
  color: var(--accent);
}

.hero-desc {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
  max-width: 600px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  font-size: 12px;
  font-family: var(--mono);
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 20px;
  padding: 2px 10px;
  border: 1px solid rgba(88, 166, 255, 0.15);
}

.hero-meta {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.meta-item svg {
  width: 16px;
  height: 16px;
  fill: var(--muted);
}

.meta-item strong {
  color: var(--text);
}

/* LAYOUT */
.layout {
  max-width: var(--main-width);
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 991px) {
  .layout {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    order: -1;
  }
}

/* MAIN CONTENT */
main {
  max-width: 100%;
}

.content h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.content h2:first-child {
  margin-top: 0;
}

.content p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* CODE BLOCKS */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
  position: relative;
}

code {
  font-family: var(--code);
  font-size: 13px;
  color: #e6edf3;
  line-height: 1.7;
}

p code,
li code {
  background: var(--tag-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #e6edf3;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--border);
  border: 1px solid var(--border-light);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.copy-btn:hover {
  color: var(--text);
  background: var(--border-light);
}

.copy-btn.copied {
  color: var(--green);
}

/* SYNTAX HIGHLIGHT */
.kw {
  color: #ff7b72;
}

.fn {
  color: #d2a8ff;
}

.str {
  color: #a5d6ff;
}

.cm {
  color: #8b949e;
  font-style: italic;
}

.num {
  color: #79c0ff;
}

.prop {
  color: #e3b341;
}

/* TABLES */
.table-wrap {
  overflow: hidden;
  margin: 12px 0;
}

.table-wrap > div {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead tr {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

td code {
  background: var(--tag-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

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

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

/* BODY CLASS MODES */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

@media (max-width: 991px) {
  .mode-grid {
    display: flex;
    flex-direction: column;
  }
}

.mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.mode-card .mode-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.mode-card .mode-classes {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--green);
  line-height: 1.8;
}

.mode-card .mode-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* SIDEBAR */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.sidebar-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.sidebar-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.install-cmd {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.install-cmd span {
  color: var(--muted);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 12px;
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-links li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.sidebar-links li svg {
  width: 15px;
  height: 15px;
  fill: var(--muted);
  flex-shrink: 0;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

footer a {
  color: var(--muted);
}

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

