/* ===== DARK CHARCOAL THEME ===== */

/* Dark mode palette */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #1a1a2e;
  --md-primary-bg-color: #e8e8e8;
  --md-accent-fg-color: #6c63ff;
  --md-default-bg-color: #121212;
  --md-default-fg-color: #e0e0e0;
  --md-default-fg-color--light: #b0b0b0;
  --md-default-fg-color--lighter: #808080;
  --md-default-fg-color--lightest: rgba(255,255,255,0.07);
  --md-code-bg-color: #1e1e1e;
  --md-code-fg-color: #e0e0e0;
  --md-typeset-a-color: #6c63ff;
}

/* Light mode palette */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #1a1a2e;
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: #6c63ff;
  --md-typeset-a-color: #5a52d5;
}

/* Header bar — matte dark */
.md-header {
  background: #1a1a2e;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

/* Tabs bar */
.md-tabs {
  background: #16162a;
}

/* Sidebar */
[data-md-color-scheme="slate"] .md-sidebar {
  background: #121212;
}

/* ===== TABLES ===== */

/* Full width tables */
.md-typeset table:not([class]) {
  width: 100%;
  display: table;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Kill the horizontal scroll wrapper */
.md-typeset__scrollwrap {
  overflow: visible !important;
}
.md-typeset__table {
  overflow: visible !important;
  max-width: 100%;
}

/* Word wrap in cells instead of scrolling */
.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Distinct header row */
.md-typeset table:not([class]) thead th {
  background: rgba(108, 99, 255, 0.12);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(108, 99, 255, 0.3);
  color: var(--md-default-fg-color--light);
}

/* Table cells */
.md-typeset table:not([class]) td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* Subtle row hover */
.md-typeset table:not([class]) tbody tr:hover {
  background: rgba(108, 99, 255, 0.04);
}

/* Fixed icon column */
.md-typeset table:not([class]) td:first-child,
.md-typeset table:not([class]) th:first-child {
  width: 60px;
  text-align: center;
}

/* Crisp pixel art */
.md-typeset table img {
  image-rendering: pixelated;
}

/* ===== CENTERED IMAGES ===== */

.img-center {
  text-align: center;
  margin: 1.5rem 0;
}
.img-center img {
  border-radius: 0.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* ===== BUTTONS ===== */

.md-typeset .md-button {
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid #6c63ff;
  color: #6c63ff;
}
.md-typeset .md-button:hover {
  background: rgba(108, 99, 255, 0.1);
  border-color: #6c63ff;
  color: #6c63ff;
}
.md-typeset .md-button--primary {
  background: #6c63ff;
  border-color: #6c63ff;
  color: #fff;
}
.md-typeset .md-button--primary:hover {
  background: #5a52d5;
  border-color: #5a52d5;
  color: #fff;
}

/* ===== FOOTER ===== */

.md-footer {
  background: #1a1a2e;
}

/* ===== SEARCH ===== */

[data-md-color-scheme="slate"] .md-search__input {
  background: rgba(255,255,255,0.06);
}
