/* Projects 页面专用样式 */
.projects-main {
  min-height: 100vh;
  padding-top: 100px;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 50%, #2a3441 100%);
  position: relative;
  overflow-x: hidden;
}

/* 页面标题 */
.page-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.page-title {
  font-size: 3.5rem;
  color: #ffffff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

.title-icon {
  font-size: 1.2em;
  background: linear-gradient(45deg, #00d4ff, #0099cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: iconPulse 2s ease-in-out infinite;
}

.title-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 212, 255, 0.1), rgba(0, 153, 204, 0.1));
  border-radius: 10px;
  filter: blur(20px);
  animation: titleGlow 3s ease-in-out infinite;
  z-index: -1;
}

@keyframes iconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes titleGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.page-subtitle {
  font-size: 1.2rem;
  color: #b0b8c8;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 项目筛选 */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  color: #b0b8c8;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-btn:hover {
  border-color: #00d4ff;
  color: #00d4ff;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(45deg, #00d4ff, #0099cc);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.filter-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.filter-btn:hover .filter-glow {
  left: 100%;
}

/* 项目网格 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

/* 项目卡片 */
.project-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  backdrop-filter: blur(10px);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: #00d4ff;
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.project-card.featured {
  grid-column: span 2;
  background: rgba(0, 212, 255, 0.05);
  border-color: rgba(0, 212, 255, 0.3);
}

.project-card.featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00d4ff, #0099cc, #00d4ff);
  background-size: 200% 100%;
  animation: featuredGlow 3s ease-in-out infinite;
}

@keyframes featuredGlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 项目图片 */
.project-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-actions {
  display: flex;
  gap: 1rem;
}

.action-btn {
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid #00d4ff;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  color: #00d4ff;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.action-btn:hover {
  background: #00d4ff;
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-ripple {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(45deg, #ffd700, #ffaa00);
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  animation: badgePulse 2s ease-in-out infinite;
}

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

/* 项目内容 */
.project-content {
  padding: 2rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-header h3 {
  font-size: 1.5rem;
  color: #ffffff;
  margin: 0;
}

.project-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-status.online {
  background: rgba(0, 255, 0, 0.1);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 0, 0.3);
}

.project-status.development {
  background: rgba(255, 165, 0, 0.1);
  color: #ffaa00;
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.project-description {
  color: #b0b8c8;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  border: 1px solid rgba(0, 212, 255, 0.3);
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: rgba(0, 212, 255, 0.2);
  transform: translateY(-1px);
}

.project-stats {
  display: flex;
  gap: 1.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #00d4ff;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.8rem;
  color: #888;
}

/* 开源贡献 */
.opensource-section {
  margin-bottom: 4rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2.5rem;
  color: #00d4ff;
  margin-bottom: 2rem;
  justify-content: center;
}

.opensource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.opensource-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid rgba(0, 212, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.opensource-card:hover {
  border-color: #00d4ff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 212, 255, 0.1);
}

.opensource-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.repo-icon {
  font-size: 2rem;
  background: linear-gradient(45deg, #00d4ff, #0099cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.repo-info {
  flex: 1;
}

.repo-info h3 {
  color: #ffffff;
  margin-bottom: 0.2rem;
  font-size: 1.2rem;
}

.repo-info p {
  color: #b0b8c8;
  font-size: 0.9rem;
  margin: 0;
}

.repo-stats {
  display: flex;
  align-items: center;
}

.star-count {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.repo-description {
  color: #b0b8c8;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.repo-tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 背景效果 */
.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.floating-code {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(2px 2px at 30px 40px, rgba(0, 212, 255, 0.3), transparent),
    radial-gradient(1px 1px at 80px 20px, rgba(0, 153, 204, 0.4), transparent),
    radial-gradient(3px 3px at 120px 80px, rgba(0, 212, 255, 0.2), transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: floatingCode 30s linear infinite;
}

@keyframes floatingCode {
  0% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) translateX(15px) rotate(120deg);
  }
  66% {
    transform: translateY(10px) translateX(-10px) rotate(240deg);
  }
  100% {
    transform: translateY(0px) translateX(0px) rotate(360deg);
  }
}

.project-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .project-card.featured {
    grid-column: span 1;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .projects-main {
    padding-top: 80px;
  }

  .page-title {
    font-size: 2.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .project-filters {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    margin: 0 1rem;
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .project-actions {
    flex-direction: column;
    width: 100%;
  }

  .action-btn {
    width: 100%;
    text-align: center;
  }

  .project-stats {
    justify-content: space-around;
  }

  .opensource-grid {
    grid-template-columns: 1fr;
  }

  .opensource-card {
    margin: 0 1rem;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 2rem;
  }

  .project-image {
    height: 150px;
  }

  .project-content {
    padding: 1rem;
  }

  .opensource-card {
    padding: 1rem;
  }

  .project-filters {
    padding: 0 1rem;
  }
}

/* 动画增强 */
.project-card {
  animation: cardSlideIn 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes cardSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 为卡片添加延迟动画 */
.project-card:nth-child(1) {
  animation-delay: 0.1s;
}
.project-card:nth-child(2) {
  animation-delay: 0.2s;
}
.project-card:nth-child(3) {
  animation-delay: 0.3s;
}
.project-card:nth-child(4) {
  animation-delay: 0.4s;
}
.project-card:nth-child(5) {
  animation-delay: 0.5s;
}
.project-card:nth-child(6) {
  animation-delay: 0.6s;
}

