/* ============================================
   代码贡献热力图
   ============================================ */
:root {
    --cell-size: min(max(2vw, 11px), 14px);
}

.contribution-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, var(--cell-size));
    gap: 3px;
    overflow-x: auto;
    padding: 4px 0 12px;
}

.box {
    width: var(--cell-size);
    height: var(--cell-size);
    min-width: 9px;
    min-height: 9px;
    position: relative;
    cursor: pointer;
    border-radius: 3px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.box:hover {
    transform: scale(1.5);
    box-shadow: 0 0 8px rgba(255,255,255,0.1);
    z-index: 2;
}

.less  { background: #161b22; }
.little { background: #1d432a; }
.some  { background: #2a6b36; }
.many  { background: #4da34a; }
.much  { background: #66cf5e; }

/* tooltip 由 JS 动态创建，样式保留 */
.tooltip {
    position: absolute;
    white-space: nowrap;
    background: rgba(22, 27, 34, 0.95);
    color: #e6edf3;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.tooltip::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    border-color: rgba(22, 27, 34, 0.95) transparent transparent transparent;
}
