/* SacCodex — Dark gaming theme inspired by Prydwen */

/* ===== DARK MODE (default) ===== */
[data-md-color-scheme="slate"] {
  /* Deep dark background like Prydwen */
  --md-default-bg-color: #0d1117;
  --md-default-bg-color--light: #151b23;
  --md-default-bg-color--lighter: #1c2333;
  --md-default-bg-color--lightest: #242d3d;

  /* Brighter text for contrast */
  --md-default-fg-color: #e2e8f0;
  --md-default-fg-color--light: #a0aec0;
  --md-default-fg-color--lighter: #718096;
  --md-default-fg-color--lightest: #4a5568;

  /* Teal/cyan accent — pops on dark */
  --md-accent-fg-color: #22d3ee;
  --md-primary-fg-color: #0f172a;
  --md-primary-bg-color: #e2e8f0;

  /* Code blocks */
  --md-code-bg-color: #161b22;
  --md-code-fg-color: #e2e8f0;

  /* Typeset links */
  --md-typeset-a-color: #22d3ee;
}

/* Header — very dark, subtle */
[data-md-color-scheme="slate"] .md-header {
  background-color: #0a0e14;
  border-bottom: 1px solid rgba(34, 211, 238, 0.15);
}

/* Tabs bar */
[data-md-color-scheme="slate"] .md-tabs {
  background-color: #0d1117;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Active tab highlight */
[data-md-color-scheme="slate"] .md-tabs__link--active {
  color: #22d3ee !important;
  border-bottom: 2px solid #22d3ee;
}

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

[data-md-color-scheme="slate"] .md-nav__link:hover {
  color: #22d3ee;
}

[data-md-color-scheme="slate"] .md-nav__link--active {
  color: #22d3ee !important;
  font-weight: 600;
}

/* Cards / admonitions — subtle glass effect */
[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  background-color: #151b23;
  border-left: 3px solid;
  border-radius: 6px;
}

/* Tables */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  background-color: #151b23;
  border-radius: 6px;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: #1c2333;
  color: #22d3ee;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover td {
  background-color: rgba(34, 211, 238, 0.05);
}

/* Search bar */
[data-md-color-scheme="slate"] .md-search__input {
  background-color: #151b23;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-md-color-scheme="slate"] .md-search__input:focus {
  border-color: #22d3ee;
}

/* Footer */
[data-md-color-scheme="slate"] .md-footer {
  background-color: #0a0e14;
  border-top: 1px solid rgba(34, 211, 238, 0.1);
}

/* Scrollbar styling */
[data-md-color-scheme="slate"] ::-webkit-scrollbar {
  width: 8px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-track {
  background: #0d1117;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background: #1c2333;
  border-radius: 4px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
  background: #22d3ee;
}

/* H1 headings — slight accent */
[data-md-color-scheme="slate"] .md-typeset h1 {
  color: #f1f5f9;
  font-weight: 700;
}

/* H2 — subtle teal tint */
[data-md-color-scheme="slate"] .md-typeset h2 {
  color: #cbd5e1;
  border-bottom: 1px solid rgba(34, 211, 238, 0.15);
  padding-bottom: 0.3em;
}

/* Inline code */
[data-md-color-scheme="slate"] .md-typeset code {
  background-color: #1c2333;
  color: #22d3ee;
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

/* ===== LIGHT MODE ===== */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #1e293b;
  --md-primary-bg-color: #f8fafc;
  --md-accent-fg-color: #0891b2;
  --md-default-bg-color: #f8fafc;
}

[data-md-color-scheme="default"] .md-header {
  background-color: #1e293b;
}

[data-md-color-scheme="default"] .md-tabs {
  background-color: #1e293b;
}

/* ===== Countdown widget ===== */
.sd-countdown {
  margin: 1.5em auto;
  padding: 1.4em 1em;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.07), rgba(34, 211, 238, 0.02));
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 10px;
  text-align: center;
  max-width: 640px;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.05);
}

.sd-countdown__heading {
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #22d3ee;
  margin-bottom: 0.9em;
  font-weight: 600;
}

.sd-countdown__time {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.2em;
  flex-wrap: wrap;
}

.sd-countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
}

.sd-countdown__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.2em;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sd-countdown__label {
  font-size: 0.68em;
  text-transform: uppercase;
  color: #718096;
  margin-top: 0.4em;
  letter-spacing: 0.1em;
}

.sd-countdown--done .sd-countdown__time {
  display: block;
  font-size: 1.4em;
  color: #22d3ee;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Light mode */
[data-md-color-scheme="default"] .sd-countdown {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.06), rgba(8, 145, 178, 0.01));
  border-color: rgba(8, 145, 178, 0.3);
  box-shadow: 0 0 24px rgba(8, 145, 178, 0.05);
}

[data-md-color-scheme="default"] .sd-countdown__heading,
[data-md-color-scheme="default"] .sd-countdown--done .sd-countdown__time {
  color: #0891b2;
}

[data-md-color-scheme="default"] .sd-countdown__num {
  color: #1e293b;
}
