:root {
  --docsify-sidebar-width: 300px;
  --docsify-sidebar-min-width: 200px;
  --docsify-sidebar-max-width: 500px;
}

.sidebar {
  position: relative;
  width: var(--docsify-sidebar-width);
}

.content {
  left: var(--docsify-sidebar-width);
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.sidebar-resizer:hover,
body.sidebar-resizing .sidebar-resizer {
  background: rgba(0, 0, 0, 0.08);
}

body.sidebar-resizing,
body.sidebar-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

body[data-theme="light"] pre {
  background: #f6f8fa;
  border-radius: 6px;
}

body[data-theme="light"] pre code {
  background: transparent;
  color: #24292e;
}

body[data-theme="light"] .token.comment,
body[data-theme="light"] .token.prolog,
body[data-theme="light"] .token.doctype,
body[data-theme="light"] .token.cdata {
  color: #6a737d;
}

body[data-theme="light"] .token.keyword {
  color: #d73a49;
}

body[data-theme="light"] .token.string {
  color: #032f62;
}

body[data-theme="light"] .token.function {
  color: #6f42c1;
}

body[data-theme="light"] .token.number {
  color: #005cc5;
}

body[data-theme="light"] .token.operator,
body[data-theme="light"] .token.punctuation {
  color: #24292e;
}

body[data-theme="dark"] pre {
  background: #1e1e1e !important;
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
}

body[data-theme="dark"] pre code {
  background: transparent !important;
  color: #e6edf3 !important;
  font-size: 14px;
  line-height: 1.6;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Scrollbar (like ChatGPT/GitHub) */
body[data-theme="dark"] pre::-webkit-scrollbar {
  height: 6px;
}

body[data-theme="dark"] pre::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

/* Syntax highlighting (GitHub-like) */
body[data-theme="dark"] .token.comment,
body[data-theme="dark"] .token.prolog,
body[data-theme="dark"] .token.doctype,
body[data-theme="dark"] .token.cdata {
  color: #8b949e !important;
}

body[data-theme="dark"] .token.keyword {
  color: #ff7b72 !important;
}

body[data-theme="dark"] .token.string {
  color: #a5d6ff !important;
}

body[data-theme="dark"] .token.function {
  color: #d2a8ff !important;
}

body[data-theme="dark"] .token.number {
  color: #79c0ff !important;
}

body[data-theme="dark"] .token.operator {
  color: #ff7b72 !important;
}

body[data-theme="dark"] .token.class-name {
  color: #ffa657 !important;
}

body[data-theme="dark"] .token.operator,
body[data-theme="dark"] .token.punctuation {
  color: #e6edf3 !important;
}

body[data-theme="dark"] .token.symbol {
  color: #f0f6fc !important;
}

body[data-theme="dark"] .token.punctuation {
  font-weight: 500;
}

body[data-theme="dark"] .token.punctuation {
  color: #c9d1d9 !important;
}

body[data-theme="dark"] .token.punctuation.bracket,
body[data-theme="dark"] .token.punctuation {
  color: #79c0ff !important;
}

body[data-theme="dark"] .token.operator {
  color: #ffb86c !important;
  font-weight: 500;
}

body[data-theme="dark"] .token.symbol {
  color: #f0f6fc !important;
}

body[data-theme="dark"] .token.punctuation {
  font-weight: 500;
}

@media screen and (max-width: 767px) {
  .sidebar {
    width: auto;
  }

  .content {
    left: 0;
  }

  .sidebar-resizer {
    display: none;
  }
}
