/* 标签页面美化样式 */

/* 标签云容器 */
.tag-cloud {
  background: linear-gradient(135deg, #f5f7fa 0%, #e3e8f0 100%);
  border-radius: 25px;
  padding: 50px;
  margin: 30px 0;
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.1);
  position: relative;
  overflow: hidden;
}

.tag-cloud::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, -20px) scale(1.1); }
}

[data-theme="dark"] .tag-cloud {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* 标签云标题 */
.tag-cloud-title {
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 标签按钮样式 - 彩色扁平风格 */
.tag-cloud-tags a,
.tag-cloud a {
  display: inline-block;
  padding: 8px 18px;
  margin: 8px;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff !important;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

/* 标签按钮悬停效果 */
.tag-cloud-tags a:hover,
.tag-cloud a:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* 标签按钮波纹效果 */
.tag-cloud-tags a::before,
.tag-cloud a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.tag-cloud-tags a:hover::before,
.tag-cloud a:hover::before {
  width: 300px;
  height: 300px;
}

/* 彩色标签 - 预定义颜色方案 */
.tag-cloud-tags a:nth-child(8n+1),
.tag-cloud a:nth-child(8n+1) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tag-cloud-tags a:nth-child(8n+2),
.tag-cloud a:nth-child(8n+2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tag-cloud-tags a:nth-child(8n+3),
.tag-cloud a:nth-child(8n+3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.tag-cloud-tags a:nth-child(8n+4),
.tag-cloud a:nth-child(8n+4) {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.tag-cloud-tags a:nth-child(8n+5),
.tag-cloud a:nth-child(8n+5) {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.tag-cloud-tags a:nth-child(8n+6),
.tag-cloud a:nth-child(8n+6) {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.tag-cloud-tags a:nth-child(8n+7),
.tag-cloud a:nth-child(8n+7) {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333 !important;
}

.tag-cloud-tags a:nth-child(8n+8),
.tag-cloud a:nth-child(8n+8) {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  color: #333 !important;
}

/* 标签数量角标 */
.tag-cloud-tags a::after,
.tag-cloud a::after {
  content: attr(data-count);
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4757;
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 统计图表容器 */
#tag-chart-container,
#category-chart-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 25px;
  padding: 40px;
  margin: 40px 0;
  box-shadow: 0 15px 45px rgba(102, 126, 234, 0.2);
  border: 2px solid rgba(102, 126, 234, 0.15);
  position: relative;
  overflow: hidden;
}

#tag-chart-container::before,
#category-chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

[data-theme="dark"] #tag-chart-container,
[data-theme="dark"] #category-chart-container {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

#tag-chart-title,
#category-chart-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding-bottom: 15px;
}

#tag-chart-title::after,
#category-chart-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
  border-radius: 2px;
}

#tagChart,
#categoryChart {
  max-width: 700px;
  margin: 0 auto;
  height: 400px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .tag-cloud {
    padding: 20px;
  }
  
  .tag-cloud-tags a,
  .tag-cloud a {
    padding: 6px 14px;
    margin: 5px;
    font-size: 0.85rem;
  }
  
  #tagChart,
  #categoryChart {
    height: 300px;
  }
}

