body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    width: 100%;
    margin: 20px;
    padding: 30px;
    background-color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

h1 {
    font-size: 2.5em;
    color: #2d3c49;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
}

h2 {
    font-size: 1.8em;
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

p {
    color: #555;
    margin-bottom: 15px;
}

#chart-container {
    width: 100%;
    height: 450px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

#chart-container canvas {
    max-width: 100%;
    max-height: 100%;
}

#download-csv {
    padding: 12px 24px;
    font-size: 1em;
    color: #fff;
    background-color: #3867d6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-bottom: 25px;
    align-self: flex-start;
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.1);
}

#download-csv:hover {
    background-color: #2a56c6;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

#download-csv:active {
    transform: translateY(0);
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.1);
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
        padding: 25px;
        margin: 15px;
    }
    h1 {
        font-size: 2.3em;
    }
    h2 {
        font-size: 1.7em;
    }
    #chart-container {
        height: 400px;
        margin-bottom: 20px;
        padding: 12px;
    }
    #download-csv {
        padding: 11px 22px;
        font-size: 0.95em;
        margin-bottom: 20px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 768px;
        padding: 20px;
        margin: 15px;
    }
    h1 {
        font-size: 2.1em;
    }
    h2 {
        font-size: 1.6em;
    }
    #chart-container {
        height: 350px;
        margin-bottom: 18px;
        padding: 10px;
    }
    #download-csv {
        padding: 10px 20px;
        font-size: 0.9em;
        margin-bottom: 18px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 15px;
        margin: 10px;
    }
    h1 {
        font-size: 1.9em;
    }
    h2 {
        font-size: 1.5em;
    }
    p {
        margin-bottom: 12px;
    }
    #chart-container {
        height: 300px;
        margin-bottom: 15px;
        padding: 8px;
    }
    #download-csv {
        padding: 9px 18px;
        font-size: 0.85em;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 15px;
        margin: 10px;
        border-radius: 12px;
    }
    h1 {
        font-size: 1.7em;
        margin-bottom: 10px;
    }
    h2 {
        font-size: 1.4em;
        margin-top: 15px;
        margin-bottom: 10px;
    }
    p {
        font-size: 0.95em;
        margin-bottom: 10px;
    }
    #chart-container {
        height: 250px;
        margin-bottom: 12px;
        padding: 6px;
    }
    #download-csv {
        padding: 8px 16px;
        font-size: 0.8em;
        margin-bottom: 12px;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 10px;
        margin: 8px;
    }
    h1 {
        font-size: 1.5em;
    }
    h2 {
        font-size: 1.3em;
    }
    p {
        font-size: 0.9em;
    }
    #chart-container {
        height: 200px;
    }
    #download-csv {
        font-size: 0.75em;
    }
}