body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.center-title {
    text-align: center;
    flex-grow: 1;
    color: rgb(255, 98, 0);
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 5px; /* Move the title 20px lower from the top */
    font-size: 30px; /* Set the font size to 24 pixels */
}

.logo-container {
    position: absolute;
    top: 0px;
    left: 3px;
    display: flex;
    align-items: center;
}

.logo {
    height: auto;
    max-width: 100%;
}

/* Adjust the width of both logos. You can modify these values as needed. */
.deloitte-logo {
    width: 150px; /* Adjust as needed */
    margin-right: 10px; /* Space between logos */
}

.hktb-logo {
    width: 150px; /* Adjust as needed */
}

.header-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.header-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.header-button:hover {
    background-color: #0056b3;
}

.close-button {
    background-color: #ff0000;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.3s;
}

.close-button::after {
    content: "Quit";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.close-button:hover::after {
    opacity: 1;
}

.close-button:hover {
    background-color: #cc0000;
}

.close-button.disabled {
    background-color: #808080;
    cursor: not-allowed;
}

.container {
    width: 90%;
    max-width: 1000px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1 {
    text-align: center;
}

.model-selection {
    margin-bottom: 10px;
}

.file-upload {
    margin-bottom: 10px;
}

#upload-status {
    margin-bottom: 10px;
    color: #007bff;
    font-weight: bold;
}

.chat-container {
    margin-bottom: 20px;
}

#file-input {
    display: none;
}

#upload-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

#upload-button:hover {
    background-color: #218838;
}

#chat-window {
    position: relative;
    height: calc(100vh - 340px); /* Adjust height dynamically */
    border: 2px solid #ffa500; /* Thicker orange border */
    border-radius: 10px;
    overflow-y: auto; /* Allow vertical scrolling */
    overflow-x: hidden; /* Hide horizontal overflow */
    padding: 10px;
    margin-bottom: 20px; /* Reduced to 20px gap */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Stronger shadow */
    background-color: #fff5e6; /* Light orange background */
    padding-top: 0px; /* Removed padding to move text up */
    z-index: 1; /* Ensure chat window is below the close button */
    font-size: 14px; /* Set font size for all content in chat window */
}

#chat-window [style*="color: blue;"] {
    font-size: 14px; /* Set font size specifically for LLM responses */
}

#chat-window .user-message {
    color: green; /* Set user message color to green */
}

/* Markdown styles */
#chat-window h1, #chat-window h2, #chat-window h3, #chat-window h4, #chat-window h5, #chat-window h6 {
    margin-top: 10px;
    margin-bottom: 5px;
}

#chat-window p {
    margin-top: 0;
    margin-bottom: 5px;
}

#chat-window code {
    background-color: #f0f0f0;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

#chat-window pre {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}

#chat-window blockquote {
    border-left: 4px solid #ccc;
    padding-left: 10px;
    margin-left: 0;
    color: #666;
}

#chat-window ul, #chat-window ol {
    padding-left: 20px;
}

#chat-window table {
    border-collapse: collapse;
    margin-bottom: 10px;
}

#chat-window th, #chat-window td {
    border: 1px solid #ccc;
    padding: 5px;
}

#chat-window img {
    max-width: 100%;
    height: auto;
}

.input-area {
    display: flex;
    margin-bottom: 20px;
    align-items: center;
    margin-top: 20px; /* Added to create 20px gap with chat window */
}

.input-container {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.rolodex-input {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 60px; /* Reduced height */
    border: none; /* Remove border */
    border-radius: 15px; /* Rounder corners */
    overflow: hidden; /* Hide overflow */
    position: relative; /* Add this to ensure it captures mouse events */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add shadow */
}

.rolodex-input::-webkit-scrollbar {
    width: 8px;
}

.rolodex-input::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.rolodex-input::-webkit-scrollbar-thumb {
    background-color: #add8e6;
    border-radius: 4px;
    border: 2px solid #f0f0f0;
}

.previous-message, .next-message {
    padding: 2px 10px; /* Reduced padding */
    font-size: 12px; /* Smaller font size */
    color: #888;
    background-color: #f8f8f8;
    white-space: nowrap;
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis for overflowing text */
    height: 16px; /* Reduced height */
    max-width: 100%; /* Ensure it doesn't extend beyond the container */
    border: none; /* Remove outline */
    resize: none; /* Prevent resizing */
    outline: none; /* Remove the outline when focused */
}

.rolodex-input {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 60px; /* Reduced height */
    border: 3px solid #add8e6; /* Thicker light blue border */
    border-radius: 15px; /* Rounder corners */
    overflow: hidden; /* Hide overflow */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #add8e6 #f0f0f0; /* For Firefox */
    position: relative; /* Add this to ensure it captures mouse events */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add shadow */
}

#user-input {
    flex-grow: 1;
    padding: 5px 10px; /* Reduced padding */
    border: none;
    font-size: 14px; /* Slightly smaller font size */
    outline: none;
    overflow-y: auto; /* Allow vertical scrolling */
    resize: none; /* Prevent resizing */
}

#user-input {
    flex-grow: 1;
    padding: 5px 10px; /* Reduced padding */
    border: none;
    font-size: 14px; /* Slightly smaller font size */
    outline: none;
    overflow-y: auto; /* Allow vertical scrolling */
    resize: none; /* Prevent resizing */
}

.arrow-icons {
    position: absolute;
    right: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.arrow-up, .arrow-down {
    font-size: 12px;
    color: #007bff;
    cursor: pointer;
    user-select: none;
}

.arrow-up:hover, .arrow-down:hover {
    color: #0056b3;
}

#send-button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: 2px solid #0056b3;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    height: 40px; /* Kept at original height */
    margin-left: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Added shadow */
}

#send-button:hover {
    background-color: #0056b3;
}

.info-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 20px; /* Changed to 20px gap with input area */
}

.left-panel {
    width: 68%;
}

.right-panel {
    width: 30%;
    display: flex;
    flex-direction: column;
}

.model-info, #token-count {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.model-info {
    background-color: #f0f8ff;
}

#token-count {
    background-color: #f0fff0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.llm-description {
    background-color: #fff0f5;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    margin-top: 3%; /* Added to move the box down by 3% */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: calc(100% + 47%);
    box-sizing: border-box;
    font-size: 0.7em; /* Set font size to match model and token fonts */
}

.model-info, #token-count {
    font-size: 0.7em;
    color: #666;
}

.llm-description {
    font-size: 0.7em; /* Set font size to match model and token fonts */
}

#typing-animation {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 20px;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #333;
    border-radius: 50%;
    margin: 0 3px;
    animation: pulse 1.5s infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0% {
        transform: scale(0.7);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.7);
        opacity: 0.5;
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.7);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0.7);
        opacity: 0.5;
    }
}

/* Change user text color to match the User: prompt green color */
#chat-window .user-message {
    color: green; /* Set user message color to green */
}

#typing-animation {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 20px;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #333;
    border-radius: 50%;
    margin: 0 3px;
    animation: pulse 1.5s infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}
