/* Base Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}

#chat-container {
    max-width: 900px;
    margin: 20px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Header Styles */
#chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #2c3e50;
    color: white;
    border-radius: 10px 10px 0 0;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid white;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #3498db;
}

/* Message Area */
#chat-messages {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.3s ease forwards;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 20px;
    border-radius: 20px;
    position: relative;
}

.user-message {
    margin-left: auto;
    background: #007bff;
    color: white;
    border-radius: 20px 20px 0 20px;
}

.bot-message {
    background: #f1f0f0;
    color: #333;
    border-radius: 20px 20px 20px 0;
}

/* Input Area */
.input-container {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#message-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    font-family: inherit;
}
button {
    padding: 12px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #0056b3;
}

/* Markdown Content */
.markdown-content {
    line-height: 1.6;
}

.markdown-content code {
    background: #f8f9fa;
    padding: 2px 5px;
    border-radius: 3px;
}

.markdown-content pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

/* Typing Indicator */
.typing-indicator {
    padding: 12px 20px;
    background: #f1f0f0;
    border-radius: 20px;
    display: none;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #93959f;
    display: inline-block;
    border-radius: 50%;
    margin-right: 5px;
    animation: typing 1s infinite;
}

/* User ID Input */
.user-id-container {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-id-wrapper {
    position: relative;
    flex: 1;
}

#user-id-input {
    flex: 1;
    padding: 12px 15px 12px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    outline: none;
}

#user-id-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

#user-id-input::placeholder {
    color: #adb5bd;
}

.user-id-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

.user-id-container.valid #user-id-input {
    border-color: #28a745;
}

/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#submit-user-id {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

#submit-user-id:hover {
    background: #0056b3;
}

#submit-user-id:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

#message-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

#message-input:disabled::placeholder {
    color: #999;
}

.input-container button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.input-container button {
    position: relative;
}

.input-container button:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 5px;
}