body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.main-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #fff;
}

.sidebar {
    width: 260px;
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    padding: 12px;
    transition: transform 0.3s ease-in-out;
    transform: translateX(0);
}

.sidebar.collapsed {
    transform: translateX(-100%);
    position: absolute;
    height: 100%;
    z-index: 10;
}

#menu-toggle-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.sidebar-header {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.new-chat-btn {
    width: 100%;
    padding: 12px;
    border: 1px dashed #ccc;
    background-color: transparent;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.new-chat-btn:hover {
    background-color: #e9ecef;
    border-color: #aaa;
}

.chat-history {
    flex-grow: 1;
    overflow-y: auto;
    padding-top: 10px;
}

.chat-history-item {
    padding: 12px 10px;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.chat-history-item:hover {
    background-color: #e9ecef;
}

.chat-history-item.active {
    background-color: #dee2e6;
    font-weight: 500;
}

.chat-history-item .delete-chat-btn {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
}

.chat-history-item:hover .delete-chat-btn {
    display: block;
}

.chat-history-item .delete-chat-btn:hover {
    color: #343a40;
}
/* Animation for new messages */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar .header {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar .header h1 {
    margin: 0;
    font-size: 1.6rem;
    color: #f6872d;
}

.sidebar .header p {
    margin: 4px 0 0;
    color: #b56e2c;
}

.chat-container {
    flex: 1;
    height: auto;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    padding: 24px; /* More padding */
    background-color: #fffaf5; /* Light orange background */
    border-bottom: 1px solid #ffe8d1;
    text-align: center;
    position: relative;
}

.chat-input .toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.toggle-label {
    font-size: 0.9rem;
    color: #b56e2c;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #f6872d;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.header h1 {
    margin: 0;
    font-size: 1.6rem;
    color: #f6872d; /* Brand color */
}

.header p {
    margin: 4px 0 0;
    color: #b56e2c; /* Darker text for readability */
}

.chat-box {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px; /* More space between messages */
}

.message {
    padding: 12px 18px;
    border-radius: 20px;
    max-width: 80%;
    line-height: 1.5;
    animation: fadeIn 0.3s ease-in-out;
}

.message p {
    margin: 0;
}

.message a {
    color: #d96d1a;
    text-decoration: underline;
}

.message a:hover {
    color: #b56e2c;
}

.user-message {
    background-color: #fff3e0; /* Light orange for user */
    color: #c76317;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.bot-message {
    background-color: #f1f3f4;
    color: #3c4043;
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

.bot-message .search-result {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    background-color: #fff;
}

.bot-message .search-result a {
    font-weight: 600;
    font-size: 1.1em;
    color: #f6872d;
    text-decoration: none;
}

.bot-message .search-result a:hover {
    text-decoration: underline;
}

.bot-message .search-result p {
    margin: 5px 0 0;
    font-size: 0.95em;
}

.loading-message {
    font-style: italic;
    color: #999;
    align-self: flex-start;
}

.example-questions {
    padding: 0 20px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.example-question {
    background-color: #f1f3f4;
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.example-question:hover {
    background-color: #e8eaf6;
    border-color: #c5cae9;
}

.filter-container {
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-btn {
    background-color: #f1f3f4;
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 8px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.filter-btn:hover {
    background-color: #e9ecef;
    border-color: #ccc;
}

.filter-btn.active {
    background-color: #333;
    color: white;
    border-color: #333;
}

.chat-input {
    display: flex;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
}

#user-input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 22px;
    padding: 12px 18px; /* More padding */
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s; /* Added shadow transition */
}

#user-input:focus {
    border-color: #f6872d;
    box-shadow: 0 0 0 3px rgba(246, 135, 45, 0.2); /* Focus ring */
}

#send-btn {
    margin-left: 12px;
    padding: 12px 24px;
    border: none;
    background-color: #f6872d; /* Brand color */
    color: white;
    border-radius: 22px;
    font-size: 1rem;
    font-weight: 500; /* Bolder text */
    cursor: pointer;
    transition: background-color 0.2s;
}

#send-btn:hover {
    background-color: #e0701a; /* Darker orange on hover */
}

/* Settings Modal */
.settings-container {
    padding: 12px;
    border-top: 1px solid #e0e0e0;
}

#settings-btn {
    width: 100%;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    text-align: left;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Dark Mode */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}
body.dark-mode .main-container { background-color: #1e1e1e; }
body.dark-mode .sidebar { background-color: #252526; border-right-color: #333; }
body.dark-mode .chat-history-item:hover { background-color: #333; }
body.dark-mode .chat-history-item.active { background-color: #444; }
body.dark-mode .header { background-color: #2d2d2d; border-bottom-color: #333; }
body.dark-mode .chat-box { background-color: #1e1e1e; }
body.dark-mode .user-message { background-color: #333; color: #e0e0e0; }
body.dark-mode .bot-message { background-color: #252526; color: #e0e0e0; }
body.dark-mode .example-question, body.dark-mode .filter-btn { background-color: #333; border-color: #555; color: #e0e0e0; }
body.dark-mode .chat-input { background-color: #252526; border-top-color: #333; }
body.dark-mode #user-input { background-color: #3c3c3c; border-color: #555; color: #e0e0e0; }
body.dark-mode .modal-content { background-color: #2d2d2d; color: #e0e0e0; }

/* Admin Panel Tabs */
.tab-container {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
}

.tab-link {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 1rem;
}

.tab-link:hover {
    background-color: #ddd;
}

.tab-link.active {
    background-color: #ccc;
}

.tab-content {
    display: none;
    padding: 6px 12px;
}

.admin-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
}

.add-item-form input {
    width: calc(100% - 80px);
    padding: 8px;
    margin-right: 10px;
} 