#chatWindow {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    font-family: 'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

#closeChatWindow {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 1;
}

#chat_title {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-size: 1.2em;
    font-weight: 500;
}

#chat_title u {
    text-decoration: none;
}

#chatForm {
    padding: 15px;
    background-color: #f8f9fa;
}

#knowledgeBaseSelector {
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    font-size: 0.9em;
    width: 200px;
}

#userPrompt {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    resize: none;
    font-size: 0.95em;
    font-family: inherit;
}

#submit {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#submit:hover {
    background-color: #1976D2;
}

#caution {
    font-size: 0.8em;
    color: #f44336;
    padding: 5px 15px;
    background-color: #ffebee;
}

#chatMessages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 300px;
    background-color: #ffffff;
}

#audioControls {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

#stopVoice {
    background-color: #757575;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9em;
}

#clearChat {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

#clearChat:hover {
    background-color: #d32f2f;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    #chatWindow {
        width: 90%;
        right: 5%;
        bottom: 10px;
    }
}
