/***********************************/
/*      GENERAL                    */
/***********************************/

:root {
    --bg: #ffffff;
    --bg-secon: #fcfcfc;
    --chat-bg: #f4f7fa;

    --main-tx: #000000;
    --prim-tx: #2c3e50;
    --secon-tx: #7f8c8d;
    --acc: #3498db;
    --high-l: #e74c3c;

    --head-bg: #2980b9;
    --msg-sent-bg: #c3d8e8;
    --msg-sent-bg-2: #e2eff6;
    --msg-recv-bg: #bdc3c7;
    --msg-recv-bg-2: #e0e4e7;
    --inp-bg: #ffffff;
    --inp-bord: hsl(198, 19%, 60%);
    --inp-act: #00b400;
    --err-tx: #e74c3c;
    --err-bg: #ffe6e6;
}

.darkmode {

    /* Base */
    --bg: #121212;
    --bg-secon: #1a1a1a;
    --chat-bg: #18191a;

    /* Text */
    --main-tx: #ffffff;
    --prim-tx: #e1e1e1;
    --secon-tx: #b0b3b8;

    /* Accents */
    --acc: #3498db;
    --high-l: #e74c3c;

    /* Header & chat bubbles */
    --head-bg: #2980b9;
    --msg-sent-bg: #253341;
    --msg-sent-bg-2: #1f2a35;
    --msg-recv-bg: #2f2f2f;
    --msg-recv-bg-2: #3b3b3b;

    /* Inputs */
    --inp-bg: #252525;
    --inp-bord: hsl(198, 19%, 40%);
    --inp-act: #00b400;

    /* Errors */
    --err-tx: #ff6b6b;
    --err-bg: #a13535;

}

@font-face {
    font-family: 'Noto';
    src: url('NotoColorEmoji.ttf') format('truetype');
}

body {
    margin: 0px;
    background-color: var(--bg);
    font-family: Arial, Helvetica, sans-serif, 'NoTo' !important;
    box-sizing: border-box;
    overflow-x: hidden;
}


#auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    overflow: hidden;

}


#home-body {
    display: flex;
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
}

#profile-body {
    display: flex;
    flex-direction: column;
    justify-content: centers;
    align-items: center;
    margin: 0px;
    width: 100vw;
    height: 100vh;
}

#chat-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--chat-bg);
    overflow-x: hidden;
    margin-bottom: 100px;
}

#t-p-body {
    background-color: rgb(215, 215, 215);
    display: flex;
    align-items: center;
    flex-direction: column;
}

.toast-noti {
    position: fixed;
    visibility: hidden;
    display: flex;
    align-items: center;
    background-color: var(--err-tx);
    top: 10px;
    right: 10px;
    border-radius: 10px;
    padding: 15px;
    font-size: 1em;
    z-index: 9999999;
    min-width: 15vw;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.5s ease;
}

.toast-noti.show {
    transform: translateX(0);
}

.toast-noti.succ {
    background-color: var(--inp-act);

}

.toast-noti:hover {
    transform: translateX(0);
}

.toast-noti p {
    margin: 0 10px;
    color: var(--prim-tx);
}


.modal-wrap {
    position: fixed;
    display: none;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: visibility 0.3s ease, opacity 0.3s ease;
}

.confirm-modal {
    position: relative;
    background-color: var(--bg);
    border-radius: 25px;
    padding: 20px 30px;
    width: 80vw;
    height: 20vh;
    max-width: 600px;
    max-height: 300px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.confirm-modal.show {
    transform: translateY(0px);
    opacity: 1;
}

.modal-wrap:has(.confirm-modal.show) {
    opacity: 1;
    visibility: visible;
}


.confirm-modal>#close-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    float: right;
    padding: 0;
    margin: 0;
    aspect-ratio: 1/1;
    cursor: pointer;
    border: none;
    background-color: transparent;

}

.confirm-modal>h3 {
    font-size: 1.2em;
    margin: 10px 20px;
}

.confirm-modal>p {
    font-size: 1em;
    margin: 40px 0px;
    text-align: center;
}


.confirm-modal>div {
    position: absolute;
    display: flex;
    justify-content: space-evenly;
    gap: 20px;
    bottom: 20px;
    right: 30px;
    left: 30px;
    margin-top: auto;
}

.confirm-modal>div>button {
    font-size: 1em;
    font-weight: bold;
    border: none;
    background-color: var(--err-bg);
    color: var(--prim-tx);
    border-radius: 10px;
    padding: 10px 40px;

}

.confirm-modal>div>button:last-child {
    background-color: var(--err-tx);
    color: var(--prim-tx);

}

img {
    user-select: none;

}

.logo {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0px;
    left: 0px;
    margin: 1%;
    color: var(--acc);
}


.logo-home {
    display: flex;
    align-items: center;

}

.logo h1,
.logo-home {
    margin: 0 10px;
}

.logo img,
.logo-home {
    width: 40px;
    height: 40px;
}



.texterr {
    opacity: 0;
    align-self: start;
    color: var(--err-tx);
    text-decoration: underline;
    font-size: 0.9em;
    margin: 10px;
    transition: opacity 0.3s ease;
}




/***********************************/
/*      AUTHENTICATION             */
/***********************************/

#auth-canvas {
    position: absolute;
    z-index: -1;
}

#auth-sec {
    display: flex;
    justify-content: space-between;
    width: 900px;
    height: 700px;
    background-color: var(--bg-secon);
    border-radius: 10px;
}

#auth-sec::before {
    content: '';
    position: absolute;
    width: 900px;
    height: 700px;
    border-radius: 10px;
    z-index: -1;
    opacity: 0.5;
    background: linear-gradient(to right, #555, 60%, var(--acc));
    filter: blur(10px);

}

.hide-btn {
    display: none;
}

.hide-btn:checked+.sign-in {
    display: none;
}

.hide-btn:not(:checked)+.sign-in+.sign-up {
    display: none;
}



.sign-in,
.sign-up {
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 500px;
    /* border: 1px solid; */
}

.sign-in>h1,
.sign-up>h1 {
    color: var(--prim-tx);
    font-size: 1.7em;
    font-weight: bold;
}

.ani-input {
    position: relative;
    display: flex;
    align-items: center;
}

.ani-input input {
    height: 30px;
    width: 300px;
    border: none;
    border: 1px solid var(--inp-bord);
    color: var(--main-tx);
    border-radius: 5px;
    background-color: var(--inp-bg);
    font-size: 1rem;


}

.ani-input svg {
    position: absolute;
    right: 10px;
}

.ani-input label {
    margin: 5px 10px;
    color: var(--secon-tx);
    position: absolute;
    background-color: var(--inp-bg);
    padding: 0px;
    font-size: 1em;
    text-wrap: nowrap;
    transition: transform 0.3s ease, color 0.3s ease;
}

.ani-input input:focus {
    border-color: var(--inp-act);
    outline: none;
}

.ani-input input:not(:placeholder-shown)+label,
.ani-input input:focus+label {
    transform: translateY(-15px) scale(0.9);
    color: var(--prim-tx);

}

.ani-input input:invalid:not(:focus) {
    border-color: var(--err-tx);
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px var(--inp-bg) inset !important;
    -webkit-text-fill-color: var(--main-tx) !important;
}

/* Firefox */
input:-moz-autofill {
    box-shadow: 0 0 0px 1000px var(--inp-bg) inset !important;
    text-fill-color: black !important;
}

.para-auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--acc);
    float: right;
    height: 600px;
    width: 300px;
    border-radius: 8px;
    border-top-left-radius: 100px;
    border-bottom-left-radius: 100px;
    padding: 50px;
    z-index: 11;
}



.para-auth p {
    width: 300px;
    font-size: 1.0em;
    line-height: 1.5em;
}


.animate-sign-change {
    animation: sign-change 1s cubic-bezier(0.23, 1, 0.320, 1);
}

.submit-f {
    width: 100px;
    height: 25px;
    background-color: var(--acc);
    border: none;
    color: whitesmoke;
    font-size: 1em;
    font-weight: bold;
    border-radius: 5px;
    z-index: 10;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.submit-f:hover {
    transform: translateY(-3px);
    box-shadow: 0px 2px 5px #555;
}

.submit-f:active {
    transform: translateY(3px);
    box-shadow: 0px 0px 5px #555;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}


.load-sub {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    width: min-content;
    border-radius: 5px;
    z-index: 5;
    padding: 2px;
}

.animate-before {
    display: block;
    background-image: conic-gradient(from var(--angle), transparent 60%, var(--high-l));
    animation: rotate 1s cubic-bezier(0.1, 0, 0.9, 1) infinite;
}

@keyframes rotate {
    from {
        --angle: 0deg;
    }

    to {
        --angle: 360deg;
    }
}


.alter-auth {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    font-size: 0.75em;
}

.link-btn {
    float: right;
    border: none;
    background-color: transparent;
    text-decoration: underline;
    color: var(--acc);
    cursor: pointer;
}


.sub-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-container div {
    display: flex;
    justify-content: center;
    align-items: center;
}

#sign-in-err {
    margin-top: 335px;
    margin-left: 15px;
}

#sign-up-err {
    margin-top: 240px;
    margin-left: 15px;
}

.err {
    display: none;
    opacity: 0;
    align-self: baseline;
    border: 1px solid var(--high-l);
    border-radius: 5px;
    background-color: var(--err-bg);
    color: var(--err-tx);
    padding: 0px 50px;
    transition: opacity 0.55s ease;
}

.err h1 {
    display: inline;
    margin: 0px 0px;
}

.tp-agree {
    font-size: 0.7em;
    margin-top: auto;
    color: var(--main-tx);
}


@keyframes sign-change {

    0%,
    100% {
        position: absolute;
        right: calc(50vw - 450px);
        width: 300px;
    }

    50% {
        border-radius: 8px;
        position: absolute;
        right: calc(50vw - 450px);
        width: 800px;
    }
}

/***********************************/
/*      HOME PAGE                  */
/***********************************/

#top-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100vw;
    height: 70px;
    background-color: var(--acc);
    box-shadow: 0 0 10px #555;
}

#top-tab h1 {
    color: white;
    margin: 0px 30px;
    font-size: 1.6em;

}

.my-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0px 50px;
    overflow: hidden;
    border-radius: 40px;
    border: 2px solid var(--high-l);
    transition: box-shadow 0.3s ease;
}

.my-profile:hover {
    box-shadow: 0px 0px 10px #555;
}



.my-profile img {
    height: 60px;
    pointer-events: none;
}

#update.hidden {
    display: none;
}

#update {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
    pointer-events: none;
}

#update button {
    float: right;
    border: none;
    background-color: transparent;
}

#update>div {
    position: absolute;
    width: calc(100% - 50px);
    height: calc(100% - 80px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 1000px;
    max-height: 800px;
    background-color: var(--bg-secon);
    border: 2px solid var(--acc);
    border-radius: 10px;
    padding: 20px;
    pointer-events: all;
    box-sizing: border-box;
}


#update h1 {
    font-size: 1em;
    margin: 0;
}

#update ul {
    margin: 0;
    line-height: 1.5em;
    font-size: 1em;
    padding-inline-start: 1;
}

#update ul li {
    margin: 10px 0px;
}

#update ul li::marker {
    margin: 0;
    padding: 0;
}

#update>div>div {
    display: flex;
    padding: 50px 0px;
    height: 100%;
    width: 100%;
}



.contacts-sec {
    display: block;
    width: 100vw;
    height: calc(100vh - 100px);
    background-color: var(--bg);


}

.contact-wrap {
    position: relative;
    display: block;
    text-decoration: none;
    color: unset;
    margin: 20px auto;
    width: calc(100% - 40px);
    box-sizing: border-box;
    border-radius: 10px;
    interpolate-size: allow-keywords;
    transition-property: height, width, top, left, border-radius, margin, background-color;
    transition-duration: 0.3s;
}


.contact-wrap.clone * {
    transition: opacity 4s ease 1s;
    will-change: opacity;
}

.contact {
    display: flex;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease, opacity 1s ease;
    z-index: 1;
    will-change: transform;
    transform-style: preserve-3d;
}

.contact::before {
    content: attr(data-msg-count);
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--high-l);
    width: 20px;
    transform: translate(50px, -22px);
    aspect-ratio: 1/1;
    border-radius: 10px;
    font-size: 0.8em;
}

.contact[data-msg-count='none']::before {
    display: none;
}

.contact:hover {
    transition: background-color 0.1s ease, box-shadow 0.1s ease,
        transform 0.1s ease;
    background-color: var(--bg-secon);
    box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.25);
    transform: perspective(2000px) translateZ(10px);
}

.contact-img {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid var(--head-bg);
    margin-right: 10px;
}

.online .contact-img {
    border-color: var(--inp-act);
}

.online .contact-img::before {
    position: absolute;
    content: '';
    width: inherit;
    height: inherit;
    border-radius: inherit;
    background-color: var(--inp-act);
    animation: ripple 2s ease infinite;
    z-index: -1;
}

@keyframes ripple {
    from {

        transform: scale(1);
        opacity: 0.8;
    }

    to {

        transform: scale(1.5);
        opacity: 0;
    }
}



.contact-img img {
    height: 100%;
    pointer-events: none;
}

.contact-info h2,
.contact-info h6 {
    margin: 5px;
    padding: 0;
}

.contact-info h2 {
    color: var(--prim-tx);
}

.contact-info h6 {
    color: var(--secon-tx);
}


.contact-img.full-img {
    position: fixed;
    width: auto;
    height: auto;
    overflow: visible;
    border-radius: 0;
    height: auto;
    width: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.contact-img.full-img::after {
    content: '';
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: all;
}

.contact-img.full-img img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
}

.online .contact-stat {
    visibility: visible;
}

.contact-stat {
    visibility: hidden;
    display: flex;
    align-items: center;
    color: var(--inp-act);
    margin-left: auto;
    padding: 0 10px;
}

.contact-stat span {
    display: block;
    width: 12px;
    border-radius: 10px;
    aspect-ratio: 1/1;
    margin: 5px;
    background-color: var(--inp-act);
}

#profile-opt {
    display: flex;
    flex-direction: column;
    position: absolute;
    text-align: center;
    right: 100px;
    top: 50px;
    background-color: var(--bg);
    border-radius: 15px;
    width: 150px;
    box-shadow: 0 0 20px #333;
    overflow: hidden;
    z-index: 99999;
    transform: translateZ(1px);
}

#profile-opt div {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
}

#profile-opt div button,
#profile-opt div p {
    width: max-content;
    color: var(--prim-tx);
    border: none;
    background-color: transparent;
    margin: 0px;
    padding: 20px 5%;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
}

#profile-opt>a {
    text-decoration: none;
    color: unset;
}

#profile-opt svg * {
    fill: var(--prim-tx);
}

#profile-opt>div:last-child * {
    color: red;
    fill: red;
}

#profile-opt div:hover {
    background-color: var(--bg-secon);

}


details summary::marker {
    content: '';
}



#loading {
    position: fixed;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--bg-secon);
    width: 100vw;
    height: 100vh;
    color: var(--main-tx);
    z-index: 1000;
}

#loading section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
}

#loading span {
    font-size: 1em;
    position: absolute;
    bottom: 5px;
    right: 5px;
}

#loading section div {
    width: 20px;
    height: 20px;
    border-radius: 20px;
    margin: 5px;
    background-color: var(--head-bg);
    animation: jump 1s ease-in-out calc(var(--delay) * 0.1) infinite;
    transition: background-color 1s ease, transform 2s ease;
}

#loading section div[type=fail] {
    background-color: var(--secon-tx);
}

#loading p {
    font-size: 1.2rem;
    font-weight: bold;
}

#loading button {
    margin: 10px;
    opacity: 0;
    pointer-events: none;
    background-color: var(--acc);
    color: whitesmoke;
    font-size: 1em;
    font-weight: bold;
    border: none;
    outline: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.1s ease, opacity 2s ease;
}

#loading button:hover {
    background-color: var(--head-bg);
}

@keyframes jump {

    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-30px);
    }

    100%,
    60% {
        transform: translateY(0px);
    }
}











/*add contact section*/

#add-contact-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--head-bg);
    color: var(--prim-tx);
    width: 50px;
    height: 50px;
    font-size: 2em;
    border: none;
    border-radius: 30px;
    transition: box-shadow 0.3s ease;
    z-index: 999;
}

#add-contact-btn:hover {
    box-shadow: 0px 0px 10px #333;
}

.add-contact-sec {
    display: none;
    flex-direction: column;
    align-items: center;
    height: calc(100vh - 100px);
    text-overflow: ellipsis;
    word-break: keep-all;
}

.add-contact-sec h2 {
    color: var(--main-tx);
}

.add-contact-sec.show {
    display: flex;
}

.contacts-sec:has(+ .add-contact-sec.show) {
    display: none;
}

.contact-search {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-display p {
    color: var(--prim-tx);
}


.add-contact {
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--secon-tx);
    border-radius: 10px;
    padding: 10px 15px;
    margin: 10px auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: clamp(300px, 40vw, 1000px);
    max-width: 90vw;
    background-color: var(--bg);
    transition: box-shadow 0.3s ease;
}

.add-contact:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.add-contact-info * {
    margin: 4px 0;
    color: var(--prim-tx);
    font-size: 1em;
    max-width: 50vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-contact-img {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid var(--head-bg);
    flex-shrink: 0;
}

.add-contact-img img {
    height: 100%;
    pointer-events: none;
    object-fit: cover;
    pointer-events: none;
}

.add-contact-sub {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.add-contact-sub button {
    border: none;
    border-radius: 6px;
    background-color: var(--acc);
    color: white;
    font-size: 1.2em;
    padding: 6px 12px;
    margin: 2px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-contact-sub button:hover {
    background-color: var(--head-bg);
    transform: scale(1.05);
}

.add-contact-sub button:active {
    transform: scale(0.98);
}

.add-contact-sub button.added {
    background-color: gray !important;
    cursor: not-allowed;
}

.add-contact-sub button.adding {
    /* background-color: gray !important; */
    transform: scale(0.98);
    cursor: progress;
}







/***********************************/
/*      SETTINGS                   */
/***********************************/

#profile-body .settings-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-secon);
    width: 90%;
    height: 80%;
    padding: 100px 0px;
    box-sizing: border-box;
    border-radius: 30px;
    box-shadow: 0 0 10px 2px#333;
    margin-top: 100px;
}

#profile-body>a {
    position: fixed;
    top: 5%;
    left: 5%;
}

.set-profile-sec {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.set-profile-sec h1 {
    font-size: 1.8em;
    color: var(--main-tx);
}

.set-prof-pic {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 110px;
    aspect-ratio: 1/1;
    border-radius: 100px;
    overflow: hidden;
}

.set-prof-pic>img {
    height: 100%;
}

.setting {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    border-bottom: 1px solid var(--secon-tx);
    border-top: 1px solid var(--secon-tx);
}

.set-label {
    font-size: 1.2em;
    color: var(--main-tx);
}

.file-inp input[type=file] {
    display: none;
}

.file-inp label {
    background-color: var(--acc);
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    margin: 0;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.file-inp label:hover {
    background-color: var(--head-bg);
}

.set-drop {
    padding: 2px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    background-color: var(--inp-bg);
    color: var(--main-tx);
    padding: 5px 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

select,
::picker(select) {
    appearance: base-select;
    border: 1px solid;
    border-radius: 5px;
}

.set-drop option {
    padding: 5px;
    background-color: var(--bg-secon);
    color: var(--main-tx);
    font-weight: normal;
}

.set-drop option:checked {
    font-weight: bold;
}

.set-drop option::checkmark {
    content: '';
}

.set-drop option:hover {
    background-color: var(--inp-bg);
}

.tp-set {

    display: inline;
    margin-top: 30px;
}




/***********************************/
/*      CHAT ROOM                  */
/***********************************/
.ch-head {
    position: fixed;
    width: 100%;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--head-bg);
    padding: 10px;
    transform: translateY(-120%);
    animation: slidedown 0.1s ease-out 0.2s forwards;
}

@keyframes slidedown {
    from {
        transform: translateY(-120%);
    }

    to {
        transform: translateY(0%);
    }
}

@keyframes slideup {
    from {
        transform: translateY(120%);
    }

    to {
        transform: translateY(0%);
    }
}

@keyframes hide {
    from {
        display: none;
    }

    to {
        display: none;
    }
}

.ch-head>a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    position: absolute;
    left: 2%;
    transition: background-color 0.1s ease;
}

.ch-head>a:hover {
    background-color: rgba(245, 245, 245, 0.1);

}

svg {
    pointer-events: none;
}

.ch-head.typing>.ch-profile:before {
    position: absolute;
    content: '';
    width: inherit;
    aspect-ratio: 1/1;
    border-radius: inherit;
    background-color: whitesmoke !important;
    animation: ripple 1.5s ease infinite !important;
    z-index: -1;
}

.ch-head.online>.ch-profile:before {
    position: absolute;
    content: '';
    width: inherit;
    aspect-ratio: 1/1;
    border-radius: inherit;
    background-color: var(--inp-act);
    animation: ripple 2s ease infinite;
    z-index: -1;
}

.ch-head.online>#ch-info:after {
    content: 'Online';
}

.ch-head.typing>#ch-info:after {
    content: 'Typing...' !important;
}

.ch-head.online>.ch-profile {
    border-color: var(--inp-act);
}

.ch-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    aspect-ratio: 1/1;
    margin: 0px 15px;
    overflow: hidden;
    border-radius: 40px;
    border: 2px solid var(--acc);
    transition: box-shadow 0.3s ease;
}



.ch-profile:hover {
    box-shadow: 0px 0px 10px #555;
}

.ch-profile img {
    height: 100%;

}

#ch-info {
    display: block;
    padding: 0;
    margin-left: 10px;
}


.msg-area {
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    bottom: 0;
    padding: 10px 20px;
    width: 100vw;
    transform: translateY(120%);
    animation: slideup 0.1s ease 0.2s forwards;
}

#ch-info * {
    margin: 0;
    color: var(--main-tx);
}

#message-f {
    position: relative;
    display: flex;
    align-items: end;
    width: 100%;
}

.reply-holder:has(+ .reply-inp) {
    /* display: block; */
    height: max-content;
    transform: translateY(0px);
}

.reply-holder {
    position: relative;
    box-sizing: border-box;
    margin: 0;
    /* min-height: 60px; */
    align-self: flex-start;
    background-color: var(--err-bg);
    color: var(--main-tx);
    width: calc(100% - 105px);
    border: 1px solid var(--inp-bord);
    border-bottom: none;
    border-radius: 10px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    margin: 0 10px;
    padding: 10px;
    height: 0px;
    interpolate-size: allow-keywords;
    transition: height 0.5s ease, transform 0.5s ease;
    transform: translateY(25px);
    animation: hide 0.6s linear;
}


.reply-holder>button {
    display: flex;
    justify-content: center;
    align-items: center;
    float: right;
    padding: 0;
    margin: 0;
    aspect-ratio: 1/1;
    cursor: pointer;
    border: none;
    background-color: transparent;
}


#message-f textarea {
    font-family: Arial, Helvetica, sans-serif, 'NoTo' !important;
    display: inline-block;
    box-sizing: border-box;
    border: 1px solid var(--inp-bord);
    border-radius: 10px;
    background-color: var(--inp-bg);
    color: var(--main-tx);
    font-size: 1em;
    font-family: Arial, Helvetica, sans-serif;
    resize: none;
    overflow: hidden;
    padding: 0.5em;
    padding-right: 90px;
    width: calc(100% - 85px);
    height: auto;
    min-height: 1.5rem;
    margin-right: 5px;
    outline: none;
}

#message-f .msg-opt {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    right: 100px;
    top: 50%;
    padding: 5px;
    background-color: transparent;
    transform: translateY(-50%);
}

#message-f .msg-opt label,
#message-f .msg-opt button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    background-color: transparent;
    cursor: pointer;
    border: none;
}

#message-f .msg-opt label:hover,
#message-f .msg-opt button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}


.img-preview {
    visibility: hidden;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    max-width: 200px;
    max-height: 200px;
    padding: 0px 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    background-color: var(--bg-secon);
}

.img-preview.show {
    visibility: visible;
}

.img-preview img {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 200px;
}

.img-preview button {
    position: absolute;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    aspect-ratio: 1/1;
    cursor: pointer;
    border: none;
    background-color: transparent;
}



#message-f button#send-msg {
    right: 0%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 2em;
    background-color: var(--acc);
    border: 1px solid var(--inp-bord);
    height: 100%;
    padding: 5px;
    aspect-ratio: 1/1;
    border-left: none;
    border-radius: 50px;
}

#message-f #send-msg.sending {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
}

#message-f #send-msg.sending::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

#message-f #send-msg.sending svg {
    visibility: hidden;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.chat-area {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 10px;
    transition: margin 0.5s ease 0.3s;
}

.chat-area:has(+ .msg-area>#emoji-togg-btn:checked) {
    margin-bottom: 210px;
    transition: none;
}

.message {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    padding: 0.1em 2em;
    padding-top: 1rem;
    margin: 5px;
    max-width: 50vw;
    text-wrap: wrap;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.message>button {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    font-size: 1em;
    padding: 2px;
    border: none;
    bottom: 5px;
    border-radius: 20px;
    cursor: pointer;
    opacity: 0.8;
    background-color: var(--chat-bg);
    color: #333;
    transition: transform 0.15s ease;
}

.message>button:active {
    transform: scale(0.9);
}

/*reply*/
.message[type=other]>button {
    right: 5px;
}

/*del*/
.message[type=user]:hover>button {
    opacity: 0.8;
    pointer-events: all;
}


.message[type=user]>button {
    pointer-events: none;
    opacity: 0;
    right: 5px;
    fill: var(--secon-tx);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.message>.reply-box {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--main-tx);
    border-radius: 5px;

}


.reply-box p {
    margin: 0;
    padding: 0.4em;
    font-size: 0.8rem;
    width: 100%;
}

.message>p {
    color: var(--main-tx);
    font-size: 0.9rem;
    margin-top: 5px;
}

.message>p>a {
    color: var(--acc);
    font-size: 0.9rem;
    margin-top: 5px;
}

.message>p>a:hover {
    color: dodgerblue;
    font-size: 0.9rem;
    margin-top: 5px;
}

.message>span {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 0.7em;
    margin: 2px 5px;
    color: var(--secon-tx);

}

.message .image-box {
    max-width: 500px;
    max-height: 500px;
}


.message .image-box img {
    display: block;
    width: 100%;
    max-width: 500px;
    max-height: 500px;
    height: auto;
}

.message .image-box.full-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.message .image-box.full-img::after {
    content: '';
    position: absolute;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
    pointer-events: all;
}

.message .image-box.full-img img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
}

.message[type=other]>span {
    left: 0;
}


.message[type=user] {
    justify-content: right;
    align-self: flex-end;
    border-top-right-radius: 0px;
    background-color: var(--msg-sent-bg);
}

.message[type=other] {
    justify-content: left;
    align-self: flex-start;
    border-top-left-radius: 0px;
    background-color: var(--msg-recv-bg);
}

.message[type=user]+.message[type=other] {
    margin-top: 25px;
}

.message[type=other]+.message[type=user] {
    margin-top: 25px;
}

.message.deleted {
    background-color: var(--err-bg);
    border-radius: 100px;
    padding: 15px;
}

.message.deleted p {
    padding: 0px;
    margin: 0;
}

.date-tag {
    align-self: center;
    background-color: var(--bg);
    color: var(--prim-tx);
    padding: 10px;
    margin: 30px 0px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.date-tag p {
    margin: 0;
    font-size: 0.7rem;
}

#emoji-togg-btn:checked+#emoji-kbd {
    visibility: visible;
    transform: translateY(0);
    height: auto;
    padding: 15px;

}

#emoji-kbd {
    display: flex;
    transform: translateY(200px);
    flex-wrap: wrap;
    background-color: var(--bg-secon);
    width: calc(100% - 85px);
    height: 0;
    margin-right: auto;
    margin-top: 10px;
    padding: 0;
    gap: 5px;
    max-height: 200px;
    overflow-y: scroll;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    interpolate-size: allow-keywords;
    transition: transform 0.5s ease, height 0.5s ease, padding 0.5s ease;
    animation: hide 0.6s linear;
}



#emoji-kbd div {
    font-family: 'NoTo', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
    font-size: 1.5em;
    user-select: none;
}

#emoji-kbd div:hover {

    background-color: rgba(0, 0, 0, 0.2);

}

#emoji-kbd p {
    display: flex;
    width: 100%;
    color: var(--main-tx);
    user-select: none;
}

#emoji-kbd img {
    width: auto;
    height: 24px;
    pointer-events: none;
}

@keyframes OnewMsg {
    0% {
        opacity: 0.1;
        transform: rotateZ(5deg) translateX(-1px) translateY(9px);

    }

    100% {
        opacity: 1;
        transform: rotateZ(0deg) translateX(0px);
    }
}

@keyframes UnewMsg {
    0% {
        opacity: 0.1;
        transform: rotateZ(-5deg) translateX(-1px) translateY(9px);

    }

    100% {
        opacity: 1;
        transform: rotateZ(0deg) translateX(0px);
    }
}

/***********************************/
/*      Privacy And Terms          */
/***********************************/

#t-p-body>div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgb(240, 240, 240);
    padding: 20px 50px;
    width: 90%;
    margin: 10%;
    border-radius: 20px;
    box-sizing: border-box;
}

#t-p-body div.polices {
    align-items: unset;
}

#t-p-body h1 {
    align-self: center;
}

































/***********************************/
/*      MOBILE SUPPORT             */
/***********************************/
@media (max-width: 925px) {
    #auth-body {
        width: 100vw;
        height: 100vh;
    }

    .logo>h1 {
        font-size: 1em;
        margin: 0;
    }

    .logo>img {
        height: 20px;
    }

    #auth-sec {
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
        width: 100vw;
        height: 100vh;
        border-radius: 0px;
        background: transparent;
    }

    #auth-sec::before {
        display: none;
    }

    .para-auth {
        justify-content: center;
        border-radius: 0px;
        border-top-left-radius: 100px;
        border-top-right-radius: 100px;
        height: 200px;
        width: calc(100vw - 100px);
    }

    .para-auth p {
        display: none;
        width: 95vw;
        line-height: 1.2em;
    }

    .sign-in>h1,
    .sign-up>h1 {
        font-size: 2em !important;
    }




    @keyframes sign-change {

        0%,
        100% {
            position: absolute;
            bottom: 0;
            height: 150px;
        }

        50% {
            border-radius: 0px;
            position: absolute;
            bottom: 0;
            height: calc(100vh - 100px);
        }
    }

    #sign-in-err {
        margin-top: 100px;
        font-size: 0.8em;
        align-self: center;
    }

    #sign-up-err {
        margin-top: 50px;
        font-size: 0.8em;
        align-self: center;
    }

    /************************************/

    #top-tab {
        height: 70px;
    }

    #top-tab>h1 {
        font-size: 1.5em;
    }

    .my-profile {
        width: 50px;
        height: 50px;
    }

    .my-profile img {
        height: 50px;
    }

    .contact-img {
        width: 50px;
        height: 50px;
    }

    .contact::before {
        transform: translate(40px, -19px);
    }

    .contact-stat p {
        display: none;
    }


    .ch-profile {
        width: 50px;
    }

    .ch-head p {
        font-size: 0.8em;
        max-width: 150px;
        overflow-x: hidden;
    }

    .ch-head h2 {
        font-size: 1em;
    }

    .message[type=user]>button {
        pointer-events: none;
        opacity: 0.8;
        right: 5px;
        fill: var(--secon-tx);
        transition: opacity 0.15s ease, transform 0.15s ease;
    }
}