.chart {
    height: 80vh; /* Full viewport height */
    max-height: 80vh; /* Ensure it does not exceed the viewport */
    width: auto; /* Let the width adjust dynamically */
    background-color: var(--bg-color);
    padding: 20px;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    /* Centering */
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
}

html, body, #container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

h1 {
    margin: 50px; /* Remove default margin */
}

.chart-container {
    position: relative;
}
.custom-legend {
    position: absolute;
    top: 50%;
    right: -150px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}
.legend-color-box {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}
.legend-line {
    position: absolute;
    border: 1px solid #000;
    pointer-events: none;
}