.qa-main {
    padding: 20px 0 40px;
}

.qa-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #000; /* 黒に設定 */
}

.chat-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 10px;
}

.chat-message {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
}

.chat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chat-bubble-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.chat-name {
    font-size: 0.8rem;
    color: #000; /* 黒に設定 */
    margin-bottom: 5px;
}

.chat-bubble {
    padding: 15px;
    border-radius: 20px;
    position: relative;
    line-height: 1.6;
    text-align: left; /* 左揃えを追加 */
}

.chat-bubble p {
    margin: 0;
    color: #000; /* 黒に設定 */
}

/* Doctor's bubble (left) */
.chat-bubble.doctor {
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.chat-bubble.doctor::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent #e0e0e0 transparent transparent;
}
.chat-bubble.doctor::after {
    content: '';
    position: absolute;
    top: 11px;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 9px 9px 9px 0;
    border-color: transparent #fff transparent transparent;
}


/* SKINU's bubble (right) */
.chat-message.own-message {
    flex-direction: row-reverse;
}

.chat-message.own-message .chat-icon {
    margin-right: 0;
    margin-left: 15px;
}

.chat-message.own-message .chat-bubble-wrapper {
    align-items: flex-end;
}

.chat-bubble.skinu {
    background-color: #f0f0f0;
}

.chat-bubble.skinu::before {
    content: '';
    position: absolute;
    top: 10px;
    right: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #f0f0f0;
}

.back-button-container {
    text-align: center;
    margin-top: 40px;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 30px 12px 35px; /* Adjusted padding for icon */
    font-size: 1rem;
    font-weight: 700;
    color: #8d6e63;
    background: linear-gradient(to right, #fff, #f5f5f5); /* Subtle gradient */
    border: 2px solid #8d6e63;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* Stronger shadow */
    position: relative; /* For pseudo-element positioning */
    overflow: hidden; /* To clip the pseudo-element if it goes outside */
}

.btn-secondary::before {
    content: '←'; /* Left arrow Unicode character */
    position: absolute;
    left: 10px; /* Position of the arrow */
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em; /* Size of the arrow */
    color: #8d6e63;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(to right, #8d6e63, #a1887f); /* Gradient on hover */
    color: #fff;
    transform: translateY(-3px); /* More pronounced lift */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25); /* Even stronger shadow on hover */
}