.card {
    background-color: rgba(31, 41, 55, 0.5);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
}

.card h3 {
    color: #a0c3ff !important;
    max-width: 90%;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.stat-card {
    background-color: rgba(17, 24, 39, 0.6);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #4b5563;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(99, 179, 237, 0.2);
}
.stat-title {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #a0c3ff !important;
}
.stat-desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

#heatmap-container {
    width: 100%;
    height: 750px;
    margin: 0 auto;
}

.chart-signature {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    font-size: 0.75rem;
    color: rgba(229, 231, 235, 0.3);
    pointer-events: none;
}

.download-chart-btn {
    background: none;
    border: 1px solid transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 9999px;
    transition: all 0.2s ease-in-out;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.download-chart-btn:hover {
    color: #d1d5db;
    background-color: rgba(59, 130, 246, 0.2);
}

.download-chart-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

.download-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1f2937;
    border: 1px solid #4b5563;
    border-radius: 6px;
    min-width: 200px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    z-index: 20;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.download-options.show {
    display: block;
}

.download-option {
    display: block;
    padding: 0.5rem 1rem;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.download-option:hover {
    background-color: #374151;
    color: white;
}

@media (max-width: 768px) {
    .chart-container,
    #heatmap-container {
        height: 400px !important;
    }
    .stat-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}
