/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #1e1e2f;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* App Container */
.app-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    background-color: #2a2a40;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #1a1a2e;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
}

.sidebar-header {
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: #4a90e2;
}

.model-selector {
    margin-bottom: 20px;
}

.model-selector label {
    font-size: 0.9rem;
    color: #ffffff;
}

.model-selector select {
    width: 100%;
    background-color: #4a90e2;
    color: #ffffff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

/* Chat Container */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Chat Header */
.chat-header {
    background-color: #1a1a2e;
    padding: 15px;
    border-bottom: 1px solid #333;
}

.chat-header h2 {
    font-size: 1.5rem;
    color: #4a90e2;
}

/* Chat Window */
.chat-window {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #2a2a40;
}

/* Message Bubbles */
.message {
    margin-bottom: 15px;
    display: flex;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.3s ease-out forwards;
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

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

.message.user .message-content {
    background-color: #4a90e2;
    color: #ffffff;
}

.message.bot .message-content {
    background-color: #3a3a5a;
    color: #ffffff;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Input */
.chat-input {
    display: flex;
    padding: 10px;
    background-color: #1a1a2e;
    border-top: 1px solid #333;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #3a3a5a;
    color: #ffffff;
    margin-right: 10px;
}

.chat-input button {
    background-color: #4a90e2;
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-input button:hover {
    background-color: #357abd;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    justify-content: center;
    padding: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #4a90e2;
    border-radius: 50%;
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: 100vh;
        border-radius: 0;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #333;
    }

    .chat-container {
        flex: 1;
    }
}