* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #382D59; /* Base Color */
}

.container {
    position: relative;
    display: flex;
    height: 100%;
    padding: 20px;
}

.image-link {
    border: none;
    outline: none;
}

.borderless-image {
    border: none;
}

a {
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

a:hover {
    background-color: transparent;
}

.left-panel {
    top: 20px;
    left: 20px;
    padding: 20px;
    background-color: #4F416D; /* Slightly lighter than the base color */
    width: 300px;
    max-height: calc(100% - 40px);
    max-width: calc(100% - 40px);
    border-radius: 8px;
    color: #F4E4FF; /* Light text color */
}

.left-panel img {
    max-width: 100%;
}

.left-panel table {
    width: 100%;
    margin-top: 10px;
}

.left-panel td {
    padding: 4px;
}

.left-panel button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background-color: #8A77A1; /* Complementary Color */
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;

}

.left-panel button:hover {
    background-color: #715B89; /* Darken the button color on hover */
}

.right-panel {
    width: 768px;
    height: 576px;
    background-color: #483773; /* Slightly different shade */
    margin-left: auto;
    margin-right: auto;
    border-radius: 0px;

}

.right-panel > canvas {
    width: 100%!important;      /* Gross hack to stretch canvas via CSS for high DPI modes */
    height: 100%!important;
    object-fit: contain;
}   

/* Media query for viewport widths less than 768px */
@media screen and (max-width: 1170px) {
    .container {
        /* Switch from row to column layout */
        flex-direction: column;
        /* Center-align the content */
        align-items: center;
    }
    .left-panel {
        padding-right: 20px;
        order: 2;
        overflow: auto;
    }
    .left-panel, .right-panel {
        /* Set both panels to 100% width when stacked */
        width: 100%;
    }  
    .right_panel {
        margin: 0px;
        margin-bottom: 20px;
        order: 1;
    }
}

.notes-header {
    vertical-align: top;
}

.title-notes {
    font-size: 0.8em; /* Make text slightly smaller */
    text-justify: inter-word; /* Improves spacing between words */
}