body::before {
    content: "OTD AI TEST UI - NOT FOR PRODUCTION USE";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fc3909;
    color: white;
    text-align: center;
    padding: 5px;
    font-weight: bold;
    z-index: 1000;
    font-size: 14px;
}

/* Adjust body padding to accommodate the test banner */
body {
    padding-top: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f5f5f5;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* App Container */
.app-container {
    display: flex;
    width: 95%;
    max-width: 1200px;
    height: 85vh;
}

/* History Sidebar */
.history-sidebar {
    width: 250px;
    background-color: #f9f9f9;
    border-right: 1px solid #eee;
    border-radius: 10px 0 0 10px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.sidebar-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #333;
}

#new-chat-btn {
    width: 100%;
    padding: 8px;
    background-color: #0078d7;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#new-chat-btn:hover {
    background-color: #006abc;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* History item styling */
.history-item {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-content {
    flex: 1;
    overflow: hidden;
}

.delete-chat-btn {
    visibility: hidden;
    background: none;
    border: none;
    color: #575757;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-chat-btn .material-icons {
    font-size: px;
}

.history-item:hover .delete-chat-btn {
    visibility: visible;
}

.delete-chat-btn:hover {
    opacity: 1;
}

/* Existing styles */
.history-item:hover {
    background-color: #eaeaea;
}

.history-item.active {
    background-color: #e5f1fb;
    border-left: 3px solid #0078d7;
}

.history-title {
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-date {
    font-size: 0.7rem;
    color: #888;
    margin-top: 3px;
}

.timezone {
    display: inline-block;
    font-weight: 600;
    color: #0078d7;
    padding: 1px 4px;
    border-radius: 3px;
    background-color: #e5f1fb;
}

.chat-container {
    flex: 1;
    width: 90%;
    max-width: 800px;
    height: 100%;
    background-color: white;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.chat-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
}

.user {
    background-color: #0078d7;
    color: white;
    align-self: flex-end;
}

.system {
    background-color: #f1f1f1;
    color: #333;
    align-self: flex-start;
}

/* Common timestamp styles */
.timestamp {
    font-size: 0.7rem;
    margin-top: 5px;
    display: block;
}

/* User message timestamps - right aligned */
.user .timestamp {
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

/* System message timestamps - left aligned */
.system .timestamp {
    color: #888;
    text-align: left;
}

.chat-input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
}

#user-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#send-button {
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #0078d7;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

#send-button:hover {
    background-color: #006abc;
}

.loading {
    align-self: flex-start;
    padding: 10px 15px;
}

.loading::after {
    content: "...";
    animation: dots 1s steps(5, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: ".";
    }

    40% {
        content: "..";
    }

    60%,
    100% {
        content: "...";
    }
}

/* Sidebar Footer with User Info and Logout */
.sidebar-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background-color: #f1f1f1;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
    width: 100%;
}

.logout-btn:hover {
    background-color: #e5e5e5;
}

.logout-btn .material-icons {
    font-size: 16px;
    margin-right: 5px;
}