/* ========== 基础样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sidebar-width: 240px;
  --toc-width: 260px;
  --header-height: 52px;
  --footer-height: 48px;

  /* 飞书配色 */
  --primary: #3370ff;
  --primary-light: #e8f0ff;
  --primary-hover: #245bdb;

  --text-title: #1f2329;
  --text-body: #373c43;
  --text-secondary: #646a73;
  --text-placeholder: #8f959e;
  --text-disabled: #bbbfc4;

  --bg-body: #ffffff;
  --bg-container: #f5f6f7;
  --bg-hover: #f0f1f2;
  --bg-active: #e8f0ff;

  --border-default: #dee0e3;
  --border-light: #e8e9eb;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  --code-bg: #fafbfc;
  --code-inline-bg: rgba(51, 112, 255, 0.08);
  --code-inline-color: #476582;
}

/* 暗夜模式 - 更黑的背景 */
[data-theme="dark"] {
  --primary: #3370ff;
  --primary-light: rgba(51, 112, 255, 0.15);
  --primary-hover: #5a8fff;

  --text-title: #e8eaed;
  --text-body: #c4c6cc;
  --text-secondary: #8f959e;
  --text-placeholder: #6b6d71;
  --text-disabled: #4e5158;
  --text-active: #ffffff;

  --bg-body: #0a0a0a;
  --bg-container: #111111;
  --bg-hover: #1a1a1a;
  --bg-active: rgba(51, 112, 255, 0.25);

  --border-default: #2a2a2a;
  --border-light: #1f1f1f;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);

  --code-bg: #0d0d0d;
  --code-inline-bg: rgba(51, 112, 255, 0.15);
  --code-inline-color: #7eb7ff;
}

[data-theme="dark"] .nav-item-file.active,
[data-theme="dark"] .nav-dir.active > .nav-dir-header .nav-dir-name,
[data-theme="dark"] .toc-nav a.active {
  color: var(--text-active);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC',
    'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', 'WenQuanYi Micro Hei', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-container);
  color: var(--text-body);
  line-height: 1.5;
  font-size: 14px;
}

.app-container {
  display: flex;
  min-height: 100vh;
}
