:root {
  --bg-color: #f5f5f5;
  --header-bg: #ffffff;
  --card-bg: #ffffff;
  --text-main: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #eaeaea;
  --accent-color: #f60;
  --accent-hover: #e65c00;
  --accent-light: rgba(255, 102, 0, 0.1);
  --item-hover: #f9f9f9;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  --header-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.8);
}

/* 默认情况下，mobile-only隐藏，desktop-only显示 */
.mobile-only {
  display: none !important;
}

.desktop-only {}

[data-theme="dark"] {
  --bg-color: #121212;
  --header-bg: #1e1e1e;
  --card-bg: #1e1e1e;
  --text-main: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-muted: #757575;
  --border-color: #333333;
  --accent-color: #ff8533;
  --accent-hover: #ff944d;
  --accent-light: rgba(255, 133, 51, 0.15);
  --item-hover: #2c2c2c;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  --header-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(30, 30, 30, 0.8);
}

/* Base Layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-y: auto;
  background-color: var(--bg-color);
  color: var(--text-main);
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
  padding: 0;
}

.layout {
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-main);
  padding-top: 60px;
  transition: background-color 0.3s, color 0.3s;
}

/* Header Styles */
.tophub-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--glass-bg);
  box-shadow: var(--header-shadow);
  z-index: 1000;
  display: flex;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-container {
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
}

.logo-area {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-img {
  height: 28px;
  width: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 40px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  padding: 4px 0;
}

.nav-link:hover {
  color: var(--accent-color);
}

.menu-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.menu-toggle-btn:hover {
  color: var(--accent-color);
  background: var(--item-hover);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.logo-text {
  text-decoration: none;
  color: var(--accent-color);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.logo-text:hover {
  color: var(--accent-hover);
}

.search-area {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

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

.search-input {
  padding: 8px 36px 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-main);
  outline: none;
  font-size: 14px;
  width: 200px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
  width: 280px;
  border-color: var(--accent-color);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.search-btn:hover {
  color: var(--accent-color);
}

.search-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.search-icon-btn:hover {
  color: var(--accent-color);
  background: var(--item-hover);
}

.search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  margin-top: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.search-dropdown-loading,
.search-dropdown-empty,
.search-dropdown-error {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.search-dropdown-results {
  padding: 8px 0;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.search-result-item:hover {
  background: var(--item-hover);
}

.search-result-item .result-title {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.4;
  flex: 1;
}

.search-result-item.subscription-item {
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
  align-items: center;
}

.search-result-item.subscription-item:hover {
  background: var(--item-hover);
}

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

.search-list-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.search-list-source-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-color);
  flex-shrink: 0;
}

.search-list-source-name {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.search-list-source-name:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.search-list-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.search-list-thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.keyword-highlight {
  color: #e74c3c;
}

.subscription-badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  background: var(--border-color);
  color: var(--text-secondary);
  white-space: nowrap;
}

.subscription-badge.subscribed {
  background: var(--accent-light);
  color: var(--accent-color);
}

.sub-action-btn {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--accent-color);
  background: transparent;
  color: var(--accent-color);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.sub-action-btn:hover {
  background: var(--accent-color);
  color: white;
}

.sub-action-btn.subscribed {
  background: var(--border-color);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.sub-action-btn.subscribed:hover {
  background: var(--text-muted);
  border-color: var(--text-muted);
}

.search-dropdown-more {
  padding: 12px 16px;
  text-align: center;
  color: var(--accent-color);
  font-size: 14px;
  cursor: pointer;
  border-top: 1px solid var(--border-color);
  transition: background 0.2s;
  font-weight: 500;
}

.search-dropdown-more:hover {
  background: var(--item-hover);
}

.search-dropdown-empty .search-dropdown-more,
.search-dropdown-error .search-dropdown-more {
  margin-top: 12px;
  border-top: none;
  padding: 8px 16px;
}

@media (max-width: 768px) {
  .search-icon-btn {
    display: flex;
  }
}

.user-avatar {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  object-fit: cover;
}

.user-avatar:hover .avatar-img {
  border-color: var(--accent-color);
  transform: rotate(15deg) scale(1.1);
}

/* Theme Switcher */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.3s;
}

.theme-toggle:hover {
  background: var(--item-hover);
  color: var(--accent-color);
  transform: translateY(-2px);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.user-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--header-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 160px;
  display: none;
  z-index: 1001;
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu.show {
  display: block;
}

.menu-item {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-item:hover {
  background: var(--item-hover);
  color: var(--accent-color);
}

.menu-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.mobile-drag-handle {
  display: none;
}

@media (max-width: 768px) {
  .user-menu {
    position: fixed;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: block !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: none;
  }
  
  .user-menu.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .user-menu-content-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--header-bg);
    border-radius: 24px 24px 0 0;
    padding: 0 16px calc(env(safe-area-inset-bottom, 20px) + 24px);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  }

  .user-menu.show .user-menu-content-wrapper {
    transform: translateY(0);
  }

  .mobile-drag-handle {
    display: block;
    width: 40px;
    height: 5px;
    background: var(--border-color);
    border-radius: 3px;
    margin: 12px auto 20px;
  }

  .user-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 8px;
    justify-items: center;
  }

  .user-menu-grid .menu-item {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    border: none !important;
    border-radius: 12px;
    font-size: 11px;
    width: 100%;
    text-align: center;
    background: transparent;
    white-space: nowrap;
  }

  .user-menu-grid .menu-item.desktop-only {
    display: none !important;
  }
  
  .user-menu-grid .menu-item svg {
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 50%;
    box-shadow: var(--shadow);
    box-sizing: content-box;
    transition: all 0.2s;
  }

  .user-menu-grid .menu-item:hover svg {
    background: var(--accent-light);
    color: var(--accent-color);
    transform: scale(1.05);
  }
}

.logo-area {
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-color);
  letter-spacing: -0.5px;
}

/* Modern Auth Buttons */
.auth-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-modern {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
}

.btn-login {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-login:hover {
  background: var(--item-hover);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.btn-register {
  background: var(--accent-color);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.2);
}

.btn-register:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 102, 0, 0.3);
}

.btn-logout {
  background: #fdf2f2;
  color: #f04438;
  border: 1px solid #fee4e2;
}

.btn-logout:hover {
  background: #fee4e2;
}

[data-theme="dark"] .btn-logout {
  background: rgba(240, 68, 56, 0.1);
  color: #f97066;
  border-color: rgba(240, 68, 56, 0.2);
}

/* Main Content */
.container {
  margin: 0 auto;
  padding: 0 20px;
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.breadcrumb a {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb .sep {
  color: var(--text-muted);
}

.breadcrumb .current {
  color: var(--text-main);
  font-weight: 500;
}

/* Profile and Feedback Container */
.profile-container,
.feedback-container {
  margin: 0 auto;
  padding: 20px;
}

/* Tabs */
.channel-tabs {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  flex-wrap: wrap;
  position: sticky;
  top: 60px;
  z-index: 99;
  background: var(--bg-color);
}

.tab-item {
  display: inline-block;
  padding: 6px 16px;
  background: var(--item-hover);
  color: var(--text-secondary);
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  border: 1px solid var(--border-color);
}

.tab-item:hover {
  color: var(--accent-color);
  background: var(--item-hover);
  border-color: var(--accent-color);
}

.tab-item.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* 系统分类样式（全部、最新、推荐） */
.tab-item.system-tab {
  font-weight: 500;
  background: var(--item-hover);
}

.tab-item.system-tab.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* 用户自定义分类样式 */
.tab-item.user-tab {
  background: var(--card-bg);
  color: var(--text-secondary);
}

.tab-item.user-tab:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.tab-item.user-tab.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.tab-item.action-btn {
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  opacity: 0.8;
  position: relative;
}

.tab-item.action-btn:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  opacity: 1;
}

.tab-item.action-btn:active {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

.tab-item.action-btn .tooltip {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-main);
  color: var(--header-bg);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
}

.tab-item.action-btn:hover .tooltip {
  opacity: 1;
}

.preview-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  opacity: 0.8;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.preview-toggle-btn:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  opacity: 1;
}

.preview-toggle-btn.active {
  color: var(--accent-color);
  background: transparent;
}

.preview-toggle-btn.active:hover {
  border-color: var(--accent-color);
}

.preview-toggle-btn svg {
  width: 16px;
  height: 16px;
}

/* Layout switching */
.mobile-layout {
  display: none;
}

.desktop-layout {
  display: block;
}

/* Grid Layout */
.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  /* Fallback grid layout */
  gap: 20px;
  min-height: 200px;
}

/* Card Styles */
.node-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.node-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
  border-color: var(--accent-color);
}

[data-theme="dark"] .node-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-header {
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.card-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.card-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.card-time {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: normal;
}

.sub-btn {
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.sub-btn:hover {
  background: var(--item-hover);
  color: var(--accent-color);
  border-color: var(--accent-color);
}

/* List Styles */
.card-body {
  padding: 5px 0;
  max-height: 240px;
  /* Show 5 items */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #eee transparent;
}

.card-body::-webkit-scrollbar {
  width: 4px;
}

.card-body::-webkit-scrollbar-track {
  background: transparent;
}

.card-body::-webkit-scrollbar-thumb {
  background-color: #eee;
  border-radius: 4px;
}

.card-body::-webkit-scrollbar-thumb:hover {
  background-color: #ddd;
}

@media (max-width: 768px) {
  .card-body {
    max-height: none;
    overflow-y: visible;
  }
}

.list-item {
  display: flex;
  align-items: flex-start;
  padding: 6px 15px;
  text-decoration: none;
  color: var(--text-main);
  transition: background 0.2s;
  gap: 10px;
}

.list-item:hover {
  background: var(--item-hover);
}

.item-index {
  width: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Rank Colors */
.item-index.rank-1 {
  color: #ff3b30;
}

.item-index.rank-2 {
  color: #ff9500;
}

.item-index.rank-3 {
  color: #ffcc00;
}

.item-title {
  flex: 1;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text-main);
  word-break: break-all;
}

.list-item:hover .item-title {
  color: var(--text-main);
}

.list-item.visited {
  opacity: 0.6;
}

.list-item.visited .item-title {
  color: var(--text-muted);
}

.list-item.visited:hover {
  background: transparent;
}

.list-item.visited:hover .item-title {
  color: var(--text-muted);
}

.item-hot {
  font-size: 12px;
  color: #bfbfbf;
  flex-shrink: 0;
}

.list-item {
  position: relative;
}

.title-tooltip {
  position: fixed;
  background: var(--card-bg);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  max-width: 400px;
  width: max-content;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  word-wrap: break-word;
}

.title-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-color);
}

.title-tooltip.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .title-tooltip {
    max-width: 280px;
    font-size: 12px;
  }
}

.card-footer {
  border-top: 1px solid var(--border-color);
}

.view-more {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.view-more:hover {
  color: var(--accent-color);
  background: var(--item-hover);
}

/* Card Tabs */
.card-tabs {
  display: none;
}

.card-tab-item {
  display: inline-block;
  padding: 6px 14px;
  background: var(--card-bg);
  color: var(--text-secondary);
  border-radius: 20px;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s;
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.card-tab-item:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.card-tab-item.active {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.2);
}

/* Card Content */
.card-content {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card-data {
  display: none;
}

.card-data-header {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  background: var(--item-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-data-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.card-data-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.card-data-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.card-data-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

.hot-update-time {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: normal;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 10px;
  background: var(--item-hover);
  border-radius: 12px;
  margin-left: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hot-update-time:hover {
  color: var(--accent-color);
}

.hot-update-time svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

@media (max-width: 768px) {
  .hot-update-time {
    font-size: 13px;
    padding: 3px 8px;
    margin-left: 6px;
  }
  
  .hot-update-time svg {
    width: 12px;
    height: 12px;
  }
}

.card-data-body {
  padding: 5px 0;
  max-height: none;
  overflow-y: auto;
}

.data-list-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 15px;
  text-decoration: none;
  color: var(--text-main);
  transition: background 0.2s;
  gap: 12px;
}

.data-list-item:hover {
  background: var(--item-hover);
}

.data-list-item.visited {
  opacity: 0.6;
}

.data-list-item.visited .data-item-title {
  color: var(--text-muted);
}

.data-list-item.visited:hover {
  background: transparent;
}

.data-list-item.visited:hover .data-item-title {
  color: var(--text-muted);
}

.data-item-index {
  min-width: 24px;
  text-align: right;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: -2px;
}

.data-item-title {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
  color: var(--text-main);
}

.data-list-item:hover .data-item-title {
  color: var(--text-main);
}

.data-item-hot {
  font-size: 12px;
  color: #bfbfbf;
  flex-shrink: 0;
}

/* 列表项图片样式 */
.item-image-index {
  max-width: 80px;
  max-height: 54px;
  width: auto;
  height: auto;
  border-radius: 4px;
  object-fit: contain;
  margin-left: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  display: block;
  background-color: #f5f5f5;
}

/* 详情页PC端图片样式 */
.item-image {
  max-width: 120px;
  max-height: 90px;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  margin-left: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  display: block;
  background-color: #f5f5f5;
}

/* 状态标签样式 */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 20px;
  height: 18px;
  color: white;
}

.status-new {
  background: #f60;
}

.status-up {
  background: #ff4d4f;
}

.status-down {
  background: #eaeaea;
}

/* PC端隐藏回到顶部按钮和抽屉 */
@media (min-width: 769px) {
  .back-to-top {
    display: none !important;
  }

  .drawer {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0;
  }

  .profile-container,
  .feedback-container {
    padding: 15px;
  }

  .mobile-layout {
    display: block;
  }

  .desktop-layout {
    display: none;
  }

  .header-right {
    gap: 12px;
  }

  .search-area {
    position: static;
  }

  .search-wrapper {
    position: fixed;
    left: 0;
    top: 0;
    height: 60px;
    display: none;
    z-index: 100;
    padding-left: 0;
    width: calc(100vw - 55px);
    background: var(--header-bg);
    padding: 0 12px;
    align-items: center;
    box-sizing: border-box;
  }

  .search-wrapper.active,
  .search-area.mobile-active .search-wrapper {
    display: flex;
  }

  .search-input {
    flex: 1;
    margin-left: 0;
    padding-right: 50px;
  }

  .search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
  }

  .search-icon-btn {
    display: flex !important;
  }

  .search-wrapper.active~.search-icon-btn,
  .search-area.mobile-active .search-icon-btn {
    display: none !important;
  }

  .search-dropdown {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100vw;
    border-radius: 0 0 12px 12px;
    border-left: none;
    border-right: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .logo-area {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .logo-img {
    height: 24px;
    width: 24px;
  }

  .nav-links {
    display: none;
  }

  .channel-tabs {
    display: none;
  }

  .channel-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-item {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 14px;
    flex-shrink: 0;
    border-radius: 20px;
  }

  .card-tabs {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .desktop-only {
    display: none !important;
  }

  .card-tab-item {
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .card-data-header {
    padding: 10px 12px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .card-data-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .card-data-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .card-data-name {
    font-size: 25px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-data-header .btn-modern {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .card-data-body {
    padding-bottom: 20px;
  }

  .data-list-item {
    padding: 8px 12px;
    gap: 10px;
  }

  .data-item-title {
    font-size: 17px;
    white-space: normal;
    word-break: break-word;
  }

  .status-badge {
    align-self: flex-end;
    margin-bottom: 2px;
  }

  .item-image-index {
    max-width: 70px;
    max-height: 48px;
    width: auto;
    height: auto;
  }

  .item-image {
    max-width: 80px;
    max-height: 54px;
    width: auto;
    height: auto;
  }

  .mobile-date-divider {
    display: flex;
    align-items: center;
    margin: 12px 0 8px 0;
    padding: 0 16px;
  }

  .mobile-date-divider::before,
  .mobile-date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
  }

  .mobile-date-text {
    padding: 4px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--card-bg);
    border-radius: 16px;
    margin: 0 12px;
  }

  .pull-to-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .refresh-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

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

  .refresh-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: opacity 0.3s ease;
  }

  .refresh-text.loading {
    opacity: 0.7;
  }

  /* 上拉加载样式 - 时间轴 */
  .timeline-push-load {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
  }

  [data-theme="dark"] .timeline-push-load {
    background: rgba(30, 30, 30, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .load-icon {
    font-size: 24px;
    color: var(--accent-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .load-icon.rotating {
    animation: smoothRotate 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  .load-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: opacity 0.3s ease;
  }

  .load-text.loading {
    opacity: 0.7;
  }

  /* 上拉加载样式 - 列表视图 */
  .list-push-load {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--card-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  [data-theme="dark"] .list-push-load {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .list-push-load .load-text {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
  }

  .list-push-load .load-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  .load-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

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

  .list-no-more {
    text-align: center;
    padding: 15px;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
  }

  .back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(102, 102, 102, 0.7);
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
  }

  .back-to-top.show {
    display: flex;
  }

  .back-to-top:active {
    transform: scale(0.95);
  }

  .back-to-top:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    background: rgba(102, 102, 102, 0.85);
  }

  .back-to-top svg {
    color: #ffffff;
  }

  .menu-toggle-btn {
    display: flex;
  }

  .avatar-img {
    transition: none !important;
  }

  .user-avatar:hover .avatar-img {
    border-color: var(--border-color);
    transform: none;
  }

  .drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
  }

  .drawer.active {
    display: block;
  }

  .drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
  }

  .drawer-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--header-bg);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .drawer.active .drawer-content {
    transform: translateX(0);
  }

  .drawer-category-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 12px 16px;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
  }

  .drawer-category-tabs::-webkit-scrollbar {
    display: none;
  }

  .drawer-tab-item {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .drawer-tab-item:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
  }

  .drawer-tab-item.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
  }

  .drawer-tab-item.manage-category-btn {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
  }

  .drawer-tab-item.manage-category-btn:hover {
    color: var(--accent-color);
  }

  .drawer-body {
    padding: 10px;
    overflow-y: auto;
    height: calc(100vh - 50px);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    -webkit-overflow-scrolling: touch;
  }

  .drawer-body::-webkit-scrollbar {
    width: 6px;
  }

  .drawer-body::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
  }

  .drawer-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
  }

  .drawer-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
  }

  .drawer-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 16px;
    gap: 12px;
  }

  .drawer-item-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .drawer-item span {
    flex: 1;
  }

  .drawer-item:hover {
    background: var(--item-hover);
    color: var(--accent-color);
  }

  .drawer-item.active {
    background: var(--accent-color);
    color: #fff;
  }
}

/* Rank Colors */
.data-item-index.rank-1 {
  color: #ff3b30;
}

.data-item-index.rank-2 {
  color: #ff9500;
}

.data-item-index.rank-3 {
  color: #ffcc00;
}

/* 详情页与发现页补充样式 */
.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 60px);
  margin: 0 auto;
}

.detail-sidebar {
  background: var(--card-bg);
  border-right: 1px solid var(--border-color);
  padding: 24px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-title {
  padding: 0 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-item:hover,
.sidebar-item.active {
  background: var(--item-hover);
  color: var(--accent-color);
}

.sidebar-item.active {
  border-left-color: var(--accent-color);
  font-weight: 600;
}

.waterfall-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  max-width: 100%;
  overflow: hidden;
}

.waterfall-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--card-bg);
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: all 0.2s;
  max-width: 100%;
  box-sizing: border-box;
}

.waterfall-item:hover {
  transform: translateX(5px);
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.item-rank {
  width: 24px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
}

.item-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.item-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
  line-height: 1.3;
  word-break: break-all;
}

.waterfall-item:hover .item-title {
  color: var(--accent-color);
}

.item-info {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 15px;
}

@media (max-width: 1024px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    display: none;
  }
}

/* Category Modal Styles */
.category-modal {
  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;
}

.category-modal-content {
  background: var(--card-bg);
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.category-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.category-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

.category-modal-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all 0.2s;
}

.category-modal-close:hover {
  background: var(--item-hover);
  color: var(--text-main);
}

.category-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

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

.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-color);
  border-radius: 8px;
  cursor: grab;
  transition: all 0.2s;
}

.category-item:hover {
  background: var(--item-hover);
}

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

.category-drag-handle {
  color: var(--text-muted);
  cursor: grab;
  display: flex;
  align-items: center;
}

.category-drag-handle:hover {
  color: var(--text-secondary);
}

.category-name {
  flex: 1;
  font-size: 15px;
  color: var(--text-main);
}

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

.category-edit-btn,
.category-delete-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.category-edit-btn {
  background: var(--bg-color);
  color: var(--text-secondary);
}

.category-edit-btn:hover {
  background: var(--accent-color);
  color: #fff;
}

.category-delete-btn {
  background: var(--bg-color);
  color: #f56c6c;
}

.category-delete-btn:hover {
  background: #f56c6c;
  color: #fff;
}

.add-category-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.add-category-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--card-bg);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.add-category-form input:focus {
  border-color: var(--accent-color);
}

.add-category-form .confirm-btn,
.add-category-form .cancel-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.add-category-form .confirm-btn {
  background: var(--accent-color);
  color: #fff;
}

.add-category-form .confirm-btn:hover {
  background: var(--accent-hover);
}

.add-category-form .cancel-btn {
  background: var(--bg-color);
  color: var(--text-secondary);
}

.add-category-form .cancel-btn:hover {
  background: var(--border-color);
}

.category-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

.add-category-btn {
  width: 100%;
  padding: 12px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-category-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: rgba(255, 102, 0, 0.05);
}

/* Manage Category Button Style */
.manage-category-btn {
  color: var(--text-muted) !important;
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: center;
  background: var(--card-bg) !important;
}

.manage-category-btn:hover {
  color: var(--accent-color) !important;
}

/* Toast Styles */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #fff !important;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: var(--text-main);
  animation: toastIn 0.3s ease;
  min-width: 200px;
}

.toast-hide {
  animation: toastOut 0.3s ease forwards;
}

.toast-success {
  background: #67c23a !important;
  color: #fff;
}

.toast-success svg {
  color: #fff;
}

.toast-error {
  background: #f56c6c !important;
  color: #fff;
}

.toast-error svg {
  color: #fff;
}

.toast-info {
  background: var(--accent-color) !important;
  color: #fff;
}

.toast-info svg {
  color: #fff;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Edit Input Style */
.edit-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 15px;
  background: var(--bg-color);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.edit-input:focus {
  border-color: var(--accent-color);
}

/* Delete Confirm Button */
.delete-confirm-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: #f56c6c;
  color: #fff;
}

.delete-confirm-btn:hover {
  background: #f78989;
}

/* Category Edit Input */
.category-edit-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--accent-color);
  border-radius: 6px;
  font-size: 15px;
  background: var(--card-bg);
  color: var(--text-main);
  outline: none;
}

.category-save-btn,
.category-cancel-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.category-save-btn {
  background: var(--accent-color);
  color: #fff;
}

.category-save-btn:hover {
  background: var(--accent-hover);
}

.category-cancel-btn {
  background: var(--bg-color);
  color: var(--text-secondary);
}

.category-cancel-btn:hover {
  background: var(--border-color);
}

/* Last Read Divider */
.last-read-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: #ff9800;
  grid-column: 1 / -1;
  grid-row: span 2;
  padding: 20px 0;
}

.last-read-divider::before,
.last-read-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ff9800;
  opacity: 0.3;
}

.last-read-text {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-color);
  border-radius: 12px;
  margin: 0 10px;
}


/* ==================== 时间轴视图样式 ==================== */

/* 视图切换按钮容器 */
.view-toggle-wrapper {
  display: none;
  padding: 12px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .view-toggle-wrapper {
    display: block;
  }
}

/* 视图切换按钮组 */
.view-toggle {
  display: flex;
  gap: 8px;
  background: var(--bg-color);
  border-radius: 10px;
  padding: 4px;
}

.view-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-toggle-btn:active {
  transform: scale(0.98);
}

.view-toggle-btn.active {
  background: var(--card-bg);
  color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.view-toggle-btn svg {
  width: 18px;
  height: 18px;
}

/* 时间轴视图容器 */
.timeline-view {
  background: var(--bg-color);
  min-height: calc(100vh - 200px);
  padding: 16px 0 20px 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.timeline-container {
  padding: 0 16px;
  position: relative;
}

.timeline-loading-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

.timeline-loading-overlay .load-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}

.timeline-loading-overlay .load-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.timeline-container.empty-state::before {
  display: none;
}

.timeline-empty-state {
  padding: 0 16px;
}

/* 时间轴竖线 */
.timeline-container::before {
  content: '';
  position: absolute;
  left: 36px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
  z-index: 0;
}

/* 时间轴项目 */
.timeline-item {
  display: flex;
  padding: 0 0 20px 0;
  gap: 16px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* 同一来源的项目样式 */
.timeline-item.same-source {
  padding-bottom: 12px;
}

/* 时间轴图标容器（带圆点） */
.timeline-icon-wrapper {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

/* 时间轴圆点 */
.timeline-icon-wrapper::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--accent-color);
  border: 3px solid var(--card-bg);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent-color);
  z-index: 2;
}

.timeline-source-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 3;
  background: var(--card-bg);
}

/* 同一来源的占位符（小圆点） */
.timeline-icon-placeholder {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-icon-placeholder::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--border-color);
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border-color);
}

/* 第一条数据（非same-source）的圆点补齐 */
.timeline-item:not(.same-source)::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 68px; /* 40px (header) + 8px (gap) + 20px (center of content) */
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--border-color);
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border-color);
  z-index: 2;
}

/* 时间轴内容卡片 */
.timeline-content-wrapper {
  flex: 1;
  min-width: 0;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.timeline-content-wrapper:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: var(--accent-color);
}

.timeline-content-wrapper:active {
  transform: translateY(0);
}

.timeline-item.visited .timeline-content-wrapper {
  opacity: 0.6;
}

.timeline-item.visited .timeline-title-link,
.timeline-item.visited .timeline-title-only {
  color: var(--text-muted);
}

.timeline-item.visited .timeline-content-wrapper:hover {
  border-color: var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transform: none;
}

/* 时间轴右侧容器（包含meta和content） */
.timeline-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 时间轴元信息（栏目名和时间，在卡片外面） */
.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 40px;
  margin-top: 0;
}

/* 时间轴图标链接 */
.timeline-icon-wrapper {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.timeline-icon-wrapper:hover {
  transform: scale(1.05);
}

.timeline-source-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-color);
  flex-shrink: 0;
  line-height: 40px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.timeline-source-name:hover {
  opacity: 0.8;
}

.timeline-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 40px;
}

/* 时间轴内容链接 */
.timeline-content-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 12px 16px;
  transition: background 0.2s;
}

.timeline-content-link:hover {
  background: var(--item-hover);
}

/* 大图布局 - 图片在文字下方 */
.timeline-content-link.large-image-layout {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.timeline-content-link.large-image-layout .timeline-title-link,
.timeline-content-link.large-image-layout .timeline-title-only {
  width: 100%;
}

/* 时间轴标题 */
.timeline-title-link,
.timeline-title-only {
  flex: 1;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  word-break: break-word;
  transition: color 0.2s;
}

.timeline-content-link:hover .timeline-title-link,
.timeline-content-link:hover .timeline-title-only {
  color: var(--accent-color);
}

/* 时间轴小图片（显示在右侧）- 小图 20×20px */
.timeline-item-image {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-item-image.loaded {
  opacity: 1;
}

/* 大图样式 - 宽度撑满，高度自适应 */
.timeline-image-large {
  width: 100%;
  height: 160px;
  min-height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

/* 同一来源的简化样式 */
.timeline-item.same-source .timeline-content-wrapper {
  background: var(--card-bg);
  border-color: var(--border-color);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.timeline-item.same-source .timeline-content-wrapper:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.timeline-title-only {
  font-size: 14px;
  line-height: 1.6;
}

.timeline-item.same-source .timeline-content-link {
  padding: 10px 16px;
}

/* 上次阅读到这标记 */
.timeline-last-read-marker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  margin: 0 16px;
}

.timeline-marker-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #ff9800, transparent);
}

.timeline-marker-text {
  font-size: 12px;
  font-weight: 600;
  color: #ff9800;
  white-space: nowrap;
  padding: 4px 12px;
  background: rgba(255, 152, 0, 0.1);
  border-radius: 12px;
}

/* 加载状态 */
.timeline-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 20px;
  color: var(--text-muted);
  background: var(--card-bg);
  margin: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 加载更多按钮 */
.timeline-load-more {
  padding: 16px;
  text-align: center;
  background: transparent;
}

.timeline-load-more .btn-modern {
  padding: 12px 40px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent-color);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

.timeline-load-more .btn-modern:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 102, 0, 0.4);
}

.timeline-load-more .btn-modern:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

/* Toast 提示样式 */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #fff !important;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: var(--text-main);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  border: 1px solid var(--border-color);
}

.toast-hide {
  animation: toastOut 0.3s ease forwards;
}

.toast-success {
  border-color: #67c23a;
  background: #67c23a !important;
  color: #fff;
}

.toast-success svg {
  color: #fff;
}

.toast-error {
  border-color: #f56c6c;
  background: #f56c6c !important;
  color: #fff;
}

.toast-error svg {
  color: #fff;
}

.toast-info {
  border-color: var(--accent-color);
  background: var(--accent-color) !important;
  color: #fff;
}

/* Toast Notifications - Classic Colorful Design */
.toast-container {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  width: auto;
  min-width: 200px;
  max-width: 90vw;
}

.toast {
  pointer-events: auto;
  padding: 10px 20px;
  border-radius: 8px;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  animation: toastIn 0.3s ease;
  transition: all 0.3s ease;
}

.toast-success {
  background: #67c23a !important;
}

.toast-error {
  background: #f56c6c !important;
}

.toast-info {
  background: #909399 !important;
}

.toast-hide {
  animation: toastOut 0.3s ease forwards;
}

.toast svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #fff !important;
}

.toast span {
  font-size: 14px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Category Modal Styles */
.category-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  animation: modalFadeIn 0.2s ease;
}

.category-modal-box {
  background: var(--card-bg);
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.category-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text-main);
}

.category-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.category-option {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text-main);
}

.category-option:hover {
  background: var(--item-hover);
}

.category-option.selected {
  color: var(--accent-color);
  font-weight: 600;
}

.category-option-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
}

.category-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

.category-modal-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.category-modal-btn.cancel {
  background: var(--item-hover);
  color: var(--text-secondary);
}

.category-modal-btn.confirm {
  background: var(--accent-color);
  color: white;
}

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

#confirmModalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  backdrop-filter: blur(4px);
}

#confirmModalOverlay.active {
  display: flex;
}

.confirm-modal-box {
  background: var(--card-bg);
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: modalFadeIn 0.2s ease;
}

.confirm-modal-header {
  padding: 20px 24px 0;
  text-align: center;
}

.confirm-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.confirm-modal-body {
  padding: 20px 24px;
  text-align: center;
}

.confirm-modal-body p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.confirm-modal-footer {
  padding: 0 24px 20px;
  display: flex;
  gap: 12px;
}

.confirm-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.confirm-btn-cancel:hover {
  border-color: var(--text-secondary);
}

.confirm-btn-ok {
  background: var(--accent-color);
  color: white;
}

.confirm-btn-ok:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .tab-item.action-btn:active {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
  }

  .back-to-top:active {
    transform: none;
  }

  .category-item:active {
    cursor: pointer;
  }

  .view-toggle-btn:active {
    transform: none;
  }

  .timeline-content-wrapper:hover,
  .timeline-content-wrapper:active {
    transform: none;
    border-color: var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .timeline-content-link:hover,
  .timeline-content-link:active {
    background: transparent;
  }

  .timeline-content-link:hover .timeline-title-link,
  .timeline-content-link:hover .timeline-title-only,
  .timeline-content-link:active .timeline-title-link,
  .timeline-content-link:active .timeline-title-only {
    color: var(--text-main);
  }

  .timeline-icon-wrapper:hover {
    transform: none;
  }

  .timeline-source-name:hover {
    opacity: 1;
  }

  .timeline-item.same-source .timeline-content-wrapper:hover {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transform: none;
  }

  .timeline-load-more .btn-modern:active {
    transform: none;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
  }

  .category-option:active {
    background: transparent;
  }

  .confirm-btn:active {
    transform: none;
  }

  .confirm-btn-ok:active {
    background: var(--accent-color);
  }

  .data-list-item:hover {
    background: transparent;
  }

  .data-list-item:hover .data-item-title {
    color: var(--text-main);
  }

  .data-list-item.visited:hover {
    background: transparent;
  }

  .data-list-item.visited:hover .data-item-title {
    color: var(--text-muted);
  }
}

/* 禁止移动端长按弹出浏览器默认菜单 */
@media (max-width: 768px) {
  [data-context-menu="true"] {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

.context-menu {
  position: fixed;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 140px;
  z-index: 9999;
  padding: 6px 0;
  animation: contextMenuIn 0.15s ease;
}

@keyframes contextMenuIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
  transition: all 0.15s;
}

.context-menu-item:hover {
  background: var(--item-hover);
  color: var(--accent-color);
}

.context-menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.context-menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* Link Preview Styles */
.link-preview-container {
  position: fixed;
  z-index: 9998;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: previewFadeIn 0.2s ease;
  pointer-events: auto;
}

@keyframes previewFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.link-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.link-preview-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 12px;
}

.link-preview-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.link-preview-close:hover {
  background: var(--accent-color);
  color: white;
}

.link-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.link-preview-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.link-preview-loading .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.link-preview-container.mobile-preview {
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.link-preview-container.mobile-preview .link-preview-header {
  border-radius: 24px 24px 0 0;
}

.link-preview-container.mobile-preview .link-preview-iframe {
  border-radius: 0 0 24px 24px;
}

.preview-mode-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.preview-mode-modal.show {
  opacity: 1;
  visibility: visible;
}

.preview-mode-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.preview-mode-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.preview-mode-modal.show .preview-mode-content {
  transform: scale(1) translateY(0);
}

.preview-mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.preview-mode-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

.preview-mode-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.preview-mode-close:hover {
  background: var(--accent-color);
  color: white;
}

.preview-mode-body {
  padding: 24px;
  max-height: calc(90vh - 140px);
  overflow-y: auto;
}

.preview-mode-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.preview-mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: 2px solid var(--border-color);
  background: var(--bg-color);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.preview-mode-tab:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.preview-mode-tab.active {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: white;
}

.preview-mode-tab svg {
  flex-shrink: 0;
}

.preview-size-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.preview-size-item {
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  background: var(--bg-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.preview-size-item:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.preview-size-item.selected {
  border-color: var(--accent-color);
  background: rgba(var(--accent-color-rgb, 59, 130, 246), 0.1);
}

.preview-size-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.preview-size-dims {
  font-size: 12px;
  color: var(--text-muted);
}

.preview-delay-section {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-color);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.preview-delay-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.preview-delay-label svg {
  opacity: 0.7;
}

.preview-delay-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-delay-item {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card-bg);
}

.preview-delay-item:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.preview-delay-item.active {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: white;
}

.preview-demo-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.preview-demo-tip svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.link-preview-container.demo-preview {
  z-index: 10001;
}

.preview-mode-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}

.preview-mode-btn {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.preview-mode-btn.secondary {
  background: var(--border-color);
  color: var(--text-secondary);
}

.preview-mode-btn.secondary:hover {
  background: var(--text-muted);
}

.preview-mode-btn.primary {
  background: var(--accent-color);
  color: white;
}

.preview-mode-btn.primary:hover:not(:disabled) {
  filter: brightness(1.1);
}

.preview-mode-btn.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Layout Settings Panel */
.layout-settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.layout-settings-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.layout-settings-panel {
  position: absolute;
  top: 80px;
  right: 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  width: 340px;
  max-height: calc(100vh - 100px);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transform: scale(0.9) translateY(-10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

[data-theme="dark"] .layout-settings-panel {
  background: rgba(30, 30, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
}

.layout-settings-overlay.show .layout-settings-panel {
  transform: scale(1) translateY(0);
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  cursor: move;
  user-select: none;
}

[data-theme="dark"] .settings-panel-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.settings-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.settings-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

[data-theme="dark"] .settings-close-btn {
  background: rgba(255, 255, 255, 0.1);
}

.settings-close-btn:hover {
  background: rgba(255, 102, 0, 0.15);
  color: var(--accent-color);
}

.settings-panel-body {
  padding: 20px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

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

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

.settings-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 10px;
}

.settings-slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-slider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

[data-theme="dark"] .settings-slider {
  background: rgba(255, 255, 255, 0.15);
}

.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(255, 102, 0, 0.3);
}

.settings-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.settings-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(255, 102, 0, 0.3);
}

.settings-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
}

.settings-value {
  min-width: 50px;
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-color);
}

.settings-presets {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.preset-btn {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

[data-theme="dark"] .preset-btn {
  border-color: rgba(255, 255, 255, 0.15);
}

.preset-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.preset-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.settings-panel-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .settings-panel-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.settings-reset-btn {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

[data-theme="dark"] .settings-reset-btn {
  border-color: rgba(255, 255, 255, 0.15);
}

.settings-reset-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
}

.settings-save-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent-color);
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-save-btn:hover {
  filter: brightness(1.1);
}

@media (max-width: 480px) {
  .layout-settings-panel {
    width: calc(100% - 40px);
    right: 20px;
    left: 20px;
    top: 70px;
  }
}

/* 统一修改所有 Toast 提示框，使其完全不透明 */
.toast-container .toast {
  opacity: 1;
  background-color: #2c3e50 !important; /* 默认不透明深色底 */
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.toast-container .toast:not(.toast-hide) {
  opacity: 1 !important;
}

.toast-container .toast.toast-success {
  background-color: #67C23A !important; /* 纯色绿 */
  border-color: #67C23A !important;
}

.toast-container .toast.toast-error {
  background-color: #d32f2f !important; /* 纯色红 */
  border-color: #b71c1c !important;
}

.toast-container .toast.toast-info {
  background-color: #67C23A !important; /* 纯色绿 */
  border-color: #67C23A !important;
}

/* 统一订阅分类选择模态框样式 */
.subscribe-category-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.subscribe-category-modal {
    background: var(--card-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.subscribe-category-modal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subscribe-category-modal .modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.subscribe-category-modal .modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.subscribe-category-modal .modal-close-btn:hover {
    background: var(--item-hover);
    color: var(--text-main);
}

.subscribe-category-modal .modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.subscribe-category-modal .category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subscribe-category-modal .category-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.subscribe-category-modal .category-option:hover {
    background: var(--item-hover);
}

.subscribe-category-modal .category-option.selected {
    background: var(--accent-light);
    border-color: var(--accent-color);
}

.subscribe-category-modal .category-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-main);
}

.subscribe-category-modal .category-option-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.subscribe-category-modal .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.subscribe-category-modal .btn-cancel {
    padding: 8px 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.subscribe-category-modal .btn-cancel:hover {
    background: var(--item-hover);
}

.subscribe-category-modal .btn-confirm {
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    background: var(--accent-color);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.subscribe-category-modal .btn-confirm:hover {
    background: var(--accent-hover);
}

/* 移动端时间轴订阅按钮 */
.timeline-sub-btn {
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--accent-color);
  background: transparent;
  color: var(--accent-color);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-left: 8px;
  line-height: 1.2;
}

.timeline-sub-btn:hover {
  background: var(--accent-color);
  color: white;
}

.timeline-sub-btn.subscribed {
  background: var(--border-color) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

.timeline-sub-btn.subscribed:hover {
  background: var(--text-muted) !important;
  border-color: var(--text-muted) !important;
}

/* 订阅按钮样式 */
.sub-action-btn {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    transition: all 0.2s;
    margin-left: 10px;
    white-space: nowrap;
}

.sub-action-btn:hover {
    background: var(--accent-color);
    color: #fff;
}

.sub-action-btn.subscribed {
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent-color);
    border-color: transparent;
}

.sub-action-btn.subscribed:hover {
    background: rgba(108, 92, 231, 0.2);
}