:root {
    --basic-size: 16px;
    --font-family: 'Inter', serif;
    --accent-color: #bf0a80;
    --secondary-color: #f2f2f2d1;
    --dark-color: #151e2b;
    --border-color: #c2c8d0;
    --gradient-color: linear-gradient(55deg, #740343, #0a0128, #740343);
}

body {
    font-family: var(--font-family);
}

body {
    margin: 0px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    background-color: #2A063D;

    /* Gradient standard */
    background-image: var(--gradient-color);
    background-attachment: fixed;
    background-size: cover;
    animation: gradientAnimation 60s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


#app-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: row;
}

aside {
    height: 100%;
    width: 400px;
    max-width: 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#logo-wrapper {
    display: flex;
    justify-content: start;
    align-items: center;
    flex: 1;
    padding: 40px 0px 70px 10%;
}

#logo {
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 5px solid white;
    margin-right: 15px;
}

#top-circle,
#bottom-circle {
    background-color: white;
    width: 25%;
    height: 25%;
    border-radius: 50%;
    margin: 7%;
}

#logo-text {
    color: white;
    font-size: 2rem;
    font-weight: 400;
    margin-top: -5px;
}

#widgets,
#chat-list,
#aside-footer {
    display: flex;
    flex-direction: column;
    justify-content: start;
    padding-left: 10%;
    padding-right: 10%;
}

.widget {
    display: flex;
    flex-direction: row;
    justify-content: center;
    color: rgba(255, 255, 255, 0.951);
    align-items: center;
    font-size: calc(var(--basic-size) * 1.375);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    background: transparent;
    overflow: hidden;
    margin-bottom: 10px;
    text-align: center;
}

.widget:hover {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0);
    font-weight: 500;
    box-shadow: none;
    ;
}

.widget:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 70%); */
    background-color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    /* Ensures this doesn't interfere with clicks or other interactions */
    z-index: -1;
    /* Keeps the gradient behind the content */
}


.widget i {
    margin-right: 10px;
}

.widget-accent {
    background: white;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    font-weight: 600;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15), 0px 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.widget-accent svg{
    fill: var(--accent-color);
    width: calc(var(--basic-size) * 1.375);
    margin-right: 10px;
}

.widget-accent:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2), 0px 3px 6px rgba(0, 0, 0, 0.15);
}

.widget-accent:hover svg{
    fill: white;
}

.aside-delimeter-text {
    color: white;
    font-size: calc(var(--basic-size) * 1.5);
    font-weight: 600;
}

#chat-list::-webkit-scrollbar {
    width: 6px;
}

#chat-list::-webkit-scrollbar-track {
    background: transparent;
}

#chat-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

#chat-list {
    max-height: 35vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding-right: 10px;
    padding-bottom: 30px;
    margin-bottom: 30px;
    margin-top: 10px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 90%, rgba(0, 0, 0, 0));
}

.conversation-link {
    display: block;
    width: 95%;
    color: rgba(255, 255, 255, 0.951);
    font-size: calc(var(--basic-size) * 1.25);
    cursor: pointer;
    background: transparent;
    padding: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 20px;
    font-weight: 300;
}


.conversation-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 30px;
}

#aside-footer {
    padding-top: 10px;
    padding-bottom: var(--basic-size);
}

#main-stage {
    width: 100%;
    height: calc(100% - var(--basic-size) * 2);
    margin: var(--basic-size);
    border-radius: 20px;
    background-color: rgb(255, 255, 255);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;

}

#prompt-area {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 45%;
    max-width: 1200px;
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    margin: 0px 0px 25px 0px;
    border-radius: 50px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.08);
    background-color: white;
}

#prompt {
    max-height: 300px;
    width: 100%;
    font-size: calc(var(--basic-size) * 1.375);
    width: 100%;
    border: none;
    outline: none;
    color: var(--text-color);
    overflow: hidden;
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    overflow-y: auto;
    scrollbar-width: thin;
    /* Pentru Firefox */
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}


#prompt:empty:before {
    content: attr(data-placeholder);
    color: gray;
    pointer-events: none;
    display: block;
}

#send-button {
    background-color: var(--accent-color);
    background-attachment: fixed;
    background-size: cover;
    border: none;
    padding: calc(var(--basic-size) * 1);
    border-radius: 50%;
    cursor: pointer;
    height: calc(var(--basic-size) * 1.375);
    width: calc(var(--basic-size) * 1.375);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15),
        0px 3px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#send-button:hover {
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2),
        0px 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

#dialog-window {
    width: 50%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-grow: 1;
}

#dialog-window::-webkit-scrollbar {
    width: 0;
}

.message {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    padding: 20px;
    margin: 10px;
    font-size: calc(var(--basic-size) * 1.25);
    background-color: white;
    border-radius: 20px;
}

.user-message {
    align-self: flex-end;
    border-radius: 20px;
    background-color: var(--secondary-color);
    box-shadow: 0 9px 9px 0px rgba(0, 0, 0, .01), 0 2px 5px 0px rgba(68, 68, 68, 0.06);
    margin-right: 30px;
    max-width: 70%;
}

.user-message .message-content {
    color: var(--dark-color);
    line-height: calc(var(--basic-size) * 1.5);
}

.message-text {
    white-space: normal;
    overflow-wrap: break-word;
    /* standard modern */
    word-wrap: break-word;
    /* pentru compatibilitate mai veche */
}


@keyframes shake {
    0% {
        transform: translate(0);
    }

    10%,
    20% {
        transform: translate(-5px, 0);
    }

    30%,
    50%,
    70%,
    90% {
        transform: translate(5px, 0);
    }

    40%,
    60%,
    80% {
        transform: translate(-5px, 0);
    }

    100% {
        transform: translate(0);
    }
}

.shake-animation {
    animation: shake 0.6s;
}

.conversation-list {
    display: none;
}

#chat-mobile-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    width: 90%;
    display: none;
}


#chat-mobile-header #menu-icon, #chat-mobile-header #feed-icon{
    background-color: white;
    padding: calc(var(--basic-size)* 1);
    border-radius: 50%;
    cursor: pointer;
    height: calc(var(--basic-size)* 1.375);
    width: calc(var(--basic-size)* 1.375);
}

#chat-title{
    color: white;
    font-size: calc(var(--basic-size) * 1.375);
    font-weight: 400;
}




















@media (max-width: 1500px) {
    :root {
        --basic-size: 14px;
    }

    #prompt-area,
    #dialog-window {
        width: 60%;
    }
}

@media (max-width: 1300px) {
    :root {
        --basic-size: 12px;
    }

    #chat-list {
        max-height: 18vh;
    }

    #logo-wrapper {
        padding: 40px 0px 30px 10%;
    }

    #prompt-area,
    #dialog-window {
        width: 80%;
    }
}

@media (max-height: 750px),
(max-width: 1300px) {
    .conversation-list {
        display: flex;
    }

    #chat-list {
        display: none;
    }
}

@media (max-width: 768px) {
    #main-stage {
        background-color: transparent;
        margin-bottom: 100px;
    }
    
    aside {
        display: none;
    }

    #app-wrapper.expanded {
        overflow: hidden;
    }
    
    #app-wrapper.expanded aside {
        transition: transform 2s ease;
        display: flex;
        width: 60%;
        min-width: 75vw;
    }
    
    #app-wrapper.expanded #main-stage {
        transition: transform 1s ease;
        transform: translateX(70%);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    #app-wrapper.collapsed #main-stage {
        transition: transform 0.5s ease-in-out;
        transform: translateX(0);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        position: unset;
    }

    #chat-mobile-header{
        display: flex;
    }

    .user-message {
        max-width: 90%;
        margin-right: 0px;
    }

    .message {
        margin: 5px 0px 5px 0px;
    }

    #dialog-window {
        width: 90%;
        padding-bottom: 90px;
    }

    #prompt-area{
        margin: 0px;
        border-radius: 20px;
        padding:12px 16px 12px 28px;
        position: absolute;
        width: calc((100vw - 24px) * 0.9);
    }
}