* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 추가 및 수정된 코드 */
body {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background: url("./assets/background.png") no-repeat center center fixed;
    background-size: 100% 100%;
}

.chat-container {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin: 0 auto;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    padding: 0 20px;
    background-color: #4267B2;
    color: white;
}

.chat-header h1 {
    font-size: 24px;
    font-weight: bold;
}

.logout-button {
    padding: 10px 20px;
    border-radius: 20px;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.logout-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-image {
    height: 200px;
    border-radius: 10px;
    height: auto;
    margin: 20px auto;
    display: block;
}

.date-input {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.date-input label {
    font-size: 16px;
    font-weight: bold;
    width: 300px;
}


.date-input input {
    padding: 10px;
    border: none;
    border-radius: 20px;
    background-color: white;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    flex-grow: 1;
}

.date-input button {
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #4267B2;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.date-input button:hover {
    background-color: #385898;
}

.main-image-text {
    font-family: 'Roboto', sans-serif;
    margin-top: 50px;
    text-align: center;
    color: white;
    font-size: 38px;
    font-weight: 600;
}
.main-image-text2 {
    font-family: 'Roboto', sans-serif;
    margin-top: 5px;
    text-align: center;
    color: white;
    font-size: 38px;
    font-weight: 600;
}

.image-text {
    font-family: 'Roboto', sans-serif;
    margin-top: 35px;
    text-align: center;
    color: white;
    font-size: 38px;
    font-weight: 600;
}


.description-image-text {
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: center;
    color: white;
    font-size: 20px;
    /*font-weight: 600;*/
}

.btn-start{
    text-align: center;
    width: 80%;
    height: 40px;
    margin-top: 5px;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    color: white;
    background-color: black;
    box-shadow: 1px 1px 3px rgba(255, 255, 255, 0.3);
}

a {
    text-decoration: none;
    color: inherit;
}

.main-chat-image{
    margin-top: 40px;
    width: 140px;
}

/* 기본 이미지 스타일 */
.chat-image {
    margin-top: 10px;
    width: 140px;
}

.chat-body {
    background-image: url("./assets/background.png");
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    background-color: #F0F2F5;
    background-size: cover;
}

.chat-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-text {
    text-align: center;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.chat-button-wrapper{
    text-align: center;
    margin: 15px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex-grow: 1;
    justify-content: flex-end; /* 새로운 코드 */
}

.chat-messages .message {
    max-width: 70%;
    font-size: 14px;
    padding: 10px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    align-self: flex-start; /* 변경된 코드 */
}

.avatar-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-messages .message.outgoing {
    align-self: flex-end;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
}

.chat-messages .message .author {
    font-weight: bold;
    margin-bottom: 5px;
}


.chat-input {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.chat-input .message-input {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 20px;
    background-color: white;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-size: 14px;
}

.chat-input .send-button {
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #4267B2;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.chat-input .send-button:hover {
    background-color: #385898;
}



/* 로딩 스피너 스타일링 */
.spinner {
    border: 3px solid #f3f3f3; /* Light grey */
    border-top: 3px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* 로딩 중인 메시지 스타일링 */
.message.loading .text {
    color: rgba(0, 0, 0, 0.5);
}

/* 로딩 중인 메시지 스타일링 */
.message.loading .spinner {
    margin-right: 10px;
}

/* 로딩 중인 메시지 스타일링 */
.message.loading .text::after {
    content: " .";
    animation: dots 1s steps(5, end) infinite;
}

.send-button:disabled {
    opacity: 0.6;
    background-color: #ccc;
    cursor: not-allowed;
}

@keyframes dots {
    0%,
    20% {
        color: rgba(0, 0, 0, 0.1);
        text-shadow: none;
    }

    50% {
        color: rgba(0, 0, 0, 0.5);
        text-shadow: 0px 0px 1px #000;
    }

    100% {
        color: rgba(0, 0, 0, 0.1);
        text-shadow: none;
    }
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 전체 화면을 차지하도록 수정합니다. */
    width: 100%;
    max-width: 600px;
    /* 내용을 가운데 정렬합니다. */
    display: flex;
    justify-content: center;
    border-radius: 20px;
}


.modal-content {
    align-self: center;
    background-color: #1f1f1f;
    margin: 15% auto;
    padding: 20px;
    border: none;
    border-radius: 20px;
    width: 80%;
    color: white;
    font-size: 17px;
    text-align: center;

}

/* 모달 닫기 버튼 */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 모달 뒤 배경 클릭 방지 */
.modal.active {
    pointer-events: auto;
}

.modal.inactive {
    pointer-events: none;
}
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: none;
}

.modal-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

.button-wrapper {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

.share-button {
    background-color: #FEE500;
    border: 1px solid #FEE500;
    border-radius: 4px;
    color: black;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
}

.kakao-share-button {
    background-color: #FEE500;
    border: 1px solid #FEE500;
    border-radius: 4px;
    color: black;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
}

.intro-kakao-share-button {
    background-color: #FEE500;
    border: 1px solid #FEE500;
    width: 80%;
    color: black;
    border-radius: 15px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
}

.close-button {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #484848;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
}

.share-button:hover, .close-button:hover {
    background-color: #f7f7f7;
    border-color: #ddd;
    color: #484848;
}



