/* ============================================================
   STARCAGE WIKI — Custom Theme
   Blue-focused, clean, with subtle atmospheric details
   ============================================================ */

/* Google Fonts — Rajdhani for headings, Inter for body */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@300;400;500&display=swap');

/* ── Colour overrides ───────────────────────────────────────── */
[data-md-color-scheme="slate"] {
  /* Primary blues */
  --md-primary-fg-color:        #1565c0;
  --md-primary-fg-color--light: #1e88e5;
  --md-primary-fg-color--dark:  #0d47a1;
  --md-accent-fg-color:         #42a5f5;

  /* Background layers */
  --md-default-bg-color:        #0d1117;
  --md-default-fg-color:        #e0e6f0;
  --md-default-fg-color--light: #8fa4c0;
  --md-default-fg-color--lighter: #4a6080;

  /* Code blocks */
  --md-code-bg-color:           #111827;
  --md-code-fg-color:           #93c5fd;

  /* Sidebar */
  --md-nav-item-fg-color--active: #42a5f5;

  /* Footer */
  --md-footer-bg-color:         #090d13;
  --md-footer-bg-color--dark:   #060a0f;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color:        #1565c0;
  --md-primary-fg-color--light: #1e88e5;
  --md-primary-fg-color--dark:  #0d47a1;
  --md-accent-fg-color:         #1976d2;
  --md-default-bg-color:        #f5f8ff;
  --md-code-bg-color:           #eef2fb;
}

/* ── Typography ─────────────────────────────────────────────── */
:root {
  --md-text-font: "Inter", sans-serif;
  --md-code-font: "JetBrains Mono", "Fira Code", monospace;
}

/* Headings use Rajdhani */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.md-typeset h1 {
  font-size: 2.2em;
  font-weight: 700;
}

/* ── Header bar ─────────────────────────────────────────────── */
.md-header {
  background: linear-gradient(135deg, #0a1628 0%, #0d1f3c 50%, #0a1628 100%);
  border-bottom: 1px solid rgba(66, 165, 245, 0.2);
  box-shadow: 0 2px 20px rgba(21, 101, 192, 0.3);
}

/* Subtle shimmer on the header */
.md-header::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #42a5f5 30%,
    #1e88e5 50%,
    #42a5f5 70%,
    transparent 100%
  );
  opacity: 0.8;
}

/* Site title styling */
.md-header__title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.1em;
  letter-spacing: 0.05em;
}

/* ── Navigation tabs ────────────────────────────────────────── */
.md-tabs {
  background: rgba(10, 22, 40, 0.95);
  border-bottom: 1px solid rgba(66, 165, 245, 0.15);
}

.md-tabs__link {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 1.2em;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  opacity: 1;
  color: #42a5f5 !important;
}

.md-tabs__link--active::after {
  background: #42a5f5;
}

/* ── Sidebar ────────────────────────────────────────────────── */
[data-md-color-scheme="slate"] .md-sidebar {
  background: #0a1120;
  border-right: 1px solid rgba(66, 165, 245, 0.08);
}

.md-nav__link--active {
  color: #42a5f5 !important;
  font-weight: 500;
}

/* Subtle left accent on active nav item */
.md-nav__item--active > .md-nav__link {
  border-left: 2px solid #42a5f5;
  padding-left: calc(var(--md-nav-item-padding-x) - 2px);
}

/* ── Content area ───────────────────────────────────────────── */
[data-md-color-scheme="slate"] .md-main {
  background: #0d1117;
}

/* Subtle grid texture on dark background */
[data-md-color-scheme="slate"] .md-content {
  background-image:
    linear-gradient(rgba(66, 165, 245, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 165, 245, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Headings with accent line ──────────────────────────────── */
.md-typeset h1 {
  border-bottom: 2px solid rgba(66, 165, 245, 0.3);
  padding-bottom: 0.3em;
  background: linear-gradient(135deg, #e0e6f0 0%, #42a5f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-md-color-scheme="default"] .md-typeset h1 {
  background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.md-typeset h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 0.9em;
  background: linear-gradient(180deg, #42a5f5, #1565c0);
  border-radius: 2px;
  margin-right: 0.5em;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ── Code blocks ────────────────────────────────────────────── */
[data-md-color-scheme="slate"] .md-typeset pre {
  border: 1px solid rgba(66, 165, 245, 0.15);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-md-color-scheme="slate"] .md-typeset code {
  color: #93c5fd;
  background: rgba(30, 50, 80, 0.6);
  border: 1px solid rgba(66, 165, 245, 0.15);
  border-radius: 3px;
  padding: 0.1em 0.35em;
}

/* ── Admonition callouts ────────────────────────────────────── */
[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  background: rgba(13, 25, 45, 0.8);
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* note callout — blue tint */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: #1e88e5;
}
.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  background: rgba(30, 136, 229, 0.15);
}

/* ── Tables ─────────────────────────────────────────────────── */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  border: 1px solid rgba(66, 165, 245, 0.15);
  border-radius: 6px;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: rgba(21, 101, 192, 0.25);
  color: #93c5fd;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.9em;
}

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

/* ── Buttons ────────────────────────────────────────────────── */
.md-typeset .md-button {
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.md-typeset .md-button--primary {
  background: linear-gradient(135deg, #1565c0, #1e88e5);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.4);
}

.md-typeset .md-button--primary:hover {
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  box-shadow: 0 4px 16px rgba(21, 101, 192, 0.5);
  transform: translateY(-1px);
}

/* ── Search bar ─────────────────────────────────────────────── */
[data-md-color-scheme="slate"] .md-search__form {
  background: rgba(30, 50, 80, 0.5);
  border: 1px solid rgba(66, 165, 245, 0.2);
  border-radius: 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-md-color-scheme="slate"] .md-search__form:focus-within {
  border-color: rgba(66, 165, 245, 0.5);
  box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.1);
}

/* ── Footer ─────────────────────────────────────────────────── */
.md-footer {
  border-top: 1px solid rgba(66, 165, 245, 0.15);
}

/* ── Scrollbar (webkit) ─────────────────────────────────────── */
[data-md-color-scheme="slate"] ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background: rgba(66, 165, 245, 0.3);
  border-radius: 3px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(66, 165, 245, 0.5);
}

/* ── Smooth page transitions ────────────────────────────────── */
.md-content {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Mod Cards ────────────────────────────────── */

.mod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.mod-card {
    display: flex;
    flex-direction: column;
    align-items: center;

    text-decoration: none;

    padding: 0.8rem;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            rgba(21, 101, 192, 0.18),
            rgba(30, 136, 229, 0.08)
        );

    border: 1px solid rgba(66, 165, 245, 0.15);

    backdrop-filter: blur(4px);

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.mod-card:hover {
    transform: translateY(-4px);

    border-color: rgba(66, 165, 245, 0.4);

    box-shadow:
        0 0 12px rgba(66, 165, 245, 0.15),
        0 4px 20px rgba(21, 101, 192, 0.2);
}

.mod-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;

    filter: drop-shadow(
        0 0 8px rgba(66,165,245,.25)
    );
}

.mod-name {
    margin-top: .6rem;

    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;

    color: #e0e6f0;

    text-align: center;
}

.mod-description {
    margin-top: .35rem;

    font-size: .8rem;

    color: var(--md-default-fg-color--light);

    text-align: center;
}