body {
    font-family: Calibri;
}

/* Style for the top bar */
#topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #cbcbd8;
    /* Dark background color */
    color: rgb(197, 168, 231);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    flex-wrap: wrap;
    /* Allow wrapping for smaller screens */
}

/* Style for the logo and text */
#logo-text {
    display: flex;
    align-items: center;
    flex: 1;
    /* Allow it to grow */
}

#logo {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

#title {
    font-size: 24px;
    color: white;
    font-family: Calibri;
}

/* Style for the icon buttons */
#icon-buttons {
    display: flex;
    align-items: center;
    margin-right: 80px;
    /* Add margin to the right */
    flex-wrap: wrap;
    /* Allow wrapping for smaller screens */
}

#icon-buttons button,
#icon-buttons label {
    background-color: #538d4e;
    /* Green color for buttons */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
    margin-left: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#icon-buttons button:hover,
#icon-buttons label:hover {
    background-color: #3a5a40;
    /* Darker green on hover */
}

/* Ensure the container is centered */
#container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;  /* 80% viewport height */
    overflow: auto; /* Allow scrolling if needed */
    padding: 20px;
    border: 1px solid lightgrey;
    margin-top: 80px;
    /* Adjust for the height of the top bar */
}

#container {
    position: relative;
    width: 200px;
    /* Adjust width as needed */
    height: 200px;
    /* Adjust height as needed */
    transform-origin: center center;
    transition: transform 0.2s ease;
    /*background-color: #4e7b8d;*/
    
}

.square {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    position: absolute;
    background-color: #3a3a3c;
    /* Dark gray background for squares */
    border: 1px solid #565758;
    /* Slightly lighter gray border */
    touch-action: none;
    /* Disable default touch actions */
}

/* Style for the settings menu */
#settingsMenu {
    position: absolute;
    width: 100px;
    top: 70px;
    /* Adjust based on the height of the top bar */
    right: 50px;
    /* Align with the right side of the top bar */
    background-color: #cbcbd8;
    /* Match the top bar background color */
    border: 1px solid #565758;
    /* Slightly lighter gray border */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    display: none;
    /* Initially hidden */
    z-index: 1001;
    /* Ensure it appears above other elements */
}

#settingsMenu button,
#settingsMenu label {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #3a5a40;
    ;
    /* Green color for buttons */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
    /* Align text to the left */
}

#settingsMenu input[type="file"] {
    display: none;
    /* Hide the file input */
}

#settingsMenu button:hover,
#settingsMenu label:hover {
    background-color: #3a5a40;
    /* Darker green on hover */
}

#settingsMenu input[type="file"] {
    display: none;
    /* Hide the file input */
}


/* Media Queries for Mobile Compatibility */
@media (max-width: 768px) {
    #title {
        font-size: 20px;
        /* Smaller font size for smaller screens */
    }

    #icon-buttons button,
    #icon-buttons label {
        font-size: 18px;
        /* Smaller font size for icons */
        margin-left: 5px;
        /* Less margin for smaller screens */
        padding: 8px;
        /* Smaller padding for smaller screens */
    }

    #settingsMenu {
        top: 40px;
        /* Adjust based on the height of the top bar */
        right: 10px;
        /* Align with the right side of the top bar */
        padding: 8px;
        /* Smaller padding for smaller screens */
    }

    #settingsMenu button,
    #settingsMenu label {
        font-size: 14px;
        /* Smaller font size for buttons */
        padding: 8px;
        /* Smaller padding for buttons */
    }
}

/* Style for the palette menu */
#paletteMenu {
    position: absolute;
    width: 120px;
    top: 70px;
    /* Adjust based on the height of the top bar */
    right: 180px;
    /* Align with the right side of the top bar */
    background-color: #cbcbd8;
    /* Match the top bar background color */
    border: 1px solid #565758;
    /* Slightly lighter gray border */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    display: none;
    /* Initially hidden */
    z-index: 1001;
    /* Ensure it appears above other elements */
}

#paletteMenu button,
#paletteMenu label {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #3a5a40;
    /* Green color for buttons */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
    /* Align text to the left */
}

#paletteMenu button:hover,
#paletteMenu label:hover {
    background-color: #2e4a32;
    /* Darker green on hover */
}

/* Media Queries for Mobile Compatibility */
@media (max-width: 768px) {
    #paletteMenu {
        top: 40px;
        /* Adjust based on the height of the top bar */
        right: 10px;
        /* Align with the right side of the top bar */
        padding: 8px;
        /* Smaller padding for smaller screens */
    }

    #paletteMenu button,
    #paletteMenu label {
        font-size: 14px;
        /* Smaller font size for buttons */
        padding: 8px;
        /* Smaller padding for buttons */
    }
}

/* Smaller square size for mobile devices */
@media (max-width: 768px) {
    .square {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    #container {
        width: 200px;
        height: 200px;        
    }
    #container-wrapper {
        
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 60px;
        overflow:scroll;
    }
}