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

header {
    position: absolute;
    top: 0;
    width: 100%;
    background: transparent;
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
}

footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: transparent;
    text-align: center;
    padding: 10px 0;
    font-size: 10px;
    z-index: -1;
}



#content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60%;
}

#display-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 1;
}

#character-display {
    font-size: 72px;
    flex: 1;
    text-align: right;
}

#input-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: left;
}

#user-input {
    font-size: 36px;
    width: 150px;
    background-color: rgba(255, 255, 255, 0.0);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

#help-button {
    padding: 5px 10px;
    position: absolute;
    top: 100%; /* Placed at the bottom of the #content */
    left: 50%; /* Horizontally centered */
    transform: translateX(-50%); /* Adjust horizontally to center */
    width: auto;
    margin-top: 10px; /* Additional space from the bottom of #content */
}

#feedback, #help-text {
    color: green;
    font-size: 24px;
    display: none;
    position: absolute;
    top: calc(100% + 50px); /* Adjusted to position below the help button */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
}

#feedback {
    font-size: 24px;
}

.character-set-selector {
    background-color: white;
    color: blue;
    border: 2px solid blue;
    border-radius: 15px;
    padding: 10px 15px;
    margin: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s, color 0.3s;
}

.character-set-selector.selected {
    background-color: blue;
    color: white;
}

#character-set-selectors {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.mode-selector {
    background-color: white;
    color: purple;
    border: 2px solid purple;
    border-radius: 15px;
    padding: 10px 15px;
    margin: 5px;
    cursor: pointer;
    font-size: smaller;
    transition: background-color 0.3s, color 0.3s;
}

.mode-selector.selected {
    background-color: purple;
    color: white;
}

#mode-selectors {
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


#switch-over-button {
    background-image: url('5436307.png'); 
    background-color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
    border: none;
    border-radius: 50%;
    width: 60px; 
    height: 60px; 
    cursor: pointer;
    margin: 0 10px;
    padding: 0;
}

#background-character-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-size: 50vw; /* Adjust size to your preference */
    color: #f5f5f5; /* Very light gray color */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -2; /* Make sure it's behind all other content */
    overflow: hidden; /* Hide overflowed parts */
}

#instruction-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7); /* Dim the entire viewport */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

#instruction-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    width: 60%; /* Adjust for your preferred size */
    max-width: 500px; /* Maximum width */
    text-align: center;
}

#instructions-help-button {
    position: fixed;
    top: 40px;
    right: 40px;
    background-color: #007bff; /* Blue background */
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px; /* Larger padding for a bigger button */
    font-size: 18px; /* Larger font size */
    cursor: pointer;
    z-index: 30;
}

/* Media Query for Mobile Devices */
@media (max-width: 768px) {
    body {
        height: auto; /* Let the content define the body height */
        min-height: 40vh; /* At least half the height of the viewport */
    }

    header {
        font-size: 6px;
    }

    footer {
        position: relative;
        bottom: -50vw;
    }

    #background-character-container {
        position: fixed; /* Keep the background fixed */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        font-size: 30vw; /* Adjust the font size for mobile devices */
    }

    #content {
        justify-content: flex-start; /* Align content to the top */
        margin-top: 20px; /* Add some space at the top, adjust as needed */
	width: 80%;
    }

    #background-character-container {
	    font-size: 90vw;
	    align-items: flex-start;
	    justify-content: center;
	    top: -10vh;
    }

    #character-display {
        font-size: 50px; /* Larger font size */
        text-align: right;
    }

    .mode-selector {
        font-size: 12px;
	padding: 7px 5px;
	border-radius: 10px;
    }

    #mode-selectors {
        top: -50px; /* Adjust this value as needed for proper spacing */
    }

    .character-set-selector {
        padding: 7px 5px;
	border-radius: 10px;
        font-size: 14px;
    }

    #user-input {
        font-size: 30px; /* Larger font size */
	width: 50px;
	height: 50px;
    }

    #feedback, #help-text, #help-button {
        font-size: 16px; /* Larger font size */
    }

    #display-area {
        margin-bottom: 0; /* Adjust or remove margin as needed */
    }

    #help-button {
        margin-top: 15px; /* Adjust spacing */
        width: auto; /* Allows button to size according to its text */
	font-size: 10px;
    }

    #instruction-content {
	    width: 100%;
    }

    #instructions-help-button
    {
	    top: 10px;
	    right: 10px;
    }
}

