/*!
 * ggmetro.css — GitHub Calendar × Aero Crystal × 青色系
 * 完整 crystal 玻璃质感：backdrop-blur、内阴影高光、顶部反光、格子的 blur 发光
 * 复用方式：在 github-calendar.css 之后加载即可
 */
:root {
  /* 底板 — 加深灰色系 */
  --gg-bg: #e5e5e5;
  --gg-glass: linear-gradient(180deg, #a0a0a0, #575757);
  --gg-glass-dark: rgba(20, 20, 20, 0.06);
  --gg-border: rgba(0, 0, 0, 0.1);
  --gg-border-light: rgba(255, 255, 255, 0.65);
  --gg-shadow: rgba(0, 0, 0, 0.12);
  --gg-shadow-heavy: rgba(0, 0, 0, 0.2);

  /* 格子 — 加深青色系 */
  --gg-cell-0: #f0fdfa;
  --gg-cell-1: #99f6e4;
  --gg-cell-2: #2dd4bf;
  --gg-cell-3: #0d9488;
  --gg-cell-4: #115e59;

  /* 文字 */
  --gg-text: #fff9f7;
  --gg-text-muted: #fbf2f0;
  --gg-text-light: #f9fafb;
  --gg-tooltip-bg: #efe9e7;
}

/* ===== CALENDAR 容器 — Crystal Glass ===== */
.calendar {
  background: var(--gg-glass) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  box-shadow:
    0 8px 32px var(--gg-shadow),
    inset 0 1px 0 var(--gg-border-light) !important;
  border: 1px solid var(--gg-border) !important;
  border-radius: 12px !important;
  position: relative;
  overflow: visible;
}

/* 顶部高光线 — 仿 .aero .content::before */
.calendar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--gg-border-light) 50%,
    transparent 100%
  );
  z-index: 1;
}

@supports not (backdrop-filter: blur(6px)) {
  .calendar {
    background: linear-gradient(180deg, #b0b0b0, #777777) !important;
  }
}

/* ===== CONTRIBUTION CELLS — 放大后层blur发光 ===== */
.github-calendar .day[data-level="0"] {
  background-color: var(--gg-cell-0);
}
.github-calendar .day[data-level="1"] {
  background-color: var(--gg-cell-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.github-calendar .day[data-level="2"] {
  background-color: var(--gg-cell-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.github-calendar .day[data-level="2"]::after {
  content: '';
  position: absolute;
  top: -3px; left: -3px;
  right: -3px; bottom: -3px;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(45, 212, 191, 0.35), transparent 70%);
  filter: blur(3px);
  z-index: -1;
  pointer-events: none;
}
.github-calendar .day[data-level="3"] {
  background-color: var(--gg-cell-3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.github-calendar .day[data-level="3"]::after {
  content: '';
  position: absolute;
  top: -5px; left: -5px;
  right: -5px; bottom: -5px;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(13, 148, 136, 0.45), transparent 65%);
  filter: blur(4px);
  z-index: -1;
  pointer-events: none;
}
.github-calendar .day[data-level="4"] {
  background-color: var(--gg-cell-4);
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.12);
}
.github-calendar .day[data-level="4"]::after {
  content: '';
  position: absolute;
  top: -6px; left: -6px;
  right: -6px; bottom: -6px;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(17, 94, 89, 0.6), transparent 60%);
  filter: blur(5px);
  z-index: -1;
  pointer-events: none;
}

/* Hover悬浮 — crystal光晕放大 */
/* 进入 hover：快；离开 hover：1s 先快后慢 ease-out */
.github-calendar .day {
  transition: all 1000ms ease;
  position: relative;
  border-radius: 2px;
  overflow: visible;
}
.github-calendar .day:hover {
  transition: all 100ms cubic-bezier(0.16, 1, 0.3, 1) ;
  transform: scale(1.3);
  z-index: 3;
}

/* ===== 图例 ===== */
.contrib-legend .legend li {
  border-radius: 2px;
}

/* ===== 次要文字 ===== */
.calendar-graph text.wday,
.calendar-graph text.month,
text.ContributionCalendar-label {
  fill: var(--gg-text-muted) !important;
}

/* ===== 统计数字 ===== */
.contrib-number {
  color: var(--gg-text);
}

/* ===== 小号文字 ===== */
.text-small {
  color: var(--gg-text-muted);
}

/* ===== 底部链接 ===== */
.monospace a,
.left.text-muted a {
  color: var(--gg-text-muted);
}

/* ===== 工具栏提示 — 深灰玻璃 ===== */
.day-tooltip {
  background: var(--gg-tooltip-bg);
  border: 1px solid var(--gg-border-light);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--gg-shadow-heavy);
  color: var(--gg-text-muted);
}
.day-tooltip strong {
  color: var(--gg-text-light);
}
.day-tooltip:after {
  border-top-color: var(--gg-tooltip-bg);
}
