/* ===== Custom Theme: Deep Purple + Gold ===== */

:root {
  --md-primary-fg-color: #6A0DAD;
  --md-primary-fg-color--light: #8A2BE2;
  --md-primary-fg-color--dark: #4A0080;
  --md-accent-fg-color: #FFA726;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #8A2BE2;
  --md-primary-fg-color--light: #A855F7;
  --md-primary-fg-color--dark: #6A0DAD;
  --md-accent-fg-color: #FFA726;
  --md-default-bg-color: #0F0F1A;
  --md-default-bg-color--light: #1A1A2E;
}

/* ===== Hero Section ===== */

.md-hero {
  background: linear-gradient(135deg, #1a0b2e 0%, #2d1b69 50%, #0F0F1A 100%);
  padding: 3rem 1rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.md-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255, 167, 38, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.md-hero h1 {
  color: #FFFFFF;
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
}

.md-hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.md-hero .hero-badges {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.md-hero .hero-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* ===== Feature Cards ===== */

.grid.cards > ul > li {
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: 12px;
  transition: all 0.25s ease;
  background: var(--md-default-bg-color--light, #fafafa);
}

.grid.cards > ul > li:hover {
  border-color: rgba(138, 43, 226, 0.5);
  box-shadow: 0 8px 24px rgba(138, 43, 226, 0.12);
  transform: translateY(-2px);
}

[data-md-color-scheme="slate"] .grid.cards > ul > li {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(138, 43, 226, 0.25);
}

[data-md-color-scheme="slate"] .grid.cards > ul > li:hover {
  background: rgba(138, 43, 226, 0.06);
  border-color: rgba(138, 43, 226, 0.5);
  box-shadow: 0 8px 24px rgba(138, 43, 226, 0.2);
}

/* ===== Stats Row ===== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: 12px;
  background: rgba(138, 43, 226, 0.06);
  border: 1px solid rgba(138, 43, 226, 0.12);
}

[data-md-color-scheme="slate"] .stat-card {
  background: rgba(138, 43, 226, 0.08);
  border-color: rgba(138, 43, 226, 0.2);
}

.stat-card .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  display: block;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--md-default-fg-color--light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
  display: block;
}

/* ===== Section Headers ===== */

.section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.section-header .section-icon {
  font-size: 1.4rem;
}

/* ===== Admonition Overrides ===== */

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: #FFA726;
}

.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background-color: rgba(255, 167, 38, 0.1);
}

.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before {
  background-color: #FFA726;
}

/* ===== Better Tables ===== */

.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(138, 43, 226, 0.15);
}

.md-typeset table:not([class]) thead {
  background: rgba(138, 43, 226, 0.06);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) thead {
  background: rgba(138, 43, 226, 0.12);
}

.md-typeset table:not([class]) th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* ===== Navigation Tab Glow ===== */

.md-tabs__link--active {
  border-bottom: 2px solid var(--md-accent-fg-color);
}

/* ===== Code Blocks ===== */

[data-md-color-scheme="slate"] .md-typeset code {
  background: rgba(138, 43, 226, 0.1);
}

/* ===== Footer ===== */

.md-footer {
  background: #0F0F1A;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
  .md-hero h1 {
    font-size: 1.8rem;
  }
  .md-hero .hero-subtitle {
    font-size: 1rem;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
