:root {
  --primary-color: #8b5cf6; /* 紫色基调 */
  --primary-light: #c4b5fd;
  --primary-dark: #6d28d9;
  --accent-color: #ec4899; /* 粉色作为点缀 */
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #1e293b;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --primary-color-rgb: 67, 97, 238;
  --secondary-color: #3a0ca3;
  --background-color: #fff;
  --background-alt: #f8f9fa;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --error-color: #e74c3c;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.5rem;
  --border-radius: 8px;
  --transition-time: 0.3s;
  --header-height: 60px;
  --sidebar-width: 240px;
  --card-width: 300px;
}

/* 深色模式 */
.dark-theme {
  --primary-color: #4cc9f0;
  --primary-color-rgb: 76, 201, 240;
  --secondary-color: #4361ee;
  --accent-color: #3a0ca3;
  --text-color: #f0f0f0;
  --text-light: #bbb;
  --background-color: #121212;
  --background-alt: #1f1f1f;
  --border-color: #2d2d2d;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  transition: background-color var(--transition-time), color var(--transition-time);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-top: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-time);
}

a:hover {
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  transition: all var(--transition-time);
}

/* 页面布局 */
.main-container {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
  background-color: var(--bg-color);
}

/* 头部样式 */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  z-index: 1000;
  transition: background-color var(--transition-time), border-color var(--transition-time);
  box-shadow: 0 2px 8px var(--shadow-color);
}

.logo a {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.logo i {
  font-size: 1.5rem;
  margin-right: var(--spacing-sm);
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--background-alt);
  border-radius: 50px;
  padding: 0 var(--spacing-md);
  width: 40%;
  max-width: 500px;
  height: 40px;
  transition: background-color var(--transition-time);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: var(--spacing-sm);
  color: var(--text-color);
  outline: none;
  font-size: 0.95rem;
}

.search-bar button {
  color: var(--text-light);
  padding: var(--spacing-xs);
}

.search-bar button:hover {
  color: var(--primary-color);
}

.theme-toggle button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.theme-toggle button:hover {
  background-color: var(--background-alt);
  color: var(--primary-color);
}

/* 侧边栏样式 */
/* 侧边栏固定布局与现代设计 */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--card-bg);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: var(--header-height);
  left: 0;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  z-index: 20;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

/* Dark mode sidebar */
.dark-theme .sidebar {
  background: var(--background-color);
  border-right-color: var(--border-color);
}

/* Clean scrollbar */
.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.1);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0,0,0,0.2);
}

/* Sidebar header */
.sidebar-header {
  padding: 0 1.5rem 0.75rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  opacity: 0.8;
}

/* Navigation menu - Modern style */
.category-nav {
  padding: 0;
  width: 100%;
}

.category-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.category-nav ul li {
  margin: 3px 0;
  width: 100%;
  transition: all 0.2s ease;
}

.category-nav ul li a {
  display: flex;
  align-items: center;
  padding: 8px 1.5rem;
  color: var(--text-color);
  font-weight: 400;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 6px;
  height: 36px;
  width: calc(100% - 12px);
  margin: 0 6px;
}

/* Icon style */
.category-nav ul li a i {
  margin-right: 10px;
  font-size: 1rem;
  width: 20px;
  text-align: center;
  color: var(--text-light);
  opacity: 0.8;
  transition: all 0.2s ease;
}

/* Active state and hover effects */
.category-nav ul li.active a {
  background: rgba(var(--primary-color-rgb), 0.08);
  color: var(--primary-color);
  font-weight: 500;
}

.category-nav ul li.active a i {
  color: var(--primary-color);
  opacity: 1;
}

.category-nav ul li:not(.active):hover a {
  background: rgba(0,0,0,0.03);
}

.dark-theme .category-nav ul li:not(.active):hover a {
  background: rgba(255,255,255,0.05);
}

/* Item count */
.category-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  background: rgba(0,0,0,0.05);
  border-radius: 12px;
  padding: 2px 8px;
  transition: all 0.2s ease;
}

.category-nav ul li.active .category-count {
  background: rgba(var(--primary-color-rgb), 0.15);
  color: var(--primary-color);
}

/* Footer links */
.sidebar-footer {
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 8px 0;
  color: var(--text-color);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 10px;
  border-radius: 6px;
}

.sidebar-link:hover {
  opacity: 0.7;
  color: var(--primary-color);
}

.sidebar-link i {
  margin-right: 10px;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: all 0.2s ease;
}

.sidebar-link:hover i {
  color: var(--primary-color);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0;
  }
  
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
  }
  
  .content {
    margin-left: 0;
  }
  
  footer {
    margin-left: 0;
  }
  
  .sidebar-backdrop.active {
    display: block;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-logo, .footer-links, .footer-social {
    justify-content: center;
    margin-bottom: var(--spacing-lg);
  }
}

/* 侧边栏背景遮罩 */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10;
  transition: all 0.3s ease;
}

/* Main content area */
.content {
  margin-left: var(--sidebar-width);
  padding: 20px;
  transition: margin-left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  background-color: var(--bg-color); /* 统一背景色 */
}

/* 增强discovery-section的卡片效果 */
.discovery-section {
  background-color: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 15px;
  margin-bottom: 24px;
  position: relative;
  border: 1px solid var(--border-color);
  overflow: hidden; /* 确保内容不溢出圆角 */
}

.discovery-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.powered-badge {
  position: absolute;
  top: -15px;
  right: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.discovery-header h2 {
  font-size: 1.8rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.discovery-header p {
  color: var(--text-light);
  font-size: 1rem;
}

.category-selector, .tags-selector {
  margin-bottom: var(--spacing-lg);
}

.category-selector h3, .tags-selector h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
  font-size: 1.1rem;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.category-buttons button {
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--background-alt);
  border-radius: 50px;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-time);
}

.category-buttons button:hover, .category-buttons button.active {
  background-color: var(--primary-color);
  color: white;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.tags-container button {
  padding: var(--spacing-xs) var(--spacing-md);
  background-color: var(--background-alt);
  border-radius: 50px;
  color: var(--text-color);
  font-size: 0.85rem;
  transition: all var(--transition-time);
}

.tags-container button:hover, .tags-container button.active {
  background-color: var(--accent-color);
  color: white;
}

.discovery-results {
  background-color: var(--background-alt);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  min-height: 200px;
}

.discovery-message {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  font-weight: bold;
}

.discovery-category-message {
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
}

/* 网站卡片部分 */
.websites-section {
  background-color: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 20px;
  border: 1px solid var(--border-color);
  margin-bottom: 30px; /* 增加与footer的间距 */
}

.category-title {
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
  color: var(--text-color);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border-color);
}

.subcategory-title {
  margin: var(--spacing-lg) 0 var(--spacing-md);
  font-size: 1.2rem;
  color: var(--text-light);
}

/* 卡片网格布局优化 - 统一网格设置 */
.website-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 15px;
}

/* 网站卡片优化 - 压缩高度 */
.website-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 10px; /* 进一步减少内边距 */
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--border-color);
  height: 100%;
  min-width: 0;
}

.website-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* 卡片头部 - 水平布局 */
.website-card .card-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start; /* 改回顶部对齐 */
  margin-bottom: 6px; /* 减少下方间距 */
}

/* Logo样式 */
.website-card .card-logo {
  width: 48px;
  height: 48px;
  margin-right: 10px; /* 减少右侧间距 */
  flex-shrink: 0;
  display: flex; /* 增加flex布局 */
  align-items: flex-start; /* 顶部对齐 */
}

.website-card .card-logo img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 卡片内容区 */
.website-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* 确保文本可以正确截断 */
  padding-top: 0; /* 确保内容区顶部无间距 */
}

.website-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0; /* 移除标题上下边距 */
  padding-top: 0; /* 确保标题顶部无间距 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2; /* 减少行高 */
}

.website-card .card-description {
  font-size: 0.8rem; /* 减小字体 */
  color: var(--text-light);
  line-height: 1.2; /* 进一步减少行高 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 2px 0 0 0; /* 减少上边距 */
  max-height: 2.4em; /* 限制最大高度 */
}

/* 底部按钮区域 */
.website-card .card-actions {
  display: flex;
  justify-content: space-between;
  margin-top: auto; /* 推到底部 */
  padding-top: 5px; /* 减少上边距 */
  margin-top: 4px; /* 减少与描述的间距 */
  border-top: 1px solid var(--border-color);
}

/* 按钮样式 */
.website-card .action-btn {
  width: 28px; /* 减小按钮尺寸 */
  height: 28px; /* 减小按钮尺寸 */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--background-alt);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  font-size: 0.85rem; /* 减小图标尺寸 */
}

.website-card .action-btn:hover {
  background: var(--primary-color);
  color: white;
}

/* AI模型卡片特殊样式 */
.website-card[href*="openai.com/dall-e"],
.website-card[href*="stability.ai"],
.website-card[href*="gemini.google.com"],
.website-card[href*="runwayml.com"],
.website-card[href*="midjourney.com"] {
  border-left: 4px solid #1967d2;
}

.website-card[href*="openai.com/dall-e"]:hover,
.website-card[href*="stability.ai"]:hover,
.website-card[href*="gemini.google.com"]:hover,
.website-card[href*="runwayml.com"]:hover,
.website-card[href*="midjourney.com"]:hover {
  border-left-color: #0d47a1;
}

/* 新增分类样式 */
.category-view-all {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 500;
  margin-top: 0.5rem;
  cursor: pointer;
  display: inline-block;
}

.category-view-all:hover {
  text-decoration: underline;
}

.subcategories-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.subcategory-item {
  background-color: var(--bg-color);
  border-radius: 12px;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.subcategory-item:hover {
  background-color: var(--primary-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.subcategory-item.active {
  background-color: var(--primary-color);
  color: white;
}

.subcategory-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.subcategory-item.active i {
  color: white;
}

.subcategory-item span {
  font-weight: 500;
}

.subcategory-count {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 0.8rem;
  margin-left: 5px;
}

.subcategory-item.active .subcategory-count {
  background: rgba(255, 255, 255, 0.2);
}

/* 响应式布局 - 统一媒体查询 */
@media (max-width: 1200px) {
  .website-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .website-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .website-cards {
    grid-template-columns: 1fr;
  }
  
  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .category-header h2::after {
    display: none;
  }
}

/* 垂直悬浮栏 */
.floating-nav {
  position: fixed;
  right: var(--spacing-lg);
  bottom: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  z-index: 100;
}

.float-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--shadow-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.float-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

/* 增强型垂直悬浮栏样式 */
#footer-tools {
  position: fixed;
  right: var(--spacing-lg);
  bottom: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  z-index: 101;
}

.enhanced-btn, #footer-tools .btn {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  margin: 5px 0;
  text-decoration: none;
  padding: 0;
}

.enhanced-btn i, #footer-tools .btn i {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.enhanced-btn .btn-text, #footer-tools .btn-text {
  position: absolute;
  white-space: nowrap;
  transition: all 0.3s ease;
  color: white;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  right: 15px;
  transform: translateX(20px);
}

.enhanced-btn:hover, #footer-tools .btn:hover {
  width: 140px;
  border-radius: 24px;
}

.enhanced-btn:hover i, #footer-tools .btn:hover i {
  left: 24px;
  transform: translateX(0);
}

.enhanced-btn:hover .btn-text, #footer-tools .btn:hover .btn-text {
  opacity: 1;
  transform: translateX(0);
}

/* 搜索按钮样式 */
.search-icon-btn {
  background: linear-gradient(135deg, #1a73e8, #4285f4);
  color: white;
}

.search-icon-btn:hover {
  background: linear-gradient(135deg, #0d62d1, #1a73e8);
}

/* AI 助手按钮样式 */
.ai-icon-btn {
  background: linear-gradient(135deg, #6200ea, #9c27b0);
  color: white;
}

.ai-icon-btn:hover {
  background: linear-gradient(135deg, #5000d1, #8a00a7);
}

/* 返回顶部按钮样式 */
.go-up {
  background: linear-gradient(135deg, #41b883, #2cb5e8);
  color: white;
}

.go-up:hover {
  background: linear-gradient(135deg, #329d6e, #23a8d8);
}

/* 客服按钮样式 */
.kefu {
  background: linear-gradient(135deg, #007bff, #00a5ff);
  color: white;
}

.kefu:hover {
  background: linear-gradient(135deg, #0069d9, #0095e8);
}

/* 夜间模式按钮样式 */
.switch-dark-mode {
  background: linear-gradient(135deg, #333, #666);
  color: #f8f9fa;
}

.switch-dark-mode:hover {
  background: linear-gradient(135deg, #222, #555);
}

/* 按钮动画效果 */
.enhanced-btn.attention, #footer-tools .btn.attention {
  animation: brightnessAnimation 1s infinite alternate;
}

@keyframes brightnessAnimation {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.3); }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(26, 115, 232, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 115, 232, 0);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(98, 0, 234, 0.5);
  }
  100% {
    box-shadow: 0 0 20px rgba(156, 39, 176, 0.8);
  }
}

/* 搜索模态框样式增强 */
.search-modal .modal-dialog {
  max-width: 800px;
}

.search-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal-header {
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
}

.search-box-container {
  margin-bottom: 25px;
}

.search-input {
  height: 60px;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

/* 响应式调整 */
@media (max-width: 767px) {
  #footer-tools {
    right: 10px;
    bottom: 70px;
  }
  
  .enhanced-btn, #footer-tools .btn {
    width: 42px;
    height: 42px;
    margin: 3px 0;
  }
  
  .enhanced-btn .btn-text, #footer-tools .btn-text {
    display: none;
  }
}

/* main-footer 样式 */
.main-footer {
  display: none; /* 默认隐藏，因为我们只需要使用footer-tools部分 */
}

/* 页脚样式 */
footer {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: white;
  padding: var(--spacing-xl) var(--spacing-lg);
  margin-left: var(--sidebar-width); /* 与content区域对齐，不被侧边栏遮挡 */
  position: relative;
  border-radius: 16px 16px 0 0; /* 增加圆角顶部边缘 */
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05); /* 添加上方阴影 */
  border-top: none;
  transition: all var(--transition-time), margin-left var(--transition-time);
}

/* 在移动设备上全宽显示 */
@media (max-width: 768px) {
  footer {
    margin-left: 0;
  }
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start; /* 改为顶部对齐 */
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: var(--spacing-lg);
  gap: 30px; /* 增加间距 */
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.footer-logo i {
  font-size: 1.5rem;
  margin-right: var(--spacing-sm);
  color: white; /* 图标改为白色 */
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2)); /* 添加阴影效果 */
}

.footer-logo span {
  font-weight: bold;
  font-size: 1.2rem;
  color: white; /* 文字改为白色 */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* 添加文字阴影 */
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px; /* 增加链接间距 */
  margin-bottom: var(--spacing-md);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s;
  position: relative;
  padding-left: 15px; /* 为箭头图标留出空间 */
}

.footer-links a:before {
  content: "→"; /* 添加箭头图标 */
  position: absolute;
  left: 0;
  opacity: 0;
  transition: all 0.3s;
}

.footer-links a:hover {
  color: white;
  transform: translateX(5px); /* 悬停时向右移动效果 */
}

.footer-links a:hover:before {
  opacity: 1; /* 悬停时显示箭头 */
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15); /* 半透明背景 */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-time);
  color: white;
}

.footer-social a:hover {
  background-color: white;
  color: var(--primary-color);
  transform: translateY(-5px) rotate(5deg); /* 上移并微微旋转 */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.footer-copyright {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.2); /* 半透明分隔线 */
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0;
  }
  
  .sidebar {
    position: fixed;
    left: -240px;
    top: var(--header-height);
    width: 240px;
    height: calc(100vh - var(--header-height));
    z-index: 999;
    transition: left var(--transition-time);
  }
  
  .sidebar.active {
    left: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }
  
  .logo {
    margin-left: 40px;
  }
  
  .menu-toggle {
    display: flex;
    margin-right: 10px;
  }
  
  .search-bar {
    width: 60%;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-logo, .footer-links, .footer-social {
    justify-content: center;
    margin-bottom: var(--spacing-lg);
  }
  
  .website-cards {
    grid-template-columns: 1fr;
  }
  
  .discovery-section {
    background-color: var(--bg-color);
    border-radius: 16px; /* 增加圆角 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* 添加轻微阴影 */
    padding: 15px; /* 增加内边距 */
    margin-bottom: 24px; /* 增加下方间距 */
    position: relative;
  }
} 

/* Optimized loading styles */
.lazy-load {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lazy-load.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Bootstrap compatibility fixes */
.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.btn-primary:hover {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
}

/* Mobile menu toggle button */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  color: var(--text-color);
  border-radius: 50%;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.menu-toggle:hover {
  background-color: var(--background-alt);
  color: var(--primary-color);
}

.menu-toggle:focus {
  outline: none;
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .logo {
    margin-left: 10px;
  }
  
  body.sidebar-open {
    overflow: hidden;
  }
}

/* Bootstrap compatibility classes */
.d-md-none {
  display: none;
}

@media (max-width: 768px) {
  .d-md-none {
    display: flex;
  }
  
  .sidebar {
    position: fixed;
    left: -240px;
    top: var(--header-height);
    width: 240px;
    height: calc(100vh - var(--header-height));
    z-index: 999;
    transition: left var(--transition-time);
  }
  
  .sidebar.active {
    left: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }
  
  .search-bar {
    width: 60%;
  }
  
  .discovery-section {
    padding: var(--spacing-md);
  }
} 

/* 分类部分 */
/* categories-section优化 - 压缩高度，增加视觉效果 */
.categories-section {
  background-color: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

/* 增强category-header样式 - 改为水平布局 */
.category-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.category-header h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin: 0;
  padding-right: 16px;
  position: relative;
}

/* 在标题后添加一个分隔符 */
.category-header h2::after {
  content: "•";
  position: absolute;
  right: 0;
  color: var(--primary-color);
  opacity: 0.7;
}

.category-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}

/* 小屏幕上的响应式布局 */
@media (max-width: 576px) {
  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .category-header h2::after {
    display: none;
  }
}

.subcategories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.subcategory-item {
    background-color: var(--bg-color);
    border-radius: 12px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.subcategory-item:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.subcategory-item.active {
    background-color: var(--primary-color);
    color: white;
}

.subcategory-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.subcategory-item.active i {
    color: white;
}

.subcategory-item span {
    font-weight: 500;
}

.subcategory-count {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.subcategory-item.active .subcategory-count {
    background: rgba(255, 255, 255, 0.2);
}

/* 暗黑模式适配 */
.dark-theme .categories-section {
    background-color: var(--bg-color-secondary);
}

.dark-theme .subcategory-item {
    background-color: var(--bg-color);
}

.dark-theme .subcategory-item:hover {
    background-color: var(--primary-color-dark);
}

/* 响应式布局调整 */
@media (max-width: 768px) {
    .subcategories-container {
        gap: 10px;
    }
    
    .subcategory-item {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
} 

/* 子分类区域样式 */
.subcategory-section {
  margin-bottom: 3rem;
}

.subcategory-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.subcategory-heading h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.subcategory-heading .website-count {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: normal;
}

.subcategory-heading.full-view {
  margin-bottom: 1.5rem;
}

.subcategory-heading .back-button {
  background-color: var(--background-alt);
  border: none;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.subcategory-heading .back-button:hover {
  background-color: var(--primary-color);
  color: white;
}

/* 查看所有按钮 */
.view-more-section {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.view-more-btn {
  background-color: var(--background-alt);
  border: none;
  border-radius: 30px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px var(--shadow-color);
}

.view-more-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-color);
}

/* 分类模态框 */
.categories-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.categories-modal-content {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

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

.categories-modal-header h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-light);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-modal:hover {
  background-color: var(--background-alt);
  color: var(--primary-color);
}

.categories-modal-body {
  padding: 1.5rem;
}

.category-section {
  margin-bottom: 2rem;
}

.category-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--text-color);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

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

.subcategory-list-item {
  background-color: var(--background-alt);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subcategory-list-item:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.subcategory-list-item .count {
  color: var(--text-light);
  font-size: 0.8rem;
}

.subcategory-list-item:hover .count {
  color: rgba(255, 255, 255, 0.8);
}

/* 分享选项样式 */
.share-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 10px 0;
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 15px;
  width: 80px;
  height: 90px;
  text-align: center;
  transition: all 0.2s ease;
}

.share-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  background-color: #fff;
}

.share-option i {
  margin-bottom: 8px;
}

.share-option span {
  font-size: 12px;
  font-weight: 500;
}

.share-text-container {
  background-color: #f5f8fc;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.share-text-container .form-label {
  color: #555;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.share-text-container .form-control {
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  resize: none;
  transition: border-color 0.2s ease;
}

.share-text-container .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

#qrcode {
  margin: 0 auto;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 添加更多空间给社交分享图标 */
.footer-social {
  gap: 15px !important;
}

/* 网站卡片促销标签样式 */
/* 促销样式1: 角标设计 - 用于显示Bonus */
.website-card {
    position: relative; /* 确保卡片设置为relative定位以支持角标 */
}

/* 斜角标样式 */
.promo-corner-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    z-index: 1;
    pointer-events: none; /* 防止角标阻挡点击 */
}

.promo-corner-ribbon::before {
    content: attr(data-promo);
    position: absolute;
    display: block;
    width: 150px;
    padding: 5px 0;
    background-color: #f39c12; /* bonus颜色 */
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    top: 23px;
    right: -45px;
    transform: rotate(45deg);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 促销样式2: 圆形角标 - 用于显示Free Trial */
.promo-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 56px;
    height: 56px;
    background: #2ecc71; /* free trial颜色 */
    border-radius: 50%;
    color: white;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    pointer-events: none; /* 防止角标阻挡点击 */
    border: 2px solid white;
}

/* 新闻和内容卡片样式 */
.news-grid, .reddit-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* 新闻卡片样式 */
.news-card {
  background-color: var(--card-bg, #ffffff);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.news-image {
  height: 160px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-content {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  color: var(--text-color, #333);
}

.news-description {
  font-size: 0.85rem;
  color: var(--text-secondary, #666);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  flex: 1;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  margin-bottom: 0.5rem;
}

.news-source {
  font-weight: 500;
}

.news-date {
  font-style: italic;
}

.news-link {
  font-size: 0.8rem;
  color: var(--primary-color, #0077cc);
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
  transition: color 0.2s ease;
}

.news-link:hover {
  color: var(--primary-hover, #005fa3);
  text-decoration: underline;
}

/* Reddit 卡片样式 */
.reddit-post {
  background-color: var(--card-bg, #ffffff);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 0.75rem;
  margin-bottom: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.reddit-post:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.post-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  color: var(--text-color, #333);
}

.post-content {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary, #666);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted, #888);
}

.post-subreddit {
  font-weight: 500;
  color: var(--primary-color, #0077cc);
}

.post-author, .post-time {
  color: var(--text-muted, #888);
}

.post-stats {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

.post-upvotes, .post-comments {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-upvotes i, .post-comments i {
  font-size: 0.85rem;
}

/* 加载指示器样式 */
.loading-indicator {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted, #888);
}

.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(0,0,0,0.1);
  border-top: 2px solid var(--primary-color, #0077cc);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误消息样式 */
.error-message {
  text-align: center;
  padding: 2rem;
  color: var(--error-color, #e53935);
}

.error-message i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.error-message h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.error-message p {
  font-size: 0.9rem;
  color: var(--text-secondary, #666);
}

/* 分类选择器样式 */
.category-selector {
  margin-bottom: 1rem;
}

.category-selector select {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  border-radius: 4px;
  border: 1px solid var(--border-color, #ddd);
  background-color: var(--input-bg, #fff);
  color: var(--text-color, #333);
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .news-card, .reddit-post {
    background-color: var(--card-bg-dark, #2d2d2d);
  }
  
  .news-title, .post-title {
    color: var(--text-color-dark, #e0e0e0);
  }
  
  .news-description, .post-content {
    color: var(--text-secondary-dark, #b0b0b0);
  }
  
  .news-meta, .post-meta {
    color: var(--text-muted-dark, #909090);
  }
}

/* Reddit 缩略图样式 */
.post-thumbnail {
  height: 160px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  border-radius: 6px;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.reddit-post:hover .post-thumbnail img {
  transform: scale(1.05);
}

/* 内容容器基本样式 */
.content-container {
  min-height: 200px;
}

/* 卡片容器基本样式 */
.card-body {
  padding: 1rem;
}

/* 卡片头部样式 */
.card-header {
  background-color: var(--card-header-bg, rgba(0,0,0,0.03));
  padding: 0.75rem 1rem;
}

/* 分类标题样式 */
.card-header h3 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 600;
}

/* 最后更新时间样式 */
.card-header small {
  display: block;
  color: var(--text-muted, #888);
  font-size: 0.8rem;
} 