html,body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

header {
    color: #029f85;
    background-image: linear-gradient(151deg, #41912f80, #34a87688 50%, #7ddbc57d);/* background-color: #f9f9f9; */
    width: 100%;
    height: 8%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 2.3svh;
}

#chat-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    height: calc(98dvh - 50px );
    padding-bottom: 10px;
    box-sizing: border-box;
    background-color: rgb(235, 235, 235);/* background-color: rgb(49, 49, 49);ダークモード用背景色 */
}

#chat-selector {
    display: flex;
    justify-content: flex-start;
    width: 90%;
    height: 4dvh;
    margin-top: 1%;
    background-color: none;
}
#chat-selector:nth-of-type(1) {
    align-items: flex-end;
}

#chat-menu1 {
    width: 55%;
    height: 100%;
    display: flex;
    align-items: center;
    border-radius: 20px 10px 0px 0px;
    background-color: #7ebe56df;
    font-size: 2.5svh;
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 700;
    font-style: Bold;
}

#chat-menu2 {
    width: 45%;
    height: 80%;
    display: flex;
    align-items: center;
    border-radius: 0px 20px 0px 0px;
    background-color: #a4d6f8;
    font-size: 2.5svh;
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 700;
    font-style: Bold;
}

.chat-menu {
    margin-top: 3%;
    margin-left: 3%;
    padding: 0;
    color: #483636;
}

#chat-area {
    width: 90%;
    height: 100%;
    /* margin-top: 1%; */
    margin-bottom: 3%;
    /* チャット画面の出力エリア */
    background-image: linear-gradient(151deg, #79cb6733, #50d99e45 50%, #41d3b141);/* background-color: #7ebe563b; background-color: #fbfbfb; */
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0px 0px 20px 20px;
}

/*  チャット画面内のメッセージ表示用のスタイル */
.chat-ai {
    width: 80%;
    height: auto;
    display: flex;
    align-items: center;
    margin: 2svh 0 2svh 2svh;
}

.chat-user {
    width: 98%;
    height: auto;
    margin: 2svh 2svh 2svh 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.chat-image {
    width: 6svh;
    height: 6svh;
    /* padding: 7%; */
    /* height: auto; */
    border-radius: 50%;
    margin-right: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.chat-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: 100%;
    object-fit: cover;
}

.chat-text {
    background-image: linear-gradient(151deg, #b5e8dec7, #52c7dc9c 50%, #5deac2ab);
    border-radius: 10px;
    width: fit-content;
    max-width: 70%;
    padding-left: 3svh;
    padding-right: 3svh;
    font-size: 0.9rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

/*  チャット画面内のメッセージ表示用のスタイル  ここまで*/



#input-container {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    padding: 0;
    
}

#input-area {
    display: flex;
    align-items: center;
    width: 90%;
    height: 50px;
    padding: 2px;
    border-radius: 40px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    margin-bottom: 2%;
}

#user-input {
    width: 90%;
    font-size: 18px;
    border: 0;
    margin: 10px;
    padding: 2px;
    outline: none;
    background-color: transparent;
}

#send-button {
    width: 8%;
    height: 80%;
    font-size: 1.2rem;
    margin-right: 10px;
    /* padding: 7px; */
    border-radius: 40px;
    border: 1px solid #ccc;
    color: #f9f9f9;
    background-color: #029f85;
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 500;
    font-style: normal;
}

#send-button:hover {
    background-color: #00c1a1;
}

#send-button:active {
    background-color: #009179;
}

.qa-question {
    margin-top: 2svh;
}

.qa-answer {
    margin: 2svh;
}

.qa-choices {
    display: flex;
    flex-direction: column;
}

/* ルールベースのボタン部分 */
.rule-button {
    background-color: #96eaaf
        /*#4CAF50*/
    ;
    border: none;
    color: rgb(66, 66, 66);
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1.2rem;
    margin: 4px 2px;
    border-radius: 8px;
    border: 1px solid #000;
    cursor: pointer;
}

.rule-button:hover {
    background-color: rgb(137, 230, 118)
        /*#45a049*/
    ;
}

.rule-button:active {
    background-color: #7ac66a
        /*#45a049*/
    ;
}

.answer-text {
    margin-top: 0px;
    margin-bottom: 15px;
}
/* ルールベースのボタン部分 END*/

@media (max-width: 800px) {
    #input-area {
        width: 98%;
    }

    #user-input {
        font-size: 16px;
        width: 80%;
    }

    #send-button {
        width: 15%;
        font-size: 16px;
    }
    .chat-menu {
        margin-top: 2svh;
        margin-left: 3%;
        padding: 0;
        color: #483636;
    }
    #chat-selector {
        display: flex;
        justify-content: flex-start;
        width: 98%;
        height: 5dvh;
        margin-top: 1%;
        background-color: none;
    }
    #chat-area {
        width: 98%;
        height: 100%;
        /* margin-top: 1%; */
        margin-bottom: 3%;
        /* チャット画面の出力エリア */
        background-image: linear-gradient(151deg, #79cb6733, #50d99e45 50%, #41d3b141);
        /* background-color: #7ebe563b; background-color: #fbfbfb; */
        box-sizing: border-box;
        overflow-y: auto;
        overflow-x: hidden;
        border-radius: 0px 0px 20px 20px;
    }
    .chat-ai {
        width: 100%;
        height: auto;
        display: flex;
        align-items: center;
        margin: 1svh 0 2svh 2svh;
    }

    .chat-user {
        width: 98%;
        height: auto;
        margin: 1svh 2svh 2svh 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    .chat-text {
        background-color: #9bf7f2;
        border-radius: 10px;
        width: fit-content;
        max-width: 60%;
        padding-left: 2svh;
        padding-right: 2svh;
    }
}