body {
    font-family: 'Roboto', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#chat-container {
    width: 90%;
    max-width: 600px;
    height: 90vh;
    background-color: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#header {
    background-color: #333;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header-content {
    text-align: left;
}

#header h1 {
    margin: 0;
    font-size: 1.5em;
    color: #ffffff;
    font-weight: 700;
}

#header p {
    margin: 5px 0 0;
    color: #bbbbbb;
    font-weight: 400;
}

#addons-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.3s;
}

#addons-btn:hover {
    background-color: #0056b3;
}

#chat-box {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* For browsers that support it */
#chat-box::-webkit-scrollbar {
    width: 8px;
}

#chat-box::-webkit-scrollbar-track {
    background: #1e1e1e;
}

#chat-box::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 10px;
    border: 2px solid #1e1e1e;
}

#options-container {
    display: none; /* Replaced by addons modal */
}

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

.user-message {
    background-color: #005c97;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-message {
    background-color: #3a3a3a;
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.typing-indicator {
    align-self: flex-start;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #3a3a3a;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
}

.typing-indicator .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #888;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator .dot:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

#input-container {
    display: flex;
    padding: 10px 15px;
    border-top: 1px solid #444;
    background-color: #1e1e1e;
    gap: 10px;
    align-items: center;
}

#user-input {
    flex-grow: 1;
    padding: 12px 18px;
    border: 1px solid #444;
    border-radius: 25px;
    background-color: #252525;
    color: #e0e0e0;
    outline: none;
    font-size: 1em;
    transition: border-color 0.3s;
}

#user-input:focus {
    border-color: #007bff;
}

#send-btn {
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

#send-btn:hover {
    background-color: #0056b3;
}

#send-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

/* Addons Modal Styles */
#addons-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#addons-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

#addons-content {
    background-color: #252525;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#addons-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}

#addons-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: #fff;
}

#close-addons-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

#close-addons-btn:hover {
    color: #fff;
}

.addon-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.addon-option label {
    font-size: 1.1em;
    color: #e0e0e0;
    font-weight: 500;
    cursor: pointer;
}

.addon-option input[type="checkbox"] {
    accent-color: #007bff;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.addon-description {
    width: 100%;
    margin: 5px 0 0 0;
    color: #aaa;
    font-size: 0.9em;
    padding-left: 28px; /* Align with label */
}