:root {
  --bg: #0b1220;
  --panel: #111a2b;
  --panel-2: #162238;
  --text: #e5edf7;
  --muted: #98a7bd;
  --border: #24324a;
  --link: #8ec5ff;
  --link-hover: #c2e0ff;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #08101c 0%, #0b1220 100%);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  padding: 32px 16px;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
}

.topbar {
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.muted {
  color: var(--muted);
  margin: 4px 0 0;
}

.folder-doc,
.listing-card {
  background: rgba(17, 26, 43, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.folder-doc {
  padding: 22px;
  margin-bottom: 18px;
}

.folder-doc h1,
.folder-doc h2,
.folder-doc h3 {
  margin-top: 0;
}

.folder-doc code,
.folder-doc pre {
  background: var(--panel-2);
  border-radius: 8px;
}

.listing-card {
  padding: 18px;
  overflow-x: auto;
}

/* fancyindex-generated markup */
.listing-card table {
  width: 100%;
  border-collapse: collapse;
}

.listing-card th,
.listing-card td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.listing-card th {
  color: var(--muted);
  font-weight: 600;
}

.listing-card tr:hover td {
  background: rgba(255,255,255,0.02);
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}



/* Markdown tables */
.folder-doc table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
  border: 1px solid #30363d;
  border-radius: 10px;
  overflow: hidden;
  background: #0d1117;
}

/* Header */
.folder-doc th {
  background: #161b22;
  color: #c9d1d9;
  text-align: left;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid #30363d;
}

/* Cells */
.folder-doc td {
  padding: 10px 12px;
  border-bottom: 1px solid #21262d;
}

/* 🔥 Vertical borders */
.folder-doc th:not(:last-child),
.folder-doc td:not(:last-child) {
  border-right: 1px solid #30363d;
}

/* Remove last row bottom border */
.folder-doc tr:last-child td {
  border-bottom: none;
}

/* Zebra striping */
.folder-doc tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

/* Hover */
.folder-doc tr:hover td {
  background: rgba(110, 118, 129, 0.1);
}

/* Rounded corners fix */
.folder-doc th:first-child {
  border-top-left-radius: 10px;
}

.folder-doc th:last-child {
  border-top-right-radius: 10px;
}


/* Replace "Parent directory" with ".." */
a[href="../"] {
  font-size: 0; /* hide original text */
}
a[href="../"]::before {
  content: "..";
  font-size: 15px;
}

/* Folders */
a[href$="/"] {
  color: #79c0ff;
  font-weight: 600;
}
/* Files */
a:not([href$="/"]) {
  color: #c9d1d9;
}
