body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 20px;
    background-color: #f0f0f0;
}

body.dark {
    background-color: #333;
    color: white;
}

#main-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 1rem;
}

#left-labels, #right-labels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

canvas {
    border: 1px solid #000;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow-x: scroll;
}

#ui {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 25rem;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.dark #ui {
    background-color: #121210;
    color: white;
}

#ui > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

input[type="text"], input[type="file"] {
    box-sizing: border-box;
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

input[type="color"] {
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

input {
    box-shadow: 0 0 4px #ccc;
}

.dark input {
    background-color: #21201D;
    color: white;
    box-shadow: 0 0 4px black;
}

button, .button {
    display: block;
    flex: 1;
    line-height: 1.5;
    text-align: center;
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
}

button:hover, .button:hover {
    background-color: #45a049;
}

#upload-json {
    display: none;
}

.title-options {
    height: 80%;
    padding: 8px;
    border-radius: 4px;
    background-color: inherit;
    color: inherit;
}


@media print {
    h1, #ui, #left-labels, #right-labels, .theme-selector {
        display: none;
    }

    body, #main-container, canvas {
        width: 100%;
        height: 100%;
    }

    canvas {
        box-shadow: none;
        border: none;
    }
}

@media (max-width: 1000px) {
    #main-container {
        flex-direction: column;
    }

    canvas, #left-labels, #right-labels {
        width: 98vw;
    }

    #ui {
        width: 80vw;
        max-width: none;
    }

    .button-row {
        border: 1px solid #ccc;
        padding: 0.3rem;
    }
    
    .button-row button, .button-row .button {
        width: 75%;
    }
}

.theme-selector {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
}