body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
    height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #ffd497 0%, #ff8928 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.chat-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.mensagem {
    margin: 15px 0;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.usuario {
    text-align: right;
}

.usuario .bubble {
    background: #007bff;
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    display: inline-block;
    max-width: 70%;
    word-wrap: break-word;
}

.ia {
    text-align: left;
}

.ia .bubble {
    background: white;
    color: #333;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    display: inline-block;
    max-width: 70%;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#prompt {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    resize: none;
    outline: none;
    transition: border-color 0.3s;
    max-height: 100px;
}

#prompt:focus {
    border-color: #007bff;
}

#enviarBtn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    min-width: 80px;
}

#enviarBtn:hover:not(:disabled) {
    background: #0056b3;
}

#enviarBtn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.loading {
    display: none;
    text-align: center;
    padding: 10px;
    color: #6c757d;
}

.loading.show {
    display: block;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    display: inline-block;
    max-width: 70%;
    word-wrap: break-word;
    border: 1px solid #f5c6cb;
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        height: 90vh;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .usuario .bubble,
    .ia .bubble {
        max-width: 85%;
    }
}