/* 作者卡片组件样式 */
.sotms-author-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    position: relative;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.sotms-author-card-header-wrapper {
    position: relative;
    height: 130px;
    flex-shrink: 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.sotms-author-card-bg-section {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 95px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

.sotms-author-card-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sotms-author-card-bg::before,
.sotms-author-card-bg::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
}
.sotms-author-card-bg::before { width:100px;height:100px;top:-30px;right:-20px; }
.sotms-author-card-bg::after { width:60px;height:60px;bottom:-15px;left:10px; }

.sotms-author-card-avatar-section {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -20px;
    z-index: 2;
}

.sotms-author-card-avatar {
    width: 88px; height: 88px;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.sotms-author-card-body {
    padding: 28px 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sotms-author-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sotms-admin-badge {
    width: 18px !important;
    height: 18px !important;
}

.sotms-author-card-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 12px;
    line-height: 1.6;
}

/* ====== 热力图（GitHub 风格紧凑版）====== */
.sotms-heatmap {
    width: 100%;
    padding-top: 2px;
}

.sotms-heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.sotms-heatmap-title {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sotms-heatmap-legend {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: .65rem;
    color: var(--text-muted);
}

.sotms-heatmap-legend-items {
    display: flex;
    gap: 1.5px;
}

.sotms-heatmap-legend-items .sotms-heatmap-cell {
    width: 10px;
    height: 10px;
}

.sotms-heatmap-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.sotms-heatmap-cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 3px;
    transition: opacity .15s ease;
    cursor: default;
    position: relative;
}

.sotms-heatmap-cell:hover {
    opacity: 1;
    outline: none;
    transform: scale(1.1);
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(255,255,255,.45), 0 2px 8px rgba(0,0,0,.25);
    z-index: 2;
    position: relative;
    transition: transform .15s ease, box-shadow .15s ease, border-radius .15s ease;
}

/* 热力图颜色等级（绿色系） */
.sotms-heatmap-level-0 { background: rgba(127,127,127,.12); }
.sotms-heatmap-level-1 { background: #9be9a8; }
.sotms-heatmap-level-2 { background: #40c463; }
.sotms-heatmap-level-3 { background: #30a14e; }

.sotms-heatmap-cell--filler { background: transparent; pointer-events: none; }

/* ---- 热力图 tooltip 美化 ---- */
.sotms-heatmap-cell[data-tip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(15,23,42,0.94);
    opacity: 0;
    visibility: hidden;
    z-index: 29;
    transition: opacity .16s ease, visibility .16s ease;
}
.sotms-heatmap-cell[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(3px);
    white-space: nowrap;
    font-size: 12px;
    color: #fff;
    background: rgba(15,23,42,0.94);
    border-radius: 6px;
    padding: 5px 9px;
    box-shadow: 0 3px 12px rgba(0,0,0,.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 30;
    transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}
.sotms-heatmap-cell[data-tip]:hover::before,
.sotms-heatmap-cell[data-tip]:hover::after {
    opacity: 1;
    visibility: visible;
}
.sotms-heatmap-cell[data-tip]:hover::after {
    transform: translateX(-50%) translateY(0);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .sotms-author-card {
        min-height: auto;
    }
    .sotms-heatmap-grid {
        gap: 2px;
    }
}
