@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

html, body {
    font-family: 'Poppins', sans-serif;
    
    margin: 0;
    background-color: #121212;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
}

h1 {
    font-size: 2em;
    margin: 20px 0;
    color: #00ffc3;
    letter-spacing: 2px;
    text-align: center;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
}

.image-container {
    margin-bottom: 10px;
    text-align: center;
    flex-shrink: 0;
}

.image-container img {
    max-width: 60%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 195, 0.2);
}

.chat-container {
    width: 100%;
    background-color: #1e1e1e;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 195, 0.2);
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.input-container {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: #2b2b2b;
    border-bottom: 1px solid #333;
}

.input-container input {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #444;
    background-color: #333;
    color: #e0e0e0;
    font-size: 1em;
}

.chat-display {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.bot {
    align-items: flex-start;
}

.chat-message p {
    margin: 0;
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 70%;
    font-size: 1em;
    line-height: 1.4em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    white-space: pre-wrap; /* 줄바꿈을 처리하기 위해 추가 */
}

.chat-message.user p {
    background-color: #00ffc3;
    color: #000;
}

.chat-message.bot p {
    background-color: #333;
    color: #e0e0e0;
}

.chat-input-container {
    display: flex;
    padding: 15px;
    background-color: #1e1e1e;
    position: sticky;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 100; /* 다른 요소들보다 위에 표시되도록 설정 */
}

.chat-input-container input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #444;
    border-radius: 10px;
    font-size: 1em;
    margin-right: 10px;
    background-color: #2b2b2b;
    color: #e0e0e0;
}

.chat-input-container input::placeholder {
    color: #aaa;
}

.chat-input-container button {
    padding: 12px 20px;
    font-size: 1em;
    background-color: #00ffc3;
    color: #000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-input-container button:hover {
    background-color: #00cca0;
}

/* 로딩 스피너 추가 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #00ffc3;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
