/* =========================================
   YEAR IN PIXELS (Responsive Grid)
   ========================================= */

/* 1. The Container */
/* Ensures the grid stays within the card/screen width */
.year-pixels-container {
    width: 100%;
    padding: 10px 0;
    box-sizing: border-box;
    overflow: hidden; /* Kills the scrollbar */
}

/* 2. The Grid Engine */
.year-pixels-grid {
    display: grid;
    
    /* THE MAGIC: 53 Columns (Weeks) x 7 Rows (Days) */
    /* '1fr' means "1 fraction of available space" */
    grid-template-columns: repeat(53, 1fr);
    grid-template-rows: repeat(7, 1fr);
    
    /* Fluid gap that scales slightly */
    gap: 2px; 
    
    width: 100%;
    margin: 0 auto;
}

/* 3. The Individual Day (Pixel) */
.pixel-day {
    width: 100%;
    
    /* Forces the element to remain a perfect square */
    aspect-ratio: 1 / 1; 
    
    background-color: #1a1a1a; /* Default 'Empty' Dark Grey */
    border-radius: 1px;
    transition: all 0.1s ease;
    cursor: pointer;
}

/* Interaction */
.pixel-day:hover {
    transform: scale(1.5);
    z-index: 10;
    border: 1px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
}

/* 4. Status Colors (Matching your theme) */
.pixel-day.secured { 
    background-color: #bef264; /* Lime Green */
    box-shadow: 0 0 2px rgba(190, 242, 100, 0.3);
}

.pixel-day.wasted { 
    background-color: #ff6b6b; /* Red */
    box-shadow: 0 0 2px rgba(255, 107, 107, 0.3);
}

.pixel-day.empty { 
    background-color: #222; 
}

/* 5. The Legend (Below Grid) */
.audit-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: block;
}

/* =========================================
   MOBILE OPTIMIZATION (Tiny Screens)
   ========================================= */
@media (max-width: 768px) {
    .year-pixels-grid {
        /* Reduce gap to 1px on phones so pixels aren't too spread out */
        gap: 1px; 
    }

    .pixel-day {
        /* Remove radius on mobile for cleaner look at small scale */
        border-radius: 0; 
    }
    
    /* Make the container full width on mobile */
    .year-pixels-container {
        padding: 0;
    }
}