/* 首页样式优化 - 增强版 */
/* 全局优化 */
:root {
  --primary-color: #4a89dc;
  --gradient-start: #4a89dc;
  --gradient-end: #6e62b5;
  --hover-color: #5d9cec;
  --border-radius: 12px;
  --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

/* 网站标题区域优化 */
.site-header-content {
  text-align: center;
  padding: 30px 20px 20px;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  box-shadow: var(--box-shadow);
  animation: fadeIn 0.8s ease-out;
  position: relative;
  overflow: hidden;
}

.site-header-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.site-title {
  font-size: 2.4rem;
  margin-bottom: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.site-description {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* 导航栏优化 */
.index-nav {
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.index-nav .logo a {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition);
}

.index-nav .type-list .list {
  border-radius: var(--border-radius);
  margin-bottom: 8px;
  transition: var(--transition);
}

.index-nav .type-list .list a {
  padding: 14px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.index-nav .type-list .list:hover {
  transform: translateX(5px);
}

/* 链接卡片优化 - 移除与product-card.css冲突的样式 */
/* 注意：以下样式已被product-card.css替代，保留注释以便参考 */
/* 
.site-main .site-list .list {
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background-color: #fff;
}

.site-main .site-list .list:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
  border-color: rgba(74, 137, 220, 0.3);
}

.site-main .site-list .list a {
  padding: 18px;
  border-radius: var(--border-radius);
}

.site-main .site-list .list p.name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 5px;
  color: #333;
}

.site-main .site-list .list .desc {
  color: #666;
  line-height: 1.6;
  font-size: 13px;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.list svg.icon,
.list img {
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  background-color: #f8f9fa;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.site-main .site-list .list:hover svg.icon,
.site-main .site-list .list:hover img {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
*/

/* 分类标题优化 */
.site-main .site-name {
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  color: white;
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.site-main .site-name::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
  background-size: 4px 4px;
  opacity: 0.2;
}

.site-main .site-name span {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 页脚优化 */
footer {
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, #f8f9fa, #f1f2f3);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
  padding: 25px 20px;
  margin-top: 40px;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* 滚动平滑效果 */
html {
  scroll-behavior: smooth;
}

/* 响应式优化 */
@media only screen and (max-width: 1200px) {
  .site-header-content {
    padding: 25px 15px 15px;
  }
  
  .site-title {
    font-size: 2rem;
  }
}

@media only screen and (max-width: 768px) {
  .site-header-content {
    padding: 20px 10px 10px;
    margin-bottom: 15px;
  }
  
  .site-title {
    font-size: 1.8rem;
  }
  
  .site-description {
    font-size: 0.9rem;
  }
  
  .site-main .site-name {
    padding: 12px 15px;
  }
  
  .site-main .site-name span {
    font-size: 16px;
  }
}

/* 暗色模式优化 */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e0e0e0;
  }
  
  footer {
    background: linear-gradient(135deg, #1a1a1a, #252525);
  }
} 

/* 文章标题轮播横条样式 */
.article-ticker-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #f0f2f5);
    border-radius: 10px;
    padding: 12px 20px;
    margin: 20px auto;
    max-width: 90%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
}

.article-ticker-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.8), transparent);
}

.article-ticker-label {
    font-weight: bold;
    color: #4a89dc;
    margin-right: 15px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 15px;
    position: relative;
    padding-right: 18px;
}

.article-ticker-label::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background-color: rgba(0,0,0,0.1);
}

.article-ticker-content {
    flex: 1;
    position: relative;
    height: 24px;
    overflow: hidden;
    text-align: center;
    max-width: 80%;
}

.article-ticker-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    text-decoration: none;
    display: block;
    line-height: 24px;
    font-size: 15px;
    font-weight: 500;
    pointer-events: auto;
}

.article-ticker-item.active {
    opacity: 1;
    transform: translateY(0);
    z-index: 2;
}

.article-ticker-item:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

/* 暗色模式适配 */
.dark-theme .article-ticker-container,
body.dark .article-ticker-container {
    background: linear-gradient(135deg, #252830, #1e222a);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
}

.dark-theme .article-ticker-label,
body.dark .article-ticker-label {
    color: #64b5f6;
}

.dark-theme .article-ticker-label::after,
body.dark .article-ticker-label::after {
    background-color: rgba(255,255,255,0.1);
}

.dark-theme .article-ticker-item,
body.dark .article-ticker-item {
    color: #e0e0e0;
}

.dark-theme .article-ticker-item:hover,
body.dark .article-ticker-item:hover {
    color: #ff7e7e;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .article-ticker-container {
        padding: 10px 15px;
        margin: 15px auto;
        max-width: 95%;
    }
    
    .article-ticker-label {
        font-size: 14px;
        margin-right: 12px;
        padding-right: 12px;
    }
    
    .article-ticker-item {
        font-size: 14px;
    }
    
    .article-ticker-content {
        max-width: 75%;
    }
} 

/* 延迟加载相关样式 */
.product-card.list {
    opacity: 1; /* 默认显示 */
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    visibility: visible !important; /* 确保链接始终可见 */
}

/* 图片延迟加载占位符 */
img[data-src] {
    opacity: 0.3; /* 显示淡色占位符 */
    transition: opacity 0.3s ease;
    background-color: #f5f5f5;
}

img.loaded {
    opacity: 1;
}

/* 虚拟滚动优化样式 */
.site-list {
    position: relative;
    contain: layout style;
}

.product-card.list {
    visibility: visible;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: opacity 0.2s ease;
}

/* 优化滚动性能 */
@media (min-width: 1200px) {
    .site-list {
        contain: content;
    }
    
    .site-main {
        overflow-anchor: auto;
    }
}

/* 提高移动端性能 */
@media (max-width: 768px) {
    .product-card.list {
        transform: none !important;
        transition: opacity 0.2s ease !important;
    }
    
    /* 减少移动端动画效果 */
    .product-card.list:hover {
        transform: none !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
    }
} 