/* GitHub 贡献热力图卡片样式 */
.github-heatmap-glass-container {
  position: relative;
  margin-bottom: 20px;
  margin-top: 20px;
}

.github-heatmap-glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-md-color-scheme='slate'] .github-heatmap-glass-card {
  background: rgba(17, 24, 39, 0.96);
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65);
}

[data-md-color-scheme='slate'] .github-heatmap-title,
[data-md-color-scheme='slate'] .github-heatmap-stats,
[data-md-color-scheme='slate'] .github-heatmap-legend {
  color: #e5e7eb;
}

[data-md-color-scheme='slate'] .github-heatmap-stats {
  opacity: 0.85;
}

[data-md-color-scheme='slate'] .github-heatmap-legend {
  opacity: 0.8;
}

.github-heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.github-heatmap-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--md-typeset-color);
  letter-spacing: 0.5px;
}

.github-heatmap-stats {
  font-size: 0.8rem;
  color: var(--md-typeset-color);
  opacity: 0.6;
  white-space: nowrap;
}

.github-heatmap-stats strong {
  color: #239a3b;
  font-weight: 700;
  opacity: 1;
}

.github-heatmap-content {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -12px;
  padding: 0 12px;
}

.github-heatmap-svg {
  width: 100%;
  height: auto;
  display: block;
  min-height: 110px;
  cursor: default;
}

.github-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--md-typeset-color);
  opacity: 0.6;
  margin-left: auto;
}

.legend-label {
  font-weight: 500;
}

.legend-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background-color: #239a3b;
  opacity: var(--opacity, 0.5);
  flex-shrink: 0;
}

.github-heatmap-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  display: none;
}

.github-heatmap-tooltip.visible {
  display: block;
  animation: tooltipFadeIn 150ms ease-out;
}

.github-heatmap-tooltip__content {
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  position: relative;
}

[data-md-color-scheme='slate'] .github-heatmap-tooltip__content {
  background: rgba(17, 24, 39, 0.95);
}

.github-heatmap-tooltip__arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.github-heatmap-tooltip.arrow-top .github-heatmap-tooltip__arrow {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent rgba(30, 30, 30, 0.95) transparent;
  filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1));
  margin-bottom: -1px;
}

[data-md-color-scheme='slate'] .github-heatmap-tooltip.arrow-top .github-heatmap-tooltip__arrow {
  border-color: transparent transparent rgba(17, 24, 39, 0.95) transparent;
}

.github-heatmap-tooltip.arrow-bottom .github-heatmap-tooltip__arrow {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-color: rgba(30, 30, 30, 0.95) transparent transparent transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  margin-top: -1px;
}

[data-md-color-scheme='slate'] .github-heatmap-tooltip.arrow-bottom .github-heatmap-tooltip__arrow {
  border-color: rgba(17, 24, 39, 0.95) transparent transparent transparent;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .github-heatmap-glass-container {
    display: none;
  }

  .github-heatmap-glass-card {
    padding: 12px;
  }

  .github-heatmap-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .github-heatmap-legend {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .github-heatmap-title {
    font-size: 1.1rem;
  }

  .github-heatmap-stats {
    font-size: 0.8rem;
  }

  .github-heatmap-legend {
    font-size: 0.7rem;
    gap: 4px;
  }

  .legend-cell {
    width: 9px;
    height: 9px;
  }
}

/* GitHub 仓库卡片样式 */
.github-repo-card {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-top: 18px;
  margin-bottom: 8px;
}

.github-repo-card-inner {
  border-radius: 24px;
  padding: 16px 22px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out, box-shadow 0.15s ease-out;
  width: 100%;
}

.github-repo-card:hover .github-repo-card-inner {
  background-color: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
}

.github-repo-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.github-repo-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.github-repo-avatar-wrapper {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}

.github-repo-avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background-color: #e5e7eb;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.github-repo-content {
  flex: 1 1 auto;
  min-width: 0;
}

.github-repo-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.github-repo-owner {
  color: #6b7280;
  font-weight: 500;
}

.github-repo-slash {
  color: #9ca3af;
}

.github-repo-name {
  color: #111827;
  font-weight: 700;
}

.github-repo-description {
  margin: 4px 0 8px 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #4b5563;
}

.github-repo-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
  color: #4b5563;
}

.github-repo-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.github-repo-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: inherit;
}

.github-repo-meta-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.github-repo-logo {
  flex-shrink: 0;
  margin-left: 12px;
  margin-top: 2px;
}

.github-repo-logo-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #111827;
  color: #f9fafb;
}

.github-repo-logo-inner svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

[data-md-color-scheme='slate'] .github-repo-card-inner {
  background: #020617;
  border-color: #1f2937;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
}

[data-md-color-scheme='slate'] .github-repo-title {
  color: #e5e7eb;
}

[data-md-color-scheme='slate'] .github-repo-owner {
  color: #9ca3af;
}

[data-md-color-scheme='slate'] .github-repo-name {
  color: #f9fafb;
}

[data-md-color-scheme='slate'] .github-repo-description {
  color: #9ca3af;
}

[data-md-color-scheme='slate'] .github-repo-meta {
  color: #9ca3af;
}

[data-md-color-scheme='slate'] .github-repo-logo-inner {
  background: #f9fafb;
  color: #020617;
}

@media (max-width: 768px) {
  .github-repo-card-inner {
    padding: 14px 16px;
    border-radius: 18px;
  }

  .github-repo-description {
    font-size: 0.84rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

