:root {
  /* 主色调 - 天蓝色 */
  --primary-color: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --accent-color: #ffd700;
  --accent-light: #ffe566;
  --accent-dark: #e6c200;
  
  /* 文本颜色 */
  --text-color: #2d2d2d;
  --text-medium: #555555;
  --text-light: #777777;
  --text-white: #ffffff;
  --text-dark: #2d2d2d;
  
  /* 背景颜色 */
  --bg-color: #f8f9fa;
  --bg-light: #f8f9fa;
  --bg-medium: #eaeaea;
  --bg-white: #ffffff;
  --border-color: #dee2e6;
  --card-bg: #ffffff;
  
  /* 主题渐变 */
  --bg-gradient-1: linear-gradient(135deg, #f5f7fa 0%, #e4ebf5 100%);
  --bg-gradient-2: linear-gradient(135deg, #f0f4ff 0%, #e4ebf5 100%);
  --bg-gradient-3: linear-gradient(135deg, #f3f0ff 0%, #eaf5ff 100%);
  
  /* 主题背景和边框 */
  --primary-bg: rgba(59, 130, 246, 0.05);
  --primary-bg-hover: rgba(59, 130, 246, 0.1);
  --primary-bg-active: rgba(59, 130, 246, 0.2);
  --primary-border: rgba(59, 130, 246, 0.2);
  --accent-bg: rgba(255, 215, 0, 0.1);
  
  /* 阴影 */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);
  --shadow-inset: inset 0 1px 3px rgba(0,0,0,0.05);
  
  /* 圆角 */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* 动画 */
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
  --transition-slow: all 0.5s ease;
  
  /* 间距 */
  --spacing-xxs: 4px;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  
  /* 布局 */
  --sidebar-width: 120px;
  --container-width: 1200px;
  --header-height-mobile: 60px;
  
  /* 代码颜色 */
  --code-color: #d63384;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
}

/* 菜单打开时锁定滚动 */
body.menu-open {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: #18181b;
  transition: var(--transition-normal);
}

a:hover {
  color: #52525b;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* 通用标题样式 */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: calc(var(--spacing-xl) * 0.7);
  color: var(--primary-color);
  position: relative;
  padding-bottom: var(--spacing-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 3px;
}

/* 标题容器，允许标题和按钮并排 */
.title-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: calc(var(--spacing-xl) * 0.7);
  position: relative;
}

/* 当在标题容器内时，调整标题样式 */
.title-container .section-title {
  margin-bottom: 0;
}

/* 调整查看全部模型链接的样式 */
.title-container .view-all-models-link {
  position: relative;
  top: -3px;
}

/* 媒体查询，在小屏幕上自适应 */
@media (max-width: 768px) {
  .title-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .title-container .view-all-models-link {
    top: 0;
  }
}

/* 通用卡片样式 */
.card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* 通用按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: var(--text-white);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--text-dark);
}

.btn-accent:hover {
  background-color: var(--accent-dark);
  color: var(--text-dark);
}

/* 通用高亮文本 */
.highlight {
  display: inline-block;
  background-color: var(--accent-bg);
  padding: 0 8px;
  margin: 0 2px;
  border-radius: 4px;
  color: var(--text-dark);
  font-weight: 600;
}

/* 通用列表样式 */
.feature-list {
  list-style: none;
  padding-left: 5px;
}

.feature-list li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 24px;
}

.feature-list li:before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 1.2em;
}

/* ========== 侧边导航（黑白简洁风格） ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  height: 100vh;
  width: var(--sidebar-width);
  background-color: #fff;
  border-right: 1px solid #e4e4e7;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  transition: var(--transition-normal);
}

.nav-title {
  display: none;
}

.nav-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 10px;
  width: 100%;
}

.logo-container {
  display: none;
}

.hamburger-menu {
  display: none;
}

.nav-links-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nav-divider {
  display: none;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.internal-links .nav-link {
  color: #52525b;
  font-weight: 400;
  font-size: 13px;
}

.external-links .nav-link {
  color: #71717a;
  font-size: 13px;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: block;
  white-space: nowrap;
  font-size: 13px;
  color: #52525b;
  text-decoration: none;
}

.nav-link:hover {
  background-color: #f4f4f5;
  color: #18181b;
}

/* 导航链接激活状态 */
.nav-link.active {
  background-color: #f4f4f5;
  color: #18181b;
  font-weight: 500;
}

/* 底部按钮容器 */
.nav-bottom-buttons {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid #e4e4e7;
}

/* 首页导航项特殊样式 */
.nav-link.home-link {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-icon {
  font-size: 1rem;
}

/* 导航图标样式 */
.nav-icon {
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  margin-right: 6px;
  opacity: 0.9;
}

.social-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: middle;
}

/* AI助手容器样式 */
.ai-assistant-container {
  margin-top: auto;
  padding: 10px 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 15px;
}

#sidebar-ai-assistant {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 5px;
}

/* 自定义AI助手按钮样式 */
.sidebar-chatbot-button {
  width: 100px !important;
  height: 50px !important;
  border-radius: 25px !important;
  background-color: var(--primary-color) !important;
  box-shadow: var(--shadow-md) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: var(--transition-normal) !important;
  border: none !important;
  outline: none !important;
  margin: 10px auto !important;
  position: relative !important;
  text-align: center !important;
  padding: 0 15px !important;
  overflow: visible !important;
}

/* 隐藏原始图标 */
.sidebar-chatbot-button svg,
.sidebar-chatbot-button img {
  display: none !important;
}

.sidebar-chatbot-button:hover {
  transform: scale(1.05) !important;
  background-color: var(--primary-dark) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* 主内容区域调整 */
.main-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  transition: var(--transition-normal);
}

/* Footer Styles */
.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 60px;
}

/* 添加装饰元素 */
.footer::before,
.footer::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.03);
  z-index: 0;
}

.footer::before {
  top: -150px;
  left: -150px;
}

.footer::after {
  bottom: -150px;
  right: -150px;
}

.footer-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.footer-link {
  color: white;
  font-size: 0.95rem;
  opacity: 0.9;
  transition: var(--transition-fast);
  position: relative;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-color);
  transition: var(--transition-normal);
}

.footer-link:hover {
  color: var(--accent-color);
  opacity: 1;
}

.footer-link:hover::after {
  width: 100%;
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Toast Messages */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--primary-color);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-error {
  background-color: #e74c3c;
}

.toast-success {
  background-color: var(--primary-color);
}

/* 加载中动画 */
.loading-placeholder {
  width: 100%;
  padding: 30px;
  text-align: center;
  border-radius: var(--radius-md);
  background-color: var(--primary-bg);
  border: 1px solid var(--primary-border);
}

.loading-text {
  font-size: 1rem;
  color: var(--text-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-text::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-message {
  color: #e74c3c;
  font-weight: bold;
  padding: 15px;
  border-radius: var(--radius-md);
  background-color: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
  /* 页面遮罩 */
  body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    pointer-events: none;
  }
  
  body.menu-open::after {
    visibility: visible;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
  }
  
  /* 左侧导航在移动设备上改为顶部 */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 1000;
    padding: 0;
    flex-direction: row;
    border-bottom: 1px solid var(--primary-border);
    border-right: none;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .nav-title {
    display: none; /* 在移动设备上隐藏导航标题以节省空间 */
  }
  
  .nav-container {
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-direction: row;
    width: 100%;
  }
  
  .nav-links-container {
    flex-direction: row;
    padding: 5px;
    width: 100%;
    overflow-x: auto;
    margin: 0;
  }
  
  .nav-links {
    flex-direction: row;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  
  .nav-link {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .nav-divider {
    width: 1px;
    height: 20px;
    margin: 0 10px;
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    margin-top: var(--header-height-mobile); /* 为固定顶部导航留出空间 */
  }
  
  .ai-assistant-container {
    display: none; /* 在移动端隐藏侧边栏的AI助手按钮 */
  }
  
  /* 在移动设备上显示默认的Dify按钮 */
  #dify-chatbot-bubble-button {
    display: flex !important;
    background-color: var(--primary-color) !important;
    box-shadow: var(--shadow-md) !important;
    transition: var(--transition-normal) !important;
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
  }
  
  #dify-chatbot-bubble-button:hover {
    transform: scale(1.05) !important;
    box-shadow: var(--shadow-lg) !important;
  }
}

/* 在桌面设备上隐藏默认的Dify按钮 */
@media (min-width: 769px) {
  #dify-chatbot-bubble-button {
    display: none !important;
  }
}

#dify-chatbot-bubble-window {
  width: 24rem !important;
  height: 40rem !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* 下拉菜单样式 */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  min-width: 120px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--primary-border);
  z-index: 10;
  padding: 5px;
}

.dropdown:hover .dropdown-content {
  display: flex;
  flex-direction: column;
}

.dropdown-item {
  padding: 8px 10px;
  color: var(--text-dark);
  font-size: 11.5px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--primary-bg-hover);
}

/* ========== 语言切换器样式 ========== */
.lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1001;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #18181b;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.lang-btn:hover {
  background: #fafafa;
  border-color: #d4d4d8;
}

.lang-icon {
  font-size: 16px;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  min-width: 100%;
}

.lang-dropdown.show {
  display: block;
}

.lang-option {
  padding: 10px 16px;
  font-size: 14px;
  color: #18181b;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.lang-option:hover {
  background: #f4f4f5;
}

.lang-option.active {
  background: #f4f4f5;
  font-weight: 500;
}

@media (max-width: 768px) {
  .lang-switcher {
    top: auto;
    bottom: 80px;
    right: 16px;
  }

  .lang-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* ========== 新版页脚样式（OpenRouter风格） ========== */
.footer-new {
  background: #fff;
  border-top: 1px solid #e4e4e7;
  padding: 20px 0;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.footer-copyright {
  font-size: 14px;
  color: #71717a;
  white-space: nowrap;
  flex-shrink: 0;
}

.footer-new .footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.footer-new .footer-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #71717a;
  border-radius: 4px;
  transition: all 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.footer-new .footer-icon-link:hover {
  color: #18181b;
  background: #f4f4f5;
}

/* X下拉菜单 */
.footer-new .footer-x-dropdown {
  position: relative;
}

.footer-new .footer-x-btn {
  padding: 0;
}

.footer-new .footer-x-menu {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 160px;
  z-index: 100;
  padding-bottom: 12px;
  margin-bottom: 0;
}

/* 添加透明连接区域，防止鼠标移动时菜单消失 */
.footer-new .footer-x-menu::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.footer-new .footer-x-dropdown:hover .footer-x-menu {
  display: block;
}

/* 小三角箭头 */
.footer-new .footer-x-menu::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #fff;
  border-right: 1px solid #e4e4e7;
  border-bottom: 1px solid #e4e4e7;
  transform: translateX(-50%) rotate(45deg);
  z-index: -1;
}

.footer-new .footer-x-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: #18181b;
  text-decoration: none;
  transition: background 0.15s ease;
}

.footer-new .footer-x-item:hover {
  background: #f4f4f5;
}

.footer-new .footer-x-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-new .footer-x-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    gap: 16px;
  }

  .footer-x-menu {
    left: auto;
    right: 0;
    transform: none;
  }

  .footer-x-menu::after {
    left: auto;
    right: 10px;
    transform: rotate(45deg);
  }
} 