/* LivesTrace v2.0 社交功能样式 */

/* 三栏布局 */
.social-layout {
  display: grid;
  grid-template-columns: 275px 1fr 350px;
  min-height: 100vh;
  max-width: 1300px;
  margin: 0 auto;
  background: #fff;
}

/* 左栏 */
.social-left {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 12px;
  border-right: 1px solid #eff3f4;
  display: flex;
  flex-direction: column;
}

.social-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  cursor: pointer;
  border-radius: 30px;
  margin-bottom: 8px;
}

.social-logo:hover {
  background: #f7f9f9;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #667eea;
}

.social-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 30px;
  text-decoration: none;
  color: #0f1419;
  font-size: 18px;
  font-weight: 500;
  transition: background 0.2s;
}

.nav-item:hover {
  background: #f7f9f9;
}

.nav-item.active {
  font-weight: 700;
}

.nav-icon {
  font-size: 22px;
}

.btn-post {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin: 16px 0;
  transition: opacity 0.2s;
}

.btn-post:hover {
  opacity: 0.9;
}

.social-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.2s;
}

.social-user-card:hover {
  background: #f7f9f9;
}

.user-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-handle {
  color: #536471;
  font-size: 14px;
}

/* 中栏 */
.social-center {
  border-right: 1px solid #eff3f4;
  min-height: 100vh;
}

.feed-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  z-index: 10;
}

.feed-header h2 {
  margin: 0 0 12px 0;
  font-size: 20px;
}

.feed-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  margin: 0 -16px -16px;
}

.feed-tab {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  transition: background 0.2s;
}

.feed-tab:hover {
  background: #f7f9f9;
}

.feed-tab.active {
  color: #0f1419;
  font-weight: 700;
  border-bottom: 3px solid #667eea;
}

/* 发布框 */
.composer-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 8px solid #f7f9f9;
  cursor: pointer;
}

.composer-inline:hover {
  background: #f7f9f9;
}

.composer-avatar-sm {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.composer-placeholder {
  color: #536471;
  font-size: 18px;
}

/* 动态列表 */
.feed-list {
  padding-bottom: 20px;
}

/* 动态卡片 */
.post-card {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  transition: background 0.2s;
}

.post-card:hover {
  background: #f7f9f9;
}

.post-header {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.post-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}

.post-author-info {
  flex: 1;
  min-width: 0;
}

.post-author {
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-author:hover {
  text-decoration: underline;
}

.verified-badge {
  color: #667eea;
  font-size: 14px;
}

.post-time {
  color: #536471;
  font-size: 14px;
}

.post-more {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #536471;
  padding: 4px 8px;
  border-radius: 50%;
}

.post-more:hover {
  background: #eff3f4;
  color: #667eea;
}

.post-content {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 12px;
  word-break: break-word;
}

.hashtag, .mention {
  color: #667eea;
  cursor: pointer;
}

.hashtag:hover, .mention:hover {
  text-decoration: underline;
}

.post-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.hashtag-tag {
  color: #667eea;
  font-size: 14px;
  cursor: pointer;
}

.hashtag-tag:hover {
  text-decoration: underline;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  max-width: 425px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  color: #536471;
  font-size: 14px;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.action-btn.active {
  color: #e91e63;
}

.action-icon {
  font-size: 18px;
}

.action-count {
  font-size: 13px;
}

/* 右栏 */
.social-right {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 12px 16px;
  overflow-y: auto;
}

.right-card {
  background: #f7f9f9;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.right-card h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.suggestion-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.suggestion-info {
  flex: 1;
  min-width: 0;
}

.suggestion-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-handle {
  color: #536471;
  font-size: 13px;
}

.btn-follow-sm {
  background: #0f1419;
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-follow-sm:hover {
  background: #272c30;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trending-item {
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.trending-item:hover {
  background: #eff3f4;
}

.trending-tag {
  font-weight: 700;
  font-size: 15px;
  color: #0f1419;
}

.trending-count {
  color: #536471;
  font-size: 13px;
}

.right-footer {
  padding: 16px;
  color: #536471;
  font-size: 13px;
  line-height: 1.8;
}

.right-footer a {
  color: #536471;
  text-decoration: none;
}

.right-footer a:hover {
  text-decoration: underline;
}

/* 发布弹窗 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 50px;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.post-composer-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  margin: 0 16px;
}

.composer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.composer-header h3 {
  margin: 0;
  font-size: 18px;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #536471;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  background: #f7f9f9;
}

.composer-body {
  display: flex;
  gap: 12px;
  padding: 16px;
}

.composer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.composer-body textarea {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  resize: none;
  min-height: 120px;
  font-family: inherit;
}

.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid #eff3f4;
}

.composer-tools {
  display: flex;
  gap: 4px;
}

.tool-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: #667eea;
}

.tool-btn:hover {
  background: rgba(102, 126, 234, 0.1);
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#charCount {
  color: #536471;
  font-size: 14px;
}

/* 个人主页 */
.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.profile-header {
  padding: 0 16px 16px;
  position: relative;
}

.profile-avatar {
  width: 134px;
  height: 134px;
  border-radius: 50%;
  border: 4px solid white;
  margin-top: -67px;
  margin-bottom: 12px;
}

.profile-info {
  margin-bottom: 12px;
}

.profile-name {
  margin: 0 0 4px 0;
  font-size: 22px;
}

.profile-handle {
  color: #536471;
  margin: 0 0 12px 0;
}

.profile-bio {
  margin: 0 0 12px 0;
  font-size: 15px;
}

.profile-stats {
  display: flex;
  gap: 20px;
  color: #536471;
  font-size: 14px;
}

.profile-stats strong {
  color: #0f1419;
}

.profile-actions {
  display: flex;
  gap: 8px;
  position: absolute;
  top: 16px;
  right: 16px;
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
}

.profile-tab {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
}

.profile-tab:hover {
  background: #f7f9f9;
}

.profile-tab.active {
  color: #0f1419;
  font-weight: 700;
  border-bottom: 3px solid #667eea;
}

/* 探索页 */
.search-box {
  margin-bottom: 12px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #eff3f4;
  border-radius: 24px;
  font-size: 15px;
  outline: none;
  background: #f7f9f9;
}

.search-box input:focus {
  background: white;
  border-color: #667eea;
}

.explore-trending {
  padding: 16px;
  border-bottom: 8px solid #f7f9f9;
}

.explore-trending h3 {
  margin: 0 0 12px 0;
}

.trending-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trending-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.trending-card:hover {
  background: #f7f9f9;
}

.trending-rank {
  font-size: 20px;
  font-weight: 700;
  color: #667eea;
  width: 30px;
}

.trending-info {
  flex: 1;
}

/* 加载和空状态 */
.loading-state, .empty-state, .error-state {
  padding: 40px 20px;
  text-align: center;
  color: #536471;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  color: #0f1419;
}

.empty-state p {
  margin: 0 0 16px 0;
}

/* 响应式 */
@media (max-width: 1100px) {
  .social-layout {
    grid-template-columns: 88px 1fr 300px;
  }
  .nav-item span:not(.nav-icon),
  .logo-text,
  .user-info,
  .btn-post span {
    display: none;
  }
  .btn-post {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .social-user-card {
    justify-content: center;
  }
}

@media (max-width: 800px) {
  .social-layout {
    grid-template-columns: 1fr;
  }
  .social-left, .social-right {
    display: none;
  }
}

/* 通知页面 */
.notification-list {
  padding-bottom: 20px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.notification-item:hover {
  background: #f7f9f9;
}

.notification-item.unread {
  background: rgba(102, 126, 234, 0.05);
}

.notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  font-size: 15px;
  line-height: 1.4;
  color: #0f1419;
}

.notification-preview {
  color: #536471;
  font-size: 14px;
  display: block;
  margin-top: 4px;
}

.notification-time {
  color: #536471;
  font-size: 13px;
  margin-top: 4px;
}

.notification-dot {
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
}

/* 导航栏徽章 */
.nav-item {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  background: #e91e63;
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* 私信页面 */
.dm-container {
  display: flex;
  height: calc(100vh - 0px);
  min-height: 600px;
}

.dm-sidebar {
  width: 320px;
  border-right: 1px solid #eff3f4;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.dm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.dm-header h2 {
  margin: 0;
  font-size: 20px;
}

.conversation-list {
  flex: 1;
  overflow-y: auto;
}

.conversation-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f7f9f9;
  transition: background 0.2s;
}

.conversation-item:hover {
  background: #f7f9f9;
}

.conversation-item.active {
  background: rgba(102, 126, 234, 0.1);
}

.conversation-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

.conversation-name {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.unread-badge {
  background: #e91e63;
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.conversation-last {
  color: #536471;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.conversation-time {
  color: #536471;
  font-size: 12px;
  margin-top: 2px;
}

/* 聊天区域 */
.dm-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #536471;
}

.chat-placeholder .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #eff3f4;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.chat-user-info {
  flex: 1;
}

.chat-user-name {
  font-weight: 700;
  font-size: 16px;
}

.chat-user-status {
  color: #4caf50;
  font-size: 13px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-bubble {
  display: flex;
  gap: 8px;
  max-width: 70%;
}

.message-bubble.own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.message-content {
  background: #f7f9f9;
  padding: 10px 14px;
  border-radius: 18px;
  min-width: 0;
}

.message-bubble.own .message-content {
  background: #667eea;
  color: white;
}

.message-text {
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
}

.message-time {
  font-size: 11px;
  color: #536471;
  margin-top: 4px;
}

.message-bubble.own .message-time {
  color: rgba(255, 255, 255, 0.7);
}

.chat-input-area {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #eff3f4;
  align-items: flex-end;
}

.chat-input-area textarea {
  flex: 1;
  border: 1px solid #eff3f4;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 15px;
  resize: none;
  outline: none;
  font-family: inherit;
  max-height: 120px;
}

.chat-input-area textarea:focus {
  border-color: #667eea;
}

@media (max-width: 800px) {
  .dm-sidebar {
    width: 100%;
  }
  .dm-chat {
    display: none;
  }
  .dm-container.chat-open .dm-sidebar {
    display: none;
  }
  .dm-container.chat-open .dm-chat {
    display: flex;
  }
}

/* 搜索页面 */
.search-page {
  min-height: 100vh;
}

.search-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.search-box-large {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f7f9f9;
  border-radius: 24px;
  padding: 8px 16px;
}

.search-box-large .search-icon {
  font-size: 18px;
}

.search-box-large input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
}

.search-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
}

.search-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.search-tab:hover {
  background: #f7f9f9;
}

.search-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.search-results {
  padding-bottom: 20px;
}

.search-initial {
  padding: 16px;
}

.search-history {
  margin-bottom: 24px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 700;
}

.btn-clear {
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  font-size: 14px;
}

.history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-tag {
  background: #f7f9f9;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.history-tag:hover {
  background: #eff3f4;
}

.trending-section, .suggested-section {
  margin-bottom: 24px;
}

.trending-section h3, .suggested-section h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.trending-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trending-tag {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.trending-tag:hover {
  background: rgba(102, 126, 234, 0.2);
}

.trending-tag small {
  opacity: 0.7;
  margin-left: 4px;
}

.suggested-users-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggested-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f7f9f9;
}

.suggested-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}

.suggested-user-info {
  flex: 1;
  min-width: 0;
}

.suggested-user-name {
  font-weight: 700;
  cursor: pointer;
}

.suggested-user-handle {
  color: #536471;
  font-size: 14px;
}

/* 搜索结果 */
.search-section {
  padding: 16px;
  border-bottom: 8px solid #f7f9f9;
}

.search-section h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #536471;
}

.user-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.user-result-item:hover {
  background: #f7f9f9;
}

.user-result-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.user-result-info {
  flex: 1;
  min-width: 0;
}

.user-result-name {
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-result-handle {
  color: #536471;
  font-size: 14px;
}

.user-result-bio {
  color: #536471;
  font-size: 14px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hashtag-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hashtag-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.hashtag-result-item:hover {
  background: #f7f9f9;
}

.hashtag-icon {
  font-size: 24px;
}

.hashtag-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hashtag-name {
  font-weight: 700;
  font-size: 16px;
  color: #667eea;
}

.hashtag-count {
  color: #536471;
  font-size: 14px;
}

.text-muted {
  color: #536471;
  font-size: 14px;
}

/* 圈子页面 */
.circles-page {
  min-height: 100vh;
}

.circles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.circles-header h2 {
  margin: 0;
  font-size: 20px;
}

.circles-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
}

.circles-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.circles-tab:hover {
  background: #f7f9f9;
}

.circles-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.circles-list {
  padding-bottom: 20px;
}

.circle-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  cursor: pointer;
  transition: background 0.2s;
}

.circle-card:hover {
  background: #f7f9f9;
}

.circle-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.circle-info {
  flex: 1;
  min-width: 0;
}

.circle-name {
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.circle-desc {
  color: #536471;
  font-size: 14px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.circle-meta {
  color: #536471;
  font-size: 13px;
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.circle-action {
  flex-shrink: 0;
}

.member-badge {
  background: #e8f5e9;
  color: #4caf50;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

/* 圈子详情 */
.circle-detail {
  min-height: 100vh;
}

.circle-detail-header {
  padding: 20px;
  border-bottom: 1px solid #eff3f4;
}

.circle-detail-avatar {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.circle-detail-content {
  padding: 20px;
}

.circle-detail-content h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.circle-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}

.circle-member-item {
  text-align: center;
  cursor: pointer;
  padding: 12px;
  border-radius: 12px;
  transition: background 0.2s;
}

.circle-member-item:hover {
  background: #f7f9f9;
}

.circle-member-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 8px;
}

.circle-member-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.circle-member-role {
  color: #536471;
  font-size: 12px;
  margin-top: 2px;
}

/* 六度关系图谱 */
.graph-page {
  min-height: 100vh;
}

.graph-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.graph-header h2 {
  margin: 0;
  font-size: 20px;
}

.graph-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
}

.graph-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.graph-tab:hover {
  background: #f7f9f9;
}

.graph-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.graph-content {
  padding: 16px;
}

.graph-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  flex: 1;
  background: linear-gradient(135deg, #667eea20, #764ba220);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #667eea;
}

.stat-label {
  color: #536471;
  font-size: 14px;
  margin-top: 4px;
}

.graph-lists {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.graph-list-section h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
}

.graph-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.graph-user-card {
  text-align: center;
  cursor: pointer;
  padding: 12px;
  border-radius: 12px;
  background: #f7f9f9;
  transition: transform 0.2s;
}

.graph-user-card:hover {
  transform: translateY(-2px);
}

.graph-user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 8px;
}

.graph-user-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.graph-user-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e3f2fd;
  color: #1976d2;
  display: inline-block;
  margin-top: 4px;
}

.graph-user-tag.mutual {
  background: #e8f5e9;
  color: #4caf50;
}

/* 路径查找 */
.path-finder {
  max-width: 600px;
  margin: 0 auto;
}

.path-input-box {
  background: #f7f9f9;
  border-radius: 12px;
  padding: 24px;
}

.path-input-box h3 {
  margin: 0 0 8px 0;
}

.path-found h3 {
  color: #4caf50;
}

.path-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.path-node {
  text-align: center;
  cursor: pointer;
  padding: 12px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-width: 80px;
}

.path-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 4px;
}

.path-name {
  font-weight: 600;
  font-size: 13px;
}

.path-degree {
  font-size: 11px;
  color: #536471;
}

.path-arrow {
  font-size: 24px;
  color: #667eea;
  font-weight: 700;
}

/* 推荐列表 */
.suggestions-list h3 {
  margin: 0 0 16px 0;
}

.suggestions-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggestion-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f7f9f9;
  border-radius: 12px;
}

.suggestion-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
}

.suggestion-info {
  flex: 1;
  min-width: 0;
}

.suggestion-name {
  font-weight: 700;
  cursor: pointer;
}

.suggestion-handle {
  color: #536471;
  font-size: 14px;
}

.suggestion-mutual {
  color: #667eea;
  font-size: 13px;
  margin-top: 2px;
}

/* 互助协作 */
.collab-page {
  min-height: 100vh;
}

.collab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.collab-header h2 {
  margin: 0;
  font-size: 20px;
}

.collab-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
  overflow-x: auto;
}

.collab-tab {
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.collab-tab:hover {
  background: #f7f9f9;
}

.collab-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.collab-list {
  padding-bottom: 20px;
}

.collab-card {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  cursor: pointer;
  transition: background 0.2s;
}

.collab-card:hover {
  background: #f7f9f9;
}

.collab-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.collab-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.collab-desc {
  color: #536471;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.collab-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #536471;
  font-size: 13px;
  margin-bottom: 12px;
}

.collab-tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 8px;
  border-radius: 10px;
}

.collab-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.collab-creator-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.collab-creator-name {
  font-size: 14px;
  color: #536471;
  flex: 1;
}

.collab-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}

.collab-status.open {
  background: #e8f5e9;
  color: #4caf50;
}

.collab-status.in_progress {
  background: #fff3e0;
  color: #ff9800;
}

.collab-status.completed {
  background: #e3f2fd;
  color: #2196f3;
}

.collab-status.closed {
  background: #f5f5f5;
  color: #9e9e9e;
}

/* 协作详情 */
.collab-detail {
  min-height: 100vh;
}

.collab-detail-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.collab-detail-meta {
  display: flex;
  gap: 16px;
  color: #536471;
  font-size: 14px;
  align-items: center;
}

.collab-detail-content {
  padding: 20px;
}

.collab-detail-section {
  margin-bottom: 24px;
}

.collab-detail-section h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
}

.collab-detail-info {
  background: #f7f9f9;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.info-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  width: 80px;
  color: #536471;
  font-weight: 500;
}

.collab-apply-section {
  background: #f0f7ff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.collab-apply-section h3 {
  margin: 0 0 12px 0;
}

.collab-applicants h3 {
  margin: 0 0 12px 0;
}

.applicant-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f9f9;
  margin-bottom: 8px;
}

.applicant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.applicant-info {
  flex: 1;
  min-width: 0;
}

.applicant-name {
  font-weight: 600;
  cursor: pointer;
}

.applicant-message {
  color: #536471;
  font-size: 13px;
  margin-top: 2px;
}

.applicant-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}

.applicant-status.pending {
  background: #fff3e0;
  color: #ff9800;
}

.applicant-status.accepted {
  background: #e8f5e9;
  color: #4caf50;
}

.applicant-status.rejected {
  background: #ffebee;
  color: #f44336;
}

/* 家族空间 */
.family-page {
  min-height: 100vh;
}

.family-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.family-header h2 {
  margin: 0;
  font-size: 20px;
}

.family-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
  overflow-x: auto;
}

.family-tab {
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.family-tab:hover {
  background: #f7f9f9;
}

.family-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.family-content {
  padding-bottom: 20px;
}

.family-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
}

.family-member-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #f8f9ff;
  border-radius: 16px;
  transition: all 0.3s;
}

.family-member-card:hover {
  background: white;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.family-member-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.family-member-info {
  flex: 1;
  min-width: 0;
}

.family-member-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.family-member-relation {
  font-size: 13px;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 6px;
}

.family-member-birthday {
  font-size: 13px;
  color: #536471;
  margin-bottom: 4px;
}

.family-member-bio {
  font-size: 13px;
  color: #536471;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 家族谱系 */
.family-tree {
  padding: 20px;
}

.tree-node {
  margin-bottom: 12px;
}

.tree-node-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin-bottom: 8px;
}

.tree-node-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.tree-node-name {
  font-weight: 700;
}

.tree-node-relation {
  font-size: 12px;
  color: #536471;
}

.tree-children {
  border-left: 2px solid #e0e0e0;
  padding-left: 20px;
  margin-left: 20px;
}

/* 家书 */
.letters-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.letter-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s;
}

.letter-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.letter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.letter-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.letter-date {
  font-size: 13px;
  color: #536471;
}

.letter-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #536471;
  margin-bottom: 12px;
}

.capsule-badge {
  background: #fff3e0;
  color: #ff9800;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.letter-content {
  color: #333;
  line-height: 1.8;
  font-size: 15px;
}

/* 家族时间轴 */
.family-timeline {
  position: relative;
  padding-left: 30px;
}

.family-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #667eea, #764ba2);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-dot {
  position: absolute;
  left: -27px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #667eea;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #667eea;
}

.timeline-content {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
}

.timeline-date {
  font-size: 13px;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.timeline-desc {
  color: #536471;
  font-size: 14px;
  margin: 0 0 8px 0;
}

.timeline-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #536471;
}

.milestone-badge {
  background: #fff3e0;
  color: #ff9800;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

/* 人生时间轴 */
.timeline-page {
  min-height: 100vh;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.timeline-header h2 {
  margin: 0;
  font-size: 20px;
}

.timeline-filters {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #eff3f4;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  padding: 6px 14px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.filter-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.timeline-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  background: #f8f9ff;
}

.timeline-stat-card {
  text-align: center;
  padding: 12px;
  background: white;
  border-radius: 12px;
}

.timeline-stat-number {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timeline-stat-label {
  font-size: 12px;
  color: #536471;
  margin-top: 2px;
}

.timeline-content {
  padding-bottom: 20px;
}

.timeline-year-group {
  margin-bottom: 24px;
}

.timeline-year-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #667eea10, transparent);
}

.timeline-year {
  font-size: 24px;
  font-weight: 800;
  color: #667eea;
}

.timeline-year-count {
  font-size: 13px;
  color: #536471;
}

.personal-timeline {
  position: relative;
  padding-left: 30px;
  margin: 0 16px;
}

.personal-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.personal-timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.personal-timeline-dot {
  position: absolute;
  left: -27px;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px currentColor;
}

.personal-timeline-content {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  border-left-width: 3px;
}

.personal-timeline-date {
  font-size: 13px;
  color: #536471;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.milestone-tag {
  background: #fff3e0;
  color: #ff9800;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.retro-tag {
  background: #e3f2fd;
  color: #2196f3;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.personal-timeline-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-icon {
  font-size: 18px;
}

.personal-timeline-desc {
  color: #536471;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 8px 0;
}

.personal-timeline-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #536471;
  align-items: center;
  flex-wrap: wrap;
}

.category-tag {
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .timeline-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 时空地图 */
.map-page {
  min-height: 100vh;
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.map-header h2 {
  margin: 0;
  font-size: 20px;
}

.map-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
}

.map-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.map-tab:hover {
  background: #f7f9f9;
}

.map-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.map-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: #f8f9ff;
}

.map-stat-card {
  text-align: center;
  padding: 12px;
  background: white;
  border-radius: 12px;
}

.map-stat-number {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.map-stat-label {
  font-size: 12px;
  color: #536471;
  margin-top: 2px;
}

.map-content {
  padding-bottom: 20px;
}

/* 人生轨迹 */
.trajectory-container {
  padding: 20px 16px;
}

.trajectory-line {
  position: relative;
  padding-left: 40px;
}

.trajectory-line::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #667eea, #764ba2);
}

.trajectory-point {
  position: relative;
  margin-bottom: 24px;
}

.trajectory-order {
  position: absolute;
  left: -40px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #667eea;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  z-index: 1;
}

.trajectory-dot {
  display: none;
}

.trajectory-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  border-left-width: 3px;
}

.trajectory-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.trajectory-icon {
  font-size: 20px;
}

.trajectory-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.current-badge {
  background: #e8f5e9;
  color: #4caf50;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.trajectory-date {
  font-size: 13px;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 6px;
}

.trajectory-address {
  font-size: 13px;
  color: #536471;
  margin-bottom: 6px;
}

.trajectory-desc {
  color: #536471;
  font-size: 14px;
  line-height: 1.7;
  margin: 8px 0;
}

.trajectory-actions {
  margin-top: 8px;
  text-align: right;
}

/* 记忆地点 */
.location-type-group {
  margin-bottom: 24px;
}

.location-type-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
}

.location-type-icon {
  font-size: 20px;
}

.location-type-count {
  background: currentColor;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  opacity: 0.8;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  padding: 0 16px;
}

.location-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s;
}

.location-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.location-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.location-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.location-card-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.location-card-date {
  font-size: 12px;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 4px;
}

.location-card-address {
  font-size: 13px;
  color: #536471;
  margin-bottom: 4px;
}

.location-card-desc {
  color: #536471;
  font-size: 13px;
  line-height: 1.6;
  margin: 6px 0;
}

.location-card-actions {
  margin-top: 8px;
  text-align: right;
}

@media (max-width: 600px) {
  .map-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .location-grid {
    grid-template-columns: 1fr;
  }
}

/* 家族认知库 */
.knowledge-page {
  min-height: 100vh;
}

.knowledge-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  gap: 16px;
}

.knowledge-header h2 {
  margin: 0;
  font-size: 20px;
}

.knowledge-categories {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #eff3f4;
  overflow-x: auto;
  flex-wrap: wrap;
}

.knowledge-cat-btn {
  padding: 6px 14px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.knowledge-cat-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.knowledge-cat-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.knowledge-list {
  padding: 16px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.knowledge-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.knowledge-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.knowledge-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.knowledge-cat-tag {
  background: #f0f4ff;
  color: #667eea;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.verified-tag {
  background: #e8f5e9;
  color: #4caf50;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.knowledge-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.knowledge-card-content {
  color: #536471;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 12px 0;
}

.knowledge-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.knowledge-author {
  font-size: 13px;
  color: #536471;
}

.knowledge-stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #536471;
}

/* 知识详情 */
.knowledge-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.knowledge-detail-header {
  margin-bottom: 24px;
}

.knowledge-detail-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #536471;
  margin-top: 12px;
  flex-wrap: wrap;
}

.knowledge-detail-content {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
}

.knowledge-detail-text {
  color: #333;
}

.knowledge-detail-actions {
  text-align: center;
}

.knowledge-detail-actions .btn {
  padding: 12px 32px;
  font-size: 16px;
}

@media (max-width: 600px) {
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
  .knowledge-header {
    flex-direction: column;
  }
}

/* 时间胶囊 */
.capsule-page {
  min-height: 100vh;
}

.capsule-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  gap: 16px;
}

.capsule-header h2 {
  margin: 0;
  font-size: 20px;
}

.capsule-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
}

.capsule-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.capsule-tab:hover {
  background: #f7f9f9;
}

.capsule-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.capsule-list {
  padding: 20px 16px;
}

.capsule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.capsule-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
}

.capsule-card.locked {
  background: linear-gradient(135deg, #f5f5f5, #e8eaf6);
  border-color: #c5cae9;
}

.capsule-card.unlocked {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-color: #a5d6a7;
}

.capsule-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.capsule-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.capsule-date {
  font-size: 13px;
  color: #536471;
  margin-bottom: 12px;
}

.capsule-countdown {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.countdown-label {
  font-size: 12px;
  color: #536471;
  display: block;
  margin-bottom: 4px;
}

.countdown-time {
  font-size: 20px;
  font-weight: 800;
  color: #667eea;
}

.capsule-content-preview {
  background: white;
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
  font-size: 14px;
  color: #536471;
  line-height: 1.6;
  text-align: left;
}

/* AI 代记 */
.ai-agent-page {
  min-height: 100vh;
}

.ai-agent-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.ai-agent-header h2 {
  margin: 0;
  font-size: 20px;
}

.ai-agent-content {
  padding: 20px 16px;
}

.ai-agent-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.ai-agent-feature {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.ai-agent-feature .feature-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.ai-agent-feature h3 {
  font-size: 18px;
  margin: 0 0 8px 0;
}

.ai-agent-feature p {
  color: #536471;
  font-size: 14px;
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.ai-agent-demo {
  background: #f8f9ff;
  border-radius: 16px;
  padding: 24px;
}

.ai-agent-demo h3 {
  margin: 0 0 16px 0;
}

.demo-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-user-msg {
  align-self: flex-end;
  background: #667eea;
  color: white;
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  max-width: 70%;
  font-size: 14px;
}

.demo-ai-reply {
  align-self: flex-start;
  background: white;
  border: 1px solid #e0e0e0;
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  max-width: 80%;
  font-size: 14px;
  line-height: 1.8;
}

/* 写书工具 */
.book-writer-page {
  min-height: 100vh;
}

.book-writer-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.book-writer-header h2 {
  margin: 0;
  font-size: 20px;
}

.book-writer-content {
  padding: 20px 16px;
}

.book-writer-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.step-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  position: relative;
}

.step-number {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.step-card h3 {
  font-size: 18px;
  margin: 12px 0 8px 0;
}

.step-card p {
  color: #536471;
  font-size: 14px;
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.book-writer-demo {
  background: #f8f9ff;
  border-radius: 16px;
  padding: 24px;
}

.book-writer-demo h3 {
  margin: 0 0 8px 0;
}

.book-writer-demo > p {
  color: #536471;
  margin: 0 0 20px 0;
}

.book-templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.book-template {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.book-template:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}

.template-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.book-template h4 {
  font-size: 15px;
  margin: 0 0 4px 0;
}

.book-template p {
  font-size: 12px;
  color: #536471;
  margin: 0;
}

@media (max-width: 600px) {
  .capsule-grid,
  .ai-agent-features,
  .book-writer-steps {
    grid-template-columns: 1fr;
  }
}

/* 设置页面 */
.settings-page {
  min-height: 100vh;
}

.settings-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.settings-header h2 {
  margin: 0;
  font-size: 20px;
}

.settings-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
  overflow-x: auto;
}

.settings-tab {
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.settings-tab:hover {
  background: #f7f9f9;
}

.settings-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.settings-content {
  padding: 20px 16px;
  max-width: 700px;
  margin: 0 auto;
}

.settings-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.settings-section h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item-info {
  flex: 1;
  min-width: 0;
}

.settings-item-label {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.settings-item-desc {
  font-size: 13px;
  color: #536471;
}

.settings-item-value {
  font-size: 14px;
  color: #536471;
}

.settings-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

/* 开关 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 26px;
  transition: 0.3s;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* 话题页面 */
.hashtag-page {
  min-height: 100vh;
}

.hashtag-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.hashtag-posts {
  padding-bottom: 20px;
}

/* 数字遗产 */
.legacy-page {
  min-height: 100vh;
}

.legacy-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.legacy-header h2 {
  margin: 0;
  font-size: 20px;
}

.legacy-content {
  padding: 20px 16px;
  max-width: 700px;
  margin: 0 auto;
}

.legacy-warning {
  display: flex;
  gap: 16px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.legacy-warning-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.legacy-warning h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.legacy-warning p {
  margin: 0;
  font-size: 14px;
  color: #536471;
  line-height: 1.6;
}

.legacy-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.legacy-section h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.legacy-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.legacy-form input,
.legacy-form select,
.legacy-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 14px;
}

.legacy-current {
  background: #f8f9ff;
  border-radius: 12px;
  padding: 16px;
}

.legacy-message textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  resize: vertical;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .settings-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .legacy-warning {
    flex-direction: column;
  }
}

/* 可信系统 */
.trust-page {
  min-height: 100vh;
}

.trust-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.trust-header h2 {
  margin: 0;
  font-size: 20px;
}

.trust-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
  overflow-x: auto;
}

.trust-tab {
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.trust-tab:hover {
  background: #f7f9f9;
}

.trust-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.trust-list {
  padding: 20px 16px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.trust-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
}

.trust-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.trust-status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.trust-content-type {
  font-size: 12px;
  color: #536471;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 8px;
}

.trust-card-id {
  font-size: 12px;
  color: #536471;
  margin-bottom: 6px;
  font-family: monospace;
}

.trust-side-type {
  font-size: 13px;
  color: #ff9800;
  margin-bottom: 8px;
}

.trust-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #536471;
  margin-bottom: 8px;
}

.trust-hash {
  font-size: 11px;
  color: #9e9e9e;
  font-family: monospace;
  margin-bottom: 12px;
  word-break: break-all;
}

.trust-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 媒体库 */
.media-page {
  min-height: 100vh;
}

.media-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.media-header h2 {
  margin: 0;
  font-size: 20px;
}

.media-upload-area {
  margin: 20px 16px;
  padding: 40px;
  border: 2px dashed #ddd;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.media-upload-area:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.media-upload-area h3 {
  margin: 0 0 8px 0;
}

.media-upload-area p {
  margin: 0;
  color: #536471;
  font-size: 14px;
}

.media-gallery {
  padding: 0 16px 20px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.media-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
}

.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 8px;
  font-size: 12px;
}

/* 数据导出 */
.export-page {
  min-height: 100vh;
}

.export-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.export-header h2 {
  margin: 0;
  font-size: 20px;
}

.export-content {
  padding: 20px 16px;
  max-width: 700px;
  margin: 0 auto;
}

.export-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.export-section h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.export-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.export-option {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.export-option:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.export-option input {
  margin-top: 4px;
}

.option-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.option-desc {
  font-size: 13px;
  color: #536471;
}

.format-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.format-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.export-actions {
  text-align: center;
  margin-top: 20px;
}

.export-note {
  font-size: 13px;
  color: #536471;
  margin-top: 12px;
}

/* 支付订阅 */
.pricing-page {
  min-height: 100vh;
}

.pricing-page-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  text-align: center;
}

.pricing-page-header h2 {
  margin: 0;
  font-size: 24px;
}

.pricing-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 30px 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.plan-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan-card.featured {
  border: 2px solid #667eea;
  box-shadow: 0 8px 32px rgba(102,126,234,0.2);
  transform: scale(1.02);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.plan-header {
  text-align: center;
  margin-bottom: 20px;
}

.plan-header h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
}

.plan-price {
  font-size: 36px;
  font-weight: 800;
  color: #667eea;
}

.plan-price span {
  font-size: 14px;
  font-weight: 500;
  color: #536471;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  flex: 1;
}

.plan-features li {
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.plan-features li:last-child {
  border-bottom: none;
}

.pricing-faq {
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 16px;
}

.pricing-faq h3 {
  text-align: center;
  margin-bottom: 20px;
}

.faq-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.faq-item h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
}

.faq-item p {
  margin: 0;
  font-size: 14px;
  color: #536471;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .trust-grid,
  .pricing-plans {
    grid-template-columns: 1fr;
  }
  .plan-card.featured {
    transform: none;
  }
}

/* 活动/事件 */
.events-page {
  min-height: 100vh;
}

.events-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.events-header h2 {
  margin: 0;
  font-size: 20px;
}

.events-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
  overflow-x: auto;
}

.events-tab {
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.events-tab:hover {
  background: #f7f9f9;
}

.events-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.events-list {
  padding: 20px 16px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.event-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.event-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.event-type-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: #e8eaf6;
  color: #3f51b5;
}

.event-type-badge.large {
  font-size: 14px;
  padding: 6px 14px;
}

.event-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.event-status.upcoming {
  background: #e3f2fd;
  color: #1976d2;
}

.event-status.ongoing {
  background: #e8f5e9;
  color: #388e3c;
}

.event-status.ended {
  background: #f5f5f5;
  color: #757575;
}

.event-title {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.event-desc {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #536471;
  line-height: 1.5;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #536471;
  margin-bottom: 8px;
}

.event-creator {
  font-size: 12px;
  color: #9e9e9e;
}

/* 活动详情 */
.event-detail {
  min-height: 100vh;
}

.event-detail-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.event-detail-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 16px;
}

.event-detail-top {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.event-detail-title {
  margin: 0 0 16px 0;
  font-size: 28px;
}

.event-detail-desc {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9ff;
  border-radius: 12px;
}

.event-detail-info {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  width: 120px;
  font-weight: 600;
  color: #536471;
}

.info-value {
  flex: 1;
}

.event-detail-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.event-participants h3 {
  margin: 0 0 16px 0;
}

.participants-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.participant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.participant-name {
  font-weight: 600;
  font-size: 14px;
}

.participant-role {
  font-size: 12px;
  color: #536471;
}

/* 创建活动表单 */
.create-event-page {
  min-height: 100vh;
}

.create-event-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.create-event-header h2 {
  margin: 0;
  font-size: 20px;
}

.create-event-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* AI 参谋 */
.ai-counselor-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ai-counselor-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.ai-counselor-header h2 {
  margin: 0;
  font-size: 20px;
}

.ai-counselor-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.ai-counselor-chat {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  min-height: 400px;
}

.ai-message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.ai-message.ai-user {
  flex-direction: row-reverse;
}

.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ai-bot .ai-avatar {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.ai-user .ai-avatar {
  background: #e0e0e0;
}

.ai-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.6;
}

.ai-bot .ai-bubble {
  background: #f0f2ff;
  border-bottom-left-radius: 4px;
}

.ai-user .ai-bubble {
  background: #667eea;
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-bubble p {
  margin: 0 0 8px 0;
}

.ai-bubble p:last-child {
  margin-bottom: 0;
}

.ai-bubble ul {
  margin: 8px 0;
  padding-left: 20px;
}

.ai-counselor-input {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid #eff3f4;
  background: white;
}

.ai-counselor-input textarea {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 12px;
  resize: none;
  font-size: 14px;
  font-family: inherit;
}

.ai-quick-questions {
  padding: 12px 16px;
  border-top: 1px solid #eff3f4;
  background: #f8f9ff;
}

.quick-question-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-tag {
  padding: 6px 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-tag:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* 管理后台 */
.admin-page {
  min-height: 100vh;
}

.admin-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.admin-header h2 {
  margin: 0;
  font-size: 20px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px 16px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
}

.stat-icon {
  font-size: 32px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #667eea;
}

.stat-label {
  font-size: 13px;
  color: #536471;
}

.admin-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  padding: 0 16px 20px;
}

.admin-section-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.admin-section-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.admin-section-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.admin-section-card h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.admin-section-card p {
  margin: 0;
  font-size: 13px;
  color: #536471;
}

@media (max-width: 600px) {
  .events-grid,
  .admin-stats,
  .admin-sections {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .ai-bubble {
    max-width: 85%;
  }
}

/* 投票/问卷 */
.polls-page {
  min-height: 100vh;
}

.polls-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.polls-header h2 {
  margin: 0;
  font-size: 20px;
}

.polls-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
  padding: 0 16px;
  overflow-x: auto;
}

.polls-tab {
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #536471;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.polls-tab:hover {
  background: #f7f9f9;
}

.polls-tab.active {
  color: #667eea;
  font-weight: 700;
  border-bottom-color: #667eea;
}

.polls-list {
  padding: 20px 16px;
}

.polls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.poll-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.poll-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.poll-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.poll-type-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: #e8eaf6;
  color: #3f51b5;
}

.poll-type-badge.large {
  font-size: 14px;
  padding: 6px 14px;
}

.poll-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.poll-status.active {
  background: #e8f5e9;
  color: #388e3c;
}

.poll-status.ended {
  background: #f5f5f5;
  color: #757575;
}

.poll-anonymous {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: #fff3e0;
  color: #f57c00;
}

.poll-title {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.poll-desc {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #536471;
  line-height: 1.5;
}

.poll-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #536471;
}

/* 投票详情 */
.poll-detail {
  min-height: 100vh;
}

.poll-detail-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.poll-detail-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 16px;
}

.poll-detail-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.poll-detail-title {
  margin: 0 0 16px 0;
  font-size: 28px;
}

.poll-detail-desc {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9ff;
  border-radius: 12px;
}

.poll-detail-info {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.poll-options h3 {
  margin: 0 0 16px 0;
}

.poll-option {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.poll-option:hover {
  border-color: #667eea;
}

.poll-option.selected {
  border-color: #667eea;
  background: #f8f9ff;
}

.poll-option.voted {
  border-color: #4caf50;
  background: #f1f8e9;
}

.option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.option-text {
  font-weight: 600;
  font-size: 15px;
}

.option-count {
  font-size: 13px;
  color: #536471;
}

.option-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.option-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.voted-mark {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #4caf50;
  font-weight: 600;
}

.poll-actions {
  margin-top: 24px;
  text-align: center;
}

.poll-voted-notice {
  margin-top: 24px;
  padding: 16px;
  background: #e8f5e9;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  color: #388e3c;
}

.poll-creator-actions {
  margin-top: 16px;
  text-align: center;
}

/* 创建投票表单 */
.create-poll-page {
  min-height: 100vh;
}

.create-poll-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.create-poll-header h2 {
  margin: 0;
  font-size: 20px;
}

.create-poll-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
}

.poll-option-input {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.poll-option-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

/* 礼物/打赏 */
.gifts-page {
  min-height: 100vh;
}

.gifts-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.gifts-header h2 {
  margin: 0;
  font-size: 20px;
}

.gifts-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  margin: 16px;
  border-radius: 12px;
}

.balance-label {
  font-size: 14px;
  opacity: 0.9;
}

.balance-value {
  font-size: 32px;
  font-weight: 800;
}

.balance-value small {
  font-size: 14px;
  font-weight: 500;
}

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  padding: 0 16px;
}

.gift-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.gift-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #667eea;
}

.gift-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.gift-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.gift-desc {
  font-size: 12px;
  color: #536471;
  margin-bottom: 8px;
}

.gift-price {
  font-size: 14px;
  font-weight: 700;
  color: #667eea;
}

.gifts-history {
  padding: 20px 16px;
}

.gifts-history h3 {
  margin: 0 0 16px 0;
}

/* 推荐系统 */
.recommend-page {
  min-height: 100vh;
}

.recommend-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.recommend-header h2 {
  margin: 0;
  font-size: 20px;
}

.recommend-filters {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #eff3f4;
  overflow-x: auto;
}

.recommend-filter {
  padding: 8px 16px;
  background: #f5f5f5;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.recommend-filter:hover {
  background: #e0e0e0;
}

.recommend-filter.active {
  background: #667eea;
  color: white;
}

.recommend-content {
  padding: 16px;
}

.recommend-section {
  margin-bottom: 32px;
}

.recommend-section h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.recommend-people,
.recommend-circles,
.recommend-events,
.recommend-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommend-person,
.recommend-circle,
.recommend-event {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
}

.person-avatar,
.circle-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

.circle-icon {
  font-size: 24px;
}

.person-info,
.circle-info,
.event-info {
  flex: 1;
  min-width: 0;
}

.person-name,
.circle-name,
.event-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

.person-desc,
.circle-desc,
.event-meta {
  font-size: 13px;
  color: #536471;
}

.recommend-post {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
}

.post-author {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.post-content {
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.5;
}

.post-meta {
  font-size: 13px;
  color: #536471;
}

@media (max-width: 600px) {
  .polls-grid,
  .gifts-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== 增强版家族树 ========== */
.family-tree-enhanced {
  padding: 16px;
}

.tree-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.tree-stats {
  display: flex;
  gap: 16px;
}

.stat-item {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.tree-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tree-relation-tip {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: #5d4037;
  margin-bottom: 16px;
}

.tree-container {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  min-height: 300px;
  overflow-x: auto;
}

.tree-node-wrapper {
  position: relative;
}

.tree-node-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
}

.tree-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 10px;
  color: #667eea;
  background: #f0f2ff;
  border-radius: 4px;
  margin-top: 12px;
  flex-shrink: 0;
  transition: all 0.2s;
  user-select: none;
}

.tree-collapse-btn:hover {
  background: #667eea;
  color: white;
}

.tree-collapse-placeholder {
  width: 24px;
  flex-shrink: 0;
}

.tree-children-container {
  margin-left: 32px;
  padding-left: 16px;
  border-left: 2px dashed #e0e0e0;
}

.tree-node-card-enhanced {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  min-width: 280px;
  position: relative;
}

.tree-node-card-enhanced:hover {
  background: white;
  transform: translateX(4px);
}

.tree-node-avatar-enhanced {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
}

.deceased-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 12px;
  background: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tree-node-info-enhanced {
  flex: 1;
  min-width: 0;
}

.tree-node-name-enhanced {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

.tree-node-relation-enhanced {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kinship-badge {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
}

.tree-node-meta {
  font-size: 11px;
  color: #536471;
  margin-top: 2px;
}

.tree-node-bio {
  font-size: 11px;
  color: #9e9e9e;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-spouse {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 2px solid #f48fb1;
  margin-left: 8px;
}

.tree-spouse-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.tree-spouse-info {
  min-width: 0;
}

.tree-spouse-name {
  font-weight: 600;
  font-size: 13px;
}

.tree-spouse-relation {
  font-size: 11px;
  color: #536471;
}

.account-indicator {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 18px;
  height: 18px;
  background: #4caf50;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* 图例 */
.tree-legend {
  margin-top: 20px;
  padding: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.tree-legend h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #536471;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

@media (max-width: 600px) {
  .tree-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .tree-children-container {
    margin-left: 16px;
    padding-left: 8px;
  }
  .tree-node-card-enhanced {
    flex-wrap: wrap;
  }
  .tree-spouse {
    width: 100%;
    border-left: none;
    border-top: 2px solid #f48fb1;
    padding-left: 0;
    padding-top: 8px;
    margin-left: 0;
  }
}

/* ========== 时间维度仪表盘 ========== */
.dashboard-page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.dashboard-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.dashboard-header h2 {
  margin: 0;
  font-size: 20px;
}

/* 时间窗切换 */
.time-window-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid #eff3f4;
  overflow-x: auto;
}

.time-tab {
  padding: 8px 16px;
  background: #f5f5f5;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.time-tab:hover {
  background: #e0e0e0;
}

.time-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.custom-date-range {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8f9ff;
  border-bottom: 1px solid #eff3f4;
}

.custom-date-range input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
}

/* 叙事摘要 */
.narrative-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea15, #764ba215);
  border: 1px solid #667eea30;
  border-radius: 16px;
}

.narrative-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.narrative-content {
  flex: 1;
}

.narrative-content h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #667eea;
}

.narrative-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

/* 统计卡片 */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 20px;
}

.stat-card-large {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.stat-card-large:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.stat-icon-large {
  font-size: 28px;
  margin-bottom: 8px;
}

.stat-value-large {
  font-size: 28px;
  font-weight: 800;
  color: #667eea;
  margin-bottom: 4px;
}

.stat-label-large {
  font-size: 13px;
  color: #536471;
  margin-bottom: 4px;
}

.stat-trend {
  font-size: 11px;
  color: #4caf50;
  font-weight: 600;
}

/* 仪表盘区块 */
.dashboard-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin: 0 16px 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h3 {
  margin: 0;
  font-size: 16px;
}

.section-hint {
  font-size: 12px;
  color: #9e9e9e;
}

.dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 16px;
  margin-bottom: 16px;
}

.dashboard-two-col .dashboard-section {
  margin: 0;
}

/* 柱状图 */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  padding-top: 20px;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
  position: relative;
}

.bar-item:hover .bar {
  background: linear-gradient(180deg, #764ba2, #667eea);
}

.bar-tooltip {
  position: absolute;
  top: 0;
  background: #333;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.bar-item:hover .bar-tooltip {
  opacity: 1;
}

.bar {
  width: 100%;
  max-width: 30px;
  background: linear-gradient(180deg, #667eea, #a8b4f0);
  border-radius: 4px 4px 0 0;
  transition: all 0.2s;
  min-height: 4px;
}

.bar-label {
  font-size: 10px;
  color: #9e9e9e;
  margin-top: 4px;
  transform: rotate(-45deg);
  white-space: nowrap;
}

/* 排行榜 */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.ranking-item:hover {
  background: #f8f9ff;
}

.ranking-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.ranking-item:nth-child(1) .ranking-rank {
  background: #ffd700;
  color: #333;
}

.ranking-item:nth-child(2) .ranking-rank {
  background: #c0c0c0;
  color: #333;
}

.ranking-item:nth-child(3) .ranking-rank {
  background: #cd7f32;
  color: white;
}

.ranking-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.ranking-info {
  flex: 1;
  min-width: 0;
}

.ranking-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.ranking-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}

.ranking-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 3px;
  transition: width 0.5s;
}

.ranking-count {
  font-size: 12px;
  color: #536471;
  font-weight: 600;
  flex-shrink: 0;
}

/* 地点分布 */
.places-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.place-item {
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.place-item:hover {
  background: #f8f9ff;
}

.place-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.place-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.place-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  border-radius: 4px;
  transition: width 0.5s;
}

.place-count {
  font-size: 11px;
  color: #536471;
}

/* 事件时间轴 */
.events-timeline-list {
  position: relative;
  padding-left: 24px;
}

.events-timeline-list::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.timeline-event-item {
  position: relative;
  padding-bottom: 20px;
  cursor: pointer;
}

.timeline-event-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 2px currentColor;
}

.timeline-event-content {
  background: #fafafa;
  padding: 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.timeline-event-item:hover .timeline-event-content {
  background: #f0f2ff;
}

.timeline-event-date {
  font-size: 11px;
  color: #9e9e9e;
  margin-bottom: 2px;
}

.timeline-event-type {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-event-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-event-desc {
  font-size: 13px;
  color: #536471;
  line-height: 1.5;
}

/* 词云 */
.wordcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  padding: 20px;
  min-height: 120px;
}

.wordcloud-word {
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  padding: 4px 8px;
  border-radius: 8px;
}

.wordcloud-word:hover {
  background: rgba(0,0,0,0.05);
  transform: scale(1.1);
}

/* 关系增长 */
.relation-growth-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 140px;
  padding-top: 20px;
}

.growth-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.growth-bar {
  width: 40px;
  background: linear-gradient(180deg, #43e97b, #38f9d7);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  min-height: 20px;
  transition: all 0.3s;
}

.growth-item:hover .growth-bar {
  background: linear-gradient(180deg, #38f9d7, #43e97b);
}

.growth-value {
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.growth-label {
  font-size: 11px;
  color: #536471;
  margin-top: 8px;
}

/* 年度总结卡入口 */
.year-summary-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 16px;
  padding: 20px;
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
  border-radius: 16px;
}

.year-summary-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.year-summary-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.year-summary-content h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: #5d4037;
}

.year-summary-content p {
  margin: 0;
  font-size: 13px;
  color: #795548;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .dashboard-two-col {
    grid-template-columns: 1fr;
  }
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .narrative-summary {
    flex-direction: column;
    text-align: center;
  }
  .year-summary-entry {
    flex-direction: column;
    text-align: center;
  }
  .year-summary-content {
    flex-direction: column;
  }
}

/* ========== 导入现有数据 ========== */
.import-page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.import-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.import-header h2 {
  margin: 0;
  font-size: 20px;
}

/* 导入说明 */
.import-intro {
  display: flex;
  gap: 16px;
  margin: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
  border-radius: 16px;
}

.intro-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.intro-content h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #2e7d32;
}

.intro-content p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.intro-content ul {
  margin: 0;
  padding-left: 20px;
}

.intro-content li {
  font-size: 13px;
  color: #536471;
  margin-bottom: 4px;
}

/* 导入数据源 */
.import-sources {
  padding: 0 16px;
  margin-bottom: 20px;
}

.import-sources h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.source-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.source-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #667eea;
}

.source-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.source-icon.wechat { background: #e8f5e9; }
.source-icon.photos { background: #fff3e0; }
.source-icon.telegram { background: #e3f2fd; }
.source-icon.moments { background: #fce4ec; }
.source-icon.cloud { background: #f3e5f5; }
.source-icon.contacts { background: #e0f7fa; }

.source-info {
  flex: 1;
  min-width: 0;
}

.source-info h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
}

.source-info p {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #536471;
}

.source-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #9e9e9e;
}

.source-arrow {
  font-size: 20px;
  color: #9e9e9e;
  flex-shrink: 0;
}

.source-card:hover .source-arrow {
  color: #667eea;
}

/* 导入进度 */
.import-progress-area {
  margin: 16px;
  padding: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.progress-header h3 {
  margin: 0;
  font-size: 16px;
}

.progress-bar-container {
  position: relative;
  height: 32px;
  background: #f0f0f0;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 16px;
  transition: width 0.5s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

.current-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8f9ff;
  border-radius: 12px;
  margin-bottom: 20px;
}

.step-icon {
  font-size: 28px;
}

.step-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.step-desc {
  font-size: 12px;
  color: #536471;
}

.steps-list {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s;
}

.step-item.pending {
  opacity: 0.4;
}

.step-item.active {
  background: #e8eaf6;
}

.step-item.completed {
  opacity: 1;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.step-item.active .step-number {
  background: #667eea;
  color: white;
}

.step-item.completed .step-number {
  background: #4caf50;
  color: white;
}

.step-name {
  font-size: 11px;
  color: #536471;
  text-align: center;
}

/* 导入预览 */
.import-preview-area {
  margin: 16px;
}

.preview-header {
  padding: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.preview-header h3 {
  margin: 0;
  font-size: 16px;
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
}

.preview-stat {
  text-align: center;
  padding: 12px;
  background: #f8f9ff;
  border-radius: 8px;
}

.preview-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #667eea;
}

.preview-stat-label {
  font-size: 11px;
  color: #536471;
  margin-top: 4px;
}

.preview-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: white;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preview-list {
  background: white;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
  max-height: 500px;
  overflow-y: auto;
}

.preview-item {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.preview-item:hover {
  background: #fafafa;
}

.preview-item.selected {
  background: #f0f4ff;
}

.preview-checkbox {
  padding-top: 4px;
}

.preview-item-content {
  flex: 1;
  min-width: 0;
}

.preview-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.preview-type {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.preview-date {
  font-size: 12px;
  color: #536471;
}

.preview-important {
  font-size: 11px;
  color: #ff9800;
  font-weight: 600;
}

.preview-item-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.preview-item-desc {
  font-size: 13px;
  color: #536471;
  line-height: 1.5;
  margin-bottom: 6px;
}

.preview-item-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #9e9e9e;
  flex-wrap: wrap;
}

.confirm-import {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 0 0 12px 12px;
  border-top: none;
}

/* 导入完成 */
.import-complete-area {
  margin: 16px;
  padding: 40px 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  text-align: center;
}

.complete-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.import-complete-area h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
}

.import-complete-area p {
  margin: 0 0 24px 0;
  font-size: 14px;
  color: #536471;
}

.complete-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 隐私提示 */
.privacy-notice {
  display: flex;
  gap: 16px;
  margin: 16px;
  padding: 20px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 12px;
}

.privacy-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.privacy-content h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #5d4037;
}

.privacy-content p {
  margin: 0;
  font-size: 12px;
  color: #795548;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .sources-grid {
    grid-template-columns: 1fr;
  }
  .preview-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-list {
    flex-wrap: wrap;
  }
  .step-item {
    flex: 0 0 calc(33% - 8px);
  }
  .confirm-import {
    flex-direction: column;
  }
}

/* ========== 个人 AI Agent ========== */
.ai-agent-page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.ai-agent-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  flex-wrap: wrap;
  gap: 12px;
}

.ai-agent-header h2 {
  margin: 0;
  font-size: 20px;
}

.agent-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.agent-status.online {
  background: #e8f5e9;
  color: #2e7d32;
}

.agent-status.offline {
  background: #f5f5f5;
  color: #757575;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 快速操作 */
.agent-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-action-btn:hover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateY(-2px);
}

.qa-icon {
  font-size: 24px;
}

.qa-text {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

/* Agent 区块 */
.agent-section {
  margin: 0 16px 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
}

.section-title {
  margin-bottom: 16px;
}

.section-title h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
}

.section-title p {
  margin: 0;
  font-size: 13px;
  color: #536471;
}

/* 接入渠道 */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  transition: all 0.2s;
}

.channel-card.connected {
  border-color: #4caf50;
  background: #f1f8e9;
}

.channel-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.channel-icon.wechat { background: #e8f5e9; }
.channel-icon.telegram { background: #e3f2fd; }
.channel-icon.whatsapp { background: #e8f5e9; }
.channel-icon.sms { background: #fff3e0; }

.channel-info {
  flex: 1;
  min-width: 0;
}

.channel-info h4 {
  margin: 0 0 2px 0;
  font-size: 14px;
}

.channel-info p {
  margin: 0;
  font-size: 11px;
  color: #536471;
}

/* 交互方式 */
.interaction-types {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.interaction-type {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 10px;
}

.it-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.it-info {
  flex: 1;
}

.it-info h4 {
  margin: 0 0 2px 0;
  font-size: 14px;
}

.it-info p {
  margin: 0;
  font-size: 12px;
  color: #536471;
}

.it-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
}

.it-status.enabled {
  background: #e8f5e9;
  color: #2e7d32;
}

/* 能力模块 */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.capability-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  transition: all 0.2s;
}

.capability-item.enabled {
  border-color: #667eea;
  background: #f8f9ff;
}

.cap-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.cap-info {
  flex: 1;
  min-width: 0;
}

.cap-info h4 {
  margin: 0 0 2px 0;
  font-size: 14px;
}

.cap-info p {
  margin: 0;
  font-size: 11px;
  color: #536471;
  line-height: 1.4;
}

/* 模型配置 */
.model-config {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.model-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #fafafa;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.model-option:hover {
  border-color: #667eea;
}

.model-option.selected {
  border-color: #667eea;
  background: #f8f9ff;
}

.model-radio {
  font-size: 20px;
  color: #667eea;
  flex-shrink: 0;
}

.model-info h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
}

.model-info p {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #536471;
}

.model-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.model-meta span {
  font-size: 11px;
  color: #667eea;
  font-weight: 600;
}

.model-tip {
  padding: 12px 16px;
  background: #fff8e1;
  border-radius: 8px;
  font-size: 12px;
  color: #5d4037;
  line-height: 1.6;
}

/* 隐私设置 */
.privacy-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.privacy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 10px;
}

.privacy-info {
  flex: 1;
}

.privacy-info h4 {
  margin: 0 0 2px 0;
  font-size: 14px;
}

.privacy-info p {
  margin: 0;
  font-size: 12px;
  color: #536471;
}

/* 对话演示 */
.demo-chat {
  height: 300px;
  overflow-y: auto;
  padding: 16px;
  background: #fafafa;
}

.demo-message {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.demo-message.user {
  flex-direction: row-reverse;
}

.demo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.demo-message.bot .demo-avatar {
  background: #e8eaf6;
}

.demo-message.user .demo-avatar {
  background: #e3f2fd;
}

.demo-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.demo-message.bot .demo-bubble {
  background: white;
  border: 1px solid #e0e0e0;
  border-bottom-left-radius: 4px;
}

.demo-message.user .demo-bubble {
  background: #667eea;
  color: white;
  border-bottom-right-radius: 4px;
}

.demo-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e0e0e0;
}

.demo-input input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 13px;
}

/* 命令列表 */
.command-category {
  margin-bottom: 20px;
}

.command-category h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #667eea;
}

.command-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #fafafa;
  border-radius: 8px;
  margin-bottom: 6px;
}

.command-item code {
  background: #e8eaf6;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #667eea;
}

.command-item span {
  font-size: 12px;
  color: #536471;
}

@media (max-width: 600px) {
  .agent-quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
  .channels-grid,
  .capabilities-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== 用户自备模型 ========== */
.model-config-page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.model-config-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.model-config-header h2 {
  margin: 0;
  font-size: 20px;
}

.model-mode-section,
.model-config-section {
  margin: 16px;
  padding: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.model-mode-section h3,
.model-config-section h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
}

.model-mode-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.model-mode-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #fafafa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.model-mode-card:hover {
  border-color: #667eea;
}

.model-mode-card.selected {
  border-color: #667eea;
  background: #f8f9ff;
}

.mode-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.mode-info {
  flex: 1;
}

.mode-info h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
}

.mode-info p {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #536471;
}

.mode-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mode-meta span {
  font-size: 11px;
  color: #667eea;
  font-weight: 600;
}

.mode-radio {
  font-size: 20px;
  color: #667eea;
  flex-shrink: 0;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header-row h3 {
  margin: 0;
}

.model-list {
  margin-bottom: 16px;
}

.empty-model-list {
  text-align: center;
  padding: 40px 20px;
  background: #fafafa;
  border-radius: 12px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-model-list p {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: #536471;
}

.model-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  margin-bottom: 10px;
}

.model-item-icon {
  width: 40px;
  height: 40px;
  background: #e8eaf6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.model-item-info {
  flex: 1;
}

.model-item-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.model-item-provider {
  font-size: 12px;
  color: #536471;
  margin-bottom: 2px;
}

.model-item-key {
  font-size: 11px;
  color: #9e9e9e;
  font-family: monospace;
}

.model-item-actions {
  display: flex;
  gap: 8px;
}

.model-security-tip {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #e8f5e9;
  border-radius: 10px;
}

.tip-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.tip-content h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
  color: #2e7d32;
}

.tip-content p {
  margin: 0;
  font-size: 12px;
  color: #388e3c;
  line-height: 1.6;
}

.local-model-config {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
}

/* 模型路由 */
.route-config-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 10px;
}

.route-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.route-icon {
  font-size: 24px;
}

.route-info h4 {
  margin: 0 0 2px 0;
  font-size: 14px;
}

.route-info p {
  margin: 0;
  font-size: 12px;
  color: #536471;
}

.route-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  background: white;
}

/* 使用统计 */
.usage-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.usage-stat {
  text-align: center;
  padding: 16px;
  background: #f8f9ff;
  border-radius: 10px;
}

.usage-value {
  font-size: 22px;
  font-weight: 800;
  color: #667eea;
}

.usage-label {
  font-size: 11px;
  color: #536471;
  margin-top: 4px;
}

.usage-chart h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
}

.usage-bar-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 120px;
  padding: 0 8px;
}

.usage-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.usage-bar {
  width: 24px;
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 4px 4px 0 0;
}

.usage-bar-label {
  font-size: 10px;
  color: #536471;
}

/* Token 经济 */
.token-economy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: #fff8e1;
  border-radius: 10px;
}

.token-info {
  display: flex;
  gap: 12px;
  flex: 1;
}

.token-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.token-info h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: #5d4037;
}

.token-info p {
  margin: 0;
  font-size: 12px;
  color: #795548;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .model-mode-card,
  .route-item,
  .token-economy {
    flex-direction: column;
    text-align: center;
  }
  .usage-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .model-item {
    flex-direction: column;
    text-align: center;
  }
  .model-item-actions {
    justify-content: center;
  }
}

/* ========== 地区分支系统 ========== */
.regions-page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.regions-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
  flex-wrap: wrap;
  gap: 12px;
}

.regions-header h2 {
  margin: 0;
  font-size: 20px;
}

/* 概览统计 */
.regions-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
}

.overview-stat {
  text-align: center;
  padding: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.overview-value {
  font-size: 24px;
  font-weight: 800;
  color: #667eea;
}

.overview-label {
  font-size: 12px;
  color: #536471;
  margin-top: 4px;
}

/* 地区列表 */
.regions-list-section,
.domain-section,
.agent-section,
.content-section {
  margin: 0 16px 20px;
  padding: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.regions-list-section h3,
.domain-section h3,
.agent-section h3,
.content-section h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
}

.regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.region-card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  background: #fafafa;
  transition: all 0.2s;
}

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

.region-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.region-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.region-info {
  flex: 1;
  min-width: 0;
}

.region-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.region-domain {
  font-size: 12px;
  color: #536471;
  font-family: monospace;
}

.region-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}

.region-status.active {
  background: #e8f5e9;
  color: #2e7d32;
}

.region-status.pending {
  background: #fff3e0;
  color: #e65100;
}

.region-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  background: white;
  border-radius: 8px;
}

.region-stat {
  text-align: center;
}

.region-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.region-stat-label {
  font-size: 10px;
  color: #9e9e9e;
  margin-top: 2px;
}

.region-card-actions {
  display: flex;
  gap: 8px;
}

.region-card-actions .btn {
  flex: 1;
}

/* 域名管理 */
.domain-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.domain-type-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #f8f9ff;
  border: 1px solid #e8eaf6;
  border-radius: 10px;
}

.domain-type-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.domain-type-info h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
}

.domain-type-info p {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #536471;
}

.domain-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.domain-meta span {
  font-size: 11px;
  color: #667eea;
  font-weight: 600;
}

.custom-domain-list h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
}

.domain-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 8px;
  margin-bottom: 8px;
}

.domain-info {
  flex: 1;
}

.domain-name {
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
}

.domain-target {
  font-size: 12px;
  color: #536471;
}

.domain-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
}

.domain-status.active {
  background: #e8f5e9;
  color: #2e7d32;
}

/* 地区代理 */
.agent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.agent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
}

.agent-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.agent-info {
  flex: 1;
}

.agent-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.agent-region {
  font-size: 12px;
  color: #536471;
  margin-bottom: 6px;
}

.agent-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.agent-stats span {
  font-size: 11px;
  color: #9e9e9e;
}

.agent-benefits h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.benefit-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #fff8e1;
  border-radius: 8px;
}

.benefit-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.benefit-item h5 {
  margin: 0 0 2px 0;
  font-size: 13px;
}

.benefit-item p {
  margin: 0;
  font-size: 11px;
  color: #536471;
}

/* 内容运营 */
.content-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.content-tab {
  padding: 8px 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.content-tab.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.content-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 8px;
}

.preview-type {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  background: #e8eaf6;
  color: #667eea;
  border-radius: 6px;
  height: fit-content;
  flex-shrink: 0;
}

.preview-content {
  flex: 1;
}

.preview-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.preview-meta {
  font-size: 11px;
  color: #9e9e9e;
}

@media (max-width: 600px) {
  .regions-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  .domain-types,
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  .region-card-actions {
    flex-direction: column;
  }
  .agent-card {
    flex-direction: column;
    text-align: center;
  }
}

/* ========== 里程碑分享 ========== */
.milestone-share-page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.share-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.share-header h2 {
  margin: 0;
  font-size: 20px;
}

.milestone-section,
.share-editor-section,
.share-history-section {
  margin: 16px;
  padding: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.milestone-section h3,
.share-editor-section h3,
.share-history-section h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
}

/* 里程碑列表 */
.milestone-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.milestone-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.milestone-item:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.milestone-type {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  flex-shrink: 0;
}

.milestone-info {
  flex: 1;
  min-width: 0;
}

.milestone-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.milestone-desc {
  font-size: 12px;
  color: #536471;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.milestone-meta {
  font-size: 11px;
  color: #9e9e9e;
}

/* 编辑器布局 */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.editor-panel,
.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
}

/* 模板选择 */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.template-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-item:hover {
  border-color: #667eea;
}

.template-item.selected {
  border-color: #667eea;
  background: #f8f9ff;
}

.template-preview {
  width: 100%;
  height: 60px;
  border-radius: 6px;
}

.template-preview.warm { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.template-preview.ocean { background: linear-gradient(135deg, #667eea, #764ba2); }
.template-preview.forest { background: linear-gradient(135deg, #11998e, #38ef7d); }
.template-preview.sunset { background: linear-gradient(135deg, #f093fb, #f5576c); }
.template-preview.minimal { background: white; border: 1px solid #e0e0e0; }
.template-preview.dark { background: linear-gradient(135deg, #232526, #414345); }

.template-item span {
  font-size: 11px;
  font-weight: 600;
}

/* 装饰选项 */
.decoration-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.decoration-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

/* 预览区 */
.preview-label {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.share-card-preview {
  display: flex;
  justify-content: center;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 12px;
  min-height: 400px;
}

.share-card {
  width: 280px;

/* ========== 落地宣传页样式 ========== */
.landing-page {
  min-height: 100vh;
  background: #fff;
  color: #1a1a2e;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 顶部导航 */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #f0f0f0;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
}

.landing-logo .logo-icon {
  font-size: 28px;
}

.landing-nav-links {
  display: flex;
  gap: 32px;
}

.landing-nav-links a {
  color: #536471;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.landing-nav-links a:hover {
  color: #667eea;
}

.landing-nav-actions {
  display: flex;
  gap: 12px;
}

/* Hero区域 */
.landing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 40px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 20px 0;
  color: #1a1a2e;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: #536471;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-xl {
  padding: 18px 40px;
  font-size: 18px;
  font-weight: 600;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stat {
  text-align: center;
}

.hero-stat .stat-number {
  font-size: 32px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.hero-stat .stat-label {
  font-size: 14px;
  color: #536471;
}

/* Hero视觉卡片 */
.hero-visual {
  flex: 1;
  position: relative;
  height: 500px;
}

.hero-card {
  position: absolute;
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  width: 280px;
}

.hero-card.floating {
  animation: float 3s ease-in-out infinite;
}

.hero-card.floating.delay-1 {
  animation-delay: 0.5s;
  top: 120px;
  left: 40px;
}

.hero-card.floating.delay-2 {
  animation-delay: 1s;
  top: 280px;
  left: 80px;
}

.hero-card:first-child {
  top: 20px;
  left: 0;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.hero-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a2e;
}

.hero-card-meta {
  font-size: 13px;
  color: #536471;
}

/* 通用section */
.landing-features,
.landing-stories,
.landing-scenarios {
  padding: 80px 40px;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #1a1a2e;
}

.section-header p {
  font-size: 18px;
  color: #536471;
  margin: 0;
}

/* 功能网格 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: #f8f9fc;
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #1a1a2e;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.6;
  color: #536471;
  margin: 0;
}

/* 故事网格 */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.story-card {
  display: flex;
  gap: 16px;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s;
}

.story-card:hover {
  border-color: #667eea;
}

.story-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}

.story-author {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.story-text {
  font-size: 15px;
  line-height: 1.6;
  color: #536471;
  margin-bottom: 12px;
}

.story-meta {
  font-size: 12px;
  color: #8899a6;
}

/* 场景网格 */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.scenario-card {
  background: linear-gradient(135deg, #f8f9fc, #fff);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}

.scenario-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.scenario-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #1a1a2e;
}

.scenario-card p {
  font-size: 14px;
  line-height: 1.6;
  color: #536471;
  margin: 0;
}

/* CTA区域 */
.landing-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 80px 40px;
  text-align: center;
  color: white;
}

.cta-content h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.cta-content p {
  font-size: 18px;
  opacity: 0.9;
  margin: 0 0 32px 0;
}

.cta-content .btn-primary {
  background: white;
  color: #667eea;
}

.cta-note {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 16px !important;
}

/* 底部 */
.landing-footer {
  background: #1a1a2e;
  color: #a0aec0;
  padding: 60px 40px 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto 40px;
  gap: 60px;
}

.footer-brand {
  flex: 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px 0;
}

.footer-slogan {
  font-style: italic;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-column h4 {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.footer-column a {
  display: block;
  color: #a0aec0;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
}

.footer-bottom p {
  margin: 4px 0;
}

/* 响应式 */
@media (max-width: 1024px) {
  .landing-hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-visual {
    display: none;
  }
  .features-grid,
  .stories-grid,
  .scenarios-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-content {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .landing-nav {
    padding: 12px 20px;
  }
  .landing-nav-links {
    display: none;
  }
  .landing-hero,
  .landing-features,
  .landing-stories,
  .landing-scenarios {
    padding: 40px 20px;
  }
  .hero-title {
    font-size: 32px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
  }
  .features-grid,
  .stories-grid,
  .scenarios-grid {
    grid-template-columns: 1fr;
  }
  .section-header h2 {
    font-size: 28px;
  }
}
  min-height: 380px;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}

.card-stars {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 16px;
  opacity: 0.8;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.card-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}

.card-desc {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.9;
}

.card-date {
  font-size: 12px;
  opacity: 0.8;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 16px;
}

.card-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.qr-placeholder {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-pattern {
  width: 48px;
  height: 48px;
  background-image: 
    linear-gradient(45deg, #000 25%, transparent 25%),
    linear-gradient(-45deg, #000 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #000 75%),
    linear-gradient(-45deg, transparent 75%, #000 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
  opacity: 0.8;
}

.qr-text {
  font-size: 9px;
  opacity: 0.8;
}

.card-brand {
  font-size: 10px;
  opacity: 0.7;
  text-align: right;
}

.preview-actions {
  display: flex;
  gap: 12px;
}

.preview-actions .btn {
  flex: 1;
}

/* 分享记录 */
.share-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fafafa;
  border-radius: 10px;
}

.history-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  flex-shrink: 0;
}

.history-thumb.warm { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.history-thumb.ocean { background: linear-gradient(135deg, #667eea, #764ba2); }

.history-info {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.history-meta {
  font-size: 11px;
  color: #9e9e9e;
  margin-bottom: 6px;
}

.history-channels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.channel-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: #e8eaf6;
  color: #667eea;
  border-radius: 6px;
  font-weight: 600;
}

/* 分享渠道网格 */
.share-channels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.share-channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.share-channel:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.share-channel input[type="checkbox"] {
  margin-bottom: 4px;
}

.share-channel .channel-icon {
  font-size: 24px;
}

.share-channel .channel-name {
  font-size: 12px;
  font-weight: 700;
}

.share-channel .channel-desc {
  font-size: 10px;
  color: #9e9e9e;
}

@media (max-width: 768px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .share-channels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== 数字遗产增强样式 ========== */
.legacy-status-overview {
  margin-bottom: 24px;
}

.legacy-status-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.legacy-status-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.legacy-status-icon {
  font-size: 28px;
}

.legacy-status-label {
  font-size: 18px;
  font-weight: 700;
}

.legacy-status-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.status-detail-item {
  display: flex;
  font-size: 14px;
}

.detail-label {
  color: #536471;
  margin-right: 8px;
}

.detail-value {
  font-weight: 600;
  color: #1a1a2e;
}

.legacy-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.legacy-section-header h3 {
  margin: 0;
}

.heirs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.heir-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8f9fc;
  border-radius: 12px;
  padding: 16px;
  transition: box-shadow 0.2s;
}

.heir-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.heir-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}

.heir-info {
  flex: 1;
}

.heir-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.heir-username {
  font-size: 13px;
  color: #536471;
  margin-bottom: 4px;
}

.heir-scope,
.heir-relation {
  font-size: 12px;
  color: #8899a6;
}

.heir-actions {
  display: flex;
  gap: 8px;
}

.emergency-contacts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f9fc;
  border-radius: 12px;
  padding: 16px;
}

.contact-info {
  flex: 1;
}

.contact-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.contact-detail {
  font-size: 13px;
  color: #536471;
  margin-bottom: 2px;
}

.contact-actions {
  display: flex;
  gap: 8px;
}

.legacy-backup {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 20px;
}

.legacy-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* 模态框通用样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

/* ========== 写书工具增强样式 ========== */
.my-books-section {
  margin-bottom: 32px;
}

.my-books-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: #1a1a2e;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.book-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.book-cover {
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: white;
}

.book-cover-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.book-cover-author {
  font-size: 13px;
  opacity: 0.9;
}

.book-info {
  padding: 16px;
}

.book-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-meta {
  font-size: 12px;
  color: #536471;
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
}

.book-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}

.book-status.draft {
  background: #f0f0f0;
  color: #757575;
}

.book-status.writing {
  background: #e3f2fd;
  color: #1976d2;
}

.book-status.completed {
  background: #e8f5e9;
  color: #388e3c;
}

.book-status.published {
  background: #fff3e0;
  color: #f57c00;
}

.book-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.book-writer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.book-writer-header h2 {
  margin: 0;
}

.book-templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.book-template {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

/* ========== 支付/收费墙样式 ========== */
.billing-page {
  padding: 0 8px;
}

.billing-header {
  margin-bottom: 24px;
}

.billing-header h2 {
  margin: 0;
}

.current-plan-section {
  margin-bottom: 32px;
}

.current-plan-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.current-plan-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.current-plan-icon {
  font-size: 40px;
}

.current-plan-name {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
}

.current-plan-status {
  font-size: 14px;
  color: #4caf50;
  margin-top: 4px;
}

.current-plan-details {
  font-size: 14px;
  color: #536471;
  line-height: 1.8;
}

.current-plan-actions {
  display: flex;
  gap: 8px;
}

.plans-section {
  margin-bottom: 32px;
}

.plans-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.plan-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.plan-card.popular {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(102,126,234,0.2);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.plan-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.plan-name {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.plan-price {
  margin-bottom: 12px;
}

.price-amount {
  font-size: 36px;
  font-weight: 800;
  color: #1a1a2e;
}

.price-period {
  font-size: 14px;
  color: #536471;
}

.plan-description {
  font-size: 14px;
  color: #536471;
  margin-bottom: 16px;
  line-height: 1.5;
}

.plan-features {
  margin-bottom: 20px;
}

.plan-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  color: #333;
}

.feature-check {
  color: #4caf50;
  font-weight: 700;
}

.plan-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
}

.payment-section,
.orders-section,
.invoice-section {
  margin-bottom: 32px;
}

.payment-section h3,
.orders-section h3,
.invoice-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8f9fc;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.payment-method.selected {
  border-color: #667eea;
  background: #f0f3ff;
}

.payment-icon {
  font-size: 32px;
}

.payment-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}

.payment-desc {
  font-size: 13px;
  color: #536471;
}

.payment-check {
  margin-left: auto;
  color: #667eea;
  font-weight: 700;
  font-size: 20px;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8f9fc;
  border-radius: 12px;
}

.order-info {
  flex: 1;
}

.order-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
}

.order-date {
  font-size: 13px;
  color: #536471;
}

.order-amount {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
}

.order-status {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 12px;
}

.order-status.completed {
  background: #e8f5e9;
  color: #388e3c;
}

.order-status.pending {
  background: #fff3e0;
  color: #f57c00;
}

.invoice-info {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 20px;
}

/* ========== 主链/侧链样式 ========== */
.trust-chain-page {
  padding: 0 8px;
}

.trust-chain-header {
  margin-bottom: 24px;
}

.trust-chain-header h2 {
  margin: 0;
}

.trust-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.trust-stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.trust-stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.trust-stat-number {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a2e;
}

.trust-stat-label {
  font-size: 13px;
  color: #536471;
  margin-top: 4px;
}

.trust-state-machine {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.trust-state-machine h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px 0;
}

.state-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.state-node {
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  min-width: 80px;
}

.state-node.draft { background: #f5f5f5; }
.state-node.side_pending { background: #fff3e0; }
.state-node.verified { background: #e3f2fd; }
.state-node.finalizing { background: #f3e5f5; }
.state-node.finalized { background: #e8f5e9; }

.state-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.state-name {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a2e;
}

.state-arrow {
  font-size: 20px;
  color: #9e9e9e;
}

.state-note {
  background: #f8f9fc;
  border-radius: 8px;
  padding: 12px;
}

.state-note p {
  margin: 0;
  font-size: 13px;
  color: #536471;
  line-height: 1.6;
}

.trust-content-section {
  margin-bottom: 32px;
}

.trust-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.trust-tab {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.trust-tab.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.trust-content-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trust-content-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.trust-content-info {
  flex: 1;
}

.trust-content-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.trust-content-meta {
  font-size: 13px;
  color: #536471;
  display: flex;
  gap: 8px;
}

.trust-content-status {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.trust-content-actions {
  display: flex;
  gap: 8px;
}

.side-chain-section {
  margin-bottom: 32px;
}

.side-chain-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.side-chain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.side-chain-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.side-chain-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.side-chain-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #1a1a2e;
}

.side-chain-card p {
  font-size: 12px;
  color: #536471;
  margin: 0;
  line-height: 1.5;
}

/* ========== P2P分布式存储样式 ========== */
.p2p-page {
  padding: 0 8px;
}

.p2p-header {
  margin-bottom: 24px;
}

.p2p-header h2 {
  margin: 0;
}

.p2p-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.p2p-stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.p2p-stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.p2p-stat-number {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a2e;
}

.p2p-stat-label {
  font-size: 13px;
  color: #536471;
  margin-top: 4px;
}

.p2p-settings-section,
.p2p-nodes-section,
.p2p-dag-section,
.p2p-encryption-section,
.p2p-incentive-section {
  margin-bottom: 32px;
}

.p2p-settings-section h3,
.p2p-nodes-section h3,
.p2p-dag-section h3,
.p2p-encryption-section h3,
.p2p-incentive-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.p2p-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.p2p-section-header h3 {
  margin: 0;
}

.p2p-settings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.p2p-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  gap: 16px;
}

.p2p-setting-info {
  flex: 1;
}

.p2p-setting-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.p2p-setting-desc {
  font-size: 13px;
  color: #536471;
  line-height: 1.5;
}

.p2p-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.nodes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.node-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.node-icon {
  font-size: 32px;
}

.node-info {
  flex: 1;
}

.node-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.node-meta {
  font-size: 13px;
  color: #536471;
  display: flex;
  gap: 8px;
}

.node-status {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.node-status.online {
  color: #4caf50;
}

.node-status.offline {
  color: #f44336;
}

.node-actions {
  display: flex;
  gap: 8px;
}

.dag-info {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dag-visual {
  margin-top: 20px;
  text-align: center;
}

.dag-node.root {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 12px;
  margin-bottom: 16px;
}

.dag-branch {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dag-node {
  padding: 10px 16px;
  background: #f8f9fc;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.dag-hash {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
}

.dag-time {
  font-size: 11px;
  color: #536471;
  margin-top: 4px;
}

.encryption-info {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.encryption-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.encryption-item:last-child {
  border-bottom: none;
}

.encryption-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.encryption-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.encryption-desc {
  font-size: 13px;
  color: #536471;
  line-height: 1.5;
}

.incentive-info {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.incentive-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.incentive-stat {
  text-align: center;
  padding: 16px;
  background: #f8f9fc;
  border-radius: 12px;
}

.incentive-value {
  font-size: 24px;
  font-weight: 800;
  color: #667eea;
}

.incentive-label {
  font-size: 13px;
  color: #536471;
  margin-top: 4px;
}

.book-template:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #667eea;
}

.template-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.book-template h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #1a1a2e;
}

.book-template p {
  font-size: 12px;
  color: #536471;
  margin: 0;
  line-height: 1.4;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #536471;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  background: #f0f0f0;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
}

/* ========== 主链/侧链管理 ========== */
.trust-chain-page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.trust-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.trust-header h2 {
  margin: 0;
  font-size: 20px;
}

/* 状态机 */
.state-machine-section,
.trust-stats-section,
.trust-metrics-section {
  margin: 16px;
  padding: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.state-machine-section h3,
.trust-metrics-section h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
}

.state-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.state-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: #fafafa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  min-width: 80px;
  text-align: center;
}

.state-node.finalized {
  border-color: #4caf50;
  background: #e8f5e9;
}

.state-node.side-pending {
  border-color: #ff9800;
  background: #fff3e0;
}

.state-icon {
  font-size: 24px;
}

.state-name {
  font-size: 12px;
  font-weight: 700;
}

.state-desc {
  font-size: 10px;
  color: #9e9e9e;
  font-family: monospace;
}

.state-arrow {
  font-size: 18px;
  color: #9e9e9e;
}

.state-transitions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.transition-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.transition-from {
  font-family: monospace;
  color: #4caf50;
  font-weight: 600;
}

.transition-arrow {
  color: #9e9e9e;
}

.transition-to {
  font-family: monospace;
  font-weight: 600;
}

.transition-to.disputed { color: #f44336; }
.transition-to.restricted { color: #ff9800; }
.transition-to.superseded { color: #9c27b0; }
.transition-to.resolved { color: #4caf50; }

/* 统计 */
.trust-stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.trust-stat {
  text-align: center;
  padding: 16px;
  background: #f8f9ff;
  border-radius: 10px;
}

.trust-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #667eea;
}

.trust-stat-label {
  font-size: 12px;
  color: #536471;
  margin-top: 4px;
}

/* 标签页 */
.trust-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.trust-tab {
  padding: 10px 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.trust-tab.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.trust-tab-content {
  padding: 0 16px;
}

/* ========== 时空地图增强样式 ========== */
.time-playback {
  background: linear-gradient(135deg, #f8f9fc, #fff);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  border: 1px solid #e8e8e8;
}

.playback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.playback-title {
  font-weight: 600;
  font-size: 15px;
  color: #1a1a2e;
}

.playback-year {
  font-size: 18px;
  font-weight: 700;
  color: #667eea;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e0e0e0;
  border-radius: 3px;
  outline: none;
}

.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(102,126,234,0.4);
}

.time-range-label {
  font-size: 13px;
  color: #536471;
  min-width: 80px;
  text-align: right;
}

/* 家族迁徙图 */
.migration-container {
  padding: 0 8px;
}

.migration-intro {
  margin-bottom: 24px;
}

.migration-intro h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1a1a2e;
}

.migration-intro p {
  font-size: 14px;
  color: #536471;
  margin: 0;
}

.migration-timeline {
  position: relative;
  padding-left: 80px;
}

.migration-timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #667eea, #764ba2);
}

.migration-item {
  position: relative;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9fc;
  border-radius: 12px;
  border-left: 3px solid #667eea;
}

.migration-item::before {
  content: '';
  position: absolute;
  left: -56px;
  top: 20px;
  width: 12px;
  height: 12px;
  background: #667eea;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #667eea;
}

.migration-year {
  position: absolute;
  left: -80px;
  top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #667eea;
  width: 50px;
  text-align: right;
}

.migration-path {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

.migration-from {
  color: #536471;
}

.migration-arrow {
  color: #667eea;
  font-size: 20px;
}

.migration-to {
  color: #1a1a2e;
}

.migration-person {
  font-size: 13px;
  color: #536471;
  margin-bottom: 4px;
}

.migration-reason {
  font-size: 13px;
  color: #8899a6;
}

/* 时空交集 */
.intersection-container {
  padding: 0 8px;
}

.intersection-intro {
  margin-bottom: 24px;
}

.intersection-intro h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1a1a2e;
}

.intersection-intro p {
  font-size: 14px;
  color: #536471;
  margin: 0;
}

.intersection-card {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.intersection-card:hover {
  box-shadow: 0 8px 24px rgba(102,126,234,0.12);
}

.intersection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.intersection-person {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 16px;
}

.person-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.intersection-count {
  font-size: 14px;
  color: #667eea;
  font-weight: 600;
  background: #f0f3ff;
  padding: 4px 12px;
  border-radius: 12px;
}

.intersection-places {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.place-tag {
  background: #f8f9fc;
  border: 1px solid #e8e8e8;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  color: #536471;
}

.intersection-story {
  font-size: 14px;
  color: #667eea;
  font-style: italic;
  background: #f8f9fc;
  padding: 12px;
  border-radius: 8px;
}

/* 心愿地图 */
.wishlist-container {
  padding: 0 8px;
}

.wishlist-intro {
  margin-bottom: 24px;
}

.wishlist-intro h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1a1a2e;
}

.wishlist-intro p {
  font-size: 14px;
  color: #536471;
  margin: 0 0 16px 0;
}

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.wish-card {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wish-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102,126,234,0.12);
}

.wish-card.visited {
  background: #f0fff4;
  border-color: #48bb78;
}

.wish-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.wish-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.wish-reason {
  font-size: 13px;
  color: #536471;
  margin-bottom: 8px;
  line-height: 1.5;
}

.wish-date {
  font-size: 12px;
  color: #667eea;
  margin-bottom: 12px;
}

.wish-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* 链内容列表 */
.chain-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chain-item {
  padding: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}

.chain-item.main {
  border-left: 4px solid #4caf50;
}

.chain-item.side {
  border-left: 4px solid #ff9800;
}

.chain-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chain-type {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: #e8eaf6;
  color: #667eea;
  border-radius: 8px;
}

.chain-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

.chain-status.finalized {
  background: #e8f5e9;
  color: #2e7d32;
}

.chain-status.side-pending {
  background: #fff3e0;
  color: #e65100;
}

.chain-item-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.chain-item-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chain-item-meta span {
  font-size: 11px;
  color: #536471;
}

.chain-hash {
  font-family: monospace;
  color: #9e9e9e !important;
}

.chain-reason {
  color: #e65100 !important;
}

.chain-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 四抽屉 */
.drawers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.drawer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  text-align: center;
}

.drawer-icon {
  font-size: 32px;
}

.drawer-name {
  font-size: 14px;
  font-weight: 700;
}

.drawer-desc {
  font-size: 11px;
  color: #536471;
  line-height: 1.5;
}

.drawer-count {
  font-size: 18px;
  font-weight: 800;
  color: #667eea;
}

.drawer-tip {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #fff8e1;
  border-radius: 10px;
}

.drawer-tip .tip-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.drawer-tip .tip-content {
  font-size: 12px;
  color: #5d4037;
  line-height: 1.6;
}

/* 争议列表 */
.dispute-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dispute-item {
  padding: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  border-left: 4px solid #f44336;
}

.dispute-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dispute-title {
  font-size: 14px;
  font-weight: 700;
}

.dispute-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: #ffebee;
  color: #c62828;
  border-radius: 8px;
}

.dispute-status.resolved {
  background: #e8f5e9;
  color: #2e7d32;
}

.dispute-parties {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.party {
  flex: 1;
  padding: 10px;
  background: #fafafa;
  border-radius: 8px;
}

.party-label {
  font-size: 10px;
  color: #9e9e9e;
  margin-bottom: 2px;
}

.party-name {
  font-size: 12px;
  font-weight: 600;
}

.party-vs {
  font-size: 14px;
  font-weight: 800;
  color: #f44336;
}

.dispute-meta {
  margin-bottom: 12px;
}

.dispute-meta span {
  font-size: 11px;
  color: #536471;
}

.dispute-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 信任指标 */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
}

.metric-bar {
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
}

.metric-value {
  font-size: 11px;
  color: #536471;
  text-align: right;
}

.metrics-tip {
  padding: 12px 16px;
  background: #e3f2fd;
  border-radius: 8px;
  font-size: 12px;
  color: #1565c0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .trust-stats-section,
  .drawers-grid,
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .state-flow {
    justify-content: flex-start;
  }
  .dispute-parties {
    flex-direction: column;
  }
}

/* ========== v2.0 优化样式 ========== */

/* 左栏导航分组 */
.nav-section {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-section:last-child {
  border-bottom: none;
}
.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px 4px;
}
.nav-badge {
  margin-left: auto;
  background: #e74c3c;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.user-more {
  margin-left: auto;
  color: #888;
  font-size: 18px;
}

/* 右栏增强 */
.search-card {
  padding: 12px !important;
}
.right-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e1e8ed;
  border-radius: 20px;
  font-size: 14px;
  background: #f5f8fa;
  outline: none;
  transition: all 0.2s;
}
.right-search:focus {
  border-color: #1da1f2;
  background: white;
  box-shadow: 0 0 0 3px rgba(29,161,242,0.1);
}
.right-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.right-card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.see-all {
  font-size: 12px;
  color: #1da1f2;
  text-decoration: none;
  cursor: pointer;
}
.see-all:hover {
  text-decoration: underline;
}
.trending-rank {
  font-size: 14px;
  font-weight: 700;
  color: #888;
  width: 20px;
  flex-shrink: 0;
}
.mutual-badge {
  font-size: 10px;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 500;
}
.highlight-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  padding: 20px !important;
}
.highlight-card .highlight-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.highlight-card h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
}
.highlight-card p {
  margin: 0 0 12px 0;
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.5;
}
.highlight-card .btn-outline {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
}
.highlight-card .btn-outline:hover {
  background: rgba(255,255,255,0.3);
}

/* 故事/时刻条 */
.stories-bar {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  overflow-x: auto;
  border-bottom: 1px solid #e1e8ed;
  background: white;
}
.stories-bar::-webkit-scrollbar {
  display: none;
}
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  width: 64px;
}
.story-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #f0f0f0;
}
.story-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-ring {
  padding: 2px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-radius: 50%;
}
.story-ring img {
  border: 2px solid white;
  border-radius: 50%;
}
.story-add-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: #1da1f2;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  border: 2px solid white;
}
.story-name {
  font-size: 11px;
  color: #333;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Feed标签页 */
.feed-tabs {
  display: flex;
  border-bottom: 1px solid #e1e8ed;
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}
.feed-tab {
  flex: 1;
  padding: 14px 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #657786;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
}
.feed-tab:hover {
  background: #f5f8fa;
  color: #1da1f2;
}
.feed-tab.active {
  color: #1da1f2;
}
.feed-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: #1da1f2;
  border-radius: 3px 3px 0 0;
}
.tab-icon {
  font-size: 14px;
}
.feed-actions {
  display: flex;
  gap: 8px;
}
.icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.icon-btn:hover {
  background: #f5f8fa;
}

/* 发布框增强 */
.composer-inline {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e8ed;
  background: white;
  cursor: pointer;
  transition: background 0.2s;
}
.composer-inline:hover {
  background: #f8f9fa;
}
.composer-inline-content {
  flex: 1;
}
.composer-placeholder {
  display: block;
  color: #657786;
  font-size: 15px;
  margin-bottom: 8px;
}
.composer-inline-tools {
  display: flex;
  gap: 16px;
}
.inline-tool {
  font-size: 12px;
  color: #1da1f2;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 12px;
  transition: background 0.2s;
}
.inline-tool:hover {
  background: rgba(29,161,242,0.1);
}

/* 动态卡片增强 */
.post-timeline-entry {
  border-left: 3px solid #1da1f2;
}
.post-timeline-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1565c0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}
.post-author-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.meta-tag {
  font-size: 11px;
  color: #657786;
  background: #f5f8fa;
  padding: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.meta-tag:hover {
  background: #e8f5e9;
  color: #2e7d32;
}
.meta-location {
  color: #1da1f2;
  background: #e3f2fd;
}
.meta-import {
  color: #ff9800;
  background: #fff3e0;
}
.meta-ai {
  color: #9c27b0;
  background: #f3e5f5;
}
.post-media {
  margin: 12px 0;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  gap: 2px;
}
.post-media.single {
  grid-template-columns: 1fr;
}
.post-media.double {
  grid-template-columns: 1fr 1fr;
}
.post-media.grid {
  grid-template-columns: 1fr 1fr;
}
.media-item {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
}
.post-media.single .media-item {
  aspect-ratio: 16/9;
}
.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.media-item:hover img {
  transform: scale(1.05);
}
.media-more {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}
.post-stats {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #e1e8ed;
  font-size: 12px;
  color: #657786;
}
.stat-item {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.stat-item:hover {
  color: #1da1f2;
  text-decoration: underline;
}
.reaction-icons {
  font-size: 12px;
}
.action-text {
  font-size: 12px;
  font-weight: 600;
}

/* LivesTrace 特有动作 */
.post-livestrace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
  margin-top: 4px;
}
.lt-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid #e1e8ed;
  background: white;
  border-radius: 16px;
  font-size: 11px;
  color: #657786;
  cursor: pointer;
  transition: all 0.2s;
}
.lt-action-btn:hover {
  background: #e3f2fd;
  border-color: #1da1f2;
  color: #1565c0;
}
.lt-icon {
  font-size: 12px;
}

/* 发布弹窗增强 */
.composer-right {
  flex: 1;
}
.composer-visibility {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.visibility-label {
  font-size: 13px;
  font-weight: 600;
  color: #1da1f2;
  background: #e3f2fd;
  padding: 4px 10px;
  border-radius: 12px;
}
.visibility-desc {
  font-size: 11px;
  color: #657786;
}
.composer-extra-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e1e8ed;
}
.extra-field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e1e8ed;
  border-radius: 16px;
  font-size: 12px;
  color: #657786;
  cursor: pointer;
  transition: all 0.2s;
}
.extra-field:hover {
  background: #f5f8fa;
  border-color: #1da1f2;
  color: #1da1f2;
}
.field-icon {
  font-size: 14px;
}

/* Toast 通知 */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-width: 80%;
  text-align: center;
}
.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 加载动画 */
.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e1e8ed;
  border-top-color: #1da1f2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 8px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-state {
  text-align: center;
  padding: 40px 20px;
  color: #657786;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.load-more {
  text-align: center;
  padding: 16px;
  color: #1da1f2;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.load-more:hover {
  background: #f5f8fa;
}
.load-more.hidden {
  display: none;
}

/* 动态菜单 */
.post-menu-dropdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  padding: 8px;
  z-index: 9999;
  min-width: 180px;
}
.menu-item {
  padding: 10px 16px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}
.menu-item:hover {
  background: #f5f8fa;
}

/* 响应式 */
@media (max-width: 1024px) {
  .social-right {
    display: none;
  }
}
@media (max-width: 768px) {
  .social-left {
    width: 60px;
  }
  .social-left .nav-item span:not(.nav-icon),
  .social-left .logo-text,
  .social-left .user-info,
  .social-left .btn-post span,
  .social-left .nav-section-title {
    display: none;
  }
  .social-left .btn-post {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
  }
  .feed-tab {
    font-size: 11px;
    padding: 12px 4px;
  }
  .tab-icon {
    display: none;
  }
  .composer-inline-tools {
    gap: 8px;
  }
  .inline-tool {
    font-size: 10px;
    padding: 2px 6px;
  }
  .post-livestrace-actions {
    gap: 2px;
  }
  .lt-action-btn {
    padding: 4px 8px;
    font-size: 10px;
  }
}

/* 时空地图：地图/列表切换 */
.trajectory-view-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.trajectory-view-switch .btn {
  border-radius: 20px;
  border: 1px solid #e1e8ed;
  background: #fff;
  color: #536471;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}
.trajectory-view-switch .btn.active {
  background: #1d9bf0;
  color: #fff;
  border-color: #1d9bf0;
}
.trajectory-view-switch .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.trajectory-map-view {
  margin-bottom: 16px;
}
.trajectory-list-view {
  width: 100%;
}
.leaflet-container {
  font-family: inherit;
}
.leaflet-popup-content-wrapper {
  border-radius: 10px;
}

/* ============ 地区分站详情页样式 ============ */
.region-detail-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 0 40px;
}
.region-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #1d9bf0 0%, #1a8cd8 55%, #0f6bb5 100%);
  border-radius: 16px;
  padding: 20px 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.region-detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
}
.region-detail-title h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
.region-detail-title p {
  color: rgba(255,255,255,0.85) !important;
}
.region-avatar-large {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.35);
}
.region-detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.region-detail-header .btn-ghost {
  background: rgba(255,255,255,0.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}
.region-detail-header .btn-ghost:hover {
  background: rgba(255,255,255,0.28);
}
.region-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.region-stat-card {
  background: #fff;
  border: 1px solid #e6ecf0;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.region-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.region-stat-card .stat-icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.region-stat-card .stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #0f1419;
}
.region-stat-card .stat-label {
  font-size: 12px;
  color: #536471;
  margin-top: 2px;
}
.region-content-section {
  background: #fff;
  border: 1px solid #e6ecf0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
.region-content-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #0f1419;
}
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-header-row h3 {
  margin: 0;
}
.region-posts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.region-post-item {
  border: 1px solid #e6ecf0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
}
.region-post-item .post-author {
  font-weight: 600;
  font-size: 13px;
  color: #0f1419;
  margin-bottom: 4px;
}
.region-post-item .post-content {
  font-size: 14px;
  color: #1d2733;
  line-height: 1.5;
}
.region-post-item .post-meta {
  font-size: 12px;
  color: #536471;
  margin-top: 6px;
}
.region-circles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.region-circle-card {
  border: 1px solid #e6ecf0;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  background: #f8fafc;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.region-circle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.region-circle-card .circle-icon-large {
  font-size: 30px;
  margin-bottom: 6px;
}
.region-circle-card .circle-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f1419;
  margin-bottom: 2px;
  word-break: break-word;
}
.region-circle-card .circle-members {
  font-size: 12px;
  color: #536471;
}
.region-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.region-event-item {
  display: flex;
  gap: 12px;
  border: 1px solid #e6ecf0;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
  align-items: center;
}
.region-event-item .event-date-badge {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #1d9bf0;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.region-event-item .event-month {
  font-size: 11px;
  text-transform: uppercase;
}
.region-event-item .event-day {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}
.region-event-item .event-info {
  flex: 1;
}
.region-event-item .event-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f1419;
  margin-bottom: 3px;
}
.region-event-item .event-meta {
  font-size: 12px;
  color: #536471;
}

@media (max-width: 640px) {
  .region-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .region-circles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .region-detail-header {
    padding: 16px;
  }
}
