html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100%;
    width: 100%;
}

#blazor-error-ui {
    background-color: #ffffe0;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.error-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-container h1 {
    color: #e74c3c;
}

.error-container a {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4a6fdc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.error-container a:hover {
    background-color: #3a59b7;
}

:root {
    --primary-color: #4a6fdc;
    --secondary-color: #f0f2f5;
    --user-message-color: #e3effd;
    --bot-message-color: #f1f0f0;
    --border-radius: 12px;
}

.chat-container {
    display: flex;
    height: 100vh;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar {
    width: 300px;
    background-color: #ffffff;
    border-right: 1px solid #e1e4e8;
    padding: 20px;
    overflow-y: auto;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
}

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

.chat-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.status-indicator {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.connected {
    background-color: #d4edda;
    color: #155724;
}

.disconnected {
    background-color: #f8d7da;
    color: #721c24;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message-container {
    display: flex;
    margin-bottom: 15px;
    max-width: 70%;
}

.user-message {
    align-self: flex-end;
}

.bot-message {
    align-self: flex-start;
}

.message {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-message .message {
    background-color: var(--user-message-color);
    border-bottom-right-radius: 4px;
}

.bot-message .message {
    background-color: var(--bot-message-color);
    border-bottom-left-radius: 4px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.message-sender {
    font-weight: bold;
    color: #333;
}

.message-time {
    color: #666;
}

.message-content {
    word-break: break-word;
    line-height: 1.4;
}

.input-area {
    display: flex;
    padding: 15px;
    background-color: #ffffff;
    border-top: 1px solid #e1e4e8;
}

.message-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
}

.message-input:focus {
    border-color: var(--primary-color);
}

.send-button {
    margin-left: 10px;
    padding: 0 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s;
}

.send-button:hover {
    background-color: #3a59b7;
}

.send-button:disabled {
    background-color: #9cadd9;
    cursor: not-allowed;
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

textarea.form-control {
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a59b7;
}

.user-info {
    margin-bottom: 20px;
}

.user-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }

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

    .message-container {
        max-width: 90%;
    }
}