/* Modern API Manager Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #e2e8f0;
  padding: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #0f172a;
  height: 100%;
  line-height: 1.6;
}

/* Modern Sidebar */
.toc-wrapper {
  -webkit-transition: left 0.3s ease-in-out;
  transition: left 0.3s ease-in-out;
  overflow-y: auto;
  overflow-x: hidden;
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.toc-wrapper .logo {
  display: block;
  max-width: 100%;
  margin-bottom: 0;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  width: 100%;
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.toc-wrapper .logo img {
  max-height: 40px;
  filter: brightness(0) invert(1);
}

.toc-wrapper > .search {
  position: relative;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced Sidebar Navigation */
.toc-wrapper .toc-link {
  padding: 12px 20px;
  display: block;
  overflow-x: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid transparent;
  font-size: 14px;
  font-weight: 400;
  position: relative;
  transform: translateX(0);
}

.toc-wrapper .toc-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-left-color: rgba(255, 165, 0, 0.6);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toc-wrapper .toc-link.active {
  background: linear-gradient(90deg, rgba(255, 165, 0, 0.15) 0%, rgba(255, 165, 0, 0.05) 100%);
  color: #ffa500;
  border-left-color: #ffa500;
  font-weight: 500;
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(255, 165, 0, 0.2);
}

.toc-wrapper .toc-link.active-parent {
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
  font-weight: 500;
  transform: translateX(2px);
}

.toc-wrapper .toc-link:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ffa500 0%, #ff8c00 100%);
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-wrapper .toc-link:hover:before,
.toc-wrapper .toc-link.active:before {
  transform: scaleY(1);
}

/* Enhanced Search Input */
.toc-wrapper > .search input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px 12px 40px;
  width: 100%;
  outline: none;
  color: #fff;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.toc-wrapper > .search input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffa500;
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.toc-wrapper > .search:before {
  position: absolute;
  top: 32px;
  left: 32px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
}

.toc-wrapper .search-results {
  margin-top: 0;
  box-sizing: border-box;
  height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition-property: height, margin;
  transition-timing-function: ease-in-out;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin: 0 20px 20px 20px;
}

.toc-wrapper .search-results.visible {
  height: 30%;
  margin-bottom: 1em;
}

.toc-wrapper .search-results li {
  margin: 1em 15px;
  line-height: 1.4;
}

.toc-wrapper .search-results a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}

.toc-wrapper .search-results a:hover {
  color: #ffa500;
}

.toc-wrapper ul, .toc-wrapper li {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

.toc-wrapper li {
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.toc-wrapper .toc-list-h2 {
  display: none;
  background: rgba(0, 0, 0, 0.1);
  font-weight: 400;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 20px;
}

.toc-wrapper .toc-h2 {
  padding-left: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* Enhanced Footer Links */
.toc-wrapper .toc-footer li, .toc-wrapper .toc-footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-wrapper .toc-footer a:hover {
  color: #ffa500;
  transform: translateX(2px);
  text-shadow: 0 0 8px rgba(255, 165, 0, 0.3);
}

/* Navigation Button */
#nav-button {
  padding: 0 1.5em 5em 0;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  color: #000;
  text-decoration: none;
  font-weight: bold;
  opacity: 0.7;
  line-height: 16px;
  transition: left 0.3s ease-in-out;
}

#nav-button span {
  display: block;
  padding: 6px 6px 6px;
  /* background-color: #ffa500; */
  border-radius: 4px;
  color: #fff;
}

/* Main Content Area */
.page-wrapper {
  margin-left: 280px;
  position: relative;
  z-index: 10;
  background-color: #0f172a;
  min-height: 100%;
  padding-bottom: 1px;
}

.page-wrapper .dark-box {
  width: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.page-wrapper .lang-selector {
  position: fixed;
  z-index: 50;
  border-bottom: 3px solid #ffa500;
  background: #1e293b;
  width: 50%;
  right: 0;
  font-weight: 500;
}

/* Enhanced Language Selector */
.lang-selector {
  background-color: #1e293b;
  width: 100%;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 0;
  position: relative;
}

.lang-selector:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
}

.lang-selector a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 16px 24px;
  line-height: 1.4;
  outline: 0;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 3px solid transparent;
  font-weight: 400;
  text-transform: capitalize;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-width: 80px;
  flex-shrink: 0;
}

.lang-selector a:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-selector a:hover:before {
  left: 100%;
}

.lang-selector a:active, .lang-selector a:focus {
  background-color: rgba(0, 0, 0, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.lang-selector a.active {
  background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
  color: #fff;
  font-weight: 500;
  border-bottom-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 165, 0, 0.3);
  position: relative;
}

.lang-selector a.active:after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffa500 0%, #ff8c00 100%);
  border-radius: 2px 2px 0 0;
}

.lang-selector a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-1px);
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* Desktop-specific language selector improvements */
@media (min-width: 931px) {
  .lang-selector {
    overflow-x: visible;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }
  
  .lang-selector a {
    padding: 16px 28px;
    font-size: 15px;
    min-width: 100px;
    text-align: center;
    flex: 1;
  }
  
  /* Ensure all language names are fully visible */
  .lang-selector a[data-language-name="shell"] { min-width: 80px; }
  .lang-selector a[data-language-name="ruby"] { min-width: 70px; }
  .lang-selector a[data-language-name="python"] { min-width: 90px; }
  .lang-selector a[data-language-name="javascript"] { min-width: 110px; }
  .lang-selector a[data-language-name="go"] { min-width: 50px; }
  .lang-selector a[data-language-name="java"] { min-width: 70px; }
  .lang-selector a[data-language-name="php"] { min-width: 60px; }
}

/* Mobile language selector with horizontal scroll */
@media (max-width: 930px) {
  .lang-selector {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
  }
  
  .lang-selector a {
    padding: 14px 16px;
    font-size: 14px;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
  }
}

/* Content Styling */
.content {
  -webkit-transform: translateZ(0);
  position: relative;
  z-index: 30;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #0f172a;
  color: #e2e8f0;
}

.content:after {
  content: '';
  display: block;
  clear: both;
}

/* Content sections spacing */
.content > p {
  margin: 20px 0;
  line-height: 1.8;
  color: #cbd5e1;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.content > div {
  margin: 28px 0;
}

.content > h1, .content > h2, .content > h3, .content > h4, .content > h5, .content > h6 {
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.content > h1 {
  font-size: 2.5em;
  padding: 24px 0;
  margin: 0 0 40px 0;
  border-bottom: 3px solid #ffa500;
  text-align: center;
  background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(255, 165, 0, 0.2);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.content > h2 {
  font-size: 1.8em;
  margin-top: 56px;
  margin-bottom: 28px;
  padding: 16px 0;
  border-bottom: 2px solid #334155;
  color: #f1f5f9;
  position: relative;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.content > h2:before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #ffa500 0%, #ff8c00 100%);
}

.content > h3, .content > h4 {
  font-size: 1.3em;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #cbd5e1;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.content > h5, .content > h6 {
  font-size: 1.1em;
  margin-top: 32px;
  margin-bottom: 16px;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0;
}

/* Content sections spacing */
.content > p {
  margin: 16px 0;
  line-height: 1.7;
  color: #cbd5e1;
}

.content > div {
  margin: 24px 0;
}

.content hr {
  margin: 32px 0;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #334155 50%, transparent 100%);
}

/* Enhanced Tables */
.content table {
  margin: 32px 0;
  overflow: auto;
  border: 1px solid #334155;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background: #1e293b;
}

.content table th, .content table td {
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
  padding: 20px;
  border-bottom: 1px solid #334155;
  color: #e2e8f0;
  font-size: 15px;
}

.content table th {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  font-weight: 600;
  color: #f8fafc;
  border-bottom: 2px solid #475569;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.content table tr:last-child td {
  border-bottom: none;
}

.content table tr:nth-child(odd) > td {
  background-color: #1e293b;
}

.content table tr:nth-child(even) > td {
  background-color: #334155;
}

.content table tr:hover > td {
  background-color: rgba(255, 165, 0, 0.1);
}

/* Enhanced Code Blocks */
.content pre, .content blockquote {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #fff;
  margin: 36px 0;
  width: 100%;
  float: none;
  clear: both;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.content pre:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffa500 0%, #ff8c00 100%);
}

.content pre > p, .content blockquote > p {
  margin: 0;
}

.content pre a, .content blockquote a {
  color: #ffa500;
  text-decoration: none;
  border-bottom: 1px dashed #ffa500;
}

.content pre {
  padding: 32px;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-weight: 400;
}

.content blockquote > p {
  background: rgba(0, 0, 0, 0.3);
  padding: 28px 32px;
  color: #e2e8f0;
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
}

/* Enhanced Inline Code */
.content code {
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  border: 1px solid rgba(255, 165, 0, 0.3);
  font-weight: 500;
}

/* Enhanced Alerts */
.content aside {
  padding: 28px 32px;
  border-radius: 12px;
  margin: 36px 0;
  line-height: 1.8;
  border-left: 4px solid;
  background: #1e293b;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  position: relative;
  color: #e2e8f0;
  font-size: 16px;
  font-weight: 400;
}

.content aside:before {
  vertical-align: middle;
  padding-right: 12px;
  font-size: 18px;
  font-weight: 600;
}

.content aside.warning {
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
  border-left-color: #f59e0b;
  color: #fef3c7;
}

.content aside.success {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  border-left-color: #10b981;
  color: #d1fae5;
}

.content aside.notice {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  border-left-color: #3b82f6;
  color: #dbeafe;
}

/* Enhanced Links */
.content a {
  color: #ffa500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
  padding-bottom: 1px;
}

.content a:hover {
  color: #ff8c00;
  border-bottom-color: #ff8c00;
}

/* Enhanced Lists */
.content ul, .content ol {
  margin: 24px 0;
  padding-left: 32px;
}

.content li {
  margin: 12px 0;
  line-height: 1.8;
  color: #cbd5e1;
  font-size: 16px;
  font-weight: 400;
}

.content li strong {
  font-weight: 600;
  color: #f1f5f9;
}

/* Enhanced Images */
.content img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin: 32px 0;
}

/* Enhanced Search Highlight */
.content .search-highlight {
  padding: 3px 6px;
  margin: -3px;
  border-radius: 6px;
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
  border: 1px solid #f59e0b;
  font-weight: 600;
  color: #fef3c7;
}

/* Responsive Design */
@media (max-width: 930px) {
  .toc-wrapper {
    left: -280px;
  }
  
  .toc-wrapper.open {
    left: 0;
  }
  
  .page-wrapper {
    margin-left: 0;
  }
  
  #nav-button {
    display: block;
  }
  
  .toc-link {
    padding: 16px 20px;
  }
  
  .content {
    padding: 20px;
  }
  
  .page-wrapper .dark-box {
    display: none;
  }
  
  .lang-selector {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .content > h1 {
    font-size: 2em;
    padding: 20px 0;
  }
  
  .content > h2 {
    font-size: 1.5em;
  }
  
  .content pre {
    padding: 16px;
    font-size: 13px;
  }
  
  .content table th, .content table td {
    padding: 12px;
  }
  
  .lang-selector a {
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* Syntax Highlighting */
.highlight {
  background: #1e293b;
  color: #e2e8f0;
}

.highlight .hll { background-color: #49483e }
.highlight .c { color: #909090 } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #909090 } /* Comment.Hashbang */
.highlight .cm { color: #909090 } /* Comment.Multiline */
.highlight .cp { color: #909090 } /* Comment.Preproc */
.highlight .cpf { color: #909090 } /* Comment.PreprocFile */
.highlight .c1 { color: #909090 } /* Comment.Single */
.highlight .cs { color: #909090 } /* Comment.Special */
.highlight .gd { color: #49483e } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #49483e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */

/* Code block wrapper and copy button */
.code-block {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
}

.copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 165, 0, 0.4);
  opacity: 1;
}

.copy-btn:active {
  transform: translateY(0);
}

.copy-btn.copied {
  background: #22c55e;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

/* Info box icons */
.content aside.notice:before {
  content: 'ℹ️';
}

.content aside.warning:before {
  content: '⚠️';
}

.content aside.success:before {
  content: '🔗';
}

/* Skeleton loading overlay */
.skeleton-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
}

.skeleton-overlay .sk-header,
.skeleton-overlay .sk-line {
  background: linear-gradient(90deg, #111827 0%, #1f2937 50%, #111827 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
}

.skeleton-overlay .sk-header { height: 32px; width: 60%; }
.skeleton-overlay .sk-line { height: 16px; width: 100%; }
.skeleton-overlay .sk-line.short { width: 70%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* Enhanced Focus States for Keyboard Navigation */
.toc-wrapper .toc-link:focus,
.lang-selector a:focus,
.copy-btn:focus,
.content a:focus {
  outline: 2px solid #ffa500;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.2);
  border-radius: 4px;
}

.toc-wrapper > .search input:focus {
  outline: 2px solid #ffa500;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Skip to content link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #ffa500;
  color: #000;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
}

/* Enhanced Contrast Ratios */
.content > h1 {
  color: #000;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.content > h2 {
  color: #f8fafc;
  border-bottom-color: #475569;
}

.content > h3, .content > h4 {
  color: #e2e8f0;
}

.content > h5, .content > h6 {
  color: #cbd5e1;
}

.content > p {
  color: #e2e8f0;
}

.content li {
  color: #e2e8f0;
}

.content li strong {
  color: #f8fafc;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 930px) {
  .toc-wrapper {
    left: -280px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .toc-wrapper.open {
    left: 0;
  }
  
  .page-wrapper {
    margin-left: 0;
  }
  
  #nav-button {
    display: block;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: #ffa500;
    color: #000;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  
  #nav-button:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
  }
  
  .toc-link {
    padding: 16px 20px;
    font-size: 16px;
  }
  
  .content {
    padding: 16px;
  }
  
  .page-wrapper .dark-box {
    display: none;
  }
  
  .lang-selector {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .lang-selector a {
    padding: 14px 16px;
    font-size: 14px;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .content > h1 {
    font-size: 1.8em;
    padding: 20px 0;
    margin: 0 0 24px 0;
  }
  
  .content > h2 {
    font-size: 1.5em;
    margin-top: 32px;
    margin-bottom: 20px;
  }
  
  .content > h3, .content > h4 {
    font-size: 1.2em;
    margin-top: 24px;
    margin-bottom: 16px;
  }
  
  .content > p {
    font-size: 15px;
    line-height: 1.7;
    margin: 16px 0;
  }
  
  .content pre {
    padding: 20px;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .content table {
    font-size: 14px;
    margin: 20px 0;
  }
  
  .content table th, .content table td {
    padding: 12px 8px;
    font-size: 14px;
  }
  
  .content aside {
    padding: 20px;
    margin: 24px 0;
    font-size: 15px;
  }
  
  .copy-btn {
    padding: 8px 12px;
    font-size: 11px;
    top: 8px;
    right: 8px;
  }
  
  .lang-selector a {
    padding: 12px 14px;
    font-size: 13px;
    min-width: 70px;
  }
  
  .toc-wrapper .toc-link {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .toc-wrapper > .search input {
    padding: 14px 16px 14px 40px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 12px;
  }
  
  .content > h1 {
    font-size: 1.6em;
    padding: 16px 0;
  }
  
  .content > h2 {
    font-size: 1.3em;
  }
  
  .content > h3, .content > h4 {
    font-size: 1.1em;
  }
  
  .content pre {
    padding: 16px;
    font-size: 12px;
  }
  
  .content table {
    font-size: 13px;
  }
  
  .content table th, .content table td {
    padding: 8px 6px;
    font-size: 13px;
  }
  
  .content aside {
    padding: 16px;
    font-size: 14px;
  }
  
  .copy-btn {
    padding: 6px 10px;
    font-size: 10px;
    top: 6px;
    right: 6px;
  }
  
  .lang-selector a {
    padding: 10px 12px;
    font-size: 12px;
    min-width: 60px;
  }
  
  .toc-wrapper .toc-link {
    padding: 12px 14px;
    font-size: 14px;
  }
  
  .toc-wrapper > .search input {
    padding: 12px 14px 12px 36px;
    font-size: 16px;
  }
  
  #nav-button {
    top: 8px;
    left: 8px;
    padding: 6px 10px;
    font-size: 14px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .content > h1 {
    background: #000;
    color: #fff;
    border: 2px solid #fff;
  }
  
  .content > h2 {
    color: #fff;
    border-bottom: 2px solid #fff;
  }
  
  .content > h3, .content > h4 {
    color: #fff;
  }
  
  .content > p, .content li {
    color: #fff;
  }
  
  .toc-wrapper .toc-link {
    color: #fff;
    border-left: 3px solid #fff;
  }
  
  .toc-wrapper .toc-link.active {
    background: #fff;
    color: #000;
  }
  
  .lang-selector a {
    color: #fff;
    border-bottom: 2px solid #fff;
  }
  
  .lang-selector a.active {
    background: #fff;
    color: #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .toc-wrapper .toc-link:hover,
  .lang-selector a:hover,
  .copy-btn:hover {
    transform: none;
  }
  
  .skeleton-overlay .sk-header,
  .skeleton-overlay .sk-line {
    animation: none;
  }
}

/* Print accessibility */
@media print {
  .skip-link,
  #nav-button,
  .copy-btn {
    display: none !important;
  }
  
  .content a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
  
  .content a[href^="#"]:after {
    content: "";
  }
}
