/* ==================== GitHub 样式增强 ==================== */

/* GitHub 仓库卡片样式 */
.github-repos-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.github-repo-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.github-repo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  border-color: #667eea;
}

.repo-name {
  font-size: 18px;
  font-weight: bold;
  color: #667eea;
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.repo-name:hover {
  color: #764ba2;
  text-decoration: underline;
}

.repo-description {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  min-height: 40px;
}

.repo-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
  color: #888;
}

.repo-stat {
  display: flex;
  align-items: center;
  gap: 5px;
}

.repo-language {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* GitHub 个人资料卡片 */
.github-profile-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  margin: 30px 0;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.github-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid white;
  margin: 0 auto 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.github-avatar:hover {
  transform: scale(1.1) rotate(5deg);
}

.github-username {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
}

.github-bio {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 20px;
}

/* GitHub 快速统计 */
.github-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.quick-stat {
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.quick-stat-number {
  font-size: 24px;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.quick-stat-label {
  font-size: 12px;
  opacity: 0.8;
}

/* GitHub 语言统计环形图 */
.language-ring {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 30px 0;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.language-chart {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(
    #f1e05a 0deg 60deg,
    #2b7489 60deg 120deg,
    #e34c26 120deg 180deg,
    #563d7c 180deg 240deg,
    #3572A5 240deg 300deg,
    #ddd 300deg 360deg
  );
}

.language-list {
  flex: 1;
}

.language-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.language-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.language-name {
  flex: 1;
  font-weight: 500;
}

.language-percent {
  color: #888;
  font-size: 14px;
}

/* GitHub 活动时间线 */
.github-activity {
  margin: 30px 0;
}

.activity-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  margin-bottom: 15px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.activity-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.activity-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-radius: 8px;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
}

.activity-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.activity-time {
  font-size: 12px;
  color: #999;
}

/* GitHub 贡献日历 */
.contribution-calendar {
  margin: 30px 0;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(53, 12px);
  grid-gap: 3px;
}

.calendar-day {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #ebedf0;
  transition: all 0.2s ease;
  cursor: pointer;
}

.calendar-day:hover {
  transform: scale(1.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.calendar-day.level-0 { background: #ebedf0; }
.calendar-day.level-1 { background: #c6e48b; }
.calendar-day.level-2 { background: #7bc96f; }
.calendar-day.level-3 { background: #239a3b; }
.calendar-day.level-4 { background: #196127; }

/* GitHub 徽章 */
.github-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.github-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  font-size: 13px;
  color: #667eea;
  transition: all 0.3s ease;
}

.github-badge:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: scale(1.05);
}

.badge-icon {
  font-size: 16px;
}

/* GitHub 链接按钮 */
.github-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.github-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 加载动画 */
.github-loading {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid rgba(102, 126, 234, 0.2);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .github-repos-container {
    grid-template-columns: 1fr;
  }
  
  .github-quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .language-ring {
    flex-direction: column;
  }
  
  .calendar-grid {
    grid-template-columns: repeat(26, 12px);
  }
}

/* 暗色模式 */
[data-theme='dark'] .github-repo-card,
[data-theme='dark'] .activity-item,
[data-theme='dark'] .contribution-calendar,
[data-theme='dark'] .language-ring {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(102, 126, 234, 0.3);
}

[data-theme='dark'] .repo-name {
  color: #8b9eff;
}

[data-theme='dark'] .repo-description,
[data-theme='dark'] .activity-description {
  color: #aaa;
}

[data-theme='dark'] .activity-title {
  color: #fff;
}

[data-theme='dark'] .calendar-day.level-0 {
  background: #2d333b;
}

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

.github-repo-card,
.activity-item {
  animation: fadeIn 0.5s ease-out;
}

/* 打印优化 */
@media print {
  .github-repo-card,
  .activity-item {
    page-break-inside: avoid;
  }
}
