/* Ensure the body has a blue background and fills the viewport */
body {
    font-family: proxima-nova, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('bg.jpg'); /* Replace with the path to your image */
    background-size: cover; /* Ensures the image covers the entire viewport */
    background-position: center; /* Centers the image in the viewport */
    background-repeat: no-repeat; /* Prevents tiling */
    min-height: 100vh;
}

/* Center the app container and give it a white background with padding */
.app-container {
    background-color: #fff; /* White background for the app container */
    padding: 30px; /* Ensure equal padding on all sides */
    border-radius: 12px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Optional shadow for depth */
    text-align: center;
    max-width: 660px; /* Max width includes canvas (600px) + 30px padding on each side */
    margin: 0 auto; /* Center the container */
    box-sizing: border-box; /* Ensure padding is included in width calculation */
}

h1 {
    margin: 30px 0 15px 0;
    color: #fff;
    text-align: center;
    font-size: 48px;
    letter-spacing: -1px;
}

.canvas-container {
    position: relative;
    width: 90vw;
    height: 90vw;
    max-width: 600px;
    max-height: 600px;
    margin: 20px auto 0 auto;
    aspect-ratio: 1 / 1;
}

.canvas-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15; /* Optional: adjust transparency */
    pointer-events: none; /* Ensures the pattern doesn't interfere with canvas events */
}

canvas {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 1px solid #ccc;
}

/* Button styling */
.button-container {
    display: flex;
    gap: 10px;
    justify-content: center; /* Center the group of buttons */
    margin-top: 0px;
}

.upload-container {
    display: flex;
    align-items: center;
}

#upload-underlay,
#upload-overlay {
    display: none;
}

.button {
    background-color: #c3a54a;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    border: none;
}

.button.inactive {
    background-color: #999;
    cursor: not-allowed;
}

.button:hover:not(.inactive) {
    background-color: #d2b14e;
}

.instruction-text {
    font-style: italic;
    color: #555;
    margin-top: 15px;
    text-align: center;
}

.footer {
    font-size: 12px;
    color: #a99044;
    text-align: center;
    margin: 25px 0 25px 0;
}

#overlay-select {
    appearance: none;
    background-color: #c3a54a;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    text-align-last: center;
}

#overlay-select:hover {
    background-color: #d2b14e;
}

#overlay-select option {
    background-color: #fff;
    color: #000;
}
select {
	width: 250px;
}

/* Stack buttons vertically on smaller screens */
@media screen and (max-width: 600px) {
    body {
        margin: 15px;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
        margin-top: 0px;
    }

    .app-container {
        max-width: 100%;
        padding: 20px;
    }

    h1 {
        font-size: 36px;
        margin: 25px 0 15px 0; 
    }

    .instruction-text {
        font-size: 14px;
    }

    /* Mobile-specific adjustments for the preview image container */
    .canvas-container {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    select {
	 width: 100%;
	}
}