.projects-section {
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  padding: 24px;
  border: 2px solid rgba(82, 183, 136, 0.3);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(82, 183, 136, 0.1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 标题和按钮容器 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-icon {
  font-size: 36px;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* 分类按钮容器 */
.category-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 分类按钮 */
.category-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 2px solid rgba(82, 183, 136, 0.3);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.category-btn:hover {
  background: rgba(82, 183, 136, 0.2);
  border-color: rgba(82, 183, 136, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(82, 183, 136, 0.3);
}

.category-btn.active {
  background: linear-gradient(135deg, #52b788, #95d5b2);
  border-color: #52b788;
  color: white;
  box-shadow: 0 4px 16px rgba(82, 183, 136, 0.4);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: auto;
  gap: 16px;
}

.project-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.develop-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  cursor: help;
  color: #52b788;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.develop-badge:hover {
  opacity: 1;
}

.develop-badge svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #52b788, #95d5b2);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.project-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-title {
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
  margin: 0;
  flex: 1;
}

.project-description {
  font-size: 14px;
  line-height: 1.5;
  color: #4a5568;
  margin-bottom: 12px;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.project-tag {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(82, 183, 136, 0.15), rgba(149, 213, 178, 0.15));
  color: #2d6a4f;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.project-link-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  color: #52b788;
  font-weight: 600;
  font-size: 13px;
}

.arrow {
  transition: transform 0.3s ease;
  font-size: 18px;
}

.project-card:hover .arrow {
  transform: translateX(4px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .section-title {
    font-size: 28px;
  }

  .category-buttons {
    gap: 8px;
    width: 100%;
  }

  .category-btn {
    padding: 8px 14px;
    font-size: 13px;
    flex: 1;
    justify-content: center;
  }
  
  .project-card {
    padding: 16px;
  }
  
  .develop-badge {
    top: 8px;
    right: 8px;
  }
  
  .develop-badge svg {
    width: 16px;
    height: 16px;
  }
  
  .project-header {
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .project-icon {
    width: 36px;
    height: 36px;
  }
  
  .project-title {
    font-size: 16px;
  }
  
  .project-description {
    font-size: 13px;
  }
  
  .project-tag {
    font-size: 11px;
    padding: 2px 8px;
  }
}

/* 桌面端固定为5列 */
@media (min-width: 1441px) {
  .projects-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1025px) and (max-width: 1440px) {
  .projects-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 分页指示器样式 */
.pagination-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding: 20px 0;
}

.pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  outline: none;
}

.pagination-dot:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.2);
}

.pagination-dot.active {
  background: #52b788;
  width: 14px;
  height: 14px;
  box-shadow: 0 0 10px rgba(82, 183, 136, 0.5);
}

.pagination-dot:focus {
  outline: 2px solid rgba(82, 183, 136, 0.5);
  outline-offset: 2px;
}
