/* 全局样式 */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f7f7f7;
  color: #050505;
  -webkit-font-smoothing: antialiased;
}

/* 动态卡片徽章样式 */
.pinned-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  color: #FFD700;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.archived-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFD700;
  color: #000;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* 小论坛区域样式 */
.forum-section {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.forum-section h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #333;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

.forum-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

.forum-link .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.forum-link .btn svg {
  width: 18px;
  height: 18px;
}

body.dark-mode .forum-section {
  background: #1e1e1e;
}

body.dark-mode .forum-section h3 {
  color: #e0e0e0;
  border-bottom-color: #333;
}

a {
  color: #050505;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px 24px 24px;
}

/* 主体布局 */
.main-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  max-width: 1500px;
  margin: 24px auto 0;
  padding: 0 24px 80px 24px;
}

/* 左侧边栏 */
.sidebar {
  position: sticky;
  top: 76px;
  height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 8px;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.sidebar-search {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.sidebar-search .form-control {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  font-size: 14px;
}

.sidebar-section {
  margin-bottom: 24px;
  background: #f4f4f4;
  border-radius: 16px;
  padding: 20px;
  border: none;
}

.sidebar-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: #050505;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
  letter-spacing: 0.5px;
}

/* 筛选列表 */
.filter-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  color: #050505;
}

.filter-item:hover {
  background: #050505;
  color: #ffffff;
}

.filter-item.active {
  background: #050505;
  color: #ffffff;
  font-weight: 500;
}

.filter-item svg {
  width: 16px;
  height: 16px;
}

/* 分类列表 */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-item {
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  color: #050505;
}

.category-item:hover {
  background: #050505;
  color: #ffffff;
}

.category-item.active {
  background: #050505;
  color: #ffffff;
  font-weight: 500;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud .tag {
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.tag-cloud .tag:hover {
  background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
  color: white;
}

/* 右侧主内容区 */
.main-content {
  min-width: 0;
  padding: 0 8px;
}

/* 笔记网格 - 瀑布流布局 */
.note-grid {
  column-count: 4;
  column-gap: 12px;
  padding-bottom: 60px;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

/* 活动列表 - 单列垂直布局 */
.note-grid .activity-card {
  break-inside: avoid;
  margin-bottom: 20px;
  display: block;
  width: 100%;
  page-break-inside: avoid;
}

/* 当包含活动卡片时，改用单列布局 */
.note-grid:has(.activity-card) {
  column-count: 1;
}

/* Home频道 - 使用3列瀑布流布局 */
body.channel-home .note-grid:has(.activity-card) {
  column-count: 3 !important;
}

/* Activity频道 - 使用3列瀑布流布局 */
body.channel-activity .note-grid:has(.activity-card) {
  column-count: 3 !important;
}

/* Flash Sale频道 - 使用3列瀑布流布局 */
body.channel-flash_sale .note-grid:has(.activity-card),
body.channel-flash-sale .note-grid:has(.activity-card) {
  column-count: 3 !important;
}

/* Search频道 - 搜索历史使用4列网格布局 */
body.channel-search .search-history-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 100%;
  margin: 0 auto;
}

/* Search频道 - 固定3列布局 */
body.channel-search .note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  body.channel-search .note-grid {
    grid-template-columns: 1fr;
  }

  body.channel-search .search-history-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  body.channel-search .note-grid {
    grid-template-columns: 1fr;
  }

  body.channel-search .search-history-grid {
    grid-template-columns: 1fr;
  }
}

body.channel-search .note-grid:has(.activity-card) {
  grid-template-columns: repeat(3, 1fr) !important;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid #e5e5e5;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #050505;
}

/* 按钮样式 */
.btn {
  padding: 8px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  background: #ffffff;
  color: #050505;
}

.btn:hover {
  background: #f5f5f5;
  border-color: #d4d4d4;
}

.btn-primary {
  background: #050505;
  color: #ffffff;
  border-color: #050505;
}

.btn-primary:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.btn-secondary {
  background: #ffffff;
  color: #050505;
  border-color: #e5e5e5;
}

.btn-secondary:hover {
  background: #f5f5f5;
}

.btn-danger {
  background: #ffffff;
  color: #dc2626;
  border-color: #e5e5e5;
}

.btn-danger:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

/* 主题切换按钮 - 更醒目 */
.theme-toggle {
  position: relative;
  background: #1a1a1a;
  border: 2px solid #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  color: #e0e0e0;
}

.theme-toggle:hover {
  background: #2a2a2a;
  border-color: #444;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.theme-toggle svg {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* 暗色模式下的主题按钮 */
body.dark-mode .theme-toggle {
  background: #2a2a2a;
  border: 2px solid #444;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  color: #e0e0e0;
}

body.dark-mode .theme-toggle svg {
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.2));
}

body.dark-mode .theme-toggle:hover {
  background: #3a3a3a;
  border-color: #555;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

/* 表单样式 */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-control:focus {
  outline: none;
  border-color: #1976d2;
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.note-grid .note-card {
  break-inside: avoid;
  margin-bottom: 12px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  page-break-inside: avoid;
}

.note-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.03);
  position: relative;
  break-inside: avoid;
  margin-bottom: 12px;
  display: block;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-all;
  width: 100%;
  max-width: 100%;
}

.note-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.note-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 8px 10px 4px 10px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* 笔记卡片图片容器 */
.note-card-image {
  position: relative;
  width: 100%;
  background: #f7f7f7;
  overflow: hidden;
}

.note-card-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.note-card:hover .note-card-image img {
  transform: scale(1.05);
}

/* 清库存图片样式 */
.note-image {
  width: 100%;
  min-height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* 笔记头部（简化） */
.note-header {
  display: none;
}

/* 徽章容器 */
.note-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  gap: 4px;
}

/* 徽章样式 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.badge svg {
  width: 11px;
  height: 11px;
}

.badge-pinned {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #000;
}

.badge-favorite {
  background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
  color: #fff;
}

.badge-archived {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  color: #fff;
}

/* 归档频道样式 - 黑白/灰度元素 */
body.channel-archived .note-card {
  filter: grayscale(80%);
  opacity: 0.9;
  transition: all 0.2s;
}

body.channel-archived .note-card:hover {
  filter: grayscale(40%);
  opacity: 1;
}

/* 归档活动卡片样式 */
body.channel-archived .activity-card {
  filter: grayscale(80%);
  opacity: 0.9;
  transition: all 0.2s;
}

body.channel-archived .activity-card:hover {
  filter: grayscale(40%);
  opacity: 1;
}

/* 归档频道中的图片使用灰度 */
body.channel-archived .note-card-image img,
body.channel-archived .activity-images img {
  filter: grayscale(100%);
  transition: filter 0.2s;
}

body.channel-archived .note-card:hover .note-card-image img,
body.channel-archived .activity-card:hover .activity-images img {
  filter: grayscale(30%);
}

/* 归档频道的徽章也使用灰度（除了归档徽章本身） */
body.channel-archived .badge-pinned,
body.channel-archived .badge-favorite {
  filter: grayscale(100%);
}

/* 归档徽章保持黄色背景，不受灰度影响 */
body.channel-archived .badge-archived {
  filter: grayscale(0%) !important;
}

body.channel-archived .note-card:hover .badge-pinned,
body.channel-archived .note-card:hover .badge-favorite {
  filter: grayscale(0%);
}

/* 个人主页频道样式 - 黑白/灰度元素，无动态效果 */
body.channel-profile .note-card {
  filter: grayscale(100%);
  opacity: 0.95;
  /* 移除过渡动画 */
  transition: none;
}

body.channel-profile .note-card:hover {
  filter: grayscale(100%);
  opacity: 0.95;
  /* 移除hover效果和过渡 */
  transform: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 个人主页活动卡片样式 - 正常颜色 */
body.channel-profile .activity-card {
  /* 移除灰度滤镜 */
  filter: none;
  opacity: 1;
  /* 移除过渡动画 */
  transition: none;
}

body.channel-profile .activity-card:hover {
  filter: none;
  opacity: 1;
  /* 移除hover效果和过渡 */
  transform: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* 个人主页中的图片保持原色 */
body.channel-profile .note-card-image img,
body.channel-profile .activity-images img {
  filter: none;
  /* 移除过渡动画 */
  transition: none;
}

body.channel-profile .note-card:hover .note-card-image img,
body.channel-profile .activity-card:hover .activity-images img {
  filter: none;
  /* 保持原色 */
}

/* 个人主页的徽章保持原色 */
body.channel-profile .badge-pinned,
body.channel-profile .badge-favorite,
body.channel-profile .badge-archived {
  filter: none;
}

/* 个人主页中的表情符号保持原色 */
body.channel-profile .mood-emoji {
  filter: none;
}

/* 移除个人主页卡片的hover上移效果 */
body.channel-profile .activity-card:hover,
body.channel-profile .note-card:hover {
  transform: none;
}

/* 置顶频道样式 - 金色高亮元素 */
body.channel-pinned .note-card {
  border: 2px solid #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

body.channel-pinned .activity-card {
  border: 2px solid #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* 收藏频道样式 - 粉红/紫色高亮元素 */
body.channel-favorites .note-card {
  border: 2px solid #f472b6;
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.3);
}

body.channel-favorites .activity-card {
  border: 2px solid #f472b6;
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.3);
}

body.channel-favorites .badge-favorite {
  background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
  color: #fff;
  animation: pulse-pink 2s infinite;
}

@keyframes pulse-pink {
  0%, 100% { box-shadow: 0 0 5px rgba(244, 114, 182, 0.5); }
  50% { box-shadow: 0 0 15px rgba(240, 147, 251, 0.8); }
}

/* 笔记操作按钮 */
.note-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: none;
  gap: 4px;
}

.note-card:hover .note-actions {
  display: flex;
}

.note-actions .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  background: rgba(0,0,0,0.7);
  color: white;
}

.note-actions .action-btn:hover {
  background: #050505;
  transform: scale(1.1);
}

.note-actions .action-btn svg {
  width: 14px;
  height: 14px;
}

.note-actions .action-btn-delete:hover {
  background: #dc2626;
}

/* 无图片时的操作按钮 */
.note-actions-no-image {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  display: none;
  gap: 4px;
}

.note-card:hover .note-actions-no-image {
  display: flex;
}

/* 笔记内容 */
.note-card .content {
  padding: 10px 14px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  color: #525252;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.note-card .content * {
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  word-break: break-all !important;
  white-space: normal !important;
  overflow-x: hidden !important;
}

.note-card .content p {
  margin: 0;
  word-wrap: break-word;
}

/* 笔记底部信息 */
.note-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px 10px 10px;
  border-top: none;
}

/* 用户信息 - 隐藏头像 */
.note-user {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.note-user-avatar {
  display: none;
}

.note-user-name {
  font-size: 11px;
  color: #737373;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 社交互动 */
.note-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-social-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #737373;
  cursor: pointer;
  transition: color 0.2s;
  padding: 2px 4px;
  border-radius: 4px;
}

.note-social-btn:hover {
  background: #f5f5f5;
}

.note-social-btn.liked {
  color: #dc2626;
}

.note-social-btn svg {
  width: 13px;
  height: 13px;
}

/* 标签 */
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 10px 8px 10px;
}

.note-tag {
  font-size: 10px;
  color: #666;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #f4f4f4;
  border-radius: 8px;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* 工具栏 */
.toolbar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.toolbar-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.toolbar-btn:hover {
  background: #f5f5f5;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: #fafafa;
  color: #525252;
  border-radius: 12px;
  font-size: 12px;
  margin: 2px;
}

.tag:hover {
  background: #050505;
  color: #ffffff;
}

/* Toast提示 */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  z-index: 10000;
}

.toast.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* 黑暗模式 */
body.dark-mode {
  background: #000000;
  color: #fafafa;
}

body.dark-mode .card,
body.dark-mode .note-card,
body.dark-mode .modal-content {
  background: #0a0a0a;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  border-color: #262626;
}

body.dark-mode .note-card h3 {
  color: #fafafa;
}

body.dark-mode .note-card .content {
  color: #a3a3a3;
}

body.dark-mode .note-card .meta {
  color: #737373;
  border-top-color: rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.1);
}

body.dark-mode .note-card .meta span::before {
  background: #262626;
}

body.dark-mode .note-header {
  border-bottom-color: #262626;
}

body.dark-mode .form-control {
  background: #171717;
  border-color: #262626;
  color: #fafafa;
}

body.dark-mode .search-bar .form-control {
  background: #171717;
}

body.dark-mode .search-bar .form-control:focus {
  background: #0a0a0a;
}

body.dark-mode .toolbar-btn {
  background: #171717;
  border-color: #262626;
  color: #fafafa;
}

body.dark-mode .header {
  background: #000000;
  border-bottom-color: #262626;
}

body.dark-mode .top-nav {
  background: #000000;
}

body.dark-mode .top-nav-item {
  background: #171717;
  color: #a3a3a3;
}

body.dark-mode .top-nav-item.active {
  background: #fafafa;
  color: #000000;
}

body.dark-mode .category-filter-bar {
  background: #000000;
  border-color: #262626;
}

body.dark-mode .filter-label {
  color: #a3a3a3;
}

body.dark-mode .category-select {
  background: transparent;
  color: #fafafa;
}

body.dark-mode .note-tag {
  background: #171717;
  color: #a3a3a3;
}

body.dark-mode .mobile-nav {
  background: #000000;
  box-shadow: 0 -1px 3px rgba(0,0,0,0.3);
}

body.dark-mode .note-user-name {
  color: #a3a3a3;
}

body.dark-mode .note-social-btn {
  color: #737373;
}

body.dark-mode .note-social-btn:hover {
  background: rgba(255,255,255,0.05);
}

body.dark-mode .note-social-btn.liked {
  color: #dc2626;
}

/* 分页暗黑模式 */
body.dark-mode .page-link {
  background: #171717;
  border-color: #262626;
  color: #fafafa;
}

body.dark-mode .page-link:hover:not(.disabled) {
  background: #fafafa;
  color: #000000;
  border-color: #fafafa;
}

body.dark-mode .page-link.active {
  background: #fafafa;
  color: #000000;
  border-color: #fafafa;
}

body.dark-mode .page-ellipsis {
  color: #737373;
}

/* 侧边栏暗黑模式 */
body.dark-mode .sidebar-section {
  background: #0a0a0a;
  border-color: #262626;
}

body.dark-mode .sidebar-section h3 {
  color: #fafafa;
  border-bottom-color: #262626;
}

body.dark-mode .sidebar-search .form-control {
  background: #171717;
  border-color: #262626;
  color: #fafafa;
}

body.dark-mode .sidebar-search .form-control:focus {
  background: #0a0a0a;
}

body.dark-mode .filter-item,
body.dark-mode .category-item {
  color: #a3a3a3;
}

body.dark-mode .filter-item:hover,
body.dark-mode .category-item:hover {
  background: #fafafa;
  color: #000000;
}

body.dark-mode .filter-item.active,
body.dark-mode .category-item.active {
  background: #fafafa;
  color: #000000;
  font-weight: 500;
}

body.dark-mode .tag-cloud .tag {
  background: #171717;
  color: #a3a3a3;
}

body.dark-mode .tag-cloud .tag:hover {
  background: #fafafa;
  color: #000000;
}

/* 翻页暗黑模式 */
body.dark-mode .pagination-btn {
  background: #0a0a0a;
  border-color: #262626;
  color: #fafafa;
}

body.dark-mode .pagination-btn:hover {
  background: #fafafa;
  border-color: #fafafa;
  color: #000000;
}

body.dark-mode .pagination-info {
  color: #737373;
}

body.dark-mode .current-page {
  background: #171717;
  color: #fafafa;
}

/* 手机端悬浮搜索框 */
.mobile-search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.mobile-search-content {
  width: 90%;
  max-width: 500px;
}

.mobile-search-header {
  display: flex;
  gap: 8px;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-search-close {
  width: 28px;
  height: 28px;
  border: none;
  background: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  flex-shrink: 0;
}

.mobile-search-close:hover {
  background: #e5e5e5;
}

.mobile-search-input {
  flex: 1;
  border: none;
  background: #f5f5f5;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.mobile-search-input:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #050505;
}

.mobile-search-btn {
  width: 36px;
  height: 36px;
  background: #050505;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.mobile-search-btn:hover {
  background: #1a1a1a;
}

.mobile-search-btn svg {
  width: 18px;
  height: 18px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }

  .note-grid {
    column-count: 3;
  }

  .note-grid .note-card {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0;
  }

  .header {
    padding: 8px 12px;
  }

  .logo img {
    width: 28px;
    height: 28px;
  }

  .header h1 {
    font-size: 16px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* 手机端隐藏顶部的商城按钮 */
  .header-actions .btn[href*="mall.hot166.com"] {
    display: none;
  }

  /* 手机端频道简化为三横 */
  .sidebar-section h3,
  .sidebar-search,
  .filter-list,
  .category-list,
  .tag-cloud {
    display: none;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    padding: 6px;
  }

  .theme-toggle svg {
    width: 14px;
    height: 14px;
  }

  .main-layout {
    display: block;
    padding-top: 8px;
  }

  .sidebar {
    display: none;
  }

  .tag-cloud .tag {
    font-size: 11px;
    padding: 4px 8px;
  }

  .note-grid {
    column-count: 1 !important;
    column-gap: 8px;
    padding: 8px;
  }

  /* 手机端所有频道都是1列 */
  body.channel-home .note-grid:has(.activity-card),
  body.channel-activity .note-grid:has(.activity-card),
  body.channel-flash_sale .note-grid:has(.activity-card),
  body.channel-flash-sale .note-grid:has(.activity-card) {
    column-count: 1 !important;
  }

  .note-card h3 {
    font-size: 12px;
    padding: 6px 8px 4px 8px;
  }

  .note-card .content {
    font-size: 11px;
    padding: 4px 8px;
    -webkit-line-clamp: 2;
    line-height: 1.4;
  }

  .note-card .meta {
    padding: 6px 8px 8px 8px;
  }

  .note-user-name {
    font-size: 10px;
  }

  .note-social-btn {
    font-size: 10px;
    gap: 1px;
  }

  .note-social-btn svg {
    width: 12px;
    height: 12px;
  }

  .note-tags {
    padding: 0 8px 6px 8px;
  }

  .note-tag {
    font-size: 9px;
    padding: 2px 5px;
  }

  .search-bar {
    padding: 0 12px;
    margin-bottom: 10px;
  }

  .top-nav {
    top: 52px;
  }

  .top-nav-items {
    padding: 0 12px 8px 12px;
  }

  .top-nav-item {
    padding: 4px 12px;
    font-size: 13px;
  }

  .pagination {
    gap: 6px;
    padding: 20px 0;
  }

  .page-link {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .page-link svg {
    width: 14px;
    height: 14px;
  }

  .mobile-nav {
    display: block;
  }

  .floating-btn {
    bottom: 68px;
    right: 12px;
    width: 48px;
    height: 48px;
  }

  .floating-btn svg {
    width: 22px;
    height: 22px;
  }

  .modal-content {
    padding: 20px;
    width: 95%;
    max-height: 85vh;
  }

  .modal-header h2 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 6px 10px;
  }

  .logo img {
    width: 24px;
    height: 24px;
  }

  .header h1 {
    font-size: 14px;
  }

  .header-actions .btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  .lang-dropdown .btn {
    font-size: 11px;
    padding: 5px 8px;
  }

  .note-grid {
    column-count: 1;
  }

  .note-card h3 {
    font-size: 13px;
  }

  .note-card .content {
    font-size: 12px;
  }

  .note-card-image {
    padding-bottom: 120%;
  }

  .pagination {
    gap: 4px;
    padding: 16px 0;
  }

  .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .floating-btn {
    width: 44px;
    height: 44px;
    bottom: 64px;
    right: 10px;
  }

  .mobile-nav-items {
    padding: 4px 0 10px 0;
  }

  .mobile-nav-icon {
    font-size: 20px;
  }

  .mobile-nav-item span {
    font-size: 9px;
  }

  .sidebar {
    max-height: 240px;
  }

  .sidebar-section h3 {
    font-size: 11px;
    padding-bottom: 6px;
    margin-bottom: 8px;
  }

  .filter-item,
  .category-item {
    padding: 6px 10px;
    font-size: 11px;
  }

  .filter-item svg {
    width: 14px;
    height: 14px;
  }
}

@media (min-width: 769px) {
  .mobile-nav {
    display: none;
  }
  .floating-btn {
    bottom: 24px;
    right: 24px;
  }
}

/* 移动导航 */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  z-index: 1000;
  display: none;
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  padding: 8px 0 8px 0;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #999;
  cursor: pointer;
  flex: 1;
  padding: 4px 0;
}

.mobile-nav-item.active {
  color: #050505;
}

.mobile-nav-item.active svg {
  fill: #050505;
}

.mobile-nav-icon {
  font-size: 22px;
}

.mobile-nav-item span {
  font-size: 10px;
  font-weight: 500;
}

/* 暗色模式下的移动导航 */
body.dark-mode .mobile-nav {
  background: #0a0a0a;
  border-top: 1px solid #2a2a2a;
}

body.dark-mode .mobile-nav-item {
  color: #999;
}

body.dark-mode .mobile-nav-item.active {
  color: #e0e0e0;
}

body.dark-mode .mobile-nav-item.active svg {
  fill: #e0e0e0;
}

body.dark-mode .mobile-nav-item:hover {
  color: #c0c0c0;
}

@media (max-width: 768px) {
  .mobile-nav {
    display: block;
  }
}

/* 顶部导航分类 */
.top-nav {
  position: sticky;
  top: 60px;
  z-index: 99;
  background: white;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav-items {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px 16px;
}

.top-nav-item {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  background: #f5f5f5;
}

.top-nav-item.active {
  color: #ffffff;
  background: #050505;
}

/* 悬浮按钮 */
.floating-btn {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #050505;
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}

.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.floating-btn svg {
  width: 24px;
  height: 24px;
}

/* 翻页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 0;
  margin-top: 24px;
  flex-wrap: wrap;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #ffffff;
  color: #050505;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.page-link:hover:not(.disabled) {
  background: #050505;
  color: #ffffff;
  border-color: #050505;
  transform: translateY(-2px);
}

.page-link.active {
  background: #050505;
  color: #ffffff;
  border-color: #050505;
}

.page-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-link svg {
  width: 16px;
  height: 16px;
}

.page-ellipsis {
  padding: 0 8px;
  color: #999;
  font-size: 14px;
}

@media (min-width: 769px) {
  .floating-btn {
    bottom: 24px;
    right: 24px;
  }
}

/* 颜色选择器 */
.color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: #1976d2;
}

/* 头像选择 */
.avatar-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.avatar-option {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.2s;
}

.avatar-option:hover {
  transform: scale(1.1);
}

.avatar-option.selected {
  border-color: #1976d2;
}

/* 用户菜单 */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 8px 0;
  z-index: 1000;
}

.user-menu.active {
  display: block;
}

.user-menu a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
}

.user-menu a:hover {
  background: #f5f5f5;
}

/* 语言菜单 */
.lang-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 10px;
}

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  min-width: 150px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 8px 0;
  z-index: 1000;
}

.lang-menu a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
}

.lang-menu a:hover {
  background: #f5f5f5;
}

/* 搜索栏 */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-bar .form-control {
  flex: 1;
  padding: 10px 16px;
  border-radius: 20px;
  border: 1px solid #e8e8e8;
  background: #f8f8f8;
  font-size: 14px;
}

.search-bar .form-control:focus {
  background: white;
  border-color: #1a1a1a;
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* 分类筛选栏 */
.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filter-label {
  font-size: 13px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
}

.category-select {
  flex: 1;
  max-width: 200px;
  border: none;
  background: transparent;
  font-size: 13px;
}

body.dark-mode .category-filter-bar {
  background: #0a0a0a;
  border-color: #262626;
}

body.dark-mode .filter-label {
  color: #a3a3a3;
}

/* 内容编辑器 */
.editor {
  min-height: 300px;
}

/* Markdown内容渲染 */
.markdown-content {
  line-height: 1.6;
}

.markdown-content img {
  max-width: 100%;
  border-radius: 8px;
}

.markdown-content pre {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
}

.markdown-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state h3 {
  margin: 0 0 10px 0;
}

/* 徽章 - 已在上面定义新的样式 */

/* 笔记操作按钮 - 已在上面定义新的样式 */

/* 加载动画 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

.toast .loading-spinner {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
}

/* 进度条 */
.progress-bar-container {
  width: 100%;
  height: 4px;
  background: #e5e5e5;
  border-radius: 2px;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #050505, #666);
  transition: width 0.3s ease;
}

/* 图片加载占位 */
.image-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.03);
}

.skeleton-image {
  width: 100%;
  height: 200px;
}

.skeleton-text {
  height: 14px;
  margin: 10px;
  width: 80%;
}

.skeleton-text-short {
  height: 14px;
  margin: 8px 10px;
  width: 60%;
}

/* 内容加载提示 */
.content-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #999;
}

.content-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e5e5;
  border-radius: 50%;
  border-top-color: #050505;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

.content-loading-text {
  font-size: 14px;
  color: #999;
}

/* 图片懒加载模糊效果 */
img.lazy-load {
  filter: blur(10px);
  transition: filter 0.3s ease;
}

img.lazy-load.loaded {
  filter: blur(0);
}

/* 加载更多按钮的加载状态 */
.btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn.loading .loading-spinner {
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: middle;
}


/* 收藏按钮样式 */
.activity-favorite-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #666;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}

.activity-favorite-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.activity-favorite-btn.favorited svg {
  fill: #fbbf24 !important;
  stroke: #fbbf24;
}

/* 深色模式下的收藏按钮 */
body.dark-mode .activity-favorite-btn {
  color: #999;
}

body.dark-mode .activity-favorite-btn:hover {
  background: #2a2a2a;
  color: #e0e0e0;
}

body.dark-mode .activity-favorite-btn.favorited svg {
  fill: #fbbf24 !important;
  stroke: #fbbf24;
}

/* 置顶和归档按钮 */
.activity-admin-actions {
  display: inline-flex;
  gap: 4px;
}

.activity-admin-btn {
  padding: 6px 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.activity-admin-btn:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.activity-admin-btn[style*="not-allowed"] {
  cursor: not-allowed;
  opacity: 0.3;
}

/* 新闻卡片样式 */
.news-card {
  background: #f9f9f9;
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-image {
  width: 100%;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 300px;
}

.news-title {
  padding: 16px 16px 8px;
  font-size: 18px;
  font-weight: 600;
  color: #000;
  line-height: 1.4;
}

.news-summary {
  padding: 0 16px 12px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.news-link {
  display: block;
  padding: 12px 16px;
  background: #000000;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s;
}

.news-link:hover {
  background: #333;
}

/* 深色模式下的新闻卡片 */
body.dark-mode .news-card {
  background: #2a2a2a;
}

body.dark-mode .news-title {
  color: #fff;
}

body.dark-mode .news-summary {
  color: #999;
}

