* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f2f5;
}

.chat-container {
    max-width: 1200px;
    margin: 2rem auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    background: #2563eb;
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header img {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    border-radius: 50%;
}

.debug-toggle {
    padding: 0.5rem 1rem;
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.debug-panel {
    width: 0;
    background: #1f2937;
    color: #e5e7eb;
    overflow-y: auto;
    transition: width 0.3s ease;
}

.debug-panel.active {
    width: 400px;
    padding: 1rem;
}

.debug-section {
    margin-bottom: 1rem;
}

.debug-section h3 {
    color: #93c5fd;
    margin-bottom: 0.5rem;
}

.debug-section pre {
    background: #111827;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
}

.message {
    margin-bottom: 1rem;
    max-width: 80%;
}

.message.user {
    margin-left: auto;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    display: inline-block;
}

.user .message-content {
    background: #2563eb;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.assistant .message-content {
    background: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 0.25rem;
}

.error .message-content {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 0.5rem;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
}

.chat-input textarea {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    resize: none;
    height: 50px;
    font-size: 1rem;
}

.chat-input button {
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.chat-input button:hover {
    background: #1d4ed8;
}

.chat-input button:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    display: inline-block;
    line-height: 1.5;
    white-space: pre-wrap;
}

.message-content br {
    display: block;
    content: "";
    margin-top: 0.5em;
}

.message-content p {
    margin-bottom: 0.75em;
}

.message-content p:last-child {
    margin-bottom: 0;
}
/* Adicionar ao styles.css */
.message.pending .message-content {
    background: #f3f4f6;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}


@media (max-width: 768px) {
    .chat-container {
        margin: 0;
        height: 100vh;
        border-radius: 0;
    }

    .chat-header {
        border-radius: 0;
    }

    .debug-panel.active {
        width: 100%;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
    }
}