* {
    box-sizing: border-box;
}

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

.chat-container {
    background-color: #1e1e2f;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px;
    height: 85vh;
    overflow: hidden;
}

.chat-header {
    background-color: #2a2a3b;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3b3b4f;
}

.chat-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #00ffcc;
}

.model-selector {
    background-color: #1e1e2f;
    color: #e0e0e0;
    border: 1px solid #3b3b4f;
    padding: 8px 12px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

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

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 8px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.user-message {
    background-color: #00ffcc;
    color: #121212;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

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

.chat-input-area {
    padding: 15px;
    background-color: #2a2a3b;
    display: flex;
    gap: 10px;
    border-top: 1px solid #3b3b4f;
}

#userInput {
    flex: 1;
    background-color: #1e1e2f;
    color: #e0e0e0;
    border: 1px solid #3b3b4f;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#userInput:focus {
    border-color: #00ffcc;
}

#askBtn {
    background-color: #00ffcc;
    color: #121212;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#askBtn:hover:not(:disabled) {
    background-color: #00ccaa;
}

#askBtn:disabled {
    background-color: #555;
    cursor: not-allowed;
    color: #888;
}
