/* チャットボックス */
#responseBox {
    width: 100% - 20px;
    height: 300px;
    padding: 12px;
    margin-bottom: 10px;
    border: 0px solid #fff;
    border-radius: 15px;
    background-color: #eee;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 12px;
    line-height: 1.4;
}

/* ユーザー入力エリア */
#userInput {
    width: calc(100% - 100px);
    padding: 10px 10px;
    border: 0px solid #fff;
    border-radius: 15px;
    background-color: #eee;
    font-size: 14px;
    resize: none;
    height: 20px;
    line-height: 20px;
}

/* 送信ボタン */
#sendButton {
    width: 100px;
    padding: 10px 20px;
    background-color: #f66;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    height: 40px;
    line-height: 20px;
}

/* ボタンホバー時の色 */
#sendButton:hover {
    background-color: #f99;
}

/* メッセージのスタイル */
.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message {
    margin: 16px 0;
}

.user-message {
    text-align: right;
    background-color: #fcc;
    padding: 8px;
    border-radius: 10px;
    max-width: 70%;
    margin-left: auto;
}

.gpt-message {
    text-align: left;
    background-color: #fff;
    padding: 2px 20px;
    border-radius: 10px;
    max-width: 75%;
}

.system-message {
    text-align: left;
    background-color: #ccc;
    padding: 8px;
    border-radius: 10px;
    max-width: 70%;
}

/* 追加されたメッセージのポップアップアニメーション */
.chat-pop {
    animation: chatPopIn 0.18s ease-out;
}

@keyframes chatPopIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 吹き出し内の段落・リストの余白を詰める */
.user-message p,
.gpt-message p,
.system-message p {
    margin: 2px;
}

.user-message ul,
.gpt-message ul,
.system-message ul {
    margin: 4px;
    padding-left: 1.2em;
}

/* チャット内のスクロールバー */
#responseBox::-webkit-scrollbar {
    width: 8px;
}

#responseBox::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#responseBox::-webkit-scrollbar-thumb:hover {
    background: #555;
}

