.heatmap-wrapper {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #fffef9;
  border: 3px dashed var(--primary);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}
.heatmap-months {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}
.month-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
}
.heatmap-grid {
    display: grid;
    grid-template-rows: repeat(7, 12px);
    grid-auto-flow: column;
    grid-auto-columns: 12px;
    gap: 3px;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}
.heatmap-cell {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
    position: relative;
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}
.heatmap-cell:hover {
    transform: scale(1.3);
    z-index: 10;
}
.heatmap-cell:hover::after{
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 100;
}
/* color */
.level-0 {
    background: #ffffff;
    background-image: repeating-linear-gradient(45deg, transparent 2px, rgba(0,0,0,0.05) 2px, rgba(0,0,0,0.05) 4px);
}
.level-1 {
  background: #d4f1d4;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(81, 207, 102, 0.2) 2px, rgba(81, 207, 102, 0.2) 4px);
}

.level-2 {
  background: #9be9a8;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(81, 207, 102, 0.3) 2px, rgba(81, 207, 102, 0.3) 4px);
}

.level-3 {
  background: #40c463;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0, 100, 0, 0.2) 2px, rgba(0, 100, 0, 0.2) 4px);
}

.level-4 {
  background: #30a14e;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0, 100, 0, 0.3) 2px, rgba(0, 100, 0, 0.3) 4px);
  border-color: #216e39;
}

.heatmap-legend {
    display:flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.5rem;
    justify-content: center;
    font-size: 0.9rem;
    color:var(--text-muted);
    font-weight: 600;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border);
    border-radius: 50px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.5);

}

.heatmap-legend span{
    font-family: "Patrik Hand", cursive;
    font-size: 1rem;
}

.legend-cell{
    width: 18px;
    height:18px;
    border-radius: 4px;
    border:2px solid var(--border);
    box-shadow: 1px 1px 0rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.legend-cell:hover {
  transform: scale(1.2) rotate(5deg);
}

@media (max-width: 768px) {
  .heatmap-grid {
    grid-template-rows: repeat(7, 10px);
    grid-auto-columns: 10px;
    gap: 2px;
    padding: 0.5rem;
  }
  
  .heatmap-cell {
    width: 10px;
    height: 10px;
  }
  
  .legend-cell {
    width: 14px;
    height: 14px;
  }
  
  .heatmap-months {
    font-size: 0.7rem;
  }
  
  .heatmap-legend {
    font-size: 0.8rem;
    gap: 0.4rem;
  }
}