@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800&family=Rajdhani:wght@400;500;600;700&display=swap");

:root {
  --neon-primary: #9a3cff;
  --neon-secondary: #c05dff;
  --neon-highlight: #7ef9ff;
  --bg-fixed: #2a1552;
  --bg-deep: #07050f;
  --bg-surface: #130d24;
  --bg-surface-soft: rgba(22, 14, 43, 0.8);
  --border-neon: rgba(176, 90, 255, 0.45);
  --text-bright: #f2e9ff;
  --text-soft: #c8bddf;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--bg-fixed);
  --md-default-fg-color: var(--text-bright);
  --md-default-fg-color--light: var(--text-soft);
  --md-primary-fg-color: #7a2fe0;
  --md-primary-fg-color--light: #9854f5;
  --md-primary-fg-color--dark: #5a1fb0;
  --md-accent-fg-color: #ca79ff;
}

body {
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  background: var(--bg-fixed);
  animation: page-fade 0.7s ease-out;
}

body::before,
body::after {
  display: none;
}

.md-header {
  background: rgba(10, 8, 18, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-neon);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.md-header__topic,
.md-tabs__link,
.md-nav__title,
.md-nav__link,
.md-footer-meta,
.md-footer {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}

.md-tabs {
  background: rgba(18, 13, 31, 0.88);
  border-top: 1px solid rgba(146, 58, 255, 0.28);
}

.md-main {
  position: relative;
}

.md-content__inner {
  border: 1px solid var(--border-neon);
  background: linear-gradient(145deg, rgba(17, 11, 33, 0.78), rgba(10, 8, 21, 0.86));
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(212, 169, 255, 0.08) inset,
    0 24px 40px rgba(0, 0, 0, 0.44),
    0 0 42px rgba(138, 56, 240, 0.16);
  padding: 1.4rem 1.6rem;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  color: #edd9ff;
  text-shadow: 0 0 12px rgba(175, 106, 255, 0.3);
}

.md-typeset h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  line-height: 1.2;
  border-bottom: 1px solid rgba(167, 86, 255, 0.35);
  padding-bottom: 0.45rem;
  margin-bottom: 1rem;
}

.md-typeset p,
.md-typeset li,
.md-typeset td,
.md-typeset th {
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.md-typeset a {
  color: var(--neon-highlight);
  text-decoration-color: rgba(126, 249, 255, 0.4);
  text-underline-offset: 0.22em;
}

.md-typeset a:hover {
  color: #c9fbff;
  text-decoration-color: rgba(201, 251, 255, 0.8);
}

.md-typeset table:not([class]) {
  border: 1px solid rgba(165, 78, 255, 0.4);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(106, 47, 182, 0.3) inset;
}

.md-typeset table:not([class]) th {
  background: rgba(141, 60, 244, 0.2);
  color: #f1ddff;
}

.md-typeset table:not([class]) tr:nth-child(2n) {
  background: rgba(88, 39, 159, 0.16);
}

.md-typeset table:not([class]) tr:hover {
  background: rgba(107, 47, 197, 0.28);
}

.md-typeset .admonition,
.md-typeset details {
  border: 1px solid rgba(172, 87, 255, 0.45);
  background: rgba(28, 18, 54, 0.72);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.md-search__form {
  border: 1px solid rgba(157, 72, 248, 0.4);
  background: rgba(16, 12, 31, 0.84);
}

.md-search__input::placeholder {
  color: rgba(211, 192, 235, 0.7);
}

.md-sidebar--primary .md-nav,
.md-sidebar--secondary .md-nav {
  border: 1px solid rgba(146, 64, 237, 0.34);
  border-radius: 14px;
  background: rgba(16, 12, 31, 0.7);
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.34);
}

.md-nav__link--active,
.md-nav__link:focus,
.md-nav__link:hover {
  color: #f6ecff;
  text-shadow: 0 0 10px rgba(194, 120, 255, 0.35);
}

.md-top {
  background: rgba(134, 55, 229, 0.84);
  border: 1px solid rgba(212, 168, 255, 0.4);
}

.md-footer {
  background: linear-gradient(180deg, rgba(20, 13, 37, 0.88), rgba(10, 7, 19, 0.98));
  border-top: 1px solid rgba(161, 79, 245, 0.34);
}

.md-typeset > * {
  opacity: 0;
  transform: translateY(14px);
  animation: rise-in 0.6s ease forwards;
}

.md-typeset > *:nth-child(2) { animation-delay: 0.08s; }
.md-typeset > *:nth-child(3) { animation-delay: 0.13s; }
.md-typeset > *:nth-child(4) { animation-delay: 0.18s; }
.md-typeset > *:nth-child(5) { animation-delay: 0.23s; }
.md-typeset > *:nth-child(6) { animation-delay: 0.28s; }
.md-typeset > *:nth-child(n+7) { animation-delay: 0.32s; }

@keyframes page-fade {
  from {
    opacity: 0;
    filter: blur(2px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .md-content__inner {
    padding: 1rem;
    border-radius: 12px;
  }

  .md-typeset h1 {
    font-size: clamp(1.6rem, 7.2vw, 2.1rem);
  }

  .md-typeset p,
  .md-typeset li,
  .md-typeset td,
  .md-typeset th {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}
