html,
body {
    touch-action: manipulation;

    overscroll-behavior: contain;

}


body>*:not(a):not(button):not([onclick]) {
    pointer-events: none;
}


.logo,
.refresh-btn,
.sync-btn,
.returnHome,
.close-modal,
.modal-overlay,
.modal-content,
.modal-content * {
    pointer-events: auto;
}

body {
    margin: 0;
    padding: 20px;
    background-color: #000;
    color: #fff;
    font-family: Arial;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    transition: filter 0.3s ease;
}

html {
    font-size: 18px;
}

.buttons-container {
    position: absolute;
    bottom: 150px;
    left: 50%;
    width: 90%;
    max-width: 300px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 150px;
    height: auto;
    object-fit: contain;
}

.quote-container {
    text-align: center;
    padding: 20px;
    max-width: 90%;
    margin: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: filter 0.3s ease;

}

.quote-en {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 10px;
}

.quote-cn {
    font-size: 18px;
    margin-bottom: 20px;
}

.refresh-btn {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: static;
    left: 50%;
    width: 90%;
    /* transform: translateX(-50%); */
    /* bottom: 120px; */
}

.personal-gen-ai-btn {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.personal-gen-ai-link {
    width: 90%;
    max-width: 300px;
    text-decoration: none;
}

.personal-gen-ai-btn {
    width: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .personal-gen-ai-btn:hover {
        background-color: #ccc;
    }
}

.sync-btn {
    width: 90%;
    max-width: 300px;
    padding: 10px 20px;
    background: linear-gradient(145deg, #0f0f0f, #1c1c1c);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    z-index: 1;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: static;
    display: none;
    left: 50%;
    /* transform: translateX(-50%); */
}

.sync-btn::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, #affefe, #0e42c4, #affefe);
    animation: rotate 4s linear infinite;
    z-index: -2;
}

.sync-btn::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: #0a0a0a;
    border-radius: inherit;
    z-index: -1;
}

.sync-btn:hover .arrow {
    transform: translateX(6px);
}

.arrow-sync {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease-in-out;
    color: #a9e1ff;
    vertical-align: middle;
    align-self: center;
}

.returnHome {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: static;
    left: 50%;
    transform: none;
    display: none;
    width: 100%;

}


@media (hover: hover) and (pointer: fine) {

    .refresh-btn:hover,
    .returnHome:hover {
        background-color: #ccc;
    }
}

.center-message {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    max-width: 80%;
    margin: auto;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #000;
    color: #fff;
    padding: 30px;
    border-radius: 15px;
    max-width: 70%;
    width: 470px;
    border: 1px solid #fff;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 5px;
    right: 15px;
    width: 30px;
    height: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: white;
    z-index: 1001;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
    line-height: 1;

    box-sizing: border-box;

}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

@media (min-width: 769px) {
    .logo {
        width: 200px;
    }

    /* .refresh-btn {
                bottom: 120px;
            } */

    .quote-en,
    .quote-cn,
    .center-message {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .logo {
        width: 170px;
    }

    .refresh-btn {
        /* padding: 8px 18px; */
        font-size: 14px;
    }


    .returnHome {
        padding: 8px 18px;
        font-size: 14px;
    }

    .quote-en,
    .quote-cn,
    .center-message {
        font-size: 18px;
    }

    .modal-content {
        padding: 20px;
        padding-top: 40px;
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 170px;
    }

    .refresh-btn {
        /* padding: 12px 0; */

        font-size: 14px;
        /* bottom: 28%; */

        margin: 0 auto;

        left: 50%;
        /* transform: translateX(-50%); */
    }

    .returnHome {
        padding: 12px 0;

        font-size: 14px;

        width: 100%;



        margin: 0 auto;

        left: 50%;

    }


    .quote-en,
    .quote-cn,
    .center-message {
        font-size: 18px;
    }
}


body.modal-open {
    overflow: hidden;

}

body.modal-open .quote-container {
    filter: blur(2px) brightness(0.9);
    transition: filter 0.3s ease;
}

.modal-overlay {
    backdrop-filter: blur(3px);

}

.emotion-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
}

.emotion-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.emotion-item:hover {
    transform: scale(1.1);
}

.emotion-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.emotion-item span {
    font-size: 14px;
    color: #a5a5a5;
}

.hidden {
    display: none !important;
    visibility: hidden;
}

.agent-wrapper {
    position: absolute;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 90%;
    max-width: 300px;
    text-align: center;
    margin: 0;
    /* remove top margin */
}


#agent-message {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: center;
}

.super-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 13px;
    background: linear-gradient(145deg, #0f0f0f, #1c1c1c);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    z-index: 1;
    text-align: center;
}

.super-button::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, #affefe, #0e42c4, #affefe);
    animation: rotate 4s linear infinite;
    z-index: -2;
}

.super-button::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: #0a0a0a;
    border-radius: inherit;
    z-index: -1;
}

.super-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.2);
}

.super-button:hover .arrow {
    transform: translateX(6px);
}

.arrow {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease-in-out;
    color: #a9e1ff;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.super-button * {
    pointer-events: auto;
}