/* Clean and Elegant Layout */
:root {
  /* Adjust these values as you like */
  --page-width: clamp(800px, 92vw, 1200px);
  
  /* Simple color palette */
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --background-light: #f7fafc;
}

/* Floating Navigation Bar - Hidden since we're using hover dropdowns */
.floating-nav {
  display: none;
}

.floating-nav.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  display: block !important;
}

.floating-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.floating-nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-nav-toggle:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}

.floating-nav-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.floating-nav.expanded .floating-nav-content {
  max-height: 60vh;
  overflow-y: auto;
  padding: 1rem;
}

.floating-nav h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.floating-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.floating-nav li {
  margin: 0.25rem 0;
}

.floating-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.floating-nav a:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  transform: translateX(4px);
}

.floating-nav a.active {
  background: rgba(102, 126, 234, 0.15);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

.floating-nav .section-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.75rem 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .floating-nav {
    right: 10px;
    max-width: 250px;
  }
}

@media (max-width: 768px) {
  .floating-nav {
    position: fixed;
    bottom: 20px;
    right: 20px;
    top: auto;
    max-height: 50vh;
    max-width: 200px;
  }
}

/* Hide on very small screens */
@media (max-width: 480px) {
  .floating-nav {
    display: none;
  }
}

.md-grid {
  max-width: var(--page-width);
}

/* Optional: give extra headroom on ultra-wide screens */
@media (min-width: 1600px) {
  .md-grid { max-width: 1400px; }
}

/* Clean typography */
.md-content {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
}

.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4,
.md-content h5,
.md-content h6 {
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.md-content h1 {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.md-content h2 {
  font-size: 1.4rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 650;
}

.md-content h3 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.md-content h4 {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 550;
}

.md-content h5 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.md-content h6 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Clean code blocks */
.md-content pre {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.md-content code {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-weight: 500;
}

.md-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

/* Clean lists - CRITICAL FOR CONTENT LISTS */
.md-content ul,
.md-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.md-content li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.md-content ul li {
  list-style-type: disc !important;
  list-style: disc !important;
}

.md-content ol li {
  list-style-type: decimal !important;
  list-style: decimal !important;
}

/* Ensure lists are visible */
.md-content ul {
  list-style-type: disc !important;
  list-style: disc !important;
}

.md-content ol {
  list-style-type: decimal !important;
  list-style: decimal !important;
}

/* Force list display for content only (not dropdowns) */
.md-typeset ul:not(.hero-dropdown ul),
.md-typeset ol:not(.hero-dropdown ol) {
  list-style-type: disc !important;
  list-style: disc !important;
  padding-left: 2rem !important;
}

.md-typeset ul li:not(.hero-dropdown li),
.md-typeset ol li:not(.hero-dropdown li) {
  list-style-type: disc !important;
  list-style: disc !important;
  display: list-item !important;
}

/* Override any conflicting styles for content only */
.md-content ul li:not(.hero-dropdown li)::before,
.md-content ol li:not(.hero-dropdown li)::before {
  display: none !important;
}

.md-typeset ul li:not(.hero-dropdown li)::before,
.md-typeset ol li:not(.hero-dropdown li)::before {
  display: none !important;
}

/* Ensure content lists are properly displayed */
.md-content .md-typeset ul:not(.hero-dropdown ul),
.md-content .md-typeset ol:not(.hero-dropdown ol) {
  list-style-type: disc !important;
  list-style: disc !important;
  padding-left: 2rem !important;
}

.md-content .md-typeset ul li:not(.hero-dropdown li),
.md-content .md-typeset ol li:not(.hero-dropdown li) {
  list-style-type: disc !important;
  list-style: disc !important;
  display: list-item !important;
}

/* Specific override for content pages */
.md-content__inner ul:not(.hero-dropdown ul),
.md-content__inner ol:not(.hero-dropdown ol) {
  list-style-type: disc !important;
  list-style: disc !important;
  padding-left: 2rem !important;
}

.md-content__inner ul li:not(.hero-dropdown li),
.md-content__inner ol li:not(.hero-dropdown li) {
  list-style-type: disc !important;
  list-style: disc !important;
  display: list-item !important;
}

/* Force list display for all content - most specific */
.md-typeset .md-content ul,
.md-typeset .md-content ol {
  list-style-type: disc !important;
  list-style: disc !important;
  padding-left: 2rem !important;
}

.md-typeset .md-content ul li,
.md-typeset .md-content ol li {
  list-style-type: disc !important;
  list-style: disc !important;
  display: list-item !important;
}

/* Override Material theme's list styling */
.md-typeset ul {
  list-style-type: disc !important;
  list-style: disc !important;
  padding-left: 2rem !important;
}

.md-typeset ul li {
  list-style-type: disc !important;
  list-style: disc !important;
  display: list-item !important;
}

/* Ensure no conflicting styles */
.md-typeset ul li::before,
.md-typeset ol li::before {
  display: none !important;
}

/* Force content lists to show bullets */
.md-content ul:not(.hero-dropdown ul),
.md-content ol:not(.hero-dropdown ol) {
  list-style-type: disc !important;
  list-style: disc !important;
  padding-left: 2rem !important;
}

.md-content ul li:not(.hero-dropdown li),
.md-content ol li:not(.hero-dropdown li) {
  list-style-type: disc !important;
  list-style: disc !important;
  display: list-item !important;
}

/* Most specific override for content */
.md-typeset .md-content ul:not(.hero-dropdown ul),
.md-typeset .md-content ol:not(.hero-dropdown ol) {
  list-style-type: disc !important;
  list-style: disc !important;
  padding-left: 2rem !important;
}

.md-typeset .md-content ul li:not(.hero-dropdown li),
.md-typeset .md-content ol li:not(.hero-dropdown li) {
  list-style-type: disc !important;
  list-style: disc !important;
  display: list-item !important;
}

/* Ultra-specific override for all content lists */
.md-content ul,
.md-content ol {
  list-style-type: disc !important;
  list-style: disc !important;
  padding-left: 2rem !important;
}

.md-content ul li,
.md-content ol li {
  list-style-type: disc !important;
  list-style: disc !important;
  display: list-item !important;
}

/* Force content lists to show bullets except hero dropdown and navigation */
.md-content ul:not(.hero-dropdown ul):not(.md-nav ul),
.md-content ol:not(.hero-dropdown ol):not(.md-nav ol) {
  list-style-type: disc !important;
  list-style: disc !important;
  padding-left: 2rem !important;
}

.md-content ul li:not(.hero-dropdown li):not(.md-nav li),
.md-content ol li:not(.hero-dropdown li):not(.md-nav li) {
  list-style-type: disc !important;
  list-style: disc !important;
  display: list-item !important;
}

/* Clean blockquotes */
.md-content blockquote {
  background: var(--background-light);
  border-left: 4px solid var(--primary-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Clean tables */
.md-content table {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.md-content th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  padding: 1rem;
}

.md-content td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.md-content tr:nth-child(even) {
  background: rgba(102, 126, 234, 0.02);
}

/* Clean navigation */
.md-nav__title {
  font-weight: 700;
  color: var(--text-primary);
}

.md-nav__link {
  border-radius: 0.25rem;
  margin: 0.25rem 0;
  transition: all 0.2s ease;
}

.md-nav__link:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}

/* Clean search */
.md-search__input {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
}

.md-search__input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Clean buttons */
.md-button {
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.md-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Clean admonitions */
.admonition {
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.admonition-title {
  font-weight: 700;
  border-radius: 0.5rem 0.5rem 0 0;
}

/* Clean scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Clean focus states */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Clean selection */
::selection {
  background: rgba(102, 126, 234, 0.2);
  color: var(--text-primary);
}