/* Premium Light Green Theme */
:root {
  /* Main "Brand" Color for TEXT/LINKS - Dark Green for readability */
  --md-primary-fg-color: #558B2F;
  /* Light Green 800 */
  --md-primary-fg-color--light: #7CB342;
  /* Light Green 600 */
  --md-primary-fg-color--dark: #33691E;
  /* Light Green 900 */

  --md-accent-fg-color: #33691E;
  /* Deep Green Accent */

  /* Header Specific: Light "Tea Green" Background */
  --md-header-bg-color: rgba(241, 248, 233, 0.95);
  /* Light Green 50 */
  --md-header-fg-color: #1B5E20;
  /* Dark Green Text */
  /* Readability: Reset to standard base, adjust locally */
  font-size: 16px;

  /* Layout Dimensions: Thicker Top Bars */
  --md-header-height: 3rem;
  /* Standard Large */
  --md-tabs-height: 3rem;
  /* Standard Tabs */
}

/* Content Body: Slightly larger than standard for readability, but not huge */
.md-typeset {
  font-size: 1.0625rem;
  /* 17px */
  line-height: 1.7;
}

/* Sidebar Navigation: Increase size */
.md-nav__link {
  font-size: 0.95rem;
}

.md-nav__title {
  font-size: 1rem;
}

/* Dark Mode Overrides - Forest Theme */
[data-md-color-scheme="slate"] {
  /* ... (unchanged) ... */
  --md-primary-fg-color: #A5D6A7;
  /* Green 200 */
  --md-primary-fg-color--light: #C8E6C9;
  /* Green 100 */
  --md-primary-fg-color--dark: #81C784;
  /* Green 300 */

  --md-accent-fg-color: #69F0AE;
  /* Bright Green Accent */

  /* Header in Dark Mode */
  --md-header-fg-color: #E8F5E9;
  /* Light Text */
  --md-header-bg-color: rgba(27, 38, 29, 0.90);
  /* Deep Forest Translucent */
}

/* -----------------------------
   Header Styling (Glassmorphism)
   ----------------------------- */
/* Header Styling (Glassmorphism) & explicit height force */
.md-header {
  background-color: var(--md-header-bg-color) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: none !important;
  /* FORCE HEIGHT MATCHING VARIABLES */
  height: var(--md-header-height) !important;
}

/* Fix: Color the GitHub/Repo Icon properly */
.md-header__source {
  display: block;
  width: 24px;
  /* Ensure width */
  margin-top: 0;
  /* Align seamlessly */
}

.md-header__source svg,
.md-header__button svg,
.md-header__title,
.md-tabs__link {
  color: var(--md-header-fg-color) !important;
  fill: var(--md-header-fg-color) !important;
  opacity: 1 !important;
}

/* FORCE TABS HEIGHT & ALIGNMENT */
[data-md-component="tabs"] {
  background-color: var(--md-header-bg-color) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  height: var(--md-tabs-height) !important;
  /* Explicitly force it */
}

.md-tabs__list {
  margin: 0;
  padding: 0;
  /* Remove padding hack */
}

/* -----------------------------
   Typography & Content 
   ----------------------------- */
.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--md-default-fg-color);
  margin-bottom: 1.5rem;
  font-size: 2.2rem;
  /* Big Header */
}

.md-typeset h2 {
  font-weight: 600;
  margin-top: 2.5rem;
  color: var(--md-accent-fg-color);
  font-size: 1.8rem;
  /* Clear hierarchy */
}

.md-typeset h3 {
  font-weight: 600;
  font-size: 1.5rem;
}

/* -----------------------------
   Components: Admonitions & Cards
   ----------------------------- */

/* Shared Styles */
.md-typeset .admonition,
.grid-cards .card {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

/* LIGHT MODE: White/Off-White Backgrounds */
[data-md-color-scheme="default"] .md-typeset .admonition,
[data-md-color-scheme="default"] .grid-cards .card {
  background-color: #FAFAFA;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* DARK MODE: Dark Backgrounds (Crucial fix for text visibility) */
[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .grid-cards .card {
  background-color: rgba(255, 255, 255, 0.05);
  /* Slight tint on dark bg */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Admonition Title Styling */
.md-typeset .admonition-title {
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 1rem !important;
  /* Prevent titles from being too small */
}

/* Fix: Enforce consistent font size inside Admonitions */
.md-typeset .admonition p,
.md-typeset .admonition ul,
.md-typeset .admonition ol {
  font-size: 1rem !important;
  /* Match body text */
  line-height: 1.7;
}

/* Adjust Headers to be proportional */
.md-typeset h1 {
  font-size: 2.2rem;
  /* Not too huge */
}

.md-typeset h2 {
  font-size: 1.6rem;
}

/* Specific styling for 'Note' or 'Info' to match Green theme */
[data-md-color-scheme="default"] .md-typeset .admonition.note,
[data-md-color-scheme="default"] .md-typeset .admonition.info {
  border-left-color: var(--md-accent-fg-color);
}

/* -----------------------------
   Grid Cards Specifics
   ----------------------------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.grid-cards .card {
  padding: 1.75rem;
}

.grid-cards .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-md-color-scheme="default"] .grid-cards .card:hover {
  border-color: var(--md-accent-fg-color);
}

.grid-cards .card h3 {
  margin-top: 0;
  color: var(--md-accent-fg-color);
  font-weight: 700;
  font-size: 1.25rem;
}

/* -----------------------------
   Utilities
   ----------------------------- */
.md-typeset pre>code {
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

html {
  scroll-behavior: smooth;
}

.md-footer {
  margin-top: 4rem;
}

/* Widen the Main Layout */
/* Widen the Main Layout */
.md-grid {
  max-width: 1220px !important;
  /* Standard wider layout */
  /* Or 90% if fluid is preferred */
}

/* -----------------------------
   Specific Fixes for User Feedback
   ----------------------------- */

/* Fix: Tabs (分点点) Font Size */
.md-typeset label.md-nav__link,
.md-typeset .tabbed-labels label {
  font-size: 1rem !important;
  /* Make tabs readable */
  font-weight: 600;
}

/* Fix: Top Header Navigation Font Size */
.md-tabs__link,
.md-header__nav .md-tabs__item {
  font-size: 1.1rem !important;
  /* Balanced Size */
  font-weight: normal;
  /* USER REQUEST: Not Bold */

  /* Robust Flexbox Centering */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100%;

  margin: 0;
  padding: 0 1rem;

  /* USER REQUEST: "Others up a bit" */
  transform: translateY(-2px);
  /* Shift Up slightly */
}