:root {
    --bubble-color: #2196f3;  /* デフォルトの色 */
    --bubble-border-color: #00000000;  /* デフォルトのボーダーカラー */
    --bubble-border-width: 0;  /* デフォルトのボーダー幅 */
}

body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    margin: 0;
    padding-top: 20px;
    /*display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh; */
    /*overflow: auto;  overflowをautoに変更 */
}

#fixed-area {
    margin-top: 20px;
    /* display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    width: 100%;
    z-index: 999;
    top: 0; */
}

#chat-log {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 30px 0px 30px 0px;
    width: 100%; /* ここを100%に変更 */
    max-width: 100%; /* ここを100%に変更 */
    max-height: calc(100vh - 300px); 
    overflow-y: auto;
    overflow-x: hidden; /* 横方向のスクロールを非表示にする */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    color: #FFFFFF; /* ホワイト */
    background-color: #00FF00;
}

button {
    border: none;
    border-radius: 50%;
    width: 90px;
    height: 90px;
    padding: 0;
    margin: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#button-container {
    margin: 10px;
    display: flex;
    align-items: center;
    width: 90%;
    justify-content: center;
    gap: 20px;
}

#start_chat {
    background: #4CAF50;
    color: white;
    width: 120px;
    height: 120px;
    font-size: 16px;
}

#end_chat {
    background: #f44336;
    color: white;
}

#play-response {
    background: #2196F3;
    color: white;
}

#stop-app {
    background: #FFEB3B;
    color: black;
}

button:hover {
    opacity: 0.7;
}

#history-area, #response-area {
    width: 90%;
    height: 200px;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

#image-area {
    width: 200px;
    height: 200px;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}

#image-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.chat-bubble {
    width: fit-content;
    max-width: 80%;
    padding: 10px;
    margin: 1em 60px 1em 30px;
    border-radius: 10px;
    position: relative;
    overflow: visible; 
}

div.chat-bubble p {
    margin: 0;
    padding: 0;
    color: white;
}

.sender {
    align-self: flex-start;
    background-color: #4CAF50;
}

.receiver {
    align-self: flex-end;
    background-color: var(--bubble-color);
   border: calc(var(--bubble-border-width) * 1px) solid var(--bubble-border-color);
}

.chat-bubble::after {
    content: '';
    position: absolute;
    border: 15px solid transparent;
}
.receiver.right::after {
    /* 吹き出しの右側に配置 */
    content: "";
    position: absolute;
    top: 50%;
    right: -24px;
    margin-top: -10px;
    border: 10px solid transparent;
    border-left: 14px solid var(--bubble-color);
}
.receiver.right::before {
    /* 吹き出しの右側に配置 */
    content: "";
    position: absolute;
    right: calc((var(--bubble-border-width) * -1px) - 24px);
    top: 50%;
    margin-top: -10px;
    border: 10px solid transparent;
    border-left: 14px solid var(--bubble-border-color);
}

.receiver.left::after {
    /* 吹き出しの左側に配置 */
  content: "";
  position: absolute;
  top: 50%;
  left: -24px;
  margin-top: -10px;
  border: 10px solid transparent;
  border-right: 14px solid var(--bubble-color);
}
.receiver.left::before {
    /* 吹き出しの左側に配置 */
    content: "";
    position: absolute;
    left: calc((var(--bubble-border-width) * -1px) - 24px);
    top: 50%;
    margin-top: -10px;
    border: 10px solid transparent;
    border-right: 14px solid var(--bubble-border-color);
}

.receiver.top::after {
    /* 吹き出しの上側に配置 */
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -10px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 14px solid var(--bubble-color);
}
.receiver.top::before {
    /* 吹き出しの上側に配置 */
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-bottom:calc(var(--bubble-border-width) * 1px);
    margin-left: -10px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 14px solid var(--bubble-border-color);
}

.receiver.bottom::after {
    /* 吹き出しの下側に配置 */
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -10px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 14px solid var(--bubble-color);
}
.receiver.bottom::before {
    /* 吹き出しの下側に配置 */
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top:calc(var(--bubble-border-width) * 1px);
    margin-left: -10px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 14px solid var(--bubble-border-color);
}

#options-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
}

h1, h2, h3 {
    width: 100%;
    text-align: center;
}

h1 {
    font-size: 2.5em; /* フォントサイズを大きく */
}

h2 {
    font-size: 2em; /* フォントサイズを少し小さく */
}

h3 {
    font-size: 1.75em; /* フォントサイズをさらに小さく */
}


.option-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(30% - 10px); /* 幅を狭くして、3つの項目が横並びになるように */
    margin-bottom: 20px;
}

.option-item label,
.option-item input,
.option-item select {
    width: 100%;
    text-align: center;
    margin-top: 5px;
}

#clear_chat {
    background:#424242;
    color:#FFFFFF;
}

#reset-settings {
    width: 40%;  /* or the percentage that fits your design */
    padding: 10px;
    margin-top: 20px;
    text-align: center;
    border-radius: 0;  /* makes the button's corners square */
    background:#4CAF50;
    color:#FFFFFF;
}

.option-item.reset-button {
    display: flex;
    justify-content: flex-end;
    flex-grow: 1; /* add this line */
}


@media (max-width: 768px) {
    button {
        width: 60px;
        height: 60px;
        font-size: 10px;
    }

    #start_chat {
        width: 80px;
        height: 80px;
        font-size: 12px;
    }

    #image-area {
        width: 150px;
        height: 150px;
    }
}
   
