* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: 'Arial', sans-serif;
    background-color: #e1e8ed; /* Twitter's light gray background */
    overflow: hidden;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.loading {
    background: url("/static/images/loading3.gif") no-repeat left center;
    background-size: contain;
}

.charm-bold {
    font-family: "Charm";
    font-weight: 700;
    color: #1da1f2; /* Twitter blue */
}

.edu-sa {
    font-family: "Edu SA Beginner";
    font-optical-sizing: auto;
    font-weight: 500;
}

#top-menu {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1da1f2; /* Twitter blue */
    color: #fff;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#announcementx {
    text-align: center;
    font-size: 2em;
    color: #fff;
    font-weight: bold;
    background-color: transparent;
    z-index: 5;
    position: relative;
}

#study-area {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-overlay {
    position: fixed;
    height: 40px;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1da1f2; /* Twitter blue */
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    font-size: 16px;
    z-index: 2;
}

.footer-overlay a {
    color: #ffffff; /* White links */
    text-decoration: none;
}

.footer-overlay a:hover {
    text-decoration: underline;
}

#chat-interface {
    width: 90%;
    max-width: 1000px;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    padding: 20px;
    border: 1px solid #1da1f2; /* Twitter blue border */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: 'Arial', sans-serif;
    color: #333;
}

#chat-form {
    display: flex;
    gap: 5px;
    width: 100%;
}

#chat-form input[type="text"] {
    flex-grow: 1;
    padding: 8px;
    border-radius: 0;
    border: 1px solid #1da1f2; /* Twitter blue border */
    outline: none;
    font-size: 22px;
}

#chat-form input[type="text"]:focus {
    border-color: #1da1f2;
    box-shadow: 0 0 0 2px rgba(29, 161, 242, 0.5);
}

#chat-form button {
    padding: 8px 15px;
    background-color: #1da1f2;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#chat-form button:hover, #chat-form button:focus {
    background-color: #1a91da;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#chat-form button i {
    font-size: 16px;
}

#dialogue-box {
    width: 90%;
    max-width: 1000px;
    position: fixed;
    top: 90px;
    bottom: 180px;
    left: 50%;
    background-color: #ffffff;
    border: 1px solid #e1e8ed;
    padding: 15px 20px;
    box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 300;
    transform: translateX(-50%);
    max-height: 100%;
}

.dialogue-content {
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

.user-prompt {
    background: #e8f5fd; /* Lighter blue background */
    color: #1da1f2; /* Twitter blue text */
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 15px;
    border: 1px solid #1da1f2; /* Twitter blue border */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    align-self: flex-end;
    white-space: pre-wrap;
}

.bot-response {
    background: #f5f8fa; /* Twitter's light gray background */
    color: #14171a; /* Twitter's dark gray text */
    font-size: 1.1em;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e1e8ed; /* Light gray border */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    align-self: flex-start;
    white-space: pre-wrap;
}

/* Additional accessibility improvements */
#chat-form input[type="text"], #chat-form button {
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

#chat-form input[type="text"]:hover, #chat-form input[type="text"]:focus, 
#chat-form button:hover, #chat-form button:focus {
    border-color: #1a91da;
    box-shadow: 0 0 0 3px rgba(26, 145, 218, 0.3);
}
