/* ✅ Messenger 스타일 채팅 UI 개선 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* 배경을 화면 전체로 확장 */
body {
    font-family: 'Roboto', sans-serif;
    background: black;
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
}
/* 컨테이너를 화면 상단부터 배치 */
.intro-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 20px;
}

/* 제목을 화면 위쪽에 배치 */
.intro-container h1 {
    margin-top: 20px;
    font-size: 24px;
    font-weight: bold;
}
.intro-image {
    width: 150px; /* 원하는 크기로 조정 */
    height: auto;
    display: block;
    margin: 10px auto;
    border-radius: 10px;
}

.input-section {
    display: flex;
    flex-direction: column;
    align-items: center; /* 가운데 정렬 */
    gap: 15px; /* 입력 필드 사이 간격 조정 */
    margin-top: 15px;
}

.input-section label {
    font-size: 16px;
    font-weight: bold;
}

.input-section input, 
.input-section select {
    width: 80%; /* 더 길게 설정 */
    max-width: 300px; /* 너무 길어지는 걸 방지 */
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 16px;
    text-align: center;
    background: white;
}



/* 🔵 전체 컨테이너 */
.chat-container {
    width: 100%;
    max-width: 450px;
    height: 90vh;
    background: white;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 💬 채팅 박스 전체 화면으로 확장 */
.chat-box {
    flex-grow: 1;
    overflow-y: auto; /* ✅ 스크롤 가능 */
    padding: 15px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-bottom: 2px solid #ddd;
    max-height: calc(100vh - 300px); /* ✅ 화면 높이에서 입력창 높이 빼기 */
}


/* 🗨️ 채팅 메시지 스타일 개선 */
.message-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
    box-sizing: border-box;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid #3f2b96;
}

/* 🐶 봇 메시지 컨테이너 */
.bot-message-container {
    justify-content: flex-start;
    display: flex;
    align-items: center;
}

.bot-message-container img {
    display: block;
}

.bot-message {
    background: #0078ff;
    color: white;
    padding: 12px;
    border-radius: 18px 18px 18px 0;
    max-width: 75%;
    word-wrap: break-word;
    box-sizing: border-box;
}

/* 🧑‍💻 사용자 메시지 (파란색 - Messenger 스타일) */
.user-message-container {
    justify-content: flex-end;
    display: flex;
    align-items: center;
}

.user-message {
    background: #0078ff;
    color: white;
    padding: 12px;
    border-radius: 18px 18px 0 18px;
    max-width: 75%;
    word-wrap: break-word;
    box-sizing: border-box;
}

/* ✏️ 입력 필드 */
.input-container {
    position: fixed; /* ✅ 화면 하단에 고정 */
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px; /* 채팅 박스와 동일한 너비 */
    background: white;
    padding: 10px;
    display: flex;
    align-items: center;
    border-top: 2px solid #ddd;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 140px;
}

input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 25px;
    outline: none;
    background: #f0f2f5;
    color: black;
    font-size: 16px;
    padding-left: 15px;
}

button {
    background: #0078ff;
    color: white;
    font-weight: bold;
    border: none;
    padding: 12px 18px;
    margin-left: 10px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

button:hover {
    background: #0056b3;
}

#loader {
    font-size: 25px;
    text-align: center;
}
/* 📢 광고 컨테이너 */
.kakao-ad-container {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    background: white;
    padding: 10px 0;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}