body {
    font-family: 'Arial', sans-serif;
    background-color: white;
    margin: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
}

.chat-container {
    background-color: #ffffff;
    font-size: large;
    margin-top: 2%;
    width: 100%;
    height: 100%;
    max-width: 600px;
    overflow: hidden;
}

.question {
    flex-direction: column;
    align-items: right;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: large;
    border-radius: 10px;
    padding: 20px;
    margin: -15px;
    line-height: 1.6;
}

.question.active {
    display: flex;
    animation: slideIn 0.8s ease-out forwards;
}

.question.deactive {
    display: flex;
    animation: slideOut 0.8s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateY(100vh);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-100vh);
    }
}

@keyframes dots {
    0%, 20% {
        content: '・';
    }
    40% {
        content: '・・';
    }
    60% {
        content: '・・・';
    }
    80%, 100% {
        content: '';
    }
}

.dots::after {
    content: '';
    animation: dots 1s steps(4, end) infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s forwards;
    display: block;
    opacity: 0; /* 初期状態は見えないように */
  }



.message-box {
    padding: 20px;
}

.agent {
    display: flex;
    align-items: center;
}

.agent-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-right: 20px;
}

.text p {
    background-color: #f0f0f0;
    font-size: large;
    border-radius: 10px;
    padding: 10px;
    margin: -15px;
    line-height: 1.6;
}

.response {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    padding: 20px 0px 0px 0px;
    align-items: flex-end;
    text-align: right;
}

.choice-button {
    padding: 10px;
    border-radius: 10px;
    border-color: white;
    color: black;
    width: 200px;
    height: 50px;
    margin: 5px;
    font-size: 16px;
    background-color: #f2f2f2;
    border: 1px solid #ccc;
    cursor: pointer;
}

.choice-button:hover {
    color: black;
    border-color: gray;
    background-color: #e8e8e8;
}

.progress-container {
    background-color: white;
    width: 50%;
    max-width: 600px;
    height: 30%;
    padding: 10px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#progressBar {
    margin: 30px;
    width: 70%;
    height: 100%;
}

#progressText {
    font-size: 30px;
}

header {
    background-color: rgb(255, 181, 76);
    color: black;
    width: 100%;
    height: 85px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
}

#end-section {
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-size: 20px;
    height: 100vh;
}

#age-select {
    width: 100px;
    height: 40px;
    font-size: 16px;
    color: black;
    background-color: #f0f0f0;
    border: none;
    border-radius: 10px;
    padding-left: 10px;
    -webkit-appearance: none;
    appearance: none;
}

#age-select:hover {
    color: black;
    border-color: gray;
    background-color: #e8e8e8;
}

option {
    background-color: #f0f0f0;
    color: black;
}

#phonenumber {
    width: calc(100% - 200px);
    height: 40px;
    font-size: 16px;
    padding: 10px;
    border: 2px solid black;
    border-radius: 5px;
    box-sizing: border-box;
}

#mailaddress {
    width: calc(100% - 200px);
    height: 40px;
    font-size: 16px;
    padding: 10px;
    border: 2px solid black;
    border-radius: 5px;
    box-sizing: border-box;
}

#name {
    width: calc(100% - 200px);
    height: 40px;
    font-size: 16px;
    padding: 10px;
    border: 2px solid black;
    border-radius: 5px;
    box-sizing: border-box;
}

.error-message {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}

@media screen and (max-width: 600px) {
    .chat-container {
        font-size: medium;
    }

    .text p,
    .choice-button,
    #phonenumber,
    #mailaddress,
    #name {
        font-size: 15px;

    }

    .choice-button {
        width: 70%;
        height: 40px;
    }

    #age-select {
        width: 70%;
        height: 30px;
    }

    #phonenumber {
        width: calc(100% - 100px);
        height: 40px;
        font-size: 16px;
        padding: 10px;
        border: 2px solid black;
        border-radius: 5px;
        box-sizing: border-box;
    }

    #mailaddress {
        width: calc(100% - 100px);
        height: 40px;
        font-size: 16px;
        padding: 10px;
        border: 2px solid black;
        border-radius: 5px;
        box-sizing: border-box;
    }

    #name {
        width: calc(100% - 100px);
        height: 40px;
        font-size: 16px;
        padding: 10px;
        border: 2px solid black;
        border-radius: 5px;
        box-sizing: border-box;
    }
}