/* ===== 学习笔记页面样式 ===== */
.notes-page {
  padding: 60px 24px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.notes-header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInUp 0.6s ease forwards;
}

.notes-header > * {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}
.notes-header > *:nth-child(1) { animation-delay: 0s; }
.notes-header > *:nth-child(2) { animation-delay: 0.1s; }

.notes-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 0 4px;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

.notes-count {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-muted);
}

/* 笔记网格 */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  animation: fadeInUp 0.6s ease 0.25s forwards;
  opacity: 0;
}

@media (max-width: 768px) {
  .notes-grid {
    grid-template-columns: 1fr;
  }
}

/* 笔记卡片 */
.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.note-card:hover {
  border-color: var(--accent-bronze);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.note-card-body {
  flex: 1;
  margin-bottom: 16px;
}

.note-card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.note-card-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.note-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.note-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.note-card-date {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
}

.note-card-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.note-card-delete:hover {
  color: var(--accent-red);
  border-color: rgba(160,64,64,0.3);
  background: rgba(160,64,64,0.1);
}

/* 空状态 */
.notes-empty {
  text-align: center;
  padding: 80px 24px;
  animation: fadeInUp 0.6s ease 0.25s forwards;
  opacity: 0;
}

.notes-empty .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.notes-empty h4 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 8px;
}

.notes-empty p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* 引用徽章 */
.ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.ref-badge.event {
  background: rgba(201,169,110,0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(201,169,110,0.25);
}

.ref-badge.philosopher {
  background: rgba(90,122,138,0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(90,122,138,0.25);
}

.ref-badge:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* 笔记编辑器弹窗 */
.note-editor-modal {
  animation: modalIn 0.3s ease;
}

/* 编辑器工具栏 */
.note-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
}

.net-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.net-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.net-btn-accent {
  width: auto;
  padding: 0 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 0.02em;
}

.net-btn-accent:hover {
  color: var(--accent-gold-light);
  border-color: rgba(201,169,110,0.3);
  background: rgba(201,169,110,0.08);
}

/* 引用选择器浮层 */
.ref-picker {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  max-width: 92vw;
  max-height: 70vh;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.25s ease;
}

.ref-picker-header {
  padding: 20px 20px 0;
}

.ref-picker-tabs {
  display: flex;
  gap: 0;
  margin-top: 12px;
  border-bottom: 1px solid var(--border-color);
}

.ref-picker-tab {
  flex: 1;
  padding: 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.ref-picker-tab.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

.ref-picker-search {
  padding: 12px 20px;
}

.ref-picker-search input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 13px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
}

.ref-picker-search input:focus {
  border-color: var(--accent-gold);
}

.ref-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 20px;
  max-height: 360px;
}

.ref-picker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 13px;
}

.ref-picker-item:hover {
  background: var(--bg-hover);
}

.ref-picker-item.added {
  cursor: default;
}

/* 引用列表 */
.ne-refs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0;
}
