body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

.container {
    text-align: center;
}

.hidden {
    visibility: hidden;
    /* Ensure space is reserved */
    opacity: 0;
    /* Start with zero opacity for fade-in effect */
    transition: opacity 0.5s ease;
    /* Add fade-in transition */
}

#password-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 300px;
    /* Set a fixed width */
}

#password-form .instructions {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

#password-form input,
#password-form button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    /* Ensure padding and border are included in the width */
}

#password-form input {
    border: 1px solid #ccc;
    padding-left: 15px;
}

#password-form button {
    background-color: #777;
    /* Neutral grey for the button */
    color: #fff;
    border: none;
    /* Remove border */
    cursor: pointer;
}

#password-form button:hover {
    background-color: #555;
    /* Slightly darker grey on hover */
}

#content h1 {
    font-size: 24px;
    /* Increase font size */
    margin-bottom: 20px;
}

#image-container.hidden {
    display: none;
    /* Ensure image container is hidden initially */
}

#image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 90vw;
    height: auto;
    /* Maintain aspect ratio */
    border-radius: 15px;
    overflow: hidden;
    /* Ensure rounded corners apply to canvases */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    /* Enhance and darken drop shadow */
}

#image-canvas,
#overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    /* Add rounded corners to canvases */
}

canvas {
    display: block;
}

#download-button {
    background-color: #777;
    /* Neutral grey for the button */
    color: #fff;
    border: none;
    padding: 10px 20px;
    /* Reset to smaller size */
    border-radius: 5px;
    margin-top: 20px;
    font-size: 16px;
    /* Smaller font size */
    cursor: pointer;
    visibility: hidden;
    /* Ensure space is reserved */
    opacity: 0;
    /* Start with zero opacity for fade-in effect */
    transition: opacity 0.5s ease;
    /* Add fade-in transition */
}

#download-button.show {
    visibility: visible;
    opacity: 1;
    /* Fully visible when shown */
}

#download-button:hover {
    background-color: #555;
    /* Slightly darker grey on hover */
}

@media (min-width: 769px) {
    #image-container {
        width: auto;
        height: 100%;
    }
}