html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden; /* Prevent scrolling */
    font-family: Verdana, Helvetica, sans-serif;
}

/* Background Image */
.bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/bg1.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3); /* Black background with 0.4 opacity */
    z-index: -1; /* Ensure it stays behind other content but above the background image */
}

/* Suisei */
.suisei {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-repeat: no-repeat;
    background-image: url('images/suisei_outfit1.webp');
    background-size: contain;
    background-position: center center;
}

.suisei-move {
    animation: moveUpDown 0.5s ease-in-out;
}

@keyframes moveUpDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); } /* Moves up */
    100% { transform: translateY(0); } /* Back to original */
}

.suisei-thinking {
    animation: suiseiPulse 1.2s ease-in-out infinite;
}

@keyframes suiseiPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.thinking {
    display: flex;
    gap: 5px;
    align-items: center;
    width: auto;
}

.thinking .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgb(85, 238, 255);
    animation: thinkingBounce 1.2s infinite ease-in-out;
}

.thinking .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinkingBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-6px); opacity: 1; }
}

form {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

textarea {
    width: 100%;
    resize: none;
    font-size: 16px;
    line-height: 1.4;
    padding: 10px 10px;
    border-radius: 5px;
    box-sizing: border-box;
    overflow-y: hidden;
}

.btn-send {
    font-size: 15px;
    height: 44px;
    width: 10%;
    min-width: 100px;
    border-radius: 5px;
    border: none;
    transition: background-color 0.3s ease;
}

.btn-send:hover {
    background-color: #2980b9;
    color: white;
}

.chat {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20%;
    padding: 20px 50px 30px 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 20px;
    background-color: rgba(0, 0, 0, 0.5);
}

.chat-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    overflow-y: auto;
}

.user, .assistant {
    width: 100%;
    font-size: 16px;
    word-wrap: break-word;  /* Ensure long text breaks to the next line */
}

.user {
    color: white;
}

.assistant {
    color: rgb(85, 238, 255);
}

/* width */
::-webkit-scrollbar {
    width: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: rgb(171, 171, 171);
    border-radius: 10px;
}

.buttons {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 20px;
    right: 10px;
}

.btn {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    background-color: #008CBA;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}

.btn:hover {
    background-color: #2980b9;
    color: white;
}


/* Broke modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-box {
    background: #16213e;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 32px 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}

.modal-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.modal-title {
    color: rgb(85, 238, 255);
    font-size: 18px;
    margin: 0 0 16px 0;
}

.modal-body {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.modal-close-btn {
    background: rgb(85, 238, 255);
    color: #16213e;
    border: none;
    padding: 8px 28px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.modal-close-btn:hover {
    background: white;
}

/* Media query for mobile */
@media (max-width: 768px) {
    .btn {
        padding: 10px 10px;/* Make the buttons smaller */
        font-size: 10px;    /* Adjust font size */
    }

    .btn-send {
        font-size: 12px;    /* Adjust font size for send button */
        min-width: 80px;    /* Reduce the minimum width */
    }

    textarea {
        font-size: 14px;    /* Adjust font size for input on smaller screens */
    }

    .chat {
        padding: 10px 20px 20px 20px;  /* Adjust chat padding */
    }
}
