/**
 * 前沿AIGC资讯 - 新主题CSS文件
 * 优化版本：合并重复、删除未用、保留核心功能
 */

/* ===== 全局样式 ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text-100);
  background-color: var(--color-bg-100);
}

/* ===== 自定义颜色变量 ===== */
:root {
  --color-primary: #0085ff;
  --color-secondary: #69b4ff;
  --color-dark: #1E1E1E;
  --color-dark-light: #2d2d2d;
  --color-gray-custom: #9e9e9e;
  --color-accent: #006fff;
  --color-accent-light: #e1ffff;
  --color-bg-100: #1E1E1E;
  --color-bg-200: #2d2d2d;
  --color-bg-300: #454545;
  --color-text-100: #FFFFFF;
  --color-text-200: #9e9e9e;
  --color-primary-100: #0085ff;
  --color-primary-200: #69b4ff;
  --color-primary-300: #e0ffff;
}

/* ===== 基础组件样式 ===== */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-100);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.btn-secondary {
  background-color: var(--color-dark-light);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #404040;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #404040;
  border-color: #505050;
}

.card {
  background-color: var(--color-dark-light);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

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

.input {
  background-color: var(--color-dark);
  border: 1px solid #404040;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: white;
  transition: border-color 0.3s ease;
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.link {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* ===== 移动端菜单按钮统一样式 ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #8E8E93;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.mobile-menu-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn:active {
  transform: scale(0.95);
}

.mobile-menu-btn i {
  display: block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
}

/* 在移动端显示菜单按钮，PC端隐藏 */
@media (max-width: 1023px) {
  .mobile-menu-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 6px !important;
    margin-right: 0.5rem !important;
  }
  
  .lg\:hidden {
    display: block !important;
  }
}

/* PC端隐藏移动端菜单按钮 */
@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none !important;
  }
}

/* ===== 布局样式 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.space-x-2>*+* { margin-left: 0.5rem; }
.space-x-4>*+* { margin-left: 1rem; }
.space-y-2>*+* { margin-top: 0.5rem; }
.space-y-4>*+* { margin-top: 1rem; }

/* ===== 间距样式 ===== */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.m-5 { margin: 1.25rem; }
.m-6 { margin: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

/* ===== 文本样式 ===== */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-white { color: white; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-primary { color: var(--color-primary); }

/* ===== 背景样式 ===== */
.bg-dark { background-color: var(--color-dark); }
.bg-dark-light { background-color: var(--color-dark-light); }
.bg-primary { background-color: var(--color-primary); }
.bg-gray-600 { background-color: #4b5563; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }

/* ===== 边框样式 ===== */
.border { border: 1px solid #404040; }
.border-t { border-top: 1px solid #404040; }
.border-b { border-bottom: 1px solid #404040; }
.border-gray-700 { border-color: #374151; }
.border-gray-800 { border-color: #1f2937; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ===== 阴影样式 ===== */
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-apple {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.shadow-apple-hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* ===== 过渡动画 ===== */
.transition-all { transition: all 0.3s ease; }
.transition-colors { transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; }
.transition-transform { transition: transform 0.3s ease; }

/* ===== 工具类 ===== */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.w-auto { width: auto; }
.h-auto { height: auto; }

/* ===== 文本截断样式 ===== */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 新闻卡片样式 ===== */
.news-card {
  background-color: var(--color-dark-light);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.news-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.news-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.news-card-title a {
  color: inherit;
  text-decoration: none;
}

.news-card-excerpt {
  color: #8E8E93;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.news-card-meta {
  font-size: 0.75rem;
  color: #8E8E93;
}

.news-card-content {
  padding: 1.5rem;
}

/* 图片容器样式 */
.image-container {
  position: relative;
  overflow: hidden;
  background-color: #333;
  min-height: 200px;
  width: 33.333333%;
  min-width: 200px;
  aspect-ratio: 16/9;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* 懒加载图片样式 */
.lazy {
  opacity: 0.3;
  transition: opacity 0.3s ease;
  background-color: #333;
}

.lazy.loaded {
  opacity: 1;
}

/* ===== 顶部导航样式 ===== */
.top-header {
  background: rgba(44, 44, 46, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #232323;
  padding: 0.5rem 2rem 0.5em 0;
  z-index: 30;
}

.top-header .search-box {
  position: relative;
  margin-left: 1rem;
}

.top-header .search-input {
  background: #232323;
  border: 1px solid #404040;
  border-radius: 9999px;
  padding: 0.5rem 1.5rem 0.5rem 2.5rem;
  color: #fff;
  font-size: 0.95rem;
  width: 16rem;
  transition: border 0.2s, box-shadow 0.2s;
}

.top-header .search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0,133,255,0.15);
}

.top-header .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8E8E93;
  font-size: 1rem;
}

/* ===== 侧边栏样式 ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 256px;
  height: 100vh;
  background: #2C2C2E;
  border-right: 1px solid #404040;
  z-index: 30;
  transition: transform 0.3s ease;
  transform: translateX(-100%);
}

.sidebar.lg\\:translate-x-0,
.sidebar[class*="lg:translate-x-0"] {
  transform: translateX(0);
}

.sidebar-nav {
  padding: 1.5rem 1rem 1rem 1rem !important;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: background 0.2s, color 0.2s;
  color: #d1d5db;
  font-size: 1rem;
  text-decoration: none;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(0,133,255,0.08);
  color: var(--color-primary);
}

.nav-item i {
  min-width: 1.25rem;
  text-align: center;
}

.nav-item span {
  margin-left: 0.75rem;
}

.main-content {
  margin-left: 0;
  transition: margin-left 0.3s ease;
}

.main-content.lg\\:ml-64,
.main-content[class*="lg:ml-64"] {
  margin-left: 256px;
}

/* ===== 轮播图样式 ===== */
.hero-slider {
  position: relative;
}

.hero-slide {
  transition: opacity 0.5s ease-in-out;
}

.hero-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  z-index: 10;
  color: white;
  pointer-events: auto;
}

.hero-title {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: color 0.3s ease;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.hero-description {
  color: #d1d5db;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
  line-height: 1.5;
  max-width: 32rem;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.hero-meta {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #9ca3af;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.carousel-controls {
  z-index: 5;
  pointer-events: none;
}

.carousel-prev,
.carousel-next {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.3s;
  z-index: 6;
}

.hero-slider:hover .carousel-prev,
.hero-slider:hover .carousel-next {
  opacity: 1;
  pointer-events: auto;
}

.carousel-dots {
  z-index: 5;
  pointer-events: none;
}

.carousel-dot {
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  z-index: 6;
}

.carousel-dot:hover {
  transform: scale(1.2);
}

/* ===== 加载状态样式 ===== */
.loading-indicator {
  transition: opacity 0.3s ease;
}

.loading-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

.no-more-content {
  transition: opacity 0.3s ease;
}

.no-more-content.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== 动画样式 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

.news-card {
  animation: fadeInUp 0.5s ease-out;
}

/* ===== 卡片悬停效果 ===== */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
}

/* ===== 响应式设计 ===== */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:block { display: block; }
  .md\:w-1\/3 { width: 33.333333%; }
  .md\:w-2\/3 { width: 66.666667%; }
  
  .image-container {
    min-height: 100%;
  }
  
  .hero-title {
    font-size: 1.875rem;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none; }
  .lg\:block { display: block; }
  .lg\:translate-x-0 { transform: translateX(0) !important; }
}

/* ===== PC端侧边栏样式 ===== */
@media (min-width: 1024px) {
  .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 256px !important;
    height: 100vh !important;
    z-index: 30 !important;
    background: #2C2C2E !important;
    border-right: 1px solid #404040 !important;
    transform: translateX(0) !important;
    transition: transform 0.3s ease;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .sidebar.lg\\:translate-x-0,
  .sidebar[class*="lg:translate-x-0"] {
    transform: translateX(0) !important;
  }
  
  .main-content {
    margin-left: 256px !important;
  }
  
  .main-content.lg\\:ml-64,
  .main-content[class*="lg:ml-64"] {
    margin-left: 256px !important;
  }
  
  /* 强制PC端显示侧边栏 */
  aside.sidebar {
    transform: translateX(0) !important;
  }
}

/* ===== 移动端样式 ===== */
@media (max-width: 1023px) {
  .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 50 !important;
    background: #2C2C2E !important;
    border-right: 1px solid #404040 !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5) !important;
    overflow-y: auto !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease;
  }
  
  .sidebar.show,
  .sidebar:not(.-translate-x-full) {
    transform: translateX(0) !important;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
  
  .main-content.lg\\:ml-64,
  .main-content[class*="lg:ml-64"] {
    margin-left: 0 !important;
  }
  
  .mobile-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 40 !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-overlay.show,
  .mobile-overlay:not(.opacity-0) {
    opacity: 1;
    visibility: visible;
  }
  
  .top-header {
    background: rgba(44, 44, 46, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(64, 64, 64, 0.5) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    padding: 0.375rem 1rem !important;
    min-height: 52px !important;
  }
  
  .top-header > .flex {
    padding: 0.375rem 0 !important;
    align-items: center;
    justify-content: space-between;
    height: 100% !important;
  }
  
  .top-header .search-input {
    width: 8rem;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem 0.375rem 2rem;
  }
  
  .top-header .search-box {
  position: relative;
    min-width: 120px;
  }
  
  .top-header .search-icon {
    font-size: 0.875rem;
    left: 0.75rem;
  }
  
  /* 手机版顶部右侧图标样式 */
  .top-header .flex.items-center.space-x-4 {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }
  
  .top-header .flex.items-center.space-x-4 button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 32px !important;
    min-height: 32px !important;
    color: #8E8E93 !important;
    transition: color 0.3s ease !important;
    position: relative !important;
  }
  
  /* 通知按钮右上角的红色圆形图标 */
  .top-header .flex.items-center.space-x-4 button span {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    background-color: var(--color-primary) !important;
    color: white !important;
    font-size: 0.625rem !important;
    border-radius: 50% !important;
    width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    line-height: 1 !important;
  }
  
  .top-header .flex.items-center.space-x-4 button:hover {
    color: #ffffff !important;
  }
  
  .top-header .flex.items-center.space-x-4 .flex.items-center {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  
  .top-header .flex.items-center.space-x-4 img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
  }
}

@media (max-width: 768px) {
  .news-card-content {
    padding: 1rem;
  }
  
  .hero-content {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .image-container {
    width: 100%;
    min-width: auto;
    aspect-ratio: 16/9;
  }
  
  .md\:w-2\/3 {
    width: 100%;
  }
  
  .news-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .news-card-meta .flex.items-center.space-x-2 {
    width: 100%;
    justify-content: space-between;
  }
  
  .news-card-meta .bg-gray-800 {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
  }
  
  .carousel-controls {
    padding: 0 1rem;
  }
  
  .carousel-prev,
  .carousel-next {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .carousel-dots {
    top: 1rem;
    right: 1rem;
  }
  
  .carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
  }
  
  .top-header {
    padding: 0.375rem 0.5rem;
    min-height: 48px;
  }
  
  .top-header .search-input {
    width: 100%;
    max-width: 200px;
  }
  
  .top-header .flex.items-center.space-x-4 {
    gap: 1rem;
  }
  
  /* 手机版面包屑导航样式 */
  .breadcrumb {
    padding: 0.75rem 1rem !important;
    background: rgba(44, 44, 46, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 0.5rem !important;
    margin: 0.75rem 0 !important;
    width: 100% !important;
  }
  
  .breadcrumb .flex.items-center {
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
    font-size: 0.875rem !important;
  }
  
  .breadcrumb .flex.items-center a {
    color: #8E8E93 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
  }
  
  .breadcrumb .flex.items-center a:hover {
    color: var(--color-primary) !important;
  }
  
  .breadcrumb .flex.items-center i {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
  }
  
  .breadcrumb .flex.items-center span {
    color: #d1d5db !important;
    word-break: break-all !important;
    line-height: 1.4 !important;
  }
}

@media (max-width: 640px) {
  .search-box {
    flex: 1;
    margin: 0 8px;
  }
  
  .search-input {
    width: 100%;
    max-width: 150px;
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem 0.25rem 1.75rem;
  }
  
  .top-header .search-icon {
    font-size: 0.8125rem;
    left: 0.5rem;
  }
  
  .top-header .flex.items-center.space-x-4 {
    gap: 0.5rem;
  }
  
  .top-header .flex.items-center.space-x-4 button {
    min-width: 28px;
    min-height: 28px;
    position: relative;
  }
  
  .top-header .flex.items-center.space-x-4 button span {
  position: absolute;
    top: -1px;
    right: -1px;
    background-color: var(--color-primary);
    color: white;
    font-size: 0.5rem;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    line-height: 1;
  }
  
  .top-header .flex.items-center.space-x-4 img {
    width: 28px;
    height: 28px;
  }
  
  .mobile-menu-btn {
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 4px !important;
    margin-right: 0.25rem !important;
  }
  
  .mobile-menu-btn i {
    font-size: 1rem !important;
  }
}

/* ===== 大分辨率优化 ===== */
@media (min-width: 1920px) {
  .image-container {
    width: 30%;
    min-width: 180px;
  }
  
  .md\:w-2\/3 {
    width: 70%;
  }
  
  .news-card-title {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  
  .news-card-excerpt {
    font-size: 0.8125rem;
    line-height: 1.4;
  }
  
  .news-card-content {
    padding: 0.875rem !important;
  }
}

/* ===== Transform 样式 ===== */
.translate-x-0 {
  transform: translateX(0) !important;
}

.-translate-x-full {
  transform: translateX(-100%) !important;
}

/* ===== 链接悬停效果 ===== */
a:hover {
  color: var(--color-primary) !important;
  transition: color 0.3s ease;
}

.news-card-title a:hover,
.hero-title:hover,
.list-title a:hover,
.hero-link:hover .hero-title {
  color: var(--color-primary) !important;
  transition: color 0.3s ease;
}

.hero-link:hover .hero-title span {
  color: var(--color-primary) !important;
}

.hero-link:hover .hero-description {
  color: #e5e7eb !important;
}

/* ===== 工具链接样式 ===== */
.tool-item {
  text-decoration: none;
  color: inherit;
}

.tool-item:hover {
  text-decoration: none;
  color: inherit;
}

.tool-item:hover .tool-icon {
  transform: scale(1.05);
}

.tool-item:hover h4 {
  color: var(--color-primary);
}

.tool-item span {
  transition: all 0.3s ease;
}

.tool-item:hover span {
  background-color: var(--color-primary);
  color: white;
}

/* ===== 注册按钮样式 ===== */
a.bg-primary {
  text-decoration: none;
  color: white !important;
}

a.bg-primary:hover {
  text-decoration: none;
  color: white !important;
}

.no-underline {
  text-decoration: none !important;
}

.no-underline:hover {
  text-decoration: none !important;
}

/* ===== 通知按钮样式 ===== */
.top-header button[class*="relative"] {
  position: relative !important;
}

.top-header button[class*="relative"] span {
  position: absolute !important;
  top: -2px !important;
  right: -2px !important;
  background-color: var(--color-primary) !important;
  color: white !important;
  font-size: 0.625rem !important;
  border-radius: 50% !important;
  width: 16px !important;
  height: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

/* ===== 面包屑导航样式 ===== */
.breadcrumb {
  background: rgba(44, 44, 46, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.breadcrumb .flex.items-center {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #8E8E93;
}

.breadcrumb .flex.items-center a {
  color: #8E8E93;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb .flex.items-center a:hover {
  color: var(--color-primary);
}

.breadcrumb .flex.items-center i {
  font-size: 0.75rem;
  color: #6b7280;
}

.breadcrumb .flex.items-center span {
  color: #d1d5db;
  word-break: break-all;
  line-height: 1.4;
}

/* ===== 加载更多按钮样式 ===== */
.load-more-btn {
  position: relative;
  overflow: hidden;
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.load-more-btn .fa-spin {
  animation: spin 1s linear infinite;
}

/* ===== 资讯卡片阅读全文按钮样式 ===== */
.news-card-meta .bg-gray-800 {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.news-card-meta .bg-gray-800:hover {
  transform: translateX(2px);
}

.news-card-meta .bg-gray-800 i {
  font-size: 0.625rem;
  transition: transform 0.2s ease;
}

.news-card-meta .bg-gray-800:hover i {
  transform: translateX(2px);
}

/* ===== 底部导航样式 ===== */
/* PC版竖着显示 */
.footer .grid.grid-cols-5 {
  display: block;
}

.footer .grid.grid-cols-5 a {
    display: block;
  text-align: left;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(64, 64, 64, 0.3);
  transition: color 0.3s ease;
}

.footer .grid.grid-cols-5 a:last-child {
  border-bottom: none;
}

.footer .grid.grid-cols-5 a:hover {
  color: var(--color-primary);
}

/* 手机版横着显示 */
@media (max-width: 768px) {
  .footer .grid.grid-cols-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.25rem;
  }
  
  .footer .grid.grid-cols-5 a {
    display: block;
    text-align: center;
    padding: 0.125rem 0.0625rem;
    font-size: 0.6875rem;
    line-height: 1.2;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: none;
  }
}

/* ===== 文章底部操作栏样式 ===== */
.article-footer {
  background: var(--color-dark-light);
  border-top: 1px solid #404040;
}

.article-footer .flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.article-footer .flex.items-center.space-x-4 {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.article-footer .action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 0.875rem;
  min-width: fit-content;
  gap: 0.375rem;
}

.article-footer .action-btn i {
  margin-right: 0;
  font-size: 0.875rem;
}

.article-footer .action-btn span {
  white-space: nowrap;
}

.article-footer .share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.article-footer .share-btn i {
  font-size: 0.875rem;
  line-height: 1;
}

/* 手机版文章底部操作栏优化 */
@media (max-width: 768px) {
  .article-footer .flex {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .article-footer .flex.items-center.space-x-4 {
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-direction: row;
    width: 100%;
  }
  
  .article-footer .action-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .article-footer .action-btn i {
    margin-right: 0;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
  }
  
  .article-footer .action-btn span {
    font-size: 0.75rem;
    line-height: 1;
  }
  
  .article-footer .share-buttons {
    justify-content: center;
    gap: 0.5rem;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
  }
  
  .article-footer .share-buttons span {
    font-size: 0.8125rem;
  }
  
  .article-footer .share-btn {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  
  .article-footer .share-btn i {
    font-size: 0.875rem;
    line-height: 1;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .article-footer .action-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.125rem;
  }
  
  .article-footer .action-btn i {
    margin-right: 0;
    font-size: 0.8125rem;
    margin-bottom: 0.0625rem;
  }
  
  .article-footer .action-btn span {
    font-size: 0.6875rem;
    white-space: nowrap;
    line-height: 1;
  }
  
  .article-footer .share-btn {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .article-footer .share-btn i {
    font-size: 0.75rem;
    line-height: 1;
  }
}

/* 极小屏幕优化 */
@media (max-width: 360px) {
  .article-footer .action-btn {
    padding: 0.25rem 0.375rem;
    font-size: 0.6875rem;
    flex-direction: column;
    gap: 0.0625rem;
  }
  
  .article-footer .action-btn i {
    margin-right: 0;
    font-size: 0.75rem;
    margin-bottom: 0;
  }
  
  .article-footer .action-btn span {
    font-size: 0.625rem;
    line-height: 1;
  }
  
  .article-footer .share-btn {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .article-footer .share-btn i {
    font-size: 0.6875rem;
  }
}

.article-footer .share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-footer .share-buttons span {
  font-size: 0.875rem;
  color: #9ca3af;
}

.article-footer .share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.article-footer .share-btn i {
  font-size: 0.875rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 文章导航样式 ===== */
.article-navigation .nav-item {
  padding: 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.article-navigation .nav-item a {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 上一篇导航 - 左对齐 */
.article-navigation .nav-item:first-child .flex.items-center {
  justify-content: flex-start;
  text-align: left;
}

.article-navigation .nav-item:first-child h3 {
  text-align: left;
}

/* 下一篇导航 - 右对齐 */
.article-navigation .nav-item:last-child .flex.items-center {
  justify-content: flex-end;
  text-align: right;
}

.article-navigation .nav-item:last-child h3 {
  text-align: right;
}

/* 确保文字对齐的一致性 */
.article-navigation .nav-item .flex.items-center {
  width: 100%;
}

.article-navigation .nav-item h3 {
  width: 100%;
  margin: 0;
}

/* 手机端导航优化 */
@media (max-width: 768px) {
  .article-navigation .nav-item {
    padding: 0.75rem;
  }
  
  .article-navigation .nav-item h3 {
    font-size: 0.875rem;
    line-height: 1.4;
  }
  
  .article-navigation .nav-item .flex.items-center {
    font-size: 0.75rem;
  }
}

/* 手机端页面边距优化 */
@media (max-width: 768px) {
  .p-6 {
    padding: 0.625rem !important;
  }
  
  .p-6 .p-6 {
    padding: 0.625rem !important;
  }
  
  .article-content {
    margin: 0 -0.625rem;
  }
  
  .article-header,
  .article-body,
  .article-footer {
    padding-left: 0.625rem !important;
    padding-right: 0.625rem !important;
  }
  
  .article-meta {
    padding: 1rem 0.625rem !important;
  }
  
  .article-body {
    padding: 1rem 0.625rem !important;
  }
  
  .article-footer {
    padding: 1rem 0.625rem !important;
  }
  
  /* 面包屑导航优化 */
  .breadcrumb {
    margin-left: -0.625rem;
    margin-right: -0.625rem;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }
  
  /* 文章导航优化 */
  .article-navigation {
    margin-left: -0.625rem;
    margin-right: -0.625rem;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }
  
  /* 相关文章优化 */
  .related-articles {
    margin-left: -0.625rem;
    margin-right: -0.625rem;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }
}

/* 超小屏幕进一步优化 */
@media (max-width: 480px) {
  .p-6 {
    padding: 0.625rem !important;
  }
  
  .p-6 .p-6 {
    padding: 0.625rem !important;
  }
  
  .article-header,
  .article-body,
  .article-footer {
    padding-left: 0.625rem !important;
    padding-right: 0.625rem !important;
  }
  
  .article-meta {
    padding: 0.75rem 0.625rem !important;
  }
  
  .article-body {
    padding: 0.75rem 0.625rem !important;
  }
  
  .article-footer {
    padding: 0.75rem 0.625rem !important;
  }
  
  /* 面包屑导航优化 */
  .breadcrumb {
    margin-left: -0.625rem;
    margin-right: -0.625rem;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }
  
  /* 文章导航优化 */
  .article-navigation {
    margin-left: -0.625rem;
    margin-right: -0.625rem;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }
  
  /* 相关文章优化 */
  .related-articles {
    margin-left: -0.625rem;
    margin-right: -0.625rem;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
  }
}

/* PC端搜索框对齐优化 */
@media (min-width: 1024px) {
  .top-header .search-box {
    margin-left: 1.5rem;
  }
  
  .top-header .flex.items-center {
    padding-left: 1rem;
  }
  
  .main-content .p-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ===== 右侧边栏固定样式 ===== */
/* 固定部分样式 */
.lg\:sticky {
  position: sticky;
}

.lg\:top-24 {
  top: 6rem;
}

.lg\:self-start {
  align-self: flex-start;
}

.lg\:h-fit {
  height: fit-content;
}

/* 右侧边栏容器样式 */
.right-sidebar {
  position: relative;
}

@media (min-width: 1024px) {
  .right-sidebar {
    position: relative;
    /* 取消sticky，防止父级影响子级sticky */
    /* top: 6rem; */
    /* align-self: flex-start; */
    /* height: fit-content; */
  }
}