/* 技术栈卡片样式 - 基于React项目设计，适配Butterfly主题 */

/* 技术栈卡片容器 */
.tech-skills-showcase {
  margin: 1.5rem 0;
  padding: 0;
  width: 100%;
}

/* 卡片网格布局 */
.tech-skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  margin: 0;
}

/* 单个技能卡片 */
.tech-skill-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tech-skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--card-border-hover);
}

/* 卡片头部 */
.tech-skill-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

/* 图标容器 */
.tech-skill-icon {
  flex-shrink: 0;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: var(--primary-bg);
  color: var(--primary-color);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.tech-skill-card:hover .tech-skill-icon {
  background: var(--primary-bg-hover);
  transform: scale(1.1);
}

/* 卡片标题 */
.tech-skill-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  line-height: 1.2;
}

/* 技能标签容器 */
.tech-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* 技能标签 */
.tech-skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: default;
  line-height: 1;
}

.tech-skill-badge:hover {
  transform: scale(1.05);
}

/* 技能等级颜色 */
.skill-level-初级 {
  background: rgba(59, 130, 246, 0.1);
  color: rgb(59, 130, 246);
}

[data-theme="dark"] .skill-level-初级 {
  background: rgba(59, 130, 246, 0.2);
  color: rgb(147, 197, 253);
}

.skill-level-中级 {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
}

[data-theme="dark"] .skill-level-中级 {
  background: rgba(34, 197, 94, 0.2);
  color: rgb(134, 239, 172);
}

.skill-level-高级 {
  background: rgba(249, 115, 22, 0.1);
  color: rgb(249, 115, 22);
}

[data-theme="dark"] .skill-level-高级 {
  background: rgba(249, 115, 22, 0.2);
  color: rgb(251, 146, 60);
}

.skill-level-专家 {
  background: rgba(239, 68, 68, 0.1);
  color: rgb(239, 68, 68);
}

[data-theme="dark"] .skill-level-专家 {
  background: rgba(239, 68, 68, 0.2);
  color: rgb(248, 113, 113);
}

/* 更多技能指示器 */
.tech-skill-more {
  background: var(--border-color);
  color: var(--text-color-secondary);
  border: 1px solid var(--border-color);
}

/* 主题适配 - 亮色主题 */
:root {
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --card-border-hover: #d1d5db;
  --primary-bg: rgba(59, 130, 246, 0.1);
  --primary-color: #3b82f6;
  --primary-bg-hover: rgba(59, 130, 246, 0.2);
  --text-color: #1f2937;
  --text-color-secondary: #6b7280;
  --border-color: #e5e7eb;
}

/* 主题适配 - 暗色主题 */
[data-theme="dark"] {
  --card-bg: #1f2937;
  --card-border: #374151;
  --card-border-hover: #4b5563;
  --primary-bg: rgba(59, 130, 246, 0.2);
  --primary-color: #60a5fa;
  --primary-bg-hover: rgba(59, 130, 246, 0.3);
  --text-color: #f9fafb;
  --text-color-secondary: #d1d5db;
  --border-color: #374151;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .tech-skills-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .tech-skill-card {
    padding: 0.875rem;
  }
  
  .tech-skill-title {
    font-size: 0.8125rem;
  }
  
  .tech-skill-badge {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.375rem;
  }
}

@media (max-width: 480px) {
  .tech-skills-showcase {
    margin: 1.5rem 0;
  }
  
  .tech-skills-grid {
    gap: 0.5rem;
  }
  
  .tech-skill-card {
    padding: 0.75rem;
  }
}

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

.tech-skill-card {
  animation: fadeInUp 0.5s ease forwards;
}

.tech-skill-card:nth-child(1) { animation-delay: 0s; }
.tech-skill-card:nth-child(2) { animation-delay: 0.1s; }
.tech-skill-card:nth-child(3) { animation-delay: 0.2s; }
.tech-skill-card:nth-child(4) { animation-delay: 0.3s; }
.tech-skill-card:nth-child(5) { animation-delay: 0.4s; }
.tech-skill-card:nth-child(6) { animation-delay: 0.5s; }

/* 初始状态隐藏，等待动画 */
.tech-skill-card {
  opacity: 0;
  transform: translateY(20px);
}