html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

body {
    background-color: #f4f4f4;
    color: #333;
}

body.dark-mode {
    background-color: #222;
    color: white;
}

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-align: center;
}

.logo {
    width: 50px;
    height: auto;
}

.btn {
    padding: 8px 12px;
    background: white;
    color: #007bff;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    margin: 5px;
    font-size: 14px;
}

.btn:hover {
    background-color: #0056b3;
    color: white;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 10px;
}

.chart-container {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow-x: auto;
}

canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 400px;
}

.dark-mode .chart-container {
    background: #333;
}

.footer {
    text-align: center;
    padding: 15px;
    background-color: #007bff;
    color: white;
    font-size: 14px;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

select {
    padding: 10px;
    font-size: 16px;
    margin: 10px auto;
    display: block;
    border-radius: 6px;
    width: 90%;
    max-width: 300px;
}

#chartdiv {
    width: 100%;
    height: 400px;
    margin: 0 auto;
    max-width: 700px;
}

#infoModal {
    width: 90%;
    max-width: 400px;
}

/* ---------- RESPONSIVE STYLING ---------- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    header h2 {
        font-size: 20px;
        margin: 10px 0;
    }

    .btn {
        font-size: 13px;
        padding: 8px 10px;
    }

    .actions {
        flex-direction: column;
        align-items: center;
    }

    canvas {
        max-height: 300px !important;
    }

    .chart-container {
        padding: 15px;
    }

    #chartdiv {
        height: 300px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px;
    }

    .btn {
        width: 100%;
        margin: 5px 0;
    }

    .chart-container h2 {
        font-size: 18px;
    }

    #modalTitle {
        font-size: 18px;
    }

    #modalContent {
        font-size: 14px;
    }
}
