* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
    background-color: #abc1d1;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-container {
    width: 100%;
    max-width: 430px;
    height: 100vh;
    background: #b2c7d9;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background-color: #a1b2c1;
    padding: 12px 20px;
    border-bottom: 1px solid #91a3b0;
    position: relative;
}

.chat-header h1 {
    font-size: 16px;
    color: #000000;
    font-weight: 600;
    text-align: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-image: url('https://t1.daumcdn.net/cfile/tistory/99B6AB485D429AFE30');
    background-size: cover;
}

.message {
    margin-bottom: 10px;
    max-width: 70%;
    position: relative;
    clear: both;
}

.user-message {
    float: right;
    background-color: #ffeb33;
    padding: 10px 15px;
    border-radius: 4px;
    margin-left: auto;
    color: #000;
    font-size: 14px;
}

.bot-message {
    float: left;
    background-color: #ffffff;
    padding: 10px 15px;
    border-radius: 4px;
    color: #000;
    font-size: 14px;
}

/* 말풍선 꼬리 스타일 */
.user-message:after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-left-color: #ffeb33;
}

.bot-message:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: #ffffff;
}

.chat-input {
    background-color: #ffffff;
    padding: 10px;
    border-top: 1px solid #e6e6e6;
}

#chat-form {
    display: flex;
    gap: 8px;
    background-color: #ffffff;
    padding: 5px;
}

#user-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e6e6e6;
    border-radius: 20px;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    height: 40px;
    outline: none;
}

button {
    background-color: #ffeb33;
    color: #000000;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

button:hover {
    background-color: #ffd700;
}

/* 메시지 시간 스타일 */
.message-time {
    font-size: 11px;
    color: #8e8e8e;
    margin-top: 5px;
    display: block;
}

.user-message .message-time {
    text-align: right;
    margin-right: 5px;
}

.bot-message .message-time {
    text-align: left;
    margin-left: 5px;
}

/* 스크롤바 스타일 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}