body, html {
    width: 100%;
    height: 100%;
    margin: 0;
    background-color: #FFCD54;
    color: white;
    display: flex;
    justify-content: space-between; /* Align items to the left and right */
    overflow: hidden; /* Prevent scrolling */
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: ghostwhite;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000; /* Ensure it is on top of everything else */
}

#splash-title {
    font-size: 48px;
    color: black;
    margin-bottom: 20px;
    font-weight: bold;
}

#splash-subtitle {
    font-size: 16px;
    color: grey;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

#start-button {
    font-size: 24px;
    padding: 15px 30px;
    background-color: #FFD51E;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-button:hover {
    background-color: #FFB400;
}

#left-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#avatar {
    display: block;
    width: 100%;
    height: 100%;
    margin-bottom: 0px;
}

#right-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    background-color: white; /* Chat background */
    color: black; /* Chat text color */
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-left: auto; /* Ensure it is on the right side */
}

#chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    margin-bottom: 20px;
    height: 500px; /* Ensure the chat area has enough height */
}

.chat-message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    max-width: 70%;
}

.user-message {
    background-color: #FFF3C5;
    align-self: flex-end;
}

.bot-message {
    background-color: #f1f1f1;
    align-self: flex-start;
}

#controls {
    display: flex;
    width: 100%;
    margin-bottom: 10px;
}

#text {
    flex: 1;
    font-family: Arial;
    font-size: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
}

#speak {
    width: 100px;
    font-family: Arial;
    font-size: 20px;
    background-color: #FFCD54;
    color: white;
    border: none;
    border-radius: 10px;
    margin-left: 10px;
    cursor: pointer;
}

#loading {
    font-family: Arial;
    font-size: 20px;
    text-align: center;
    margin-top: 20px;
    color: grey;
}

#social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

#social-links a {
    text-decoration: none;
    font-family: Arial;
    font-size: 15px;
    color: #555;
    background-color: #f1f1f1;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s;
}

#social-links a:hover {
    background-color: #FFD51E;
    color: white;
}

@media (max-width: 768px) {

    body, html {
        flex-direction: column; /* Stacks panels vertically on mobile */
        padding: 0; /* Ensure no extra padding */
        margin: 0; /* Ensure no extra margin */
        box-sizing: border-box; /* Include padding and border in element's width and height */
    }

    #left-panel{
        display: block !important;
        width: 100%;
        height: 50%;
        overflow-y: auto;
    }

    #right-panel {
        width: 100%;
        height: 50%;
        display: flex;
        flex-direction: column;
        background-color: white; /* Chat background */
        color: black; /* Chat text color */
        border-radius: 15px;
        padding: 20px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        overflow: hidden; /* Prevents content from overflowing out of the panel */
    }

    #start-button {
    font-size: 20px;
    padding: 12px 20px;
    }

    #splash-title {
        font-size: 32px;
    }

    #splash-subtitle {
        font-size: 14px;
    }

    /*#right-panel {*/
    /*    width: 100%;*/
    /*    margin-top: 20px;*/
    /*}*/



    #text {
        font-size: 16px;
    }

    #speak {
        width: 20% !important;
        padding: 12px 20px !important;
        font-size: 18px !important;
        margin-left: 10px !important;
        margin-right: 40px !important;
    }

    #social-links {
        flex-direction: column;
        align-items: center;
    }

    #controls {
        /*display: flex !important;*/
        /*flex-direction: row !important;*/
        align-items: center !important;
        /*justify-content: space-between !important;*/
        margin-bottom: 10px !important;
        position: absolute !important;
        bottom: 0 !important;
        width: 95% !important;
        padding: 10px !important;
        /*box-sizing: border-box !important;*/
        background-color: white !important;
    }

    #social-links {
        visibility: hidden;
        height: 0;
    }

    #chat {
        height: auto;
        width: auto;
        margin-bottom: auto;  /* Ensure there's no margin at the bottom */
        padding-bottom: 10%;
        padding-right: 10%;
        scroll-behavior: smooth;  /* Ensure smooth scrolling */
    }
}
