body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-10%);
}

.chat-header {
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 20px;
}

.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    border-bottom: 1px solid #eee;

    /* Added max-height to limit vertical expansion and enable scrolling */
    max-height: 50vh; /* Adjust this value to control how much space the chat takes */
    overflow-y: auto; /* Enable vertical scrolling when content exceeds max-height */
}

.chat-box .message {
    margin: 10px 0;
}

.message.user {
    text-align: right;
}

.message.user span {
    background-color: #d1e7ff;
    padding: 8px 12px;
    border-radius: 15px;
    display: inline-block;
    /* Added this to preserve new lines */
    white-space: pre-wrap;
}

.message.bot span {
    background-color: #f0f0f0;
    padding: 8px 12px;
    border-radius: 15px;
    display: inline-block;
    /* Added this to preserve new lines */
    white-space: pre-wrap;
}

.input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

.input-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
}

.input-container button {
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.input-container button:hover {
    background-color: #45a049;
}

.intro-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.intro-container img {
    display: block;
    min-height: 20px;
    width: 40%;
    max-height: 500px;
    margin: 0 auto;
}

#loader {
    font-size: 25px;
    text-align: center;
}

.kakao-ad {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    min-width: 350px;
    min-height: 100px;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background-color: #e0e0e0;
    padding: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}
