/* CSS variables for themes */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --accent-primary: #3182ce;
  --accent-secondary: #2b6cb0;
  --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #475569;
  --accent-primary: #60a5fa;
  --accent-secondary: #3b82f6;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Theme toggle */
.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 24px;
  padding: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 64px;
  height: 32px;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.theme-toggle::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--accent-primary);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

[data-theme="dark"] .theme-toggle::before {
  transform: translateX(34px);
  background: var(--accent-primary);
}

.theme-toggle i {
  position: relative;
  font-size: 12px;
  transition: all 0.3s ease;
  z-index: 1;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle .fa-sun {
  color: var(--accent-primary);
  opacity: 1;
}

.theme-toggle .fa-moon {
  color: var(--text-muted);
  opacity: 0.6;
}

[data-theme="dark"] .theme-toggle .fa-sun {
  color: var(--text-muted);
  opacity: 0.6;
}

[data-theme="dark"] .theme-toggle .fa-moon {
  color: var(--accent-primary);
  opacity: 1;
}

/* Animation on click */
.theme-toggle:active::before {
  transform: scale(0.95) translateX(2px);
}

[data-theme="dark"] .theme-toggle:active::before {
  transform: scale(0.95) translateX(34px);
}

/* Modern header */
#sticky-header {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

#sticky-header.sticky {
  box-shadow: var(--shadow-lg);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex-shrink: 0;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.logo img:hover {
  transform: scale(1.05);
}

.site-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Footer controls */
footer {
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 40px 24px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.footer-right p {
  margin-bottom: 16px;
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

footer .github-icon {
  height: 1em;
  vertical-align: middle;
  margin-left: 5px;
  filter: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

footer a:hover .github-icon {
  opacity: 1;
}

.footer-subscribe {
  padding-top: 24px;
}

.footer-subscribe a {
  display: inline-flex;
  align-items: center;
  background: var(--accent-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  gap: 8px;
}

.footer-subscribe a:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  gap: 24px;
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-nav ul li a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  font-size: 14px;
  white-space: nowrap;
}

.main-nav ul li a:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

.main-nav ul li a.active {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

/* Language selector */
.language-selector select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  min-width: 100px;
}

.language-selector select:hover {
  border-color: var(--accent-primary);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
  position: relative;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Main content */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-radius: 16px;
  font-size: 14px;
  list-style: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--accent-primary);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 500;
}

.breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin: 0 12px;
  color: var(--text-primary);
  font-weight: 500;
  opacity: 0.6;
  position: static;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  transform: none;
  box-shadow: none;
  z-index: auto;
}

/* Section grid */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.section-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.section-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.section-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.section-item:hover::before {
  opacity: 0.05;
}

.section-item a {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  z-index: 1;
}

.section-item i {
  font-size: 48px;
  color: var(--accent-primary);
  margin-bottom: 16px;
  display: block;
}

.section-item h2 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0;
}

/* Letter grid for pedia */
.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 16px;
  padding: 40px 0;
}

.letter-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.letter-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.letter-item a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.letter-item .letter {
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--accent-primary);
}

.letter-item .count {
  font-size: 0.8em;
  color: var(--text-muted);
}

/* Filters */
#filters {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.search-container {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

#catalog-search,
#search-input {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: block;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.3s ease;
  outline: none;
}

#catalog-search:focus,
#search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#search-form {
  display: flex;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

#search-form button {
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 0 16px 16px 0;
  padding: 16px 32px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#search-form button:hover {
  background: var(--accent-secondary);
}

/* Pedia filter search */
.pedia-search-container {
  max-width: 600px;
  margin: 0 auto 24px;
}

#pedia-filter {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.3s ease;
  outline: none;
}

#pedia-filter:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#pedia-search-results ul {
  padding-left: 24px;
}

#pedia-search-results li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.filter-btn-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.filter-btn {
  padding: 10px 20px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.filter-btn.highlight {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border-color: transparent;
  position: relative;
}

.filter-btn.highlight::before {
  content: '★';
  margin-right: 6px;
}

.filter-btn.highlight:hover,
.filter-btn.highlight.active {
  background: linear-gradient(135deg, #d97706, #b45309);
}

/* Catalog */
#catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.catalog-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.catalog-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.catalog-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.catalog-item:hover::before {
  opacity: 0.03;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.item-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.item-logo img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.item-logo h2 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin: 0;
}

.item-header img {
  max-width: 48px;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.external-links {
  display: flex;
  gap: 12px;
}

.external-links a {
  color: var(--text-muted);
  font-size: 18px;
  transition: color 0.2s ease;
  text-decoration: none;
}

.external-links a:hover {
  color: var(--accent-primary);
}

.catalog-item h2 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  text-align: left;
}

.catalog-item p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  font-size: 0.9em;
}

.more-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.more-link:hover {
  text-decoration: underline;
}

.filters-and-links {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.filter-tag {
  padding: 6px 12px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  display: inline-block;
  margin: 2px;
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--accent-primary);
  color: white;
}

.filter-tag.highlight {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.additional-links {
  display: flex;
  gap: 8px;
  margin-left: 16px;
  flex-direction: column;
}

.additional-links a {
  color: var(--text-muted);
  font-size: 16px;
  transition: color 0.2s ease;
  text-decoration: none;
}

.additional-links a:hover {
  color: var(--accent-primary);
}

/* Footer */
.footer-content p {
  margin-bottom: 16px;
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

footer .github-icon {
  height: 1em;
  vertical-align: middle;
  margin-left: 5px;
  filter: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

footer a:hover .github-icon {
  opacity: 1;
}

.footer-subscribe a {
  display: inline-flex;
  align-items: center;
  background: var(--accent-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  gap: 8px;
}

.footer-subscribe a:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Subscribe */
.subscribe-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  margin: 20px auto;
  max-width: 640px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.subscribe-container h1 {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.subscribe-container p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

#mc_embed_signup {
  background: transparent !important;
  clear: left;
  font: 14px 'Inter', Arial, sans-serif !important;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

#mc_embed_signup input[type="email"],
#mc_embed_signup input[type="text"] {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 2px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  transition: all 0.3s ease !important;
}

#mc_embed_signup input[type="email"]:focus,
#mc_embed_signup input[type="text"]:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
  outline: none !important;
}

#mc-embedded-subscribe {
  background: var(--accent-primary) !important;
  border: none !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 12px 24px !important;
}

#mc-embedded-subscribe:hover {
  background: var(--accent-secondary) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Content links */
main a {
  color: var(--accent-primary);
  text-decoration: none;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: none;
}

main a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

main a:visited {
  color: var(--text-muted);
}

/* Content formatting */
main p {
  margin-bottom: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

main ul, 
main ol {
  margin: 16px 0;
  padding-left: 24px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

main li {
  margin-bottom: 8px;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

main ol:not(.breadcrumb) {
  list-style-type: decimal;
  list-style-position: outside;
}

main ol li {
  display: list-item;
  padding-left: 8px;
}

main ol li::marker {
  color: var(--accent-primary);
  font-weight: 600;
}

main ul li::marker {
  color: var(--accent-primary);
}

@supports not (::marker) {
  main ol:not(.breadcrumb) {
    counter-reset: item;
    list-style: none;
  }
  
  main ol:not(.breadcrumb) > li {
    counter-increment: item;
    position: relative;
  }
  
  main ol:not(.breadcrumb) > li::before {
    content: counter(item) ". ";
    color: var(--accent-primary);
    font-weight: 600;
    position: absolute;
    left: -24px;
    width: 20px;
  }
}

main ol ol,
main ul ul,
main ol ul,
main ul ol {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 20px;
}

main h1:not(.site-title) {
  font-size: 2.5rem;
  margin-bottom: 24px;
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

main h2:not(.catalog-item h2):not(.section-item h2):not(.item-logo h2) {
  font-size: 1.8rem;
  margin: 32px 0 16px 0;
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  line-height: 1.3;
}

main h3 {
  font-size: 1.4rem;
  margin: 24px 0 12px 0;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
}

main h4 {
  font-size: 1.2rem;
  margin: 20px 0 10px 0;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
}

main code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

main pre {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--border-color);
}

main pre code {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  overflow-wrap: normal;
  word-wrap: normal;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 16px;
    position: relative;
  }
  
  .header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo-container {
    flex: 1;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-card);
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding-top: 80px;
    order: 3;
    display: block;
  }
  
  .main-nav.active {
    left: 0;
  }
  
  .main-nav ul {
    flex-direction: column;
    padding: 20px;
    gap: 0;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  .main-nav ul li {
    width: 100%;
    margin-bottom: 8px;
  }
  
  .main-nav ul li a {
    display: block;
    width: 100%;
    padding: 16px 20px;
    text-align: center;
    border-radius: 12px;
    background: var(--bg-secondary);
    margin-bottom: 8px;
    font-size: 16px;
  }
  
  .main-nav ul li a:hover {
    background: var(--accent-primary);
    color: white;
    transform: none;
  }
  
  .main-nav ul li a.active {
    background: var(--accent-primary);
    color: white;
  }
  
  /* Show menu toggle button */
  .menu-toggle {
    display: block;
    width: 30px;
    height: 30px;
  }
  
  /* Keep header above menu */
  #sticky-header {
    position: relative;
    z-index: 1003;
  }
  
  .site-title {
    font-size: 1.1rem;
  }
  
  main {
    padding: 20px 16px;
  }
  
  .section-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  #catalog-list {
    grid-template-columns: 1fr;
  }
  
  .filter-btn-container {
    justify-content: flex-start;
    gap: 8px;
  }
  
  .filter-btn {
    font-size: 12px;
    padding: 8px 16px;
  }
  
  .breadcrumb {
    font-size: 12px;
    padding: 8px 16px;
  }
  
  .letter-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 12px;
  }
  
  .subscribe-container {
    padding: 24px;
    margin: 16px;
  }
  
  .mobile-language-selector {
    display: none;
  }
  
  .desktop-only {
    display: none;
  }
  
  main ul, 
  main ol {
    padding-left: 20px;
  }
  
  main h1:not(.site-title) {
    font-size: 2rem;
  }
  
  main h2:not(.catalog-item h2):not(.section-item h2):not(.item-logo h2) {
    font-size: 1.5rem;
  }
  
  main h3 {
    font-size: 1.3rem;
  }
  
  main h4 {
    font-size: 1.1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-left {
    align-items: center;
  }

  .footer-right {
    text-align: center;
  }
}