body, html {
    padding: 0;
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
    /*background-color: #16171b;*/
    /*overscroll-behavior: none;*/
    background-color: #f8f8f8;
}

textarea, input {
    font-family: Helvetica, Arial, sans-serif;
}

#pageOccluder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    justify-content: center;
    align-items: center;
    display: none;
}

#pageContainer {
    position: sticky;
    top: 50px;
    max-width: 1000px;
    margin: auto;
    /*display: flex;*/
    flex-direction: column;
    /*align-items: center;*/
    align-items: end;
    /*height: 90vh;*/
    /*background-color: #16171b;*/
    background-color: #f8f8f8;
    z-index: 5;
    padding: 0 5px 0 5px
}

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

#canvasContainer {
    display: flex;
    justify-content: center;
    transition: height 0.3s ease, opacity 0.3s ease;
    height: 30vh; /* Set an explicit max-height for the animation */
    overflow: hidden; /* Hide the overflowing content */
}


canvas {
    /*width: calc(100% - (100vw - 300px) * 0.2);*/
    /*max-width: 100%;*/
    height: 30vh;
    min-height: 260px;
    transition: height 0.3s ease, opacity 0.3s ease;
    margin-left: -50px;
}

/*canvas.signedIn {*/
/*    margin-left: -50px;*/
/*}*/

canvas.hidden {
    height: 0;
    opacity: 0;
}

#canvasContainer.hidden {
    height: 0;
    /*opacity: 0;*/
}

#pressAndHoldFey {
    display: none;
    position: absolute;
    bottom: 0;
    color: white;
    background-color: #00000094;
    backdrop-filter: blur(5px);
    padding: 3px 5px 5px 5px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.8em;
    font-family: var(--system-ui), serif;
    left: 20px;
    box-shadow: 0 0 10px 0px rgba(0, 0, 0, 0.2);
    /* Diffused background effect */
    background: radial-gradient(
            circle at center,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.5) 35%,
            rgba(0, 0, 0, 0.2) 80%,
            rgba(0, 0, 0, 0.07) 100%
    );
}

/*#pressAndHoldFey.signedIn {*/
/*    left: 20px;*/
/*}*/

#textStreamDisplay {
    display: none;
    width: 100%;
    /*position: absolute;*/
    /*left: 5px;*/
    padding: 7px 0 6px 0;
    margin-left: -50px;
    /*width: calc(100vw - 7px);*/
    /*width: calc(100vw - 256px);*/
    /*height: 59px;*/
    height: 250px;
    overflow-y: auto;
    font-size: 0.87em;
    line-height: 1.3em;
    font-weight: 300;
    color: #474747;
    font-family: var(--system-ui), serif;

    /* Add padding to prevent text from being cut off */
    /*padding: 10px 0;*/

    /* Create fade effect */
    mask-image: linear-gradient(
            to bottom,
            transparent,
            black 5%,
            black 95%,
            transparent
    );
    -webkit-mask-image: linear-gradient(
            to bottom,
            transparent,
            black 5%,
            black 95%,
            transparent
    );
}

/*.switchSpaceLink {*/
/*    display: none;*/
/*    align-items: center;*/
/*    color: #434343;*/
/*    font-weight: bold;*/
/*}*/

/*.switchSpaceLink > svg {*/
/*    margin-right: 5px;*/
/*}*/


#chatContainer {
    display: flex;
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    opacity: 0.9;
    margin-top: -76px;
    /*margin-top: 5px;*/
    /*margin: auto;*/
    /*max-width: 600px;*/
    /*padding: 10px;*/
    /*border: 1px solid #ccc;*/
    /*border-radius: 10px;*/
    /*box-shadow: 0 4px 6px rgba(0,0,0,0.1);*/
}

/*textarea {*/
/*    width: 100%;*/
/*    max-width: 600px;*/
/*    margin-top: 10px;*/
/*    padding: 10px;*/
/*    !*background-color: lightblue;*!*/
/*    border: none;*/
/*    border-radius: 5px;*/
/*    font-size: 16px;*/
/*}*/

/*button {*/
/*    padding: 10px 20px;*/
/*    !*margin-top: 10px;*!*/
/*    border: none;*/
/*    background-color: #007BFF;*/
/*    color: white;*/
/*    border-radius: 5px;*/
/*    font-size: 16px;*/
/*    cursor: pointer;*/
/*}*/


/*.button {*/
/*    background-color: #e9e7e4;*/
/*    border-radius: 10px;*/
/*    border-width: 0;*/
/*    color: #333333;*/
/*    cursor: pointer;*/
/*    display: inline-flex;*/
/*    font-size: 14px;*/
/*    font-weight: 500;*/
/*    line-height: 20px;*/
/*    list-style: none;*/
/*    margin: 0;*/
/*    !*padding: 5px 20px;*!*/
/*    padding: 2px 8px;*/
/*    text-align: center;*/
/*    transition: all 200ms;*/
/*    vertical-align: baseline;*/
/*    white-space: nowrap;*/
/*    user-select: none;*/
/*    -webkit-user-select: none;*/
/*    touch-action: manipulation;*/
/*    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);*/
/*    -webkit-tap-highlight-color: transparent;*/
/*}*/

/*button:hover {*/
/*    background-color: rgb(214, 214, 214);*/
/*}*/

/*button:active {*/
/*    background-color: rgb(193, 193, 193);*/
/*}*/

button {
    display: inline-flex;
    align-items: center;
    /* justify-content: center; */
    /* height: 31px; */
    background: none;
    border: none;
    color: #7c7c7c;
    /* padding: 5px 10px; */
    /*margin: 3px 7px 3px 0;*/
    margin: 3px;
    /* gap: 3px; */
    border-radius: 10px;
    font-weight: 500;
    /* transition: transform 0.1s; */
    font-family: var(--system-ui), serif;
    padding: 4px 8px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
}

button:disabled {
    color: #999999;
    cursor: not-allowed;
}

button:hover {
    background-color: #ebebeb;
}

button:active {
    background-color: #d5d5d5;
    /*transform: scale(0.98);*/
}


.pill {
    margin: 5px 0;
    height: 40px;
    display: inline-flex;
    align-items: center;
    background: #f2f2f2;
    border: 1px solid #dedede;
    border-radius: 15px;
    transition: background 0.3s;
}

.pill-selected {
    background: #dedede;
}

#bottomInputContainer {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
}

#currentEvents {

}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
}

.chatMessagesContainer {
    display: none;
    /*display: flex;*/
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    user-select: none;
    -webkit-user-select: none; /* Safari */
    /* disable highlight on select */
    -webkit-touch-callout: none; /* iOS Safari */
    /*margin: 10px;*/

    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
}

.chatMessagesTitle {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* CSS for the Chat Box */
.chatMessages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    height: 500px;
    overflow-y: auto;
    background: #f4f7f6; /* Light gray background */
    border: 1px solid #ccc;
    border-radius: 10px;
}

.message {
    position: relative;
    padding: 5px 10px;
    border-radius: 14px;
    /*margin-top: 10px;*/
    margin-bottom: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: Helvetica, Arial, sans-serif;
    line-height: 1.4;
    max-width: 98%;
    font-size: 0.9em;

    /*contain: content;*/
    /*content-visibility: auto;*/
}

.assistantMessage {
    /*background: #e9e7e4;*/
    /*color: #000000;*/
    /*align-self: flex-start;*/

    background: #373737;
    color: azure;
    color: #ffffff;
    align-self: flex-start;


}

.userMessage {
    /*background: linear-gradient(135deg, #232323, #3b3b3b);*/
    color: #ffffff;
    align-self: flex-end;
    text-align: right;
}

/* Hover Effects for Interactivity */
.message:hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

#chatMessages {
    width: 100%;
}

@media (max-width: 600px) {
    .chatMessages {
        padding: 10px;
    }

    .message {
        max-width: 95%;
    }
}

/* CSS for the Textarea Input */
#chatInput {
    width: 99%;
    height: 28px;
    /* padding: 10px; */
    /* max-width: 580px; */
    border: 0px solid #fff;
    /* border-radius: 10px; */
    /* box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1); */
    font-family: Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4em;
    resize: none;
    outline: none;
    background: #ffffff;
}


#touchHere {
    width: 100%;
    height: 50px;
    background-color: #cccccc;
}


#speechIndicator {
    width: 18px;
    height: 18px;
    /*background-color: red;*/
    /*border: 2px solid red;*/
    border-radius: 100%;
    /*display: none;*/
    /*margin-right: 10px;*/
    /*position: fixed;*/
    /*left: 10px;*/
    /*top: 10px;*/
    visibility: hidden;
}

#speechInputAndIndicatorContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    max-width: 585px;
    padding: 7px 5px 5px 5px;
    background-color: #fff;
    /*max-width: 580px;*/
    border: 2px solid #dbdbdb;
    border-radius: 15px;
}

@media (max-width: 600px) {
    #speechInputAndIndicatorContainer {
        box-sizing: border-box;
    }
}

#speechInputAndIndicatorContainer:hover {
    border-color: #eadbff; /* A bright focus color */
    box-shadow: inset 0 2px 5px rgba(98, 0, 234, 0.2), 0 0 5px rgba(98, 0, 234, 0.5);
    transition: border 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

#deviceMessage {
    color: white;
    font-size: 0.9em;
    text-align: center;
    display: flex;
    align-items: center;
    padding: 5px;
    font-weight: bold;
    background-color: #000000bd;
    border-radius: 5px;
}


.toggle {
    cursor: pointer;
    display: inline-block;
}

.toggle-switch {
    display: inline-block;
    background: #ccc;
    border-radius: 16px;
    width: 38px;
    height: 22px;
    position: relative;
    vertical-align: middle;
    transition: background 0.25s;

    &:before,
    &:after {
        content: "";
    }

    &:before {
        display: block;
        background: linear-gradient(to bottom, #fff 0%, #eee 100%);
        border-radius: 50%;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
        width: 16px;
        height: 16px;
        position: absolute;
        top: 3px;
        left: 3px;
        transition: left 0.25s;
    }

    .toggle:hover &:before {
        background: linear-gradient(to bottom, #fff 0%, #fff 100%);
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
    }

    .toggle-checkbox:checked + & {
        background: #1697f3;

        &:before {
            left: 19px;
        }
    }
}

.toggle-checkbox {
    position: absolute;
    visibility: hidden;
}

.toggle-label {
    margin-left: 5px;
    position: relative;
    top: 1px;
    font-size: 0.9em;
    color: #484848;
}

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
}

#topPanel {
    position: sticky;
    top: 0;
    display: flex;
    /* position: absolute; */
    /* top: 6px; */
    /* right: 5px; */
    /*align-items: center;*/
    /*gap: 5px;*/
    /* flex-direction: column; */
    justify-content: space-between;
    /* margin: 10px; */
    /* border-bottom: 1px solid #f1f1f1; */
    background: linear-gradient(180deg, #e3e3e3, #f8f8f8);
    /*padding: 5px;*/
    padding: 5px 12px 5px 5px;

    z-index: 6;
}

.topPanelChildren {
    display: flex;
    gap: 10px;
    align-items: center;
}

.topPanelButtons {
    padding: 5px 8px;
    font-size: 0.9em;
    font-weight: bold;
    background-color: #e7e7e7;
    color: #676767;
    border-radius: 13px;
    cursor: pointer;
    /* border: 2px solid #6f6f6f; */
    display: inline-flex;
    gap: 5px;
    box-shadow: rgba(14, 63, 126, 0.06) 0px 0px 0px 1px, rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px, rgba(42, 51, 70, 0.04) 0px 2px 2px -1px, rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px, rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px, rgba(42, 51, 70, 0.03) 0px 10px 10px -5px, rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
    transition: background-color 0.2s;
}

.topPanelButtons:hover {
    background-color: #d8d8d8;
}

.topPanelButtons:active {
    background-color: #b8b8b8;
}

#topPanelSignInText {
    max-width: 100px; /* Adjust this value as needed */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.collapsableText {
    max-width: 100px; /* Adjust this value as needed */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

@media (max-width: 700px) {
    .topCollabsableText {
        max-width: 100px; /* Adjust this value as needed */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }

    .notext {
        display: none;
    }

    .topPanelChildren {
        gap: 5px;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 2px #3498db;
    }
    25% {
        box-shadow: 0 0 4px #2ecc71;
    }
    50% {
        box-shadow: 0 0 4px #f39c12;
    }
    75% {
        box-shadow: 0 0 6px #e74c3c;
    }
}

#topPanelUpgradeButton {
    display: none;
    animation: glow 5s infinite linear;
}

#privateSpaceLink {
    display: none;
}

#publicSpaceLink {
    display: none;
    background-color: #474747;
    color: #f4f4f4;
}

#publicSpaceLink:hover {
    background-color: #070707;
}

#publicSpaceLink:active {
    background-color: #000;
}

#signInContainer {
    background: linear-gradient(180deg, #f0f0f0, transparent);
    width: 100%;
    text-align: center;
}

/*#signInBtn {*/
/*    padding: 7px 8px;*/
/*    font-size: 1em;*/
/*    font-weight: bold;*/
/*    !* background-color: #383838; *!*/
/*    color: #676767;*/
/*    border-radius: 40px;*/
/*    cursor: pointer;*/
/*    !* border: 2px solid #6f6f6f; *!*/
/*    display: inline-flex;*/
/*    gap: 5px;*/
/*}*/

/*#signInBtn:hover {*/
/*    background-color: #d8d8d8;*/
/*}*/

#topPanelProfilePicture {
    /*width: 40px;*/
    height: 23px;
}

dialog {
    /*width: 400px;*/
    border: 1px solid #ccc;
    border-radius: 15px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

dialog p {
    margin-bottom: 10px;
}

dialog button {
    background-color: #363636;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
}

dialog button:hover {
    background-color: #0056b3;
}

dialog button:disabled {
    background-color: #f5f5f5;
    color: #878787;
    cursor: not-allowed;
}


dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.83);
}

dialog::close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    color: #fff;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

dialog::close:hover {
    color: #ff0000;
}

dialog::default {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

dialog::default:hover {
    background-color: #0056b3;
}


#scroll-container {
    display: none;
    overflow-x: auto; /* Enable horizontal scrolling */
    /*width: 100%; !* Full width of viewport *!*/
    width: 100vw; /* Full width of viewport */
    position: absolute;
    bottom: 15px;

    scroll-snap-type: x mandatory; /* Enable scroll snapping on the x-axis */
    scroll-padding-left: 10px; /* Respect the left margin when snapping */
    scroll-padding-right: 10px; /* Respect the right margin when snapping */
}

#scroll-container::-webkit-scrollbar {
    display: none;
}



.article-card {
    /*margin: 10px 0; !* Adjust spacing *!*/
    padding: 6px 15px; /* Adjust padding */
    width: 250px;
    border-radius: 20px;
    overflow-y: auto;


    height: 90%;
    background-color: #e8e8e8;
    box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
    transition: height 0.2s, width 0.2s;
    contain: content;
    content-visibility: auto;

    scroll-snap-align: center; /* Snap each card to the start of the container */
}

.article-card::-webkit-scrollbar {
    display: none;
}

.article-card-fullWidth {
    width: calc(100vw - 100px);
    max-width: 1000px;
}

.title, .date, .summary, .credit {
    margin: 5px 0;
}

.category {
    font-size: 0.8em;
    color: #878787;
    margin-bottom: 7px;
}

.minimize-article {
    position: absolute;
    top: 6px;
    right: 6px;
    cursor: pointer;
    border-radius: 50px;
    background: #f2f2f2;
    border: 1px solid #dedede;
    width: 27px;
    height: 27px;
    display: none;
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
}

.minimize-article:hover {
    background: #dcdcdc;
}

.minimize-article:active {
    background: #cfcfcf;
}

.title {
    color: #333;
    font-weight: bold;
    margin-right: 23px;
}

.date, .credit, .domain, .separator {
    font-size: 0.8em;
    color: #878787;
    font-weight: bold;
    line-height: 0.5em;
}

.date {
    font-weight: normal;
}

a {
    /*font-size: 1em;*/
    color: #878787;
    text-decoration: none;
}

a:link {

}

a:visited {
    color: #bdbdbd;
}

a:focus {
}

a:hover {
    color: #5a5a5a;
}

a:active {
}


.summary {
    font-size: 14px;
    color: #686868;
    margin-top: 13px;
}


.image > img {
    max-width: 100%;
    border-radius: 15px;
    max-height: 300px;
    /*box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;*/
}

.pin {
    position: absolute;
    top: -6px;
    right: -7px;
    background-color: #ebebeb;
    display: none;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    padding: 4px;
}

.pin:hover {
    background-color: #dcdcdc;
}

.pin:active {
    background-color: #cfcfcf;
}


#settingsDialog {
    width: 85%;
    max-width: 900px;
    max-height: 80vh;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
    font-family: Helvetica, Arial, sans-serif;
    /*background-color: #f5f5f5;*/
    background-color: #ffffff;
    overflow-y: auto;
    overscroll-behavior: contain;
}

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

#settingsContainer > div, #revealAfterUsernameSaved > div {
    /*background-color: #fff;*/
    border-radius: 20px;
    padding: 2px 0px;
    margin-bottom: 20px;
}

#memoryBankContainer {
    /*margin-top: 20px;*/
}

.character-avatars-container-sign-in {
    justify-content: center !important;
    margin: 20px !important;
    gap: 15px !important;
}

.character-avatar-image-sign-in {
    width: 64px !important;
    height: 64px !important;
    padding: 5px !important;
}

.dialogTitles {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    display: inline-block;
    /*margin-left: 18px;*/
}


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

/* Close button at the top right */
#closeSettings {
    position: absolute;
    top: 2px;
    right: 0px;
    background-color: transparent;
    color: #333;
    font-size: 16px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
}

#closeSettings:focus {
    outline: none;
}

#signOutBtn {
    width: max-content;
    background-color: #7e7e7e;
}

#saveMemoryBank {
    margin-top: 10px;

}


#memoryBankInput {
    min-height: 100px;
    max-height: 70vh;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 17px;
    resize: vertical;
}

#sendMessage {
    padding: 3px 14px;
}

#chatCreationContainer {
    /*background: aliceblue;*/
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    max-width: 600px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
    /*border-radius: 10px;*/
    margin: 5px 0 5px;
    gap: 10px;
    overflow: hidden; /* Add this to ensure the container doesn't expand */
}

#chatTitles {
    display: flex;
    overflow-x: auto; /* Enable horizontal scrolling */
    white-space: nowrap; /* Prevent line breaks inside the container */
    gap: 10px; /* Optional: Adjust gap between buttons if needed */
}

.chatTitle {
    flex: 0 0 auto; /* Ensure buttons don't shrink or grow */
    font-weight: bold;
}



.muted{
    background-color: #fff;
}

.animated-text-container {
    display: inline-block;
    overflow: hidden;
}

#chatTitles::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.buttonStyle2 {
    box-shadow: rgba(14, 63, 126, 0.06) 0px 0px 0px 1px, rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px, rgba(42, 51, 70, 0.04) 0px 2px 2px -1px, rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px, rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px, rgba(42, 51, 70, 0.03) 0px 10px 10px -5px, rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
    cursor: pointer;
}

#signInPrivateSpace {
    height: 40px;
    font-size: 16px;
    max-width: fit-content;
}


/* Style for the renameThreadDialog background */
dialog#renameThreadDialog {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 300px;
    max-width: 90%;
    font-family: Helvetica, Arial, sans-serif;
}

/* Style for the form inside the renameThreadDialog */
dialog#renameThreadDialog form {
    display: flex;
    flex-direction: column;
}

/* Style for the input label inside the renameThreadDialog */
dialog#renameThreadDialog form label {
    margin-bottom: 10px;
    font-weight: bold;
}

/* Style for the input field inside the renameThreadDialog */
dialog#renameThreadDialog form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 15px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Style for the buttons inside the renameThreadDialog */
dialog#renameThreadDialog form div {
    display: flex;
    justify-content: space-between;
}

/* Style for the buttons inside the renameThreadDialog */
/*dialog#renameThreadDialog form button {*/
/*    padding: 10px 20px;*/
/*    border: none;*/
/*    border-radius: 4px;*/
/*    font-size: 14px;*/
/*    cursor: pointer;*/
/*}*/

/* Style for the save button inside the renameThreadDialog */
dialog#renameThreadDialog form button#saveThreadTitleButton {
    /*background-color: #4CAF50;*/
    color: white;
}

/* Style for the cancel button inside the renameThreadDialog */
dialog#renameThreadDialog form button[type="button"] {
    background-color: #cacaca;
    color: white;
}


.roundInput {
    border: 1px solid #ccc;
    border-radius: 17px;
    height: 28px;
    padding: 0 10px;
}


.inputGroup {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-direction: column;
}

.inputGroup input {
    width: 40%;
    border: 1px solid #f5f5f5;
    border-radius: 17px;
    height: 28px;
    padding: 0 10px;
    background-color: #f5f5f5;
    align-content: center;
}

.inputGroup input:disabled {
    background-color: #f1f1f1;
    border: 0px;
    cursor: not-allowed;
}

.inputGroup button {
    width: max-content;
}

@media screen and (max-width: 600px) {
    .inputGroup input {
        width: 90%;
    }
}

.inputGroup label {
    display: block;
    font-weight: bold;
    color: #333;
}

#userAccountEmail {
    font-size: 0.9em;
    color: #878787;
    margin-bottom: 10px;
}

#userAccountInputContainer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.characterSection {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 20px 50px 55px 0px !important;
}

.characterSingleton {
    padding: 20px;
    border-radius: 20px;
    width: 256px;
    min-width: 256px;
    border: 1px solid #fff;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
    transition: box-shadow 0.3s ease, padding 0.3s ease, border-radius 0.3s ease;
    position: relative;
}

#revealAfterUsernameSaved {
    transition: filter 0.5s ease, opacity 0.5s ease;
}

.blocked {
    filter: blur(10px);
    -webkit-filter: blur(10px);
    pointer-events: none;
    opacity: 0.5;
}

#userProfileSection {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    flex-wrap: wrap;
    width: unset;
    background-color: white;
    padding: 20px 0px!important;
}

#addCharacterButtonText {
    /*  remove highlight on hover */
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    user-select: none;
}

.characterSingletonAddCharacter {
    box-shadow: none;
    border: 1px dashed #e1e1e1;
    cursor: pointer;
}

.characterSingletonAddCharacter > div {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.characterSingleton:hover {
    box-shadow: #e5e5e5 0 0 20px 0;
    padding: 20px;
}

.characterTextSettingsContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.characterTextSettingsContainerUserAccount {
    width: 430px;
}

.characterTextSettingsContainer label {
    display: block;
    font-weight: bold;
    color: #333;
    align-self: center;
}

.characterTextSettingsContainer button {
    width: max-content;
}

.characterTextSettingsContainer input {
    border: 1px solid #f5f5f5;
    border-radius: 17px;
    min-height: 28px;
    padding: 0 10px;
    background-color: #f5f5f5;
    align-content: center;
}

.characterTextSettingsContainer textarea {
    border: 1px solid #f5f5f5;
    border-radius: 17px;
    min-height: 75px;
    /*padding: 0 10px;*/
    background-color: #f5f5f5;
    padding: 10px;
}

.selectCharacter, .selectedCharacterIndicator {
    position: absolute;
    z-index: 3;
    right: 4px;
    top: 5px;
}

.selectedCharacterStyle {
    background: linear-gradient(180deg, #b5f3f1 0%, transparent 20%);
}

/*.selectedCharacterIndicator > svg {*/
/*    fill: #2196F3;*/
/*}*/

.selectCharacter:hover {
    cursor: pointer;
}

.selectCharacter > svg:hover {
    stroke: black;
}


/*.avatarPromptInputContainer{*/
/*    display: flex;*/
/*    justify-content: space-between;*/
/*}*/

/*.avatarPromptInputContainer >input{*/
/*    width: 72%;*/
/*}*/

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

.saveAvatar, .deleteCharacter {
    padding: 8px 9px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.deleteCharacter {
    background-color: #f44336;
    color: white;
}

.deleteCharacter:hover {
    background-color: #d32f2f;
}

.default-character .deleteCharacter {
    display: none;
}

.default-character {
    background-color: #f0f0f0;
    border: none;
}

.default-character:hover {
    border: none;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
}

.default-character input,
.default-character textarea,
.default-character button {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.default-character .characterActions {
    justify-content: flex-end;
}

.card {
    transition: opacity 0.3s ease-in-out;
}

.iconButtons {
    display: flex;
    gap: 6px;
}

@keyframes flashInput {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(244, 99, 66, 0.81);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(244, 93, 66, 0.86);
    }
}

.flashInput {
    animation: flashInput 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

/*.flashInput:focus {*/
/*    animation: none;*/
/*    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.5);*/
/*    outline: none;*/
/*}*/


/* CSS for the Chat Box avatar selection */

.character-avatars-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin: 3px;
    /* if conetnt is empty, hide the container */
}

.character-avatars-container:empty {
    display: none;
}

.character-avatar-label {
    position: relative;
    cursor: pointer;
    display: flex;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-tap-highlight-color: transparent;
}

.character-avatar-label:hover .character-avatar-image {
    border-color: #c0deff;
}

.character-avatar-radio {
    position: absolute;
    opacity: 0;
    border: 1px solid #e8e8e8;
    cursor: pointer;
}

.character-avatar-radio:checked + .character-avatar-image {
    border-color: #007bff;
    background-color: #e9f4ff;
}

.character-avatar-image {
    width: 20px;
    height: 20px;
    padding: 2px;
    border-radius: 50%;
    border: 2px solid #e7e7e7;
    transition: border-color 0.3s ease;
    cursor: pointer;
}


/** chatbox response **/
.ai-response-container {
    /*margin: 10px 0;*/
    /*margin-top: 10px;*/
    padding: 5px;
    /*background-color: #f0f4f8;*/
    /*border-radius: 12px;*/
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/
}

.ai-response-title {
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
    color: #6a6a6a;
}

.character-response {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.character-response-header {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.character-avatar {
    width: 70px;
}

.ai-response-container h4 {
    max-width: 100px; /* Adjust this value as needed */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    margin: 0;
    color: #333;
    font-size: 0.7em;
}

.ai-response-container p {
    margin: 0;
    /* font-style: italic; */
    color: #555;
    line-height: 1.4;
    font-size: 0.9em;
}


/****** pricing section ******/
#paymentSection {
    /*font-family: Arial, sans-serif;*/
    /*max-width: 1200px;*/
    /*margin: 0 auto;*/
    /*padding: 20px;*/
    background-color: #f8f8f8 !important;
    /*border-radius: 15px;*/
    /*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);*/
}

.pricing-header {
    text-align: center;
    margin-bottom: 30px;
}

.pricing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 10px 30px 80px;
    font-size: 0.9em;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 32px;
    margin: 0 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(18px);
}

.pricing-plans {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 10px;
}

.pricing-plan {
    background-color: white;
    border-radius: 10px;
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/
    box-shadow: rgba(14, 63, 126, 0.06) 0px 0px 0px 1px, rgba(42, 51, 70, 0.03) 0px 1px 1px -0.5px, rgba(42, 51, 70, 0.04) 0px 2px 2px -1px, rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px, rgba(42, 51, 70, 0.03) 0px 5px 5px -2.5px, rgba(42, 51, 70, 0.03) 0px 10px 10px -5px, rgba(42, 51, 70, 0.03) 0px 24px 24px -8px;
    padding: 20px;
    width: 200px;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.pricing-plan-selected {
    background: linear-gradient(180deg, #b5f3f1, transparent);
}

.pricing-plan:hover {
    transform: translateY(-5px);
    box-shadow: rgba(0, 0, 0, 0.2) 0 18px 50px -10px;
}

/* Styles for the Standard (middle) plan */
.emphasized-plan {
    background-color: #f0f7ff;
    border: 2px solid #2196F3;
    padding: 30px 20px;
    transform: scale(1.05);
    z-index: 1;
}

.emphasized-plan:hover {
    transform: scale(1.05) translateY(-5px);
}

.emphasized-plan::before {
    content: "Most Popular";
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2196F3;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: bold;
}

.plan-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.plan-billing {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.plan-discount {
    font-size: 14px;
    color: #2196F3;
    font-weight: bold;
    margin-bottom: 20px;
}

.plan-features {
    list-style-type: none;
    padding: 0;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.plan-features li {
    margin-bottom: 10px;
}

.plan-button {
    background-color: #2196F3;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.plan-button-selected {
    background-color: #c3c3c3;
    pointer-events: none;
}

#free-plan-button {
    pointer-events: none;
    /*border: 1px solid #dddddd;*/
    background-color: unset;
    color: black;
}

.plan-button:hover {
    background-color: #1976D2;
}

.manage-subscription-link {
    text-align: center;
    margin: 30px 0 10px 0;
    font-size: 0.8em;
}

.manage-subscription-link a {
    color: #666;
    text-decoration: none;
}

.manage-subscription-link a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 800px) {
    .pricing-plans {
        flex-direction: column;
        align-items: center;
    }

    .pricing-toggle {
        margin: 15px 10px 30px 7px
    }

    .pricing-plan,
    .emphasized-plan {
        width: 80%;
        max-width: 350px;
        transform: none;
        margin-bottom: 20px;
    }

    .emphasized-plan {
        order: -1;
    }

    .pricing-plan:hover,
    .emphasized-plan:hover {
        transform: translateY(-5px);
    }
}

/* Add these styles to your existing CSS file */

.plan-price-container {
    position: relative;
    display: inline-block;
    margin-bottom: 5px;
}

.original-price {
    font-size: 24px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.discounted-price {
    font-size: 36px;
    font-weight: bold;
    color: #2196F3;
}

.discount-label {
    position: absolute;
    top: -10px;
    right: -40px;
    background-color: #ff5722;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    transform: rotate(15deg);
}

/* Update existing styles */
.plan-price {
    display: none; /* Hide the original plan price */
}

.plan-billing {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}


/** about section **/
#aboutSection {
    background-color: #f8f8f8 !important;
    padding: 10px 20px !important;
    border-radius: 15px;
    font-size: 0.9em;
}



#promo-hero-section {
    display: none;
    flex-direction: column;
    justify-content: center;
}

.promo-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.2;
}

.promo-text {
    font-size: 16px;
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 25px;
}

.promo-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.feature-item {
    background-color: #f0f7ff;
    border-radius: 12px;
    padding: 15px;
    font-size: 14px;
    color: #0066cc;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.cta-promo-section {
    margin: 20px 0;
}

@media (max-width: 700px) {
    .promo-title {
        font-size: 1em;
        margin: 20px 0 0 0;
    }

    .promo-text {
        font-size: 0.8em;
        margin-bottom: 10px;
        line-height: 1.3em;
    }

    .promo-features {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 15px;
        font-size: 0.9em;
    }

    .promo-feature {
        padding: 3px;
        font-size: 0.8em;
    }

    .feature-item {
        padding: 10px;
        font-size: 10px;
    }

    .cta-promo-section {
        margin-top: 5px;
        font-size: 0.8em!important;
    }

    #signInPrivateSpace {
        font-size: 1em;
    }
}
