.heatmap-page {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    color: #ffffff;
    padding-bottom: 80px;
}

.heatmap-header {
    text-align: center;
    margin-bottom: 30px;
}

.heatmap-header h1 {
    color: #ffcc00;
    font-size: 38px;
    margin-bottom: 10px;
}

.heatmap-header p {
    color: #b0b0b0;
    font-size: 17px;
}

.heatmap-modes,
.heatmap-years {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.heatmap-modes a,
.heatmap-years a {
    background: #2b2b2f;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: 0.2s ease;
}

.heatmap-modes a:hover,
.heatmap-years a:hover,
.heatmap-modes a.active,
.heatmap-years a.active {
    background: #ffcc00;
    color: #000000;
}

.heatmap-year-section {
    margin-top: 50px;
}

.heatmap-year-section h2 {
    text-align: center;
    color: #ffcc00;
    font-size: 30px;
    margin-bottom: 25px;
}

.heatmap-wrapper {
    display: flex;
    gap: 14px;
    background: #1c1c1f;
    border-radius: 18px;
    padding: 30px;
    overflow: visible;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.45);
}

.heatmap-days {
    display: grid;
    grid-template-rows: repeat(7, 16px);
    gap: 5px;
    color: #8f8f8f;
    font-size: 12px;
}

.heatmap-days div {
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.heatmap-scroll {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 8px;
    width: 100%;
}

.heatmap-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 16px);
    gap: 5px;
    min-width: max-content;
}

.heatmap-cell {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    position: relative;
    transition: 0.15s ease;
    z-index: 1;
}

.heatmap-cell:not(.empty):hover {
    transform: scale(1.3);
    z-index: 50;
}

.heatmap-cell:not(.empty):hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 145%;
    transform: translateX(-50%);
    background: #111111;
    color: #ffffff;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-line;
    min-width: 220px;
    text-align: center;
    box-shadow: 0 0 22px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.heatmap-page,
.heatmap-year-section,
.heatmap-wrapper,
.heatmap-scroll,
.heatmap-grid {
    overflow: visible !important;
}

.level-0 {
    background: #2b2b2f;
}

.level-1 {
    background: #9be9a8;
}

.level-2 {
    background: #40c463;
}

.level-3 {
    background: #ffcc00;
}

.level-4 {
    background: #ff8c00;
}

.level-5 {
    background: #ff3b30;
}

.empty {
    background: transparent;
}

.heatmap-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 25px;
    margin-bottom: 45px;
}

.heatmap-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c5c5c5;
    font-size: 13px;
}

.heatmap-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.heatmap-stat-card {
    background: #1c1c1f;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.heatmap-stat-card span {
    color: #d0d0d0;
    font-size: 15px;
}

.heatmap-stat-card strong {
    color: #ffcc00;
    font-size: 22px;
    line-height: 1.4;
}

.heatmap-stat-card small {
    color: #a0a0a0;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 1100px) {

    .heatmap-page {
        padding: 0 12px;
    }

    .heatmap-header h1 {
        font-size: 30px;
    }

    .heatmap-wrapper {
        padding: 20px;
    }

    .heatmap-stats {
        grid-template-columns: 1fr;
    }

    .heatmap-cell {
        width: 15px;
        height: 15px;
    }

    .heatmap-grid {
        grid-template-rows: repeat(7, 15px);
    }

    .heatmap-days {
        grid-template-rows: repeat(7, 15px);
    }

    .heatmap-cell:not(.empty):hover::after {
        min-width: 180px;
        font-size: 11px;
    }

}