.chat-container {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    /*background-color: #f2efe4;*/
    overflow-y: auto;              /* 세로 스크롤은 동작하도록 */
    -ms-overflow-style: none;      /* IE/Edge */
    scrollbar-width: none;         /* Firefox */
}

.chat-container::-webkit-scrollbar {
  display: none;                 /* Chrome, Safari, Opera */
}

/* 메시지 리스트 및 메시지 자체 */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    /* padding을 0으로 설정 */
    margin: 0;
    /* margin을 0으로 설정 */
}

.message-container {
    display: flex;
    align-items: flex-start;
    margin: 10px 0;
}

/* 프로필 이미지 크기 및 설정 */
.profile-image {
    max-width: 32px;
    width: 100%;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 5px;
}

.message-body {
    display: flex;
    flex-direction: column;
}

.message-content {
    padding: 6px 14px;
    border-radius: 14px;
    background-color: #ffffff;
    color: black;
    word-wrap: break-word;
    position: relative;
}

.actions-wrapper {
    margin-top: 10px;
}

.msg-hr {
    border: none;
    height: 1px;
    background-color: #ccc;
    margin: 10px 0;
}

.message-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    text-align: initial;
}

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.action-button img {
    width: 24px;
    height: 24px;
}

.copy-btn img {
  width: 63px;
}

/* AI 메시지 스타일 */
.ai-message {
    /* [사진][메시지 내용] 순서 */
}

/* 사용자 메시지 스타일 */
.user-message {
    align-self: flex-end;
    /* 메시지를 오른쪽에 위치시킴 */
    margin-left: auto;
}

.user-message .message-body {
    align-items: flex-end;
    /* 메시지 내용을 오른쪽으로 정렬 */
}

.user-message .message-content {
    background-color: #FFFBF2;
    /* 사용자 메시지의 배경색 변경 */
}

.user-message .message-actions,
.user-message .msg-hr {
    display: none;
    /* 사용자 메시지에서는 액션 버튼 숨김 */
}

/* 입력창, 음성 UI 등도 중앙 정렬 */
.input-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0; /* 상하 패딩만 주고 좌우는 page-container에 맡김 */
  box-sizing: border-box;
}

/* 질문 버블 슬라이더 */
.question-slider {
  overflow-x: auto;
  white-space: nowrap;
  padding-left: 0;
  padding-right: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.swiper-slide {
  display: inline-block;
  background: #eee;
  border-radius: 8px !important;
  padding: 10px 6px;
  margin-right: 10px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.swiper-slide:hover {
  background-color: #ddd;
}

.input-wrapper {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 5px 10px;
    width: 100%;

}

.input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px;
    font-size: 16px;
    border-radius: 10px;
    background-color: #ffffff;
}

.input-wrapper.hidden {
  display: none;
}

.send-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 5px;
}

.send-button img {
    width: 24px;
    height: 24px;
}

.swiper-container {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    max-width: 100%;
    width: 100%;
    padding: 0px;
    box-sizing: border-box;
    max-height: 200px;
}

.swiper-wrapper {
    display: flex;
}

.swiper-slide {
    flex-shrink: 0;
    width: auto;
}

.tag-button {
    background-color: #F5F5F5;
    border: 1px solid #cccccc;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    text-align: center;
}

@media (max-width: 375px) {
    body {
        font-size: 14px;
        background-position: top;
    }

    .profile-image {
        max-width: 32px;
        width: 100%;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        margin: 0 5px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    body {
        font-size: 16px;
    }
}

@media (min-width: 1025px) {
    body {
        font-size: 18px;
    }
}

.send-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
}

.send-button img {
    width: 24px;
    height: 24px;
}

#sendTts.recording {
    background-color: red;
    border-radius: 50%;
}

.loading-animation {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid #ccc;
    border-top-color: #3498db;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.message-container.ai-message.thinking .message-content {
    font-style: italic;
    color: gray;
}

.message-container.ai-message.thinking .message-content p {
    display: flex;
    align-items: center;
}

.message-container.ai-message.thinking .message-content p .loading-animation {
    margin-left: 5px;
}

.welcome-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-logo-button {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: none;
    background: none;
    padding: 0;
}

.menu-right {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex-grow: 1;
    /*padding-bottom: 5px;*/
    text-align: right;
}



.voice-ui {
  /*position: absolute;*/
  bottom: 13px;
  left: 3%;
  right: 0;
  max-width: 900px;
  width: 94%; /* padding: 3% 좌우 보정 */
  align-self: center;
  background-color: #222;
  color: #fff;
  padding: 15px 5%; /* 내부 여백은 여기서 */
  border-radius: 10px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-height: 52px;
}

.voice-ui.hidden {
  display: none;
}

.voice-ui .waveform {
  display: flex;
  gap: 4px;
  align-items: flex-end;
}

.voice-ui .waveform .bar {
  width: 4px;
  height: 15px;
  background-color: white;
  animation: waveHeight 1s infinite ease-in-out;
}

.voice-ui .waveform .bar:nth-child(2) { animation-delay: 0.1s; }
.voice-ui .waveform .bar:nth-child(3) { animation-delay: 0.2s; }
.voice-ui .waveform .bar:nth-child(4) { animation-delay: 0.3s; }

@keyframes waveHeight {
  0%, 100% { height: 20px; }
  50% { height: 36px; }
}

.cancel-button {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  border-radius: 12px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
}
.cancel-button:hover {
  background: rgba(255,255,255,0.1);
}