@font-face {
    font-family: 'VV0Regular';
    src: url('https://www.littlepixeldoods.xyz/fonts/VV0Regular.woff2') format('woff2'),
         url('https://www.littlepixeldoods.xyz/fonts/VV0Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'VV0Regular', Arial, sans-serif;
    background-color: #36393f;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    color: #ffffff; /* Set default text color to white for better contrast */
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%; /* Full width on mobile */
    max-width: 600px; /* Max width on desktop */
    color: #000000; /* Ensure text inside container is visible */
}

.accreditation {
    text-align: center;
    margin-bottom: 20px;
    font-family: 'VV0Regular', sans-serif;
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%; /* Make sure the header stretches across the top */
    max-width: 600px; /* Align with container width */
}

.accreditation h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.accreditation p {
    margin: 5px 0;
    font-size: 14px;
    color: #000000; /* Ensure the text is visible against the white background */
}

.accreditation a {
    color: #007bff;
    text-decoration: none;
}

.accreditation a:hover {
    text-decoration: underline;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

#speech-text {
    width: 100%;
    height: 100px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'VV0Regular', sans-serif;
}

#text-size {
    width: 60px; /* Adjust width as necessary */
    padding: 5px; /* Add padding for space inside the box */
    margin-bottom: 20px; /* Add extra margin below to prevent overlap */
    text-align: center; /* Center the text within the box */
    border: 1px solid #ccc; /* Keep consistent styling */
    border-radius: 4px; /* Match other elements' border radius */
    font-family: 'VV0Regular', sans-serif; /* Ensure the font matches */
}

.bubble-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap; /* Wrap buttons on mobile */
    justify-content: space-between; /* Space out buttons evenly */
}

.bubble-button {
    flex: 1 1 45%; /* Responsive buttons for mobile */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 5px; /* Space between buttons on mobile */
    font-family: 'VV0Regular', sans-serif; /* Apply VV0Regular font */
    background-color: #f8f8f8;
    color: #000000; /* Ensure text is visible */
    text-align: center;
}

#download-button {
    padding: 15px 20px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    width: 100%; /* Full width button on mobile */
    font-family: 'VV0Regular', sans-serif; /* Apply VV0Regular font */
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 360px;
    border: 0; /* Ensure no unwanted borders on the canvas */
    background-color: rgba(0, 0, 0, 0); /* Transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
}

#bubble-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0; /* Remove any potential margins */
    padding: 0; /* Remove any potential padding */
    background-color: rgba(0, 0, 0, 0); /* Transparent background */
}

.draggable {
    position: absolute;
    cursor: move;
}

.resizable {
    resize: both;
    overflow: hidden;
    box-sizing: border-box; /* Ensure padding is included in size */
    position: relative; /* Make sure the resizing handles position correctly */
}

.bubble {
    border: 2px dashed #ccc;
    background-size: 100% 100%; /* Ensure the background image scales with the element */
}

.text {
    font-family: 'VV0Regular', sans-serif;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border: 1px dashed #ccc;
    background-color: transparent !important; /* Make text background transparent */
    white-space: pre-wrap; /* Allow text to wrap within the element */
    overflow: hidden; /* Prevent overflow outside the text box */
    word-break: break-word; /* Break words if they exceed the box width */
}

/* Ensure resizable handles are visible and functional */
.ui-resizable-handle {
    background: #ccc; /* Light gray to make them more visible */
    border: 1px solid #999;
    z-index: 90; /* Keep them above other elements */
}

.ui-resizable-ne, .ui-resizable-se, .ui-resizable-sw, .ui-resizable-nw {
    width: 12px;
    height: 12px;
    z-index: 100;
    background: #333; /* Darker color for better visibility */
    cursor: pointer;
}

.ui-resizable-n, .ui-resizable-s {
    height: 7px;
    width: 100%;
    cursor: ns-resize;
}

.ui-resizable-e, .ui-resizable-w {
    width: 7px;
    height: 100%;
    cursor: ew-resize;
}

.hidden {
    display: none !important;
}

/* Mobile Responsive Adjustments */
@media only screen and (max-width: 600px) {
    .container {
        padding: 10px;
    }

    #speech-text {
        width: 100%;
        height: 80px;
        margin-bottom: 5px;
    }

    .bubble-button {
        flex: 1 1 45%; /* Make buttons take up more space */
        margin-bottom: 5px;
    }

    #download-button {
        width: 100%;
        margin-top: 10px;
    }

    .canvas-container {
        width: 100%;
        height: auto;
    }

    #bubble-canvas {
        width: 100%;
        height: 300px; /* Adjust based on needs */
    }

    .text {
        font-size: 14px; /* Adjust the default font size for smaller screens */
    }
}

/* Ensure no unwanted borders or artifacts on resizable elements */
.ui-resizable {
    box-shadow: none; /* Remove shadow that might create a line */
    border: 0 !important; /* Override any dashed borders */
}
