@import url(https://s1.hdslb.com/bfs/static/jinkela/long/font/HarmonyOS_Sans_SC_Medium.css);
@import url(https://s1.hdslb.com/bfs/static/jinkela/long/font/HarmonyOS_Sans_SC_Bold.css);
@import url(https://s1.hdslb.com/bfs/static/jinkela/long/font/HarmonyOS_Sans_SC_Black.css);
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
@layer properties;
@layer theme, base, components, utilities;
@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}
@layer base {
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }
  html, :host {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
      -o-tab-size: 4;
         tab-size: 4;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }
  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }
  b, strong {
    font-weight: bolder;
  }
  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }
  small {
    font-size: 80%;
  }
  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }
  :-moz-focusring {
    outline: auto;
  }
  progress {
    vertical-align: baseline;
  }
  summary {
    display: list-item;
  }
  ol, ul, menu {
    list-style: none;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }
  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }
  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }
  ::file-selector-button {
    margin-inline-end: 4px;
  }
  ::-moz-placeholder {
    opacity: 1;
  }
  ::placeholder {
    opacity: 1;
  }
  @supports (not (-webkit-appearance: -apple-pay-button))  or (contain-intrinsic-size: 1px) {
    ::-moz-placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
    ::placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }
  textarea {
    resize: vertical;
  }
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }
  ::-webkit-datetime-edit {
    display: inline-flex;
  }
  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }
  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }
  :-moz-ui-invalid {
    box-shadow: none;
  }
  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    -webkit-appearance: button;
       -moz-appearance: button;
            appearance: button;
  }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
@layer utilities {
  .visible {
    visibility: visible;
  }
  .fixed {
    position: fixed;
  }
  .container {
    width: 100%;
    @media (width >= 40rem) {
      max-width: 40rem;
    }
    @media (width >= 48rem) {
      max-width: 48rem;
    }
    @media (width >= 64rem) {
      max-width: 64rem;
    }
    @media (width >= 80rem) {
      max-width: 80rem;
    }
    @media (width >= 96rem) {
      max-width: 96rem;
    }
  }
  .block {
    display: block;
  }
  .flex {
    display: flex;
  }
  .hidden {
    display: none;
  }
  .table {
    display: table;
  }
  .rotate-180 {
    rotate: 180deg;
  }
  .transform {
    transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
  }
  .resize {
    resize: both;
  }
}
body {
  font-family: -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Helvetica Neue",
    Arial,
    
    "HarmonyOS Sans SC",
    
    "PingFang SC",     
    "Microsoft YaHei",  
    "Source Han Sans SC", 
    "Noto Sans CJK SC",   
    sans-serif,
    
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol";
  font-size: 10px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga" 1, "calt" 1;
}
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Helvetica Neue",
    Arial,
    "HarmonyOS Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
code, kbd, samp, pre {
  font-family: "JetBrains Mono",   
    "Fira Code",        
    "Cascadia Code",    
    "SF Mono",          
    "Monaco",           
    "Consolas",         
    "Liberation Mono",  
    "Courier New",
    
    "PingFang SC",
    "Microsoft YaHei",
    monospace;
  font-feature-settings: "liga" 1, "calt" 1;
  font-variant-ligatures: common-ligatures;
}
.tabular-numbers {
  font-variant-numeric: tabular-nums;
}
:root {
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-tertiary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --border-color: #e5e7eb;
  --border-hover: #d1d5db;
  --accent-primary: #3b82f6;
  --code-bg: #f3f4f6;
  --code-text: #ef4444;
  --font-size-body: 15px;
  --font-size-code: 14px;
}
[data-theme='dark'] {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --bg-primary: #1a1d21;
  --bg-secondary: #25282d;
  --bg-tertiary: #2d3136;
  --border-color: #374151;
  --border-hover: #4b5563;
  --accent-primary: #818cf8;
  --code-bg: #2d3136;
  --code-text: #fca5a5;
}
@property --tw-rotate-x {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-y {
  syntax: "*";
  inherits: false;
}
@property --tw-rotate-z {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-x {
  syntax: "*";
  inherits: false;
}
@property --tw-skew-y {
  syntax: "*";
  inherits: false;
}
@layer properties {
  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
    *, ::before, ::after, ::backdrop {
      --tw-rotate-x: initial;
      --tw-rotate-y: initial;
      --tw-rotate-z: initial;
      --tw-skew-x: initial;
      --tw-skew-y: initial;
    }
  }
}


/* Dialog Overlay */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Dialog Content */
.dialog-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  max-width: calc(48rem + 40px);
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

[data-theme='dark'] .dialog-content {
  background: #1e293b;
  color: #e2e8f0;
}

/* Dialog Header */
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme='dark'] .dialog-header {
  border-bottom-color: #334155;
}

.dialog-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

[data-theme='dark'] .dialog-title {
  color: #f1f5f9;
}

.dialog-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 8px;
  color: #64748b;
  transition: all 0.2s;
}

.dialog-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme='dark'] .dialog-close:hover {
  background: #334155;
  color: #f1f5f9;
}

/* Dialog Body - Scrollable Container */
.dialog-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.dialog-description {
  padding: 0 1.25rem;
  margin: 0.5rem 0;
  color: #64748b;
  font-size: 0.875rem;
}

[data-theme='dark'] .dialog-description {
  color: #94a3b8;
}

/* Toolbar */
.dialog-toolbar {
  padding: 0 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Select Container */
.dialog-select-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dialog-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
}

[data-theme='dark'] .dialog-label {
  color: #cbd5e1;
}

.dialog-select {
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  background: white;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 200px;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  transform: scale(1);
  opacity: 1;
  animation: selectFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes selectFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(-2px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 自定义下拉选择组件 */
.custom-select-wrapper {
  position: relative;
  min-width: 200px;
}

.custom-select-button {
  width: 100%;
  padding: 0.3rem 0.5rem 0.3rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  background: white;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  animation: selectFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-button:hover {
  border-color: #3b82f6;
  background-color: #eff6ff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 2px 8px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.custom-select-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-arrow {
  color: #64748b;
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-button:hover .custom-select-arrow {
  color: #3b82f6;
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 4px;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-select-option {
  margin-top: 0.125rem;
  padding: 0.425rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0;
  position: relative;
}

.custom-select-option:hover {
  background: #eff6ff;
  color: #3b82f6;
  transform: translateX(2px);
}

.custom-select-option.selected {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.custom-select-option.selected:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateX(2px);
}

.custom-select-check {
  flex-shrink: 0;
  margin-left: 0.5rem;
  animation: checkFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 滚动条样式 */
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Dark theme for custom select */
[data-theme='dark'] .custom-select-button {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme='dark'] .custom-select-button:hover {
  border-color: #3b82f6;
  background-color: #1e293b;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 2px 8px rgba(59, 130, 246, 0.2);
}

[data-theme='dark'] .custom-select-arrow {
  color: #94a3b8;
}

[data-theme='dark'] .custom-select-button:hover .custom-select-arrow {
  color: #3b82f6;
}

[data-theme='dark'] .custom-select-dropdown {
  background: #1e293b;
  border-color: #475569;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .custom-select-option {
  color: #e2e8f0;
  background: #1e293b;
}

[data-theme='dark'] .custom-select-option:hover {
  background: #334155;
  color: #3b82f6;
}

[data-theme='dark'] .custom-select-option.selected {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

[data-theme='dark'] .custom-select-option.selected:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

[data-theme='dark'] .custom-select-dropdown::-webkit-scrollbar-track {
  background: #0f172a;
}

[data-theme='dark'] .custom-select-dropdown::-webkit-scrollbar-thumb {
  background: #475569;
}

[data-theme='dark'] .custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* 当前编辑主题信息栏样式 */
.current-category-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.625rem;
  background-color: #f8fafc;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme='dark'] .current-category-info {
  background-color: #1e293b;
  color: #cbd5e1;
  border-bottom-color: #334155;
}

.current-category-info strong {
  color: #0f172a;
  font-weight: 600;
}

[data-theme='dark'] .current-category-info strong {
  color: #f1f5f9;
}

.current-category-info .dialog-button {
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dialog-select:hover {
  border-color: #3b82f6;
  background-color: #eff6ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%233b82f6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 2px 8px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.dialog-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 2px 12px rgba(59, 130, 246, 0.2);
  background-color: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%233b82f6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transform: translateY(-1px);
}

.dialog-select:active {
  transform: translateY(0) scale(0.99);
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] .dialog-select {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

/* Tree Container */
.tree-container {
  flex: 1;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin: 0 1.25rem 1rem;
  padding: 0.625rem 0.5rem;
  background: #f8fafc;
  min-height: 400px;
}

[data-theme='dark'] .tree-container {
  background: #0f172a;
  border-color: #334155;
}

.tree-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6b7280;
}

/* Tree Styles */
.tree-root {
  width: 100%;
}

.tree-root ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tree-root li {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.tree-node {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tree-node:hover {
  background-color: rgba(59, 130, 246, 0.04);
}

[data-theme='dark'] .tree-node:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.tree-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 0.5rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  border-radius: 6px;
}

.tree-toggle:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

[data-theme='dark'] .tree-toggle:hover {
  color: #f1f5f9;
}

.tree-spacer {
  width: 16px;
  margin-right: 0.5rem;
}

.tree-icon {
  margin-right: 0.5rem;
  color: #64748b;
  display: flex;
  align-items: center;
}

[data-theme='dark'] .tree-icon {
  color: #94a3b8;
}

.tree-text {
  font-size: 0.875rem;
  color: #0f172a;
  flex: 1;
  cursor: text;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.2s;
}

.tree-text:hover {
  background-color: rgba(59, 130, 246, 0.06);
}

[data-theme='dark'] .tree-text {
  color: #e2e8f0;
}

[data-theme='dark'] .tree-text:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

/* 编辑触发按钮 */
.tree-edit-trigger {
  opacity: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  margin-left: 4px;
}

.tree-node:hover .tree-edit-trigger {
  opacity: 1;
}

.tree-edit-trigger:hover {
  background: #f1f5f9;
  color: #3b82f6;
}

[data-theme='dark'] .tree-edit-trigger:hover {
  background: #334155;
  color: #60a5fa;
}

/* 编辑输入框容器 */
.tree-edit-container {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.tree-edit-input {
  flex: 1;
  padding: 4px 10px;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #0f172a;
  background: white;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.tree-edit-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

[data-theme='dark'] .tree-edit-input {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #60a5fa;
}

[data-theme='dark'] .tree-edit-input:focus {
  border-color: #3b82f6;
}

/* 编辑按钮 */
.tree-edit-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.tree-edit-save {
  color: #10b981;
}

.tree-edit-save:hover {
  background: #ecfdf5;
  color: #059669;
}

[data-theme='dark'] .tree-edit-save:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* 添加节点按钮 */
.dialog-button-add {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.dialog-button-add:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}

.dialog-button-add:active {
  transform: translateY(0);
}

[data-theme='dark'] .dialog-button-add {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

[data-theme='dark'] .dialog-button-add:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* 文本样式按钮（用于添加节点等轻量操作） */
.dialog-button-text {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  background: transparent;
  border: none;
  color: #afafb3;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
  margin-left: 12px;
  margin-top: 12px;
}

.dialog-button-text:hover {
  color: #4b5563;
  text-decoration: underline;
}

.dialog-button-text:active {
  color: #374151;
}

[data-theme='dark'] .dialog-button-text {
  color: #d1d5db;
}

[data-theme='dark'] .dialog-button-text:hover {
  color: #e5e7eb;
}

/* 添加节点对话框 */
.add-dialog-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.add-dialog-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  width: 90%;
  max-width: 540px;
  position: relative;
  z-index: 10002;
}

[data-theme='dark'] .add-dialog-content {
  background: #1e293b;
}

.add-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme='dark'] .add-dialog-header {
  border-bottom-color: #334155;
}

.add-dialog-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

[data-theme='dark'] .add-dialog-title {
  color: #f1f5f9;
}

.add-dialog-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.add-dialog-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.add-dialog-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

[data-theme='dark'] .add-dialog-label {
  color: #cbd5e1;
}

.add-dialog-input,
.add-dialog-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.875rem;
  background: white;
  color: #0f172a;
  transition: all 0.2s;
}

.add-dialog-input:hover,
.add-dialog-select:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.add-dialog-input:focus,
.add-dialog-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

[data-theme='dark'] .add-dialog-input,
[data-theme='dark'] .add-dialog-select {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

.add-dialog-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.add-dialog-checkbox input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}

.add-dialog-checkbox span {
  font-size: 0.875rem;
  color: #374151;
}

[data-theme='dark'] .add-dialog-checkbox span {
  color: #cbd5e1;
}

.add-dialog-hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
  margin-top: -0.25rem;
}

[data-theme='dark'] .add-dialog-hint {
  color: #94a3b8;
}

.add-dialog-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.625rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme='dark'] .add-dialog-footer {
  border-top-color: #334155;
}

/* 节点操作按钮组 */
.tree-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

/* URL 设置按钮 */
.tree-url-trigger {
  color: #6b7280 !important;
}

.tree-url-trigger:hover {
  background: #f1f5f9 !important;
  color: #3b82f6 !important;
}

.tree-url-trigger.has-url {
  color: #3b82f6 !important;
}

.tree-url-trigger.has-url:hover {
  background: #dbeafe !important;
  color: #2563eb !important;
}

[data-theme='dark'] .tree-url-trigger:hover {
  background: #334155 !important;
  color: #60a5fa !important;
}

[data-theme='dark'] .tree-url-trigger.has-url {
  color: #60a5fa !important;
}

[data-theme='dark'] .tree-url-trigger.has-url:hover {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #3b82f6 !important;
}

/* URL 对话框 */
.url-dialog-content {
  max-width: 600px;
}

.url-preview {
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

[data-theme='dark'] .url-preview {
  background: #0f172a;
  border-color: #334155;
}

.url-preview-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme='dark'] .url-preview-label {
  color: #94a3b8;
}

.url-preview-code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  color: #3b82f6;
  background: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  word-break: break-all;
}

[data-theme='dark'] .url-preview-code {
  background: #1e293b;
  color: #60a5fa;
  border-color: #475569;
}

/* 删除按钮 */
.tree-delete-trigger {
  color: #6b7280 !important;
}

.tree-delete-trigger:hover {
  background: #fef2f2 !important;
  color: #ef4444 !important;
}

[data-theme='dark'] .tree-delete-trigger:hover {
  background: rgba(220, 38, 38, 0.2) !important;
  color: #f87171 !important;
}

/* 删除确认对话框 */
.delete-dialog-content {
  max-width: 480px;
}

.delete-warning {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1rem 0;
}

.delete-warning-icon {
  color: #dc2626;
  opacity: 0.8;
}

[data-theme='dark'] .delete-warning-icon {
  color: #f87171;
}

.delete-warning-text {
  font-size: 1rem;
  color: #374151;
  margin: 0;
  line-height: 1.6;
}

[data-theme='dark'] .delete-warning-text {
  color: #cbd5e1;
}

.delete-warning-text strong {
  color: #111827;
  font-weight: 600;
}

[data-theme='dark'] .delete-warning-text strong {
  color: #f1f5f9;
}

.delete-warning-children {
  font-size: 0.875rem;
  color: #f59e0b;
  margin: 0;
  padding: 0.625rem 0.875rem;
  background: #fffbeb;
  border-radius: 10px;
  border: 1px solid #fde68a;
  width: 100%;
}

[data-theme='dark'] .delete-warning-children {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
}

.delete-warning-children strong {
  font-weight: 700;
}

.delete-warning-notice {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  font-style: italic;
}

[data-theme='dark'] .delete-warning-notice {
  color: #94a3b8;
}

/* 危险按钮 */
.dialog-button-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.dialog-button-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.dialog-button-danger:active:not(:disabled) {
  transform: translateY(0);
}

[data-theme='dark'] .dialog-button-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

[data-theme='dark'] .dialog-button-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Drag & Drop States */
.tree-dragging {
  opacity: 0.4;
}

.tree-drop-target {
  background-color: #dbeafe !important;
  border-radius: 8px;
}

[data-theme='dark'] .tree-drop-target {
  background-color: rgba(59, 130, 246, 0.15) !important;
}

.tree-placeholder {
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 2px;
  margin: 4px 0;
  position: relative;
}

.tree-placeholder::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 0 2px white;
}

/* Dialog Footer */
.dialog-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.625rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

[data-theme='dark'] .dialog-footer {
  border-top-color: #334155;
}

.dialog-button {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  white-space: nowrap;
}

.dialog-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dialog-button-secondary {
  background: white;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.dialog-button-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme='dark'] .dialog-button-secondary {
  background: #334155;
  color: #e2e8f0;
  border-color: #475569;
}

[data-theme='dark'] .dialog-button-secondary:hover:not(:disabled) {
  background: #475569;
}

.dialog-button-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.dialog-button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  transform: translateY(-1px);
}

.dialog-button-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* 主题管理列表项样式 */
.category-manager-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: grab;
  transition: all 0.2s;
}

.category-manager-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

[data-theme='dark'] .category-manager-item {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

.category-manager-item:active {
  cursor: grabbing;
}

.category-manager-item-content {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.category-manager-drag-handle {
  display: flex;
  align-items: center;
  cursor: grab;
  color: #9ca3af;
  padding: 2px;
}

[data-theme='dark'] .category-manager-drag-handle {
  color: #64748b;
}

.category-manager-item-text {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #111827;
  font-size: 13px;
}

[data-theme='dark'] .category-manager-item-text {
  color: #e2e8f0;
}

.category-manager-item-id {
  color: #6b7280;
  font-size: 12px;
}

[data-theme='dark'] .category-manager-item-id {
  color: #9ca3af;
}

.category-manager-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
}

.category-manager-empty {
  color: #6b7280;
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

[data-theme='dark'] .category-manager-empty {
  color: #9ca3af;
}

.category-manager-row input {
  flex: 1 1 140px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  background: white;
  color: #0f172a;
  transition: all 0.2s;
}

.category-manager-row input:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.category-manager-row input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

[data-theme='dark'] .category-manager-row input {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

[data-theme='dark'] .category-manager-row input::-moz-placeholder {
  color: #9ca3af;
}

[data-theme='dark'] .category-manager-row input::placeholder {
  color: #9ca3af;
}

/* 简约风格优化 - 统一间距和样式 */
.category-manager-row {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.dialog-select-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 简约风格优化 - 统一间距和样式 */
.category-manager-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}


.header {
  background-color: #F7F7F8;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: none;
  transition: background-color 0.3s ease;
}

[data-theme='dark'] .header {
  background-color: #1a1d21;
  border-bottom: none;
}

.header-container {
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  gap: 2rem;
}

.logo {
  flex-shrink: 0;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  gap: 0.75rem;
  transition: color 0.3s ease;
}

.logo img {
  width: 24px;
  height: auto;
  border-radius: 8px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.nav-menu a {
  text-decoration: none;
  color: #505256;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

[data-theme='dark'] .nav-menu a {
  color: #cbd5e1;
}

.nav-menu a:hover {
  color: #26272c;
}

[data-theme='dark'] .nav-menu a:hover {
  color: #f1f5f9;
}

.nav-menu a.active {
  color: #26272c;
  font-weight: 600;
}

[data-theme='dark'] .nav-menu a.active {
  color: #f1f5f9;
}


.header-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border-color);
}

.header-right {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.control-btn {
  background-color: transparent;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
}

.control-btn:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--text-tertiary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

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

.login-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.125rem;
  background-color: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.login-btn:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

.login-btn:active {
  background-color: #f3f4f6;
}

[data-theme='dark'] .login-btn {
  background-color: transparent;
  color: #9ca3af;
  border-color: #4b5563;
}

[data-theme='dark'] .login-btn:hover {
  background-color: #374151;
  border-color: #6b7280;
  color: #d1d5db;
}

[data-theme='dark'] .login-btn:active {
  background-color: #4b5563;
}

/* 用户信息显示 */
.user-menu-container {
  position: relative;
}

/* 登录菜单容器 */
.login-menu-container {
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background-color: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.user-info:hover {
  background-color: transparent;
}

.user-info svg:last-child {
  transition: transform 0.2s;
}

.user-info svg.rotate-180 {
  transform: rotate(180deg);
}

/* 登录图标按钮 */
.login-icon-btn {
  padding: 0.5rem;
  color: #6b7280;
  opacity: 0.7;
}

.login-icon-btn:hover {
  background-color: #f3f4f6;
  opacity: 1;
}

[data-theme='dark'] .login-icon-btn {
  color: #9ca3af;
}

[data-theme='dark'] .login-icon-btn:hover {
  background-color: #374151;
  opacity: 1;
}

/* 登录下拉菜单 */
.login-dropdown {
  min-width: 160px;
}

.login-item {
  text-decoration: none;
}

/* 用户下拉菜单 */
.user-dropdown {
  position: absolute;
  top: calc(100% + 0.1rem);
  right: 0;
  min-width: 200px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  overflow: hidden;
  animation: dropdown-fade-in 0.2s ease;
  padding: 0.5rem 0.5rem;
}

@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-theme='dark'] .user-dropdown {
  background-color: #1a1d21;
  border-color: #374151;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.user-dropdown-header {
  padding: 0.5rem 1rem;
  background-color: transparent;
}

[data-theme='dark'] .user-dropdown-header {
  background-color: transparent;
}

.user-dropdown-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.user-dropdown-email {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

[data-theme='dark'] .user-dropdown-email {
  color: #9ca3af;
}


.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: #3f4145;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

[data-theme='dark'] .user-dropdown-item {
  color: #9c9d9e;
}

.user-dropdown-item:hover:not(:disabled) {
  background-color: #F7F7F8;
  color: black;
  border-radius: 6px;
}

[data-theme='dark'] .user-dropdown-item:hover:not(:disabled) {
  background-color: #F7F7F8;
  color: black;
  border-radius: 6px;
}

.user-dropdown-item.edit-item:hover:not(:disabled) {
  background-color: #F7F7F8;
  color: black;
  border-radius: 6px;
}

[data-theme='dark'] .user-dropdown-item.edit-item:hover:not(:disabled) {
  background-color: #F7F7F8;
  color: black;
  border-radius: 6px;
}

.user-dropdown-item:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.logout-item:hover:not(:disabled) {
  background-color: #F7F7F8;
  color: black;
  border-radius: 6px;
}

[data-theme='dark'] .logout-item:hover:not(:disabled) {
  background-color: #F7F7F8;
  color: black;
  border-radius: 6px;
}

/* ========== 移动端适配 ========== */

/* 汉堡菜单按钮 */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
}

.mobile-menu-toggle:active {
  background-color: var(--bg-tertiary);
}

@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .header {
    height: 72px;
  }

  .header-container {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  /* Logo 文字隐藏 */
  .logo span {
    display: none;
  }

  .logo img {
    width: 28px;
  }

  /* 导航菜单默认隐藏 */
  .nav-menu {
    display: none;
  }

  /* 用户菜单触摸优化 */
  .user-info,
  .login-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .user-info span {
    display: none;
  }

  .login-btn span {
    display: none;
  }

  .user-dropdown {
    position: fixed;
    right: 1rem;
    top: 64px;
    width: calc(100vw - 2rem);
    max-width: 280px;
  }
}

@media (max-width: 374px) {
  .header {
    height: 60px;
  }

  .header-container {
    padding: 0 0.75rem;
  }

  .user-dropdown {
    top: 60px;
  }
}

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

.layout {
  min-height: 100vh;
  background-color: #F7F7F8;
  transition: background-color 0.3s ease;
}

[data-theme='dark'] .layout {
  background-color: #0f172a;
}

.main-container {
  display: flex;
  width: 100%;
  margin: 0;
}

.content-area {
  flex: 1;
  min-width: 0;
  background-color: #ffffff;
  position: relative;
  transition: margin-left 0.3s ease, background-color 0.3s ease;
  margin: 1.5rem;
  margin-left: 0 !important;
  padding: 1rem 2rem;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-top: 0 !important;
}

[data-theme='dark'] .content-area {
  background-color: #1a1d21;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.content-area.sidebar-hidden {
  margin-left: 0;
}

.page-nav-inline {
  position: fixed;
  right: 1.5rem;
  top: 84px;
  width: 240px;
  height: calc(100vh - 100px);
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-nav-inline.page-nav-collapsed {
  transform: translateX(calc(100% + 1.5rem));
  width: 0;
  padding: 0;
  border: none;
  overflow: hidden;
  pointer-events: none;
}

.content-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.markdown-pane {
  flex: 1;
  padding: 16px;
  position: relative;
  min-width: 0; /* 允许 flex 项目缩小 */
  margin-right: 260px; /* 为 PageNav 预留空间：240px 宽度 + 20px 间距 */
}

/* ========== 响应式断点优化 ========== */

/* 平板竖屏和小笔记本：768px-1279px - 完全隐藏 PageNav */
@media (min-width: 768px) and (max-width: 1279px) {
  .page-nav-inline {
    display: none;
  }

  .markdown-pane {
    max-width: 100%;
    margin-right: 0; /* 移除右边距 */
  }
}

/* 中等桌面：1280px-1599px - PageNav 显示，但优化布局 */
@media (min-width: 1280px) and (max-width: 1599px) {
  .page-nav-inline {
    width: 200px; /* 稍微缩小 PageNav 宽度 */
    right: 1rem; /* 调整右边距 */
  }

  .markdown-pane {
    margin-right: 220px; /* 200px + 20px */
  }

  .markdown-content {
    max-width: 800px; /* 限制内容宽度，保持可读性 */
  }
}

/* 大屏桌面：1600px+ - 完整三栏布局 */
@media (min-width: 1600px) {
  .page-nav-inline {
    width: 240px;
    right: 1.5rem;
  }

  .markdown-pane {
    margin-right: 260px; /* 240px + 20px */
  }

  .markdown-content {
    max-width: 900px;
  }
}

.page-nav-empty {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* Markdown 渲染基础样式 */
.markdown-content {
  color: #111827;
  line-height: 1.7;
  font-size: var(--font-size-body, 15px); /* 使用 CSS 变量，便于统一调整 */
  max-width: 900px; /* 限制最大宽度 */
  margin: 0 auto; /* 居中显示 */
}

[data-theme='dark'] .markdown-content {
  color: #e2e8f0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin: 1.2em 0 0.6em;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}

[data-theme='dark'] .markdown-content h1,
[data-theme='dark'] .markdown-content h2,
[data-theme='dark'] .markdown-content h3,
[data-theme='dark'] .markdown-content h4,
[data-theme='dark'] .markdown-content h5,
[data-theme='dark'] .markdown-content h6 {
  color: #f1f5f9;
}

.markdown-content h1 { font-size: 2rem; }
.markdown-content h2 { font-size: 1.6rem; }
.markdown-content h3 { font-size: 1.3rem; }
.markdown-content h4 { font-size: 1.15rem; }
.markdown-content h5 { font-size: 1rem; }
.markdown-content h6 { font-size: 0.95rem; }

.markdown-content p {
  margin: 0.8em 0;
}

.markdown-content ul,
.markdown-content ol {
  margin: 0.6em 0 0.6em 1.4em;
  padding-left: 0;
}

.markdown-content ul { list-style: disc; }
.markdown-content ol { list-style: decimal; }

.markdown-content li {
  margin: 0.3em 0;
}

.markdown-content a {
  color: #2563eb;
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

[data-theme='dark'] .markdown-content a {
  color: #60a5fa;
}

[data-theme='dark'] .markdown-content a:hover {
  color: #93c5fd;
}

.markdown-content code {
  background: #f3f4f6;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.95em;
  color: #111827;
}

[data-theme='dark'] .markdown-content code {
  background: #2d3748;
  color: #e2e8f0;
}

.markdown-content pre {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1em;
  overflow: auto;
  margin: 1em 0;
}

[data-theme='dark'] .markdown-content pre {
  background: #1e293b;
  border-color: #334155;
}

[data-theme='dark'] .markdown-content pre code {
  background: transparent;
  color: #e2e8f0;
}

.markdown-content img {
  max-width: 100%;
  display: block;
  margin: 1em 0;
}

.sidebar-expand-handle {
  position: fixed;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 0.5rem;
  cursor: pointer;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  width: 28px;
  height: 80px;
}

[data-theme='dark'] .sidebar-expand-handle {
  background: #2d3748;
  border-color: #475569;
  color: #94a3b8;
}

.sidebar-expand-handle:hover {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
  left: -6px;
  box-shadow: 2px 0 12px rgba(203, 213, 225, 0.6), 0 0 20px rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.05);
}

[data-theme='dark'] .sidebar-expand-handle:hover {
  background: #374151;
  color: #cbd5e1;
}

.sidebar-expand-handle:active {
  transform: translateY(-50%) scale(0.95);
}

/* 页面导航展开按钮 */
.page-nav-expand-handle {
  position: fixed;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  z-index: 9999;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px 0 0 8px;
  padding: 1.5rem 0.5rem;
  cursor: pointer;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  width: 28px;
  height: 80px;
}

[data-theme='dark'] .page-nav-expand-handle {
  background: #2d3748;
  border-color: #475569;
  color: #94a3b8;
}

.page-nav-expand-handle:hover {
  background: #e2e8f0;
  color: #334155;
  border-color: #cbd5e1;
  right: -6px;
  box-shadow: -2px 0 12px rgba(203, 213, 225, 0.6), 0 0 20px rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) rotate(180deg) scale(1.05);
}

[data-theme='dark'] .page-nav-expand-handle:hover {
  background: #374151;
  color: #cbd5e1;
}

.page-nav-expand-handle:active {
  transform: translateY(-50%) rotate(180deg) scale(0.95);
}

/* 无文档提示信息样式 */
.no-document-message {
  padding: 60px 20px;
  text-align: center;
  color: #666;
}

[data-theme='dark'] .no-document-message {
  color: #9ca3af;
}

.no-document-title {
  font-size: 18px;
  margin-bottom: 12px;
  color: #666;
}

[data-theme='dark'] .no-document-title {
  color: #d1d5db;
}

.no-document-subtitle {
  font-size: 14px;
  color: #999;
}

[data-theme='dark'] .no-document-subtitle {
  color: #9ca3af;
}

/* ========== 移动端适配 ========== */

/* 侧边栏宽度调整手柄 */
.sidebar-resize-handle {
  position: fixed;
  left: var(--sidebar-width, 280px);
  top: 72px;
  width: 6px;
  height: calc(100vh - 72px);
  cursor: ew-resize;
  background: transparent;
  z-index: 1001;
  transition: background-color 0.2s, left 0.05s;
  margin-left: -3px; /* 居中对齐 */
}

.sidebar-resize-handle:hover {
  background-color: rgba(59, 130, 246, 0.5);
  width: 8px;
  margin-left: -4px;
}

.sidebar-resize-handle:active {
  background-color: #2563eb;
  width: 8px;
  margin-left: -4px;
}

[data-theme='dark'] .sidebar-resize-handle:hover {
  background-color: rgba(129, 140, 248, 0.5);
}

[data-theme='dark'] .sidebar-resize-handle:active {
  background-color: #6366f1;
}

/* 页面导航宽度调整手柄 */
.page-nav-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  z-index: 10;
  transition: background-color 0.2s;
}

.page-nav-resize-handle:hover {
  background-color: #3b82f6;
}

.page-nav-resize-handle:active {
  background-color: #2563eb;
}

[data-theme='dark'] .page-nav-resize-handle:hover {
  background-color: #818cf8;
}

[data-theme='dark'] .page-nav-resize-handle:active {
  background-color: #6366f1;
}

/* .page-nav-inline 的 position 已在文件开头设置为 fixed，此处不再重复设置 */

/* 页面导航悬浮按钮 */
.page-nav-toggle-fab {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  cursor: pointer;
  z-index: 900;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-nav-toggle-fab:hover {
  background: #2563eb;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.page-nav-toggle-fab:active {
  transform: scale(0.95);
}

.page-nav-toggle-fab.active {
  background: #1e40af;
}

[data-theme='dark'] .page-nav-toggle-fab {
  background: #818cf8;
}

[data-theme='dark'] .page-nav-toggle-fab:hover {
  background: #6366f1;
}

[data-theme='dark'] .page-nav-toggle-fab.active {
  background: #4f46e5;
}

/* 在 768px-1279px 显示悬浮按钮 */
@media (min-width: 768px) and (max-width: 1279px) {
  .page-nav-toggle-fab {
    display: flex;
  }

  /* 页面导航默认隐藏 */
  .page-nav-inline:not(.page-nav-visible) {
    display: none;
  }

  /* 显示时使用固定定位 */
  .page-nav-inline.page-nav-visible {
    display: block;
    position: fixed; /* 保持 fixed */
    right: 0;
    top: 72px;
    height: calc(100vh - 72px);
    width: 280px; /* 固定宽度 */
    background: var(--bg-primary);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    z-index: 950;
    overflow-y: auto;
  }

  [data-theme='dark'] .page-nav-inline.page-nav-visible {
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 767px) {
  /* 移动端：防止页面级横向溢出（常见原因：长链接/长单词/某些块级元素撑开） */
  html,
  body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .main-container {
    flex-direction: column;
    max-width: 100%;
  }

  .content-area {
    margin: 0;
    padding: 1rem;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    overflow-x: hidden;
  }

  .content-body {
    flex-direction: column;
    max-width: 100%;
  }

  .markdown-pane {
    padding: 0;
    margin-right: 0; /* 移除右边距 */
    max-width: 100%;
    min-width: 0;
  }

  .markdown-content {
    max-width: 100%;
    font-size: 15px;
    line-height: 1.65;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* flex 子项默认 min-width:auto 可能撑出容器，这里统一允许收缩 */
  .content-body > * {
    min-width: 0;
    max-width: 100%;
  }

  /* 标题字号调整 */
  .markdown-content h1 { font-size: 1.75rem; }
  .markdown-content h2 { font-size: 1.5rem; }
  .markdown-content h3 { font-size: 1.25rem; }
  .markdown-content h4 { font-size: 1.125rem; }

  /* 代码块优化 */
  .markdown-content pre {
    border-radius: 8px;
    padding: 0.875rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 表格横向滚动 */
  .markdown-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* PageNav 移动端完全隐藏 */
  .page-nav-inline {
    display: none;
  }

  /* 侧边栏展开按钮移除 */
  .sidebar-expand-handle {
    display: none;
  }

  /* 移动端隐藏页面导航悬浮按钮 */
  .page-nav-toggle-fab {
    display: none !important;
  }

  /* 移动端隐藏宽度调整手柄 */
  .sidebar-resize-handle,
  .page-nav-resize-handle {
    display: none;
  }

  /* 无文档提示优化 */
  .no-document-message {
    padding: 2rem 1rem;
    text-align: center;
  }
}

@media (max-width: 374px) {
  .content-area {
    padding: 0.75rem;
  }

  .markdown-content {
    font-size: 14px;
  }

  .markdown-content h1 { font-size: 1.5rem; }
  .markdown-content h2 { font-size: 1.375rem; }
  .markdown-content h3 { font-size: 1.125rem; }
}

.page-nav {
  width: 100%;
  height: -moz-fit-content;
  height: fit-content;
  max-height: 100%; /* 继承父容器的 max-height */
  overflow-y: auto;
  padding: 1.5rem;
  border-left: 1px solid #e5e7eb;
}

.page-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.page-nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.page-nav-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.page-nav-collapse-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #1e293b;
  transform: scale(1.05);
}

.page-nav-collapse-btn:active {
  transform: scale(0.95);
}

[data-theme='dark'] .page-nav-collapse-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

[data-theme='dark'] .page-nav-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

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

.page-nav-item {
  margin-bottom: 0.5rem;
}

.page-nav-item a {
  display: block;
  text-decoration: none;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.25rem 0;
  transition: color 0.2s;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
}

/* Level 1 - 最大、最粗、颜色最深 */
.page-nav-item.level-1 a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  padding-left: 0.75rem;
}

/* Level 2 - 中等大小、稍微缩进 */
.page-nav-item.level-2 a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  padding-left: 1.125rem;
}

/* Level 3 - 较小、更多缩进、颜色较浅 */
.page-nav-item.level-3 a {
  padding-left: 1.75rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #6b7280;
}

.page-nav-item a:hover {
  color: #3b82f6;
}

.page-nav-item.active a {
  color: #3b82f6;
  border-left-color: #3b82f6;
}

/* Active 状态下保持各级别的字体粗细 */
.page-nav-item.level-1.active a {
  font-weight: 600;
}

.page-nav-item.level-2.active a {
  font-weight: 500;
}

.page-nav-item.level-3.active a {
  font-weight: 400;
}

.page-nav::-webkit-scrollbar {
  width: 4px;
}

.page-nav::-webkit-scrollbar-track {
  background: transparent;
}

.page-nav::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}

.page-nav::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* 暗色主题样式 */
[data-theme='dark'] .page-nav {
  border-left-color: #374151;
}

[data-theme='dark'] .page-nav-title {
  color: #f9fafb;
}

[data-theme='dark'] .page-nav-item a {
  color: #9ca3af;
}

[data-theme='dark'] .page-nav-item.level-1 a {
  color: #f9fafb;
}

[data-theme='dark'] .page-nav-item.level-2 a {
  color: #d1d5db;
}

[data-theme='dark'] .page-nav-item.level-3 a {
  color: #9ca3af;
}

[data-theme='dark'] .page-nav-item a:hover {
  color: #818cf8;
}

[data-theme='dark'] .page-nav-item.active a {
  color: #818cf8;
  border-left-color: #818cf8;
}

[data-theme='dark'] .page-nav::-webkit-scrollbar-thumb {
  background: #4b5563;
}

[data-theme='dark'] .page-nav::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

.sidebar {
  /* width 由 inline style 控制，默认 280px */
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 72px;
  left: 0;
  border-right: none;
  background: #F7F7F8;
  padding: 0;
  box-shadow: none;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

[data-theme='dark'] .sidebar {
  background: #1a1d21;
  border-right: none;
}

.sidebar.sidebar-collapsed {
  transform: translateX(-100%);
  width: 0;
  padding: 0;
  border: none;
  overflow: hidden;
  pointer-events: none;
}

.sidebar-toggle-handle {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem 0.5rem;
  cursor: pointer;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  width: 28px;
  height: 80px;
}

[data-theme='dark'] .sidebar-toggle-handle {
  background: #2d3748;
  border-color: #475569;
  color: #94a3b8;
}

.sidebar-toggle-handle:hover {
  background: #f1f5f9;
  color: #334155;
  right: -6px;
  border-radius:8px;
  box-shadow: 2px 0 12px rgba(203, 213, 225, 0.6), 0 0 20px rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.05);
}

[data-theme='dark'] .sidebar-toggle-handle:hover {
  background: #374151;
  color: #cbd5e1;
}

.sidebar-toggle-handle:active {
  transform: translateY(-50%) scale(0.95);
}

.sidebar.sidebar-collapsed .sidebar-toggle-handle {
  position: fixed !important;
  left: -6px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 0 8px 8px 0;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  pointer-events: auto;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 28px;
  height: 80px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.sidebar.sidebar-collapsed .sidebar-toggle-handle:hover {
  left: -18px;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: none;
  background: transparent;
  backdrop-filter: none;
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000;
  padding: 0 1.5rem 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.sidebar-close-btn {
  background: rgba(0, 0, 0, 0.04);
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #64748b;
  font-size: 1.125rem;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

[data-theme='dark'] .sidebar-close-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.sidebar-close-btn:hover {
  color: #1e293b;
  background-color: rgba(0, 0, 0, 0.08);
  transform: scale(1.05);
}

[data-theme='dark'] .sidebar-close-btn:hover {
  color: #e2e8f0;
  background-color: rgba(255, 255, 255, 0.12);
}

.sidebar-close-btn:active {
  transform: scale(0.95);
}

.search-box {
  margin: 0rem 1.5rem 0rem;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  color: #94a3b8;
  pointer-events: none;
  z-index: 1;
  transition: color 0.2s;
}

[data-theme='dark'] .search-icon {
  color: #64748b;
}

.search-input {
  width: 100%;
  padding: 0.325rem 0.875rem 0.325rem 2.5rem;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #ffffff;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] .search-input {
  background-color: #2a2e34;
  color: #e2e8f0;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
}

.search-input::-moz-placeholder {
  color: #94a3b8;
}

.search-input::placeholder {
  color: #94a3b8;
}

[data-theme='dark'] .search-input::-moz-placeholder {
  color: #64748b;
}

[data-theme='dark'] .search-input::placeholder {
  color: #64748b;
}

.search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
}

.search-box:focus-within .search-icon {
  color: #3b82f6;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0.75rem 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.toc-item {
  display: flex;
  flex-direction: column;
}

.toc-item.active {
  background-color: transparent;
}

.toc-item-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.325rem 1rem;
  border-radius: 8px;
  margin: 0.125rem 0;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

.toc-item-content.active {
  background: #E1E7F5;
  box-shadow: 0 1px 3px rgba(26, 86, 219, 0.16);
}

[data-theme='dark'] .toc-item-content.active {
  background: rgba(26, 86, 219, 0.16);
  box-shadow: 0 1px 4px rgba(26, 86, 219, 0.25);
}

.toc-item-content:hover:not(.active):not(.clicked):not(.selected) {
  background-color: rgba(0, 0, 0, 0.04);
}

[data-theme='dark'] .toc-item-content:hover:not(.active):not(.clicked):not(.selected) {
  background-color: rgba(255, 255, 255, 0.06);
}

.toc-item-icon {
  font-size: 1rem;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6b7280;
  transition: color 0.2s;
}

[data-theme='dark'] .toc-item-icon {
  color: #94a3b8;
}

.toc-item-content.active .toc-item-icon {
  color: rgb(var(--primary, 26 86 219));
}

[data-theme='dark'] .toc-item-content.active .toc-item-icon {
  color: rgb(var(--primary, 26 86 219));
}

/* Document 类型点击后的样式 - 应用到最外层 div */
.toc-item-content.clicked {
  background-color: #E1E7F5;
  border-radius: 8px;
  transition: background-color 0.2s, border-radius 0.2s;
  box-shadow: 0 1px 3px rgba(26, 86, 219, 0.16);
}

[data-theme='dark'] .toc-item-content.clicked {
  background-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
  border-left: 2px solid rgba(59, 130, 246, 0.6);
}

/* 为不同层级的 clicked 状态调整 padding，补偿 border-left */
[data-theme='dark'] .level-1 > .toc-item-content.clicked {
  padding-left: calc(1rem - 2px);
}

[data-theme='dark'] .level-2 > .toc-item-content.clicked {
  padding-left: calc(0.5rem - 2px);
}

[data-theme='dark'] .level-1 .toc-children .toc-item-content.clicked {
  padding-left: calc(1rem + 2ch - 2px);
}

[data-theme='dark'] .level-3 > .toc-item-content.clicked {
  padding-left: calc(2rem - 2px);
}

/* Document 类型点击后，icon 的样式 */
.toc-item-content.clicked .toc-item-icon {
  background-color: rgba(26, 86, 219, 0.1);
  color: rgb(var(--primary, 26 86 219));
}

[data-theme='dark'] .toc-item-content.clicked .toc-item-icon {
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

/* Document 类型点击后，label 的样式 */
.toc-item-content.clicked .toc-label {
  color: rgb(var(--primary, 26 86 219));
  font-weight: 600;
}

[data-theme='dark'] .toc-item-content.clicked .toc-label {
  color: #93c5fd;
  font-weight: 600;
}

/* Document 类型点击后，icon 的样式（带 clicked 类） */
.toc-item-content.clicked .toc-item-icon.clicked {
  background-color: rgba(26, 86, 219, 0.1);
  color: rgb(var(--primary, 26 86 219));
}

[data-theme='dark'] .toc-item-content.clicked .toc-item-icon.clicked {
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

/* Document 类型点击后，label 的样式（带 clicked 类） */
.toc-item-content.clicked .toc-label.clicked {
  color: rgb(var(--primary, 26 86 219));
  font-weight: 600;
}

[data-theme='dark'] .toc-item-content.clicked .toc-label.clicked {
  color: #93c5fd;
  font-weight: 600;
}

/* Document 类型选中后的样式 */
.toc-item-content.selected {
  background-color: #E1E7F5;
  box-shadow: 0 1px 3px rgba(26, 86, 219, 0.16);
}

[data-theme='dark'] .toc-item-content.selected {
  background-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
  border-left: 2px solid rgba(59, 130, 246, 0.6);
}

/* 为不同层级的 selected 状态调整 padding，补偿 border-left */
[data-theme='dark'] .level-1 > .toc-item-content.selected {
  padding-left: calc(1rem - 2px);
}

[data-theme='dark'] .level-2 > .toc-item-content.selected {
  padding-left: calc(0.5rem - 2px);
}

[data-theme='dark'] .level-1 .toc-children .toc-item-content.selected {
  padding-left: calc(1rem + 2ch - 2px);
}

[data-theme='dark'] .level-3 > .toc-item-content.selected {
  padding-left: calc(2rem - 2px);
}

/* Document 类型选中后，icon 的样式 */
.toc-item-content.selected .toc-item-icon {
  background-color: rgba(26, 86, 219, 0.1);
  color: rgb(var(--primary, 26 86 219));
}

[data-theme='dark'] .toc-item-content.selected .toc-item-icon {
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

/* Document 类型选中后，label 的样式 */
.toc-item-content.selected .toc-label.selected {
  color: rgb(var(--primary, 26 86 219));
  font-weight: 600;
}

[data-theme='dark'] .toc-item-content.selected .toc-label.selected {
  color: #93c5fd;
  font-weight: 600;
}

.toc-chevron {
  margin-left: auto;
  font-size: 0.7rem;
  color: #9ca3af;
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toc-chevron.expanded {
  transform: rotate(0deg);
}

.toc-item-content.active .toc-chevron {
  color: #9ca3af;
}

.toc-arrow {
  margin-left: auto;
  font-size: 0.875rem;
  color: #9ca3af;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.toc-item-content:hover .toc-arrow {
  opacity: 1;
}

.toc-link,
.toc-label {
  text-decoration: none;
  color: #475569;
  font-size: 0.875rem;
  cursor: pointer;
  flex: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.6;
  font-weight: 400;
}

[data-theme='dark'] .toc-link,
[data-theme='dark'] .toc-label {
  color: lab(97.51% -0.12 -1.68) !important;
}

.toc-link.active,
.toc-label.active {
  color: rgb(var(--primary, 26 86 219));
  font-weight: 600;
}

[data-theme='dark'] .toc-link.active,
[data-theme='dark'] .toc-label.active {
  color: rgb(var(--primary, 26 86 219));
}

/* .toc-link:hover:not(.active) {
  color: #1e293b;
} */

/* [data-theme='dark'] .toc-link:hover:not(.active) {
  color: #f1f5f9;
}

.toc-label:hover:not(.active) {
  color: #1e293b;
}

[data-theme='dark'] .toc-label:hover:not(.active) {
  color: #f1f5f9;
} */


/* API 方法标签 */
.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  min-width: 48px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.method-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Sidebar footer controls */
.sidebar-footer {
  margin: 0 1.5rem 1.5rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  gap: 1.5rem;
}

[data-theme='dark'] .sidebar-footer {
  background: #111827;
  border-color: #1f2937;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.sidebar-language {
  position: relative;
  width:140px;
}

.lang-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #1f2937;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-trigger:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

[data-theme='dark'] .lang-trigger {
  background: #1f2937;
  border-color: #334155;
  color: #e5e7eb;
}

[data-theme='dark'] .lang-trigger:hover {
  border-color: #475569;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.lang-flag-wrap {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 12px;
}

.lang-flag-wrap img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 999px;
  display: block;
}

.lang-flag-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(26, 86, 219, 0.08);
  pointer-events: none;
}

[data-theme='dark'] .lang-flag-ring {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(99, 102, 241, 0.12);
}

.lang-trigger-text {
  flex: 1;
  text-align: left;
  font-size: 12px;
}

.lang-trigger-chevron {
  color: #9ca3af;
  transition: transform 0.2s ease;
}

.lang-trigger-chevron.open {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  z-index: 10;
}

[data-theme='dark'] .lang-menu {
  background: #0f172a;
  border-color: #1f2937;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.lang-option:hover {
  background-color: #f1f5f9;
}

[data-theme='dark'] .lang-option {
  color: #e5e7eb;
}

[data-theme='dark'] .lang-option:hover {
  background-color: #1f2937;
}

.lang-option.active {
  background-color: #eef2ff;
  color: #1d4ed8;
}

[data-theme='dark'] .lang-option.active {
  background-color: rgba(79, 70, 229, 0.18);
  color: #c7d2fe;
}

.lang-text {
  flex: 1;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
}

.lang-check {
  color: #2563eb;
}

[data-theme='dark'] .lang-check {
  color: #c7d2fe;
}

.sidebar-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar-theme-label {
  font-size: 0.9rem;
  color: #1f2937;
  font-weight: 600;
}

[data-theme='dark'] .sidebar-theme-label {
  color: #e5e7eb;
}

.theme-switcher {
  display: inline-flex;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.2rem;
}

.theme-btn {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  border-color: #d1d5db;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}

.theme-btn.active {
  background: #e0e7ff;
  border-color: #6366f1;
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.25);
}

[data-theme='dark'] .theme-btn {
  border-color: #334155;
  background: #111827;
  color: #e5e7eb;
}

[data-theme='dark'] .theme-btn:hover {
  border-color: #475569;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

[data-theme='dark'] .theme-btn.active {
  background: rgba(99, 102, 241, 0.16);
  border-color: #6366f1;
  color: #c7d2fe;
  box-shadow: 0 10px 22px rgba(99, 102, 241, 0.25);
}

.method-get {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.method-post {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.method-put {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.method-delete {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.method-patch {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

/* Level-1和Level-2显示在同一层级，无缩进 */
.level-1 > .toc-item-content .toc-link,
.level-1 > .toc-item-content .toc-label,
.level-2 > .toc-item-content .toc-link,
.level-2 > .toc-item-content .toc-label {
  font-weight: 500;
  color: #475569;
  font-size: 0.875rem;
}

.level-1 > .toc-item-content.active .toc-link,
.level-1 > .toc-item-content.active .toc-label,
.level-2 > .toc-item-content.active .toc-link,
.level-2 > .toc-item-content.active .toc-label {
  color: #1e293b;
  font-weight: 600;
}

/* Level-0 标题样式 */
.level-0 > .toc-item-content {
  padding-left: 1rem;
  font-weight: 700;
  color: #0f172a;
  cursor: default;
}

.level-0 > .toc-item-content .toc-title {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.level-0 > .toc-item-content:first-child {
  margin-top: 0;
}

[data-theme='dark'] .level-0 > .toc-item-content {
  color: #f1f5f9;
}

[data-theme='dark'] .level-0 > .toc-item-content .toc-title {
  color: #f1f5f9;
}

.level-1 > .toc-item-content {
  padding-left: 1rem;
  font-weight: 600;
  color: #1e293b;
  cursor: default;
}

.level-1 > .toc-item-content .toc-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.level-2 > .toc-item-content {
  padding-left: 0.5rem;
  margin-top: 0.125rem;
}

.level-2 > .toc-item-content .toc-item-icon {
  color: #64748b;
  flex-shrink: 0;
}

/* 如果父级是 level-1，子级缩进2个字符 */
.level-1 .toc-children .toc-item-content {
  padding-left: calc(1rem + 2ch);
}

.level-3 > .toc-item-content {
  padding-left: 2rem;
  font-size: 0.8125rem;
}

.level-3 > .toc-item-content .toc-item-icon {
  color: #94a3b8;
  flex-shrink: 0;
}


/* Level 3 items can show icons if needed */

.toc-children {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.25rem;
}

.expand-button {
  background: rgba(0, 0, 0, 0.04);
  border: none;
  cursor: pointer;
  padding: 0;
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  font-weight: 600;
  margin-left: auto;
}

[data-theme='dark'] .expand-button {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.expand-placeholder {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-left: auto;
}

.expand-button:hover {
  color: #1e293b;
  background-color: rgba(0, 0, 0, 0.08);
  transform: scale(1.1);
}

[data-theme='dark'] .expand-button:hover {
  color: #e2e8f0;
  background-color: rgba(255, 255, 255, 0.12);
}

.expand-button:active {
  transform: scale(0.95);
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
  border-radius: 4px;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}

/* ========== 移动端适配 ========== */

/* 移动端遮罩层 */
.sidebar-overlay {
  display: none;
}

@media (max-width: 767px) {
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 998;
    animation: fadeIn 0.2s ease-out;
  }

  /* 移动端抽屉模式 */
  .sidebar.sidebar-mobile {
    position: fixed;
    left: 0;
    top: 72px;
    bottom: 0;
    width: 100vw !important; /* 移动端全宽，覆盖 inline style */
    max-width: none;
    height: auto;
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    /* 避免与 .toc-nav 的滚动区域形成双滚动：移动端仅允许目录区域滚动 */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 999;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
    transform: translateX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar-mobile.sidebar-collapsed {
    transform: translateX(-100%);
  }

  /* 移动端隐藏桌面折叠按钮 */
  .sidebar-mobile .sidebar-toggle-handle {
    display: none !important;
  }

  /* 搜索框防止 iOS 缩放 */
  .sidebar-mobile .search-input {
    font-size: 16px;
  }

  /* 导航项触摸优化 */
  .sidebar-mobile .toc-item-content {
    /* 与桌面端保持一致，避免移动端条目被强制撑高（44px + margin 约等于 48px） */
    min-height: unset;
    padding: 0.325rem 1rem;
  }

  /* 移动端 Footer：更紧凑 + safe-area + 固定在底部（目录区独立滚动） */
  .sidebar-mobile .sidebar-footer {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    background: rgba(247, 247, 248, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  [data-theme='dark'] .sidebar-mobile .sidebar-footer {
    background: rgba(15, 23, 42, 0.72);
    border-top-color: #1f2937;
  }

  .sidebar-mobile .sidebar-language {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .sidebar-mobile .lang-trigger {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    gap: 0.4rem;
  }

  .sidebar-mobile .lang-flag-wrap {
    width: 12px;
    height: 12px;
  }

  .sidebar-mobile .lang-trigger-text {
    font-size: 12px;
  }

  .sidebar-mobile .theme-switcher {
    padding: 0.2rem;
    gap: 0.25rem;
  }

  .sidebar-mobile .theme-btn {
    width: 28px;
    height: 28px;
  }

  .sidebar-mobile .expand-button {
    /* 移动端不要放大：保持与桌面一致 */
    min-width: unset;
    min-height: unset;
    width: 22px;
    height: 22px;
  }

  /* 移动端不要放大：底部工具栏保持桌面样式 */
}

@media (max-width: 374px) {
  /* .sidebar-mobile {
    width: 90%;
    max-width: 280px;
  } */
}

/* 深色主题遮罩 */
[data-theme='dark'] .sidebar-overlay {
  background: rgba(0, 0, 0, 0.7);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.api-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 3rem;
}

.api-content {
  max-width: 900px;
}

.api-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.api-description {
  font-size: 1.125rem;
  color: var(--text-tertiary);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.api-section {
  margin-bottom: 3rem;
}

.api-section h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.api-endpoint {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.method-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.method-get {
  background-color: #10b981;
  color: white;
}

.method-post {
  background-color: #3b82f6;
  color: white;
}

.method-put {
  background-color: #f59e0b;
  color: white;
}

.method-delete {
  background-color: #ef4444;
  color: white;
}

.endpoint-path {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  color: var(--accent-primary);
  background-color: var(--code-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.api-endpoint h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.api-endpoint h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.api-endpoint p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.params-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background-color: var(--bg-primary);
  border-radius: 6px;
  overflow: hidden;
}

.params-table th,
.params-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.params-table th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.params-table td {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.params-table code {
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.8125rem;
  font-family: 'Courier New', Courier, monospace;
}

.api-endpoint pre {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.api-endpoint pre code {
  background: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.5;
}

/* 暗色主题样式 */
[data-theme='dark'] .api-container {
  color: var(--text-secondary);
}

[data-theme='dark'] .api-endpoint {
  background-color: var(--bg-secondary);
}

[data-theme='dark'] .endpoint-path {
  background-color: var(--code-bg);
}

[data-theme='dark'] .params-table {
  background-color: var(--bg-primary);
}

[data-theme='dark'] .params-table th {
  background-color: var(--bg-tertiary);
}

[data-theme='dark'] .params-table code {
  background-color: var(--code-bg);
  color: var(--code-text);
}

[data-theme='dark'] .api-endpoint pre {
  background-color: var(--bg-tertiary);
}

/* Index 页面样式 */
.index-page-container {
  padding: 2rem 2.5rem;
  max-width: 920px;
}

.index-page-subtitle {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.index-page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.index-page-description {
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.index-page-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

.index-page-list {
  padding-left: 1.25rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.index-page-list li {
  margin-bottom: 0.5rem;
}

.index-page-list:last-of-type {
  margin-bottom: 0;
}

/* 暗色主题样式 */
[data-theme='dark'] .index-page-subtitle {
  color: var(--text-tertiary);
}

[data-theme='dark'] .index-page-title {
  color: var(--text-primary);
}

[data-theme='dark'] .index-page-description {
  color: var(--text-secondary);
}

[data-theme='dark'] .index-page-section-title {
  color: var(--text-primary);
}

[data-theme='dark'] .index-page-list {
  color: var(--text-secondary);
}

.home-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.home-hero {
  text-align: center;
  padding: 4rem 0;
}

.home-title {
  font-size: 3rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.home-subtitle {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.home-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background-color: white;
  color: #3b82f6;
  border: 2px solid #3b82f6;
}

.btn-secondary:hover {
  background-color: #eff6ff;
  transform: translateY(-2px);
}

.home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature-card {
  padding: 2rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: #6b7280;
  line-height: 1.6;
}

/* 暗色主题样式 */
[data-theme='dark'] .home-title {
  color: #f9fafb;
}

[data-theme='dark'] .home-subtitle {
  color: #d1d5db;
}

[data-theme='dark'] .feature-card {
  background-color: #25282d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .feature-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .feature-card h3 {
  color: #f9fafb;
}

[data-theme='dark'] .feature-card p {
  color: #d1d5db;
}

[data-theme='dark'] .btn-secondary {
  background-color: #25282d;
  color: #818cf8;
  border-color: #818cf8;
}

[data-theme='dark'] .btn-secondary:hover {
  background-color: #2d3136;
}

@media (max-width: 768px) {
  .home-title {
    font-size: 2rem;
  }

  .home-subtitle {
    font-size: 1rem;
  }

  .home-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
}

.edit-docs-container {
  padding: 2rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.edit-docs-header {
  text-align: center;
  margin-bottom: 3rem;
}

.edit-docs-header .page-icon {
  color: #6366f1;
  margin-bottom: 1rem;
}

[data-theme='dark'] .edit-docs-header .page-icon {
  color: #818cf8;
}

.edit-docs-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.edit-docs-header .page-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 文档卡片网格 */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.docs-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.docs-card:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

[data-theme='dark'] .docs-card:hover {
  border-color: #818cf8;
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.2);
}

.docs-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border-radius: 10px;
  margin-bottom: 1rem;
}

[data-theme='dark'] .docs-card-icon {
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
}

.docs-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.docs-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 使用说明 */
.edit-docs-info {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

.edit-docs-info h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.edit-docs-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.edit-docs-info ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.edit-docs-info ul li:last-child {
  margin-bottom: 0;
}

.edit-docs-info ul li::before {
  content: '•';
  position: absolute;
  left: 0.5rem;
  color: #6366f1;
  font-weight: bold;
}

[data-theme='dark'] .edit-docs-info ul li::before {
  color: #818cf8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .edit-docs-container {
    padding: 1.5rem 1rem;
  }

  .edit-docs-header h1 {
    font-size: 1.5rem;
  }

  .docs-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .docs-card {
    padding: 1.25rem;
  }
}

/* 文档容器 */
.doc-container {
  padding: 2rem 2.5rem;
  max-width: 920px;
}

/* 加载状态 */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.loading-spinner {
  color: #6366f1;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

[data-theme='dark'] .loading-spinner {
  color: #818cf8;
}

/* 文档信息 */
.doc-info {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-tertiary);
  border-radius: 8px;
  border-left: 3px solid #6366f1;
}

[data-theme='dark'] .doc-info {
  border-left-color: #818cf8;
}

.doc-info p {
  margin: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.doc-info p:first-child {
  margin-top: 0;
}

.doc-info p:last-child {
  margin-bottom: 0;
}

.doc-info strong {
  color: var(--text-primary);
  margin-right: 0.5rem;
}

.doc-info a {
  color: #6366f1;
  text-decoration: none;
  word-break: break-all;
}

.doc-info a:hover {
  text-decoration: underline;
}

[data-theme='dark'] .doc-info a {
  color: #818cf8;
}

/* 文档内容 */
.doc-content {
  line-height: 1.7;
  color: var(--text-primary);
}

/* Markdown 内容样式 */
.markdown-content {
  font-size: 1rem;
  line-height: 1.7;
}

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

.markdown-content h1 {
  font-size: 1.75rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.markdown-content h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.3rem;
}

.markdown-content h3 {
  font-size: 1.25rem;
}

.markdown-content h4 {
  font-size: 1.125rem;
}

.markdown-content p {
  margin: 1rem 0;
  color: var(--text-secondary);
}

.markdown-content strong {
  font-weight: 600;
  color: var(--text-primary);
}

.markdown-content em {
  font-style: italic;
}

.markdown-content a {
  color: #6366f1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.markdown-content a:hover {
  border-bottom-color: #6366f1;
}

[data-theme='dark'] .markdown-content a {
  color: #818cf8;
}

[data-theme='dark'] .markdown-content a:hover {
  border-bottom-color: #818cf8;
}

.markdown-content pre {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.markdown-content code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.markdown-content :not(pre) > code {
  background-color: var(--bg-tertiary);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.875em;
}

.markdown-content ul,
.markdown-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.markdown-content li {
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

.markdown-content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid #6366f1;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
}

[data-theme='dark'] .markdown-content blockquote {
  border-left-color: #818cf8;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.markdown-content thead {
  background-color: var(--bg-tertiary);
}

.markdown-content th,
.markdown-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.markdown-content th {
  font-weight: 600;
  color: var(--text-primary);
}

.markdown-content td {
  color: var(--text-secondary);
}

.markdown-content hr {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 2rem 0;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

/* 文档头部 - 包含标题和编辑按钮 */
.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.doc-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* 编辑按钮 */
.edit-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.edit-btn:hover {
  background-color: var(--bg-tertiary);
  border-color: #6366f1;
  color: #6366f1;
  transform: translateY(-1px);
}

[data-theme='dark'] .edit-btn:hover {
  border-color: #818cf8;
  color: #818cf8;
}

/* 对话框遮罩层 */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: overlay-fade-in 0.2s ease;
}

@keyframes overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

[data-theme='dark'] .dialog-overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

/* 对话框内容 */
.dialog-content {
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: dialog-slide-in 0.3s ease;
}

@keyframes dialog-slide-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

[data-theme='dark'] .dialog-content {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* 对话框头部 */
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dialog-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-close-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* 对话框主体 */
.dialog-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* 错误提示 */
.error-message {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background-color: #fee2e2;
  color: #dc2626;
  border-radius: 6px;
  font-size: 0.875rem;
  border-left: 3px solid #dc2626;
}

[data-theme='dark'] .error-message {
  background-color: #7f1d1d;
  color: #fca5a5;
  border-left-color: #991b1b;
}

/* 表单组 */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 表单输入框 */
.form-input,
.form-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

[data-theme='dark'] .form-input:focus,
[data-theme='dark'] .form-select:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.form-input::-moz-placeholder {
  color: var(--text-tertiary);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

/* 对话框底部 */
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* 按钮样式 */
.btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-hover);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5558e3 0%, #7c3aed 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.35);
}

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

[data-theme='dark'] .btn-primary {
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
}

[data-theme='dark'] .btn-primary:hover {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .doc-container {
    padding: 1.5rem 1rem;
  }

  .doc-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .dialog-content {
    width: 95%;
    max-height: 95vh;
  }

  .dialog-header,
  .dialog-body,
  .dialog-footer {
    padding: 1rem;
  }
}

.login-page {
  min-height: 100vh;
  background-color: #f4f2f3;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background-color 0.3s ease;
}

[data-theme='dark'] .login-page {
  background-color: #1a1d21;
}

.login-controls {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.login-control-btn {
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
}

[data-theme='dark'] .login-control-btn {
  background-color: rgba(42, 46, 52, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  color: #d1d5db;
}

.login-control-btn:hover {
  background-color: rgba(255, 255, 255, 1);
  border-color: rgba(0, 0, 0, 0.2);
  color: #111827;
  transform: translateY(-1px);
}

[data-theme='dark'] .login-control-btn:hover {
  background-color: rgba(42, 46, 52, 1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f9fafb;
}

.login-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.06);
  padding: 3rem;
  max-width: 440px;
  width: 100%;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme='dark'] .login-card {
  background: #2a2e34;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 10px 20px rgba(0, 0, 0, 0.2);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-icon {
  color: #3b82f6;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

[data-theme='dark'] .login-icon {
  color: #60a5fa;
}

.login-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

[data-theme='dark'] .login-header h1 {
  color: #f9fafb;
}

.login-header p {
  font-size: 0.9375rem;
  color: #6b7280;
  transition: color 0.3s ease;
}

[data-theme='dark'] .login-header p {
  color: #9ca3af;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.error-message {
  padding: 0.75rem 1rem;
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

[data-theme='dark'] .error-message {
  background-color: #450a0a;
  border-color: #991b1b;
  color: #fca5a5;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  transition: color 0.3s ease;
}

[data-theme='dark'] .form-group label {
  color: #d1d5db;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: #9ca3af;
  pointer-events: none;
  transition: color 0.3s ease;
}

[data-theme='dark'] .input-icon {
  color: #6b7280;
}

.input-wrapper input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9375rem;
  background-color: #ffffff;
  color: #111827;
  transition: all 0.2s ease;
  outline: none;
}

.input-wrapper input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

[data-theme='dark'] .input-wrapper input {
  background-color: #1a1d21;
  color: #f9fafb;
  border-color: #374151;
}

.input-wrapper input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

[data-theme='dark'] .input-wrapper input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.input-wrapper input::-moz-placeholder {
  color: #9ca3af;
}

.input-wrapper input::placeholder {
  color: #9ca3af;
}

[data-theme='dark'] .input-wrapper input::-moz-placeholder {
  color: #6b7280;
}

[data-theme='dark'] .input-wrapper input::placeholder {
  color: #6b7280;
}

.toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: #6b7280;
}

[data-theme='dark'] .toggle-password {
  color: #6b7280;
}

[data-theme='dark'] .toggle-password:hover {
  color: #9ca3af;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #374151;
  transition: color 0.3s ease;
}

[data-theme='dark'] .checkbox-label {
  color: #d1d5db;
}

.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.submit-btn {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
  margin-top: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(59, 130, 246, 0.35);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

[data-theme='dark'] .submit-btn {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

[data-theme='dark'] .submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9375rem;
  color: #6b7280;
  transition: color 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

[data-theme='dark'] .login-footer {
  color: #9ca3af;
}

.login-footer p {
  margin: 0;
}

.register-link,
.back-home {
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

.register-link {
  margin-left: 0.5rem;
}

.register-link:hover,
.back-home:hover {
  color: #2563eb;
  text-decoration: underline;
}

[data-theme='dark'] .register-link,
[data-theme='dark'] .back-home {
  color: #60a5fa;
}

[data-theme='dark'] .register-link:hover,
[data-theme='dark'] .back-home:hover {
  color: #3b82f6;
}

/* 响应式设计 */
@media (max-width: 640px) {
  .login-controls {
    top: 1rem;
    right: 1rem;
  }

  .login-container {
    padding: 1rem;
  }

  .login-card {
    padding: 2rem 1.5rem;
  }

  .login-header h1 {
    font-size: 1.5rem;
  }
}

.doc-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
}

.markdown-content {
  flex: 1;
  padding: 0 !important; /* 默认：上下 32px，左右 0 */
  max-width: 900px;
  min-width: 0;
}

/* 大屏幕（>= 1024px）保留左右 padding */
@media (min-width: 1024px) {
  .markdown-content {
    padding: 2rem 3rem; /* 上下 32px，左右 48px */
  }
}

.doc-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.doc-description {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Markdown 样式 */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  position: relative;
}

.markdown-content h1 .header-anchor,
.markdown-content h2 .header-anchor,
.markdown-content h3 .header-anchor,
.markdown-content h4 .header-anchor,
.markdown-content h5 .header-anchor,
.markdown-content h6 .header-anchor {
  position: absolute;
  left: -1.5rem;
  opacity: 0;
  transition: opacity 0.2s;
  text-decoration: none;
  color: #9ca3af;
  font-weight: normal;
}

.markdown-content h1:hover .header-anchor,
.markdown-content h2:hover .header-anchor,
.markdown-content h3:hover .header-anchor,
.markdown-content h4:hover .header-anchor,
.markdown-content h5:hover .header-anchor,
.markdown-content h6:hover .header-anchor {
  opacity: 1;
}

.markdown-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.markdown-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.markdown-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.markdown-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.markdown-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: #374151;
  margin-bottom: 1rem;
}

.markdown-content ul,
.markdown-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.markdown-content li {
  font-size: 1rem;
  line-height: 1.75;
  color: #374151;
  margin-bottom: 0.5rem;
}

.markdown-content code {
  background-color: #f3f4f6;
  color: #ef4444;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: 'Courier New', Courier, monospace;
}

.markdown-content pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.markdown-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.875rem;
}

.markdown-content blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #6b7280;
  font-style: italic;
}

.markdown-content a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s;
}

.markdown-content a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

.markdown-content th {
  background-color: #f9fafb;
  font-weight: 600;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
  display: block;
}

/* 图片尺寸支持 */
.markdown-content img[width] {
  max-width: none;
}

.markdown-content img[height] {
  height: auto;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* 任务列表样式 */
.markdown-content .task-list-item {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.markdown-content .task-list-item input[type="checkbox"] {
  margin-right: 0.5rem;
  margin-left: -1.5rem;
  cursor: pointer;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #3b82f6;
}

.markdown-content .task-list-item input[type="checkbox"]:checked {
  accent-color: #10b981;
}

.markdown-content .task-list-item input[type="checkbox"]:checked + label {
  text-decoration: line-through;
  color: #6b7280;
}

.markdown-content ul.contains-task-list {
  padding-left: 1.5rem;
}

.markdown-content ul.contains-task-list .task-list-item {
  padding-left: 1.5rem;
}

/* 暗色主题样式 */
[data-theme='dark'] .doc-container {
  color: var(--text-secondary);
}

[data-theme='dark'] .doc-title {
  color: var(--text-primary);
}

[data-theme='dark'] .doc-description {
  color: var(--text-tertiary);
}

[data-theme='dark'] .markdown-content h1,
[data-theme='dark'] .markdown-content h2,
[data-theme='dark'] .markdown-content h3,
[data-theme='dark'] .markdown-content h4,
[data-theme='dark'] .markdown-content h5,
[data-theme='dark'] .markdown-content h6 {
  color: var(--text-primary);
}

[data-theme='dark'] .markdown-content h1 {
  border-bottom-color: var(--border-color);
}

[data-theme='dark'] .markdown-content h2 {
  border-bottom-color: var(--border-color);
}

[data-theme='dark'] .markdown-content p {
  color: var(--text-secondary);
}

[data-theme='dark'] .markdown-content li {
  color: var(--text-secondary);
}

[data-theme='dark'] .markdown-content code {
  background-color: var(--code-bg);
  color: var(--code-text);
}

[data-theme='dark'] .markdown-content pre {
  background-color: #1f2937;
  color: #f9fafb;
}

[data-theme='dark'] .markdown-content blockquote {
  border-left-color: #818cf8;
  color: var(--text-tertiary);
}

[data-theme='dark'] .markdown-content a {
  color: #818cf8;
}

[data-theme='dark'] .markdown-content a:hover {
  color: #6366f1;
}

[data-theme='dark'] .markdown-content th,
[data-theme='dark'] .markdown-content td {
  border-color: var(--border-color);
}

[data-theme='dark'] .markdown-content th {
  background-color: var(--bg-tertiary);
}

[data-theme='dark'] .markdown-content hr {
  border-top-color: var(--border-color);
}

[data-theme='dark'] .markdown-content .header-anchor {
  color: #6b7280;
}

[data-theme='dark'] .markdown-content .table-of-contents {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
}

[data-theme='dark'] .markdown-content .table-of-contents a {
  color: #818cf8;
}

[data-theme='dark'] .markdown-content .table-of-contents a:hover {
  color: #6366f1;
}

/* TOC 样式 */
.markdown-content .table-of-contents {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.markdown-content .table-of-contents ol,
.markdown-content .table-of-contents ul {
  margin: 0;
  padding-left: 1.5rem;
  list-style: none;
}

.markdown-content .table-of-contents li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.markdown-content .table-of-contents a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s;
}

.markdown-content .table-of-contents a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.markdown-content .table-of-contents li li {
  margin-left: 1rem;
  font-size: 0.9em;
}

@media (max-width: 1200px) {
  .doc-container {
    flex-direction: column;
  }

  .markdown-content {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .markdown-content {
    padding: 1.5rem;
  }

  .doc-title {
    font-size: 2rem;
  }
}

