/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #333;
    margin-bottom: 20px;
}

.engagement-explanation {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.engagement-explanation h3 {
    color: #333;
    margin-top: 0;
}

.engagement-explanation ul {
    margin-top: 10px;
    padding-left: 20px;
}

/* Upload section */
#upload-section {
    text-align: center;
    margin-bottom: 30px;
}

#upload-section input[type="file"] {
    padding: 10px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    cursor: pointer;
}

/* Chart grid layout */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin: 0 auto;
    max-width: 1600px;
}

/* Chart containers */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 400px;
    position: relative;
}

.chart-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 20px;
    background: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 1px solid #eee;
    z-index: 1;
}

.chart-header h2 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

canvas {
    margin-top: 50px;
    width: 100% !important;
    height: calc(100% - 50px) !important;
}

/* Media query */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .chart-container {
        height: 300px;
    }
}

.chartjs-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 14px;
}
