/**
 * VitePress Custom Styles
 * Overrides and extensions for default VitePress theme
 * Design System: ui-ux-pro-max — flat design, developer-focused, documentation-optimized
 */

/* ============================================
 * Global Theme Variables
 * ============================================ */
:root {
  --vp-c-brand: var(--vp-c-primary);
  --vp-c-brand-light: var(--vp-c-primary-300);
  --vp-c-brand-lighter: var(--vp-c-primary-200);
  --vp-c-brand-dark: var(--vp-c-primary-700);
  --vp-c-brand-darker: var(--vp-c-primary-800);

  --vp-home-hero-name-color: var(--vp-c-primary);
  --vp-home-hero-name-background: linear-gradient(120deg, var(--vp-c-primary-500) 30%, var(--vp-c-secondary-500));

  --vp-button-brand-bg: var(--vp-c-primary);
  --vp-button-brand-hover-bg: var(--vp-c-primary-600);
  --vp-button-brand-active-bg: var(--vp-c-primary-700);

  --vp-custom-block-tip-bg: var(--vp-c-primary-50);
  --vp-custom-block-tip-border: var(--vp-c-primary-200);
  --vp-custom-block-tip-text: var(--vp-c-primary-700);

  --vp-custom-block-warning-bg: var(--vp-c-accent-50);
  --vp-custom-block-warning-border: var(--vp-c-accent-200);
  --vp-custom-block-warning-text: var(--vp-c-accent-700);

  --vp-custom-block-danger-bg: #fef2f2;
  --vp-custom-block-danger-border: #fecaca;
  --vp-custom-block-danger-text: #b91c1c;

  /* Layout Width - Wider content area (using rem for zoom responsiveness) */
  --vp-layout-max-width: 100rem; /* 1600px / 16 */
  --vp-content-width: 57.5rem; /* 920px / 16 */
  --vp-sidebar-width: 17.5rem; /* 280px / 16 */
  --vp-toc-width: 12.5rem; /* 200px / 16 */

  /* Prose width for optimal readability */
  --vp-prose-width: 51.25rem; /* 820px / 16 */
}

.dark {
  --vp-custom-block-tip-bg: rgba(59, 130, 246, 0.1);
  --vp-custom-block-tip-border: rgba(59, 130, 246, 0.3);
  --vp-custom-block-tip-text: var(--vp-c-primary-300);

  --vp-custom-block-warning-bg: rgba(217, 119, 6, 0.1);
  --vp-custom-block-warning-border: rgba(217, 119, 6, 0.3);
  --vp-custom-block-warning-text: var(--vp-c-accent-300);

  --vp-custom-block-danger-bg: rgba(185, 28, 28, 0.1);
  --vp-custom-block-danger-border: rgba(185, 28, 28, 0.3);
  --vp-custom-block-danger-text: #fca5a5;
}

/* ============================================
 * Layout Container Adjustments
 * Use CSS variables in :root to control layout widths
 * Do not override VitePress layout calculations with !important
 * ============================================ */

/* Adjust sidebar and content layout */
/* NOTE: Removed duplicate padding-left - VitePress already handles sidebar layout */
/* .VPDoc, .VPDoc[data-v-343c73d6] { padding-left: var(--vp-sidebar-width) !important; } */

/* Right side outline (TOC) adjustments */
.VPDocOutline {
  padding-left: 24px;
}

.VPDocOutline .outline-link {
  font-size: 13px;
  line-height: 1.6;
  padding: 4px 8px;
}

/* ============================================
 * Navigation Bar Border
 * ============================================ */
.VPNav {
  border-bottom: 1px solid var(--vp-c-divider);
}

/* ============================================
 * Desktop Layout Adjustments
 * Grid-based layout is defined in mobile.css @media (min-width: 1024px)
 * ============================================ */

/* ============================================
 * Home Page Override
 * ============================================ */

/* Use :has() to detect home page (contains .pro-home) */
.VPContent:has(.pro-home) {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
}

.Layout:has(.pro-home) {
  max-width: 100vw !important;
}

/* Ensure VPNav doesn't cause overflow */
.Layout:has(.pro-home) .VPNav {
  max-width: 100vw;
}

/* Home page navbar - reduce title left margin since no sidebar */
.Layout:has(.pro-home) .VPNavBar .content-body,
.Layout:has(.pro-home) .VPNavBar .title {
  padding-left: 0 !important;
}

/* Ensure VPFooter doesn't cause overflow */
.Layout:has(.pro-home) .VPFooter {
  max-width: 100vw;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

/* ProfessionalHome component full width */
.pro-home {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Ensure all sections extend to full width */
.pro-home .hero-section,
.pro-home .features-section,
.pro-home .pipeline-section,
.pro-home .json-section,
.pro-home .quickstart-section,
.pro-home .cta-section {
  width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
  max-width: 100vw !important;
}

.VPHomeHero {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--vp-c-bg-soft) 0%, var(--vp-c-bg) 100%);
}

/* ============================================
 * Documentation Content Typography
 * Optimized for readability (65-75 chars per line)
 * ============================================ */
.vp-doc {
  font-family: var(--vp-font-family-base);
  line-height: var(--vp-line-height-relaxed);
  color: var(--vp-c-text-1);
}

/* Heading hierarchy with clear visual distinction */
.vp-doc h1 {
  font-family: var(--vp-font-family-heading);
  font-size: var(--vp-font-size-4xl);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: var(--vp-line-height-tight);
  margin-bottom: var(--vp-spacing-8);
  color: var(--vp-c-text-1);
}

.vp-doc h2 {
  font-family: var(--vp-font-family-heading);
  font-size: var(--vp-font-size-2xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: var(--vp-line-height-tight);
  margin-top: var(--vp-spacing-12);
  padding-top: var(--vp-spacing-8);
  border-top: 1px solid var(--vp-c-divider);
  color: var(--vp-c-text-1);
}

.vp-doc h2:first-of-type {
  margin-top: var(--vp-spacing-6);
  border-top: none;
}

.vp-doc h3 {
  font-family: var(--vp-font-family-heading);
  font-size: var(--vp-font-size-xl);
  font-weight: 600;
  line-height: var(--vp-line-height-snug);
  margin-top: var(--vp-spacing-10);
  color: var(--vp-c-text-1);
}

.vp-doc h4 {
  font-family: var(--vp-font-family-heading);
  font-size: var(--vp-font-size-lg);
  font-weight: 600;
  line-height: var(--vp-line-height-snug);
  margin-top: var(--vp-spacing-8);
  color: var(--vp-c-text-2);
}

.vp-doc h5 {
  font-size: var(--vp-font-size-base);
  font-weight: 600;
  line-height: var(--vp-line-height-snug);
  margin-top: var(--vp-spacing-6);
  color: var(--vp-c-text-2);
}

.vp-doc h6 {
  font-size: var(--vp-font-size-sm);
  font-weight: 600;
  line-height: var(--vp-line-height-snug);
  margin-top: var(--vp-spacing-4);
  color: var(--vp-c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Body text with optimal line height */
.vp-doc p {
  font-size: var(--vp-font-size-base);
  line-height: var(--vp-line-height-relaxed);
  margin: var(--vp-spacing-5) 0;
  max-width: 100%;
}

/* Lists with proper spacing */
.vp-doc ul,
.vp-doc ol {
  font-size: var(--vp-font-size-base);
  line-height: var(--vp-line-height-relaxed);
  margin: var(--vp-spacing-5) 0;
  padding-left: var(--vp-spacing-6);
  max-width: 100%;
}

.vp-doc li {
  line-height: var(--vp-line-height-relaxed);
  margin: var(--vp-spacing-2) 0;
}

.vp-doc li + li {
  margin-top: var(--vp-spacing-2);
}

/* Nested lists */
.vp-doc ul ul,
.vp-doc ol ol,
.vp-doc ul ol,
.vp-doc ol ul {
  margin: var(--vp-spacing-2) 0;
}

/* Better spacing for code blocks in lists */
.vp-doc li > code {
  margin: 0 2px;
}

/* Blockquotes */
.vp-doc blockquote {
  margin: var(--vp-spacing-6) 0;
  padding: var(--vp-spacing-4) var(--vp-spacing-6);
  border-left: 4px solid var(--vp-c-primary);
  background: var(--vp-c-bg-soft);
  border-radius: 0 var(--vp-radius-lg) var(--vp-radius-lg) 0;
  color: var(--vp-c-text-2);
  font-style: italic;
}

.vp-doc blockquote p {
  margin: var(--vp-spacing-2) 0;
}

/* Strong and emphasis */
.vp-doc strong {
  font-weight: 600;
  color: var(--vp-c-text-1);
}

.vp-doc em {
  font-style: italic;
}

/* ============================================
 * Command Reference Specific Styles
 * ============================================ */
.vp-doc h3[id^="ccw"],
.vp-doc h3[id^="workflow"],
.vp-doc h3[id^="issue"],
.vp-doc h3[id^="cli"],
.vp-doc h3[id^="memory"] {
  scroll-margin-top: 80px;
  position: relative;
}

/* Add subtle separator between command sections */
.vp-doc hr {
  border: none;
  border-top: 1px solid var(--vp-c-divider);
  margin: 3rem 0;
}

/* ============================================
 * Custom Container Blocks
 * Flat design with left accent border
 * ============================================ */
.custom-container {
  margin: var(--vp-spacing-6) 0;
  padding: var(--vp-spacing-4) var(--vp-spacing-5);
  border-radius: var(--vp-radius-xl);
  border-left: 4px solid;
  background: var(--vp-c-bg-soft);
  box-shadow: var(--vp-shadow-xs);
}

.custom-container.info {
  background: var(--vp-c-bg-soft);
  border-color: var(--vp-c-primary);
}

.custom-container.success {
  background: var(--vp-c-secondary-50);
  border-color: var(--vp-c-secondary);
}

.dark .custom-container.success {
  background: rgba(16, 185, 129, 0.08);
}

.custom-container.tip {
  border-radius: var(--vp-radius-xl);
  background: rgba(59, 130, 246, 0.05);
}

.custom-container.warning {
  border-radius: var(--vp-radius-xl);
  background: rgba(245, 158, 11, 0.05);
}

.custom-container.danger {
  border-radius: var(--vp-radius-xl);
  background: rgba(239, 68, 68, 0.05);
}

/* Custom container titles */
.custom-container .custom-container-title {
  font-family: var(--vp-font-family-heading);
  font-weight: 600;
  font-size: var(--vp-font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--vp-spacing-2);
}

/* VitePress default custom blocks */
.vp-doc .tip,
.vp-doc .warning,
.vp-doc .danger,
.vp-doc .info {
  border-radius: var(--vp-radius-xl);
  margin: var(--vp-spacing-6) 0;
  padding: var(--vp-spacing-4) var(--vp-spacing-5);
  box-shadow: var(--vp-shadow-xs);
}

.vp-doc .tip {
  background: rgba(59, 130, 246, 0.05);
  border-color: var(--vp-c-primary);
}

.vp-doc .warning {
  background: rgba(245, 158, 11, 0.05);
  border-color: var(--vp-c-accent);
}

.vp-doc .danger {
  background: rgba(239, 68, 68, 0.05);
  border-color: #ef4444;
}

.vp-doc .info {
  background: var(--vp-c-bg-soft);
  border-color: var(--vp-c-primary);
}

/* ============================================
 * Code Block Improvements
 * Clean, flat design with subtle borders
 * ============================================ */
.vp-code-group {
  margin: var(--vp-spacing-6) 0;
  border-radius: var(--vp-radius-xl);
  overflow: hidden;
  border: 1px solid var(--vp-c-divider);
  box-shadow: var(--vp-shadow-sm);
}

.vp-code-group .tabs {
  background: var(--vp-c-bg-soft);
  border-bottom: 1px solid var(--vp-c-divider);
  padding: 0 var(--vp-spacing-2);
}

.vp-code-group div[class*='language-'] {
  margin: 0;
  border-radius: 0;
  border: none;
}

div[class*='language-'] {
  border-radius: var(--vp-radius-xl);
  margin: var(--vp-spacing-6) 0;
  border: 1px solid var(--vp-c-divider);
  background: var(--vp-c-bg-soft) !important;
  box-shadow: var(--vp-shadow-sm);
}

div[class*='language-'] pre {
  line-height: var(--vp-line-height-relaxed);
  padding: var(--vp-spacing-5) var(--vp-spacing-6);
}

div[class*='language-'] code {
  font-family: var(--vp-font-family-mono);
  font-size: var(--vp-font-size-sm);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* Code block header with language label */
div[class*='language-'] > span.lang {
  font-size: var(--vp-font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vp-c-text-3);
  padding: var(--vp-spacing-2) var(--vp-spacing-4);
  background: var(--vp-c-bg-soft);
  border-radius: var(--vp-radius-md);
}

/* Inline code - subtle styling */
.vp-doc :not(pre) > code {
  font-family: var(--vp-font-family-mono);
  border-radius: var(--vp-radius-md);
  padding: 2px 6px;
  font-size: 0.875em;
  font-weight: 500;
  background: var(--vp-c-bg-soft);
  border: 1px solid var(--vp-c-divider);
  color: var(--vp-c-primary);
}

/* Copy button styling */
.vp-code-group .vp-copy,
div[class*='language-'] .vp-copy {
  border-radius: var(--vp-radius-md);
  transition: all var(--vp-transition-color);
}

.vp-code-group .vp-copy:hover,
div[class*='language-'] .vp-copy:hover {
  background: var(--vp-c-bg-mute);
}

/* ============================================
 * Table Styling
 * Clean, flat design with subtle borders
 * ============================================ */
.vp-doc table {
  border-collapse: collapse;
  width: 100%;
  margin: var(--vp-spacing-6) 0;
}

.vp-doc table th,
.vp-doc table td {
  padding: var(--vp-spacing-3) var(--vp-spacing-4);
  border: 1px solid var(--vp-c-divider);
  text-align: left;
  font-size: var(--vp-font-size-sm);
  line-height: var(--vp-line-height-normal);
}

.vp-doc table th {
  background: var(--vp-c-bg-soft);
  font-family: var(--vp-font-family-heading);
  font-weight: 600;
  font-size: var(--vp-font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vp-c-text-2);
  border-bottom-width: 2px;
}

.vp-doc table td {
  color: var(--vp-c-text-1);
  vertical-align: top;
}

.vp-doc table tr:hover {
  background: var(--vp-c-bg-soft);
}

.vp-doc table tr:hover td {
  color: var(--vp-c-text-1);
}

/* Responsive tables */
@media (max-width: 767px) {
  .vp-doc table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .vp-doc table th,
  .vp-doc table td {
    padding: var(--vp-spacing-2) var(--vp-spacing-3);
    font-size: var(--vp-font-size-xs);
    white-space: nowrap;
  }
}

/* ============================================
 * Sidebar Polish
 * Clean, organized navigation
 * ============================================ */
.VPSidebar {
  background: var(--vp-c-bg);
  border-right: 1px solid var(--vp-c-divider);
}

.VPSidebar .group + .group {
  margin-top: var(--vp-spacing-4);
  padding-top: var(--vp-spacing-4);
  border-top: 1px solid var(--vp-c-divider);
}

/* Sidebar item styling */
.VPSidebar .VPSidebarItem .text {
  font-size: var(--vp-font-size-sm);
  line-height: var(--vp-line-height-normal);
  transition: color var(--vp-transition-color);
}

.VPSidebar .VPSidebarItem .link:hover .text {
  color: var(--vp-c-primary);
}

.VPSidebar .VPSidebarItem.is-active .link .text {
  color: var(--vp-c-primary);
  font-weight: 600;
}

/* Sidebar group titles */
.VPSidebar .VPSidebarGroup .title {
  font-family: var(--vp-font-family-heading);
  font-size: var(--vp-font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vp-c-text-3);
  padding: var(--vp-spacing-2) var(--vp-spacing-4);
}

/* Sidebar numbering and indentation */
/* Initialize counter on the sidebar container */
.VPSidebar .VPSidebarGroup,
.VPSidebar nav {
  counter-reset: sidebar-item;
}

/* Increment counter for level-1 items only */
.VPSidebar .VPSidebarItem.level-1 {
  counter-increment: sidebar-item;
}

/* Add numbers to sidebar items */
.VPSidebar .VPSidebarItem.level-1 .link::before {
  content: counter(sidebar-item) ". ";
  color: var(--vp-c-text-3);
  font-weight: 500;
  margin-right: 8px;
}

/* Indentation for different levels */
.VPSidebar .VPSidebarItem.level-1 {
  padding-left: 16px;
}

.VPSidebar .VPSidebarItem.level-2 {
  padding-left: 32px;
}

.VPSidebar .VPSidebarItem.level-3 {
  padding-left: 48px;
}

/* ============================================
 * Navigation Polish
 * ============================================ */
.VPNav {
  background: var(--vp-c-bg);
  border-bottom: 1px solid var(--vp-c-divider);
  box-shadow: var(--vp-shadow-xs);
}

.VPNavBar .title {
  font-family: var(--vp-font-family-heading);
  font-weight: 700;
  font-size: var(--vp-font-size-lg);
  color: var(--vp-c-text-1);
}

.VPNavBarMenu .VPNavBarMenuLink {
  font-family: var(--vp-font-family-heading);
  font-weight: 500;
  font-size: var(--vp-font-size-sm);
  transition: color var(--vp-transition-color);
}

.VPNavBarMenu .VPNavBarMenuLink:hover {
  color: var(--vp-c-primary);
}

.VPNavBarMenu .VPNavBarMenuLink.active {
  color: var(--vp-c-primary);
  font-weight: 600;
}

/* ============================================
 * Scrollbar Styling
 * Subtle, flat design
 * ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--vp-c-surface-2);
  border-radius: var(--vp-radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--vp-c-surface-3);
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--vp-c-surface-2) transparent;
}

/* ============================================
 * TOC (Table of Contents) Polish
 * Sticky positioning handled by grid layout in mobile.css
 * ============================================ */
.VPDocOutline {
  padding-left: 24px;
}

.VPDocOutline .outline-link {
  font-family: var(--vp-font-family-base);
  font-size: var(--vp-font-size-sm);
  line-height: var(--vp-line-height-normal);
  padding: var(--vp-spacing-1) var(--vp-spacing-2);
  color: var(--vp-c-text-3);
  transition: color var(--vp-transition-color);
  border-radius: var(--vp-radius-md);
}

.VPDocOutline .outline-link:hover {
  color: var(--vp-c-primary);
  background: var(--vp-c-bg-soft);
}

/* Match VitePress actual DOM structure: <li><a class="outline-link active">...</a></li> */
/* Override VitePress scoped styles with higher specificity */
.VPDocAside .VPDocAsideOutline .outline-link.active {
  color: var(--vp-c-brand) !important;
  font-weight: 600 !important;
  background: var(--vp-c-bg-soft) !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  transition: all 0.25s !important;
}

.VPDocOutline .outline-marker {
  width: 3px;
  background: var(--vp-c-brand);
  border-radius: var(--vp-radius-full);
}

/* ============================================
 * Link Improvements
 * Clean, accessible link styling
 * ============================================ */
a {
  text-decoration: none;
  color: var(--vp-c-primary);
  transition: color var(--vp-transition-color);
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
  color: var(--vp-c-primary-600);
}

a:visited {
  color: var(--vp-c-primary-700);
}

.dark a:visited {
  color: var(--vp-c-primary-300);
}

/* External link indicator */
.vp-doc a[target="_blank"]::after {
  content: " ↗";
  font-size: 0.75em;
  opacity: 0.7;
}

/* ============================================
 * Button Improvements
 * ============================================ */
.VPButton {
  font-family: var(--vp-font-family-heading);
  font-weight: 600;
  font-size: var(--vp-font-size-sm);
  padding: var(--vp-spacing-2-5) var(--vp-spacing-5);
  border-radius: var(--vp-radius-lg);
  transition: all var(--vp-transition-color);
  cursor: pointer;
}

.VPButton.brand {
  background: var(--vp-c-primary);
  color: white;
  border: none;
}

.VPButton.brand:hover {
  background: var(--vp-c-primary-600);
  transform: translateY(-1px);
  box-shadow: var(--vp-shadow-md);
}

.VPButton.alt {
  background: var(--vp-c-bg-soft);
  color: var(--vp-c-text-1);
  border: 1px solid var(--vp-c-divider);
}

.VPButton.alt:hover {
  background: var(--vp-c-bg-mute);
  border-color: var(--vp-c-primary);
}

/* ============================================
 * Focus States — Accessibility
 * Clear visible focus for keyboard navigation
 * ============================================ */
:focus-visible {
  outline: 2px solid var(--vp-c-primary);
  outline-offset: 2px;
  border-radius: var(--vp-radius-md);
}

/* Skip focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Better focus for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--vp-c-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* ============================================
 * Skip Link — Accessibility
 * ============================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--vp-c-bg);
  padding: 8px 16px;
  z-index: 9999;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
 * Print Styles
 * ============================================ */
@media print {
  .VPNav,
  .VPSidebar,
  .skip-link {
    display: none;
  }

  .VPContent {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/*
 * ===================================================================
 *  智能响应式内容宽度方案 (Intelligent Responsive Content Width)
 * ===================================================================
 *  目的: 根据视口宽度动态调整内容区域占比，优化空间利用。
 *  原理: 使用rem单位的padding，在不同视口宽度下提供合适的留白。
 *        窄屏使用较小padding，超宽屏使用较大padding。
 */

/* 步骤1: 在所有桌面视图下，让.container可以填满父级空间 */
@media (min-width: 1024px) {
  .VPDoc.has-aside .container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 var(--vp-spacing-8) !important;
  }
  
  .VPContent.has-sidebar {
    margin-left: var(--vp-sidebar-width) !important;
    margin-right: var(--vp-toc-width) !important;
    width: calc(100vw - var(--vp-sidebar-width) - var(--vp-toc-width)) !important;
    box-sizing: border-box;
  }
}

/* 窄屏 (1024px - 1439px): 使用2rem padding */
@media (min-width: 1024px) and (max-width: 1439px) {
  .VPContent.has-sidebar {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

/* 标准宽屏 (1440px - 1919px): 使用3rem padding */
@media (min-width: 1440px) and (max-width: 1919px) {
  .VPContent.has-sidebar {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }
}

/* 超宽屏 (>= 1920px): 使用5rem padding */
@media (min-width: 1920px) {
  .VPContent.has-sidebar {
    padding-left: 5rem !important;
    padding-right: 5rem !important;
  }
}

/* ============================================
 * Widen Doc Content to Fill Container
 * ============================================ */
/*
 * Overrides VitePress's default readability width limit for .vp-doc
 * and .content-container on desktop layouts, allowing content to use
 * the full available space defined by the responsive padding in the
 * "Intelligent Responsive Content Width" section.
 */
@media (min-width: 1024px) {
  /* Remove padding from VPDoc to maximize content width */
  .VPDoc.has-aside {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Remove padding from container to maximize content width */
  .VPDoc.has-aside .container {
    justify-content: flex-start !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Keep .aside at fixed width */
  .VPDoc.has-aside .container .aside {
    flex: 0 0 auto !important;
  }

  /* Expand .content to fill available space and remove padding */
  .VPDoc.has-aside .container .content {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Use multiple selectors to increase specificity and override scoped styles */
  .VPDoc.has-aside .container .content-container,
  .VPDoc.has-aside .content-container[class],
  .content-container {
    max-width: none !important;
    width: 100% !important;
  }

  .vp-doc {
    max-width: 100% !important;
    width: 100% !important;
  }
}
