body {
    font-family: 'Noto Sans KR', sans-serif;
    color: #fff;
    display: flex;
    min-height: 100%;
    justify-content: center;
    padding-top: 30px;
    padding-bottom: 30px;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('bg.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    opacity: 0.8;
}

.background-image:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.500);
    z-index: -1;
}

.intro-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.chat-container {
    background-color: rgba(0 0 0 / 73%);
    border-radius: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 80%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    margin: 5% auto;
    z-index: 1;
    position: relative;
    padding-bottom: 20px;
    min-width: 360px;
}

.chat-content {
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 360px;
}

.messages {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    min-height: 20px;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 20px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.5;
}

.message.me {
    align-self: flex-end;
    background-color: #8d6aff;
    color: #fff;
}

.message.bot {
    align-self: flex-start;
    background-color: #fff;
    color: #333;
}

input[type="text"] {
    padding: 10px;
    border-radius: 20px;
    border: none;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    width: calc(100% - 70px);
    margin-right: 10px;
}

button {
    padding: 10px;
    background-color: #8d6aff;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    align-self: flex-end;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

button:hover {
    background-color: #4b2f91;
}

button:disabled,
button[disabled] {
    border: 1px solid #999999;
    background-color: #cccccc;
    color: #666666;
}

.message.me:before {
    content: "";
    position: absolute;
    border-width: 20px 20px 20px 0;
    border-color: transparent rgba(255, 255, 255, 0.8) transparent transparent transparent;
    top: 0;
    left: -20px;
}

.message.bot:before {
    content: "";
    position: absolute;
    border-width: 20px 0 20px 20px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.8);
    top: 0;
    right: -20px;
}

h1 {
    font-size: 28px;
    text-shadow: 2px 2px #000;
    text-align: center;
    margin-bottom: 0px;
}

p {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

#introduction {
    font-size: 18px;
    text-align: center;
    margin-top: 3px;
    margin-bottom: 3px;
}

#copyright {
    font-size: 12px;
    color: #f73737;
    text-decoration: underline;
    text-align: center;
    margin-top: 3px;
    margin-bottom: 10px;
}

#loading {
    padding-bottom: 10px;
    display: none;
}

#intro-message {
    font-size: 24px;
    margin-bottom: 0px;
    text-align: center;
}

#intro-question {
    display: flex;
    flex-direction: column;
}

#start-btn {
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
    width: 100%;
    border-radius: 20px;
}

label {
    font-size: 20px;
    text-align: center;
    margin-top: 5px;
    margin-bottom: 5px;
}

#chat {
    display: flex;
    flex-direction: column;
}

.info-buttons {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.info-buttons button {
    min-width: 90px;
    background-color: #8d6aff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
    flex: 1 1 auto;
}

.info-buttons button:hover {
    color: #000;
}

@media (max-width: 768px) {

    .info-buttons {
        justify-content: space-around;
        flex-wrap: wrap;
    }

    .info-buttons button {
        flex: 1 0 48%;
        margin-bottom: 2px;
    }
}

#kakao-ad {
    min-width: 320px;
    z-index: 2;
    display: flex;
    justify-content: center;
    margin-top: 25px;
    margin-bottom: 5px;
}

#randomImage {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
}

#language-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#language-toggle button {
    width: auto;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s, color 0.3s;
    flex: 1 1 auto;
    padding: 5px 10px;
    margin: 0 5px;
    background-color: #8d6aff;
    color: #fff;
    border-radius: 10px;
}

#youtuberLinks button {
    width: auto;
    cursor: pointer;
    padding: 5px 10px;
    margin: 10px;
    background-color: #8d6aff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.button-style {
    min-width: 90px;
    background-color: #8d6aff;
    color: #fff;
    padding: 10px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
    flex: 1 1 auto;
    margin: 5px;
    text-align: center;
}

.button-style:hover {
    color: #000;
}

@media (max-width: 768px) {
    .button-style {
        flex: 1 0 48%;
        margin-bottom: 10px;
    }
}

#youtuberButtons button {
    min-width: 90px;
    background-color: #8d6aff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
    margin: 3px;
    text-align: center;
    flex: 1 1 auto;
}

#youtuberButtons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 5px;
    margin-bottom: 15px;
}

#youtuberButtons button:hover {
    color: #000;
}

@media (max-width: 768px) {
    #youtuberButtons button {
        flex: 1 0 28%;
        margin-bottom: 2px;
    }
}