@font-face {
  font-family: 'Peyda';
  src: url('fonts/PeydaWebFaNum-Regular.woff2') format('woff2'),
       url('fonts/PeydaWebFaNum-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Peyda-Bold';
  src: url('fonts/PeydaWebFaNum-Bold.woff2') format('woff2'),
       url('fonts/PeydaWebFaNum-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
    --primary-color: #5d0cae;
    --radius: 12px;
    --container-width: min(600px, 100%);
    --header-height: 80px;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html{
    font-size: 15px;
}

body {
    font-family: 'Peyda', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    word-spacing: 0.05rem;
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    direction: rtl;
    position: relative;
}
.container {
    width: var(--container-width);
    margin: 0 auto;
    background-color: #ffffff;
    flex: 1;
}
#comments-container{
    padding: 0 30px;
}
header{
    position: sticky;
    top: 0;
    background-color: #ffffffbf;
    z-index: 101;
    width: 100%;
    padding: 20px 40px;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
    user-select: none; -ms-user-select: none; -webkit-user-select: none;
}
header .header-menu{
    display: flex;
    align-items: center;
    gap: 10px;
}
header #profile{
    --size: 30px;
    width: var(--size);
    height: var(--size);
    padding: 6px;
    background-color: #eeeeeecf;
    cursor: pointer;
    border-radius: var(--radius);
}
.connection{
    --size: 12px;
    width: var(--size);
    height: var(--size);
    background-color: #f0305f;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.connection.online{
    background-color: #20f09f;
}
.connection::before{
    content: none;
}
.connection.online::before{
    content: '';
    width: var(--size);
    height: var(--size);
    background-color: #20f09f3f;
    filter: grayscale(0.2);
    border-radius: 100%;
    display: inline-block;
    z-index: 1;
    animation: pulse 1s alternate infinite;
}
.alert{
    position: fixed;
    top: calc( var(--header-height) + 19px );
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    width: fit-content;
    max-width: calc(var(--container-width) - 60px);
    background-color: #EDFFFFaf;
    margin: 0 auto;
    color: #08A4FF;
    border-radius: var(--radius);
    padding: 10px;
    user-select: none; -ms-user-select: none; -webkit-user-select: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    border: 1px solid #08A4FF30;
    text-align: center;
}
.alert.success {
    color: #2AD16F;
    background-color: #EDFFF3af;
    border-color: #2AD16F40;
}
.alert.error{
    color: darkred;
    background-color: #fff0f0af;
    border-color: #af103040;
}
.alert.hide{
    opacity: 0;
    pointer-events: none;
}
.modal{
    --padding: 30px;
    padding-top: calc(10px + var(--header-height));
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    top: 0;
    right: 0;
    position: fixed;
    background-color: white;
    z-index: 100;
    transition: all 0.5s ease;
    overflow: auto;
}
.modal.hide {
    opacity: 0;
    user-select: none; -ms-user-select: none; -webkit-user-select: none;
    pointer-events: none;
}
.modal>.title, .modal>.body{
    width: var(--container-width);
}
.modal>.title{
    text-align: center;
}
.modal>.body{
    padding: 0 var(--padding);
}
.modal>.body>.info{
    margin: 10px auto;
    display: flex;
    width: fit-content;
    max-width: 90%;
    background-color: #EDFFFF;
    color: #08A4FF;
    border-radius: var(--radius);
    padding: 15px;
    user-select: none; -ms-user-select: none; -webkit-user-select: none;
    transition: all 0.3s ease;
}
h1 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-family: 'Peyda-Bold', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.hidden {
    display: none;
}
.comment {
    --border: 1px solid #eee;
    background-color: #fafafc;
    border-radius: var(--radius);
    padding: 20px;
    border: var(--border); 
    margin-bottom: 15px;
    position: relative;
}
.comment.top {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px 0 #dadaec;
}
.comment .comment-id {
    position: absolute;
    top: 5px;
    left: 8px;
    color: #ccc;
    font-size: 0.8rem;
}
.comment .info {
    font-size: 1.1rem;
    --space: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space);
    padding-bottom: var(--space);
    border-bottom: var(--border);
}
.comment .info .profile {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 9px;
}
.comment .info .profile .name{
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.comment .info .profile img {
    --size: 25px;
    width: var(--size);
    height: var(--size);
    user-select: none; -ms-user-select: none; -webkit-user-select: none;
}
.comment .info .time {
    white-space: nowrap;
    display: inline-block;
    font-size: 0.95rem;
}
.comment .comment-text{
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.comment .actions{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    margin-top: 10px;
}
.comment .actions .answer-form-button{
    cursor: pointer;
    user-select: none; -ms-user-select: none; -webkit-user-select: none;
    background-color: #e3f8fa;
    color: #26a6ba;
    padding: 5px 8px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    filter: grayscale(1);
    border: 2px solid #26c6da3f;
}
.comment .actions .answer-form-button:hover{
    filter: grayscale(0.5);
}
.comment .actions .answer-form-button.cancel-answer-button{
    filter: grayscale(0);
}
.comment .actions .likes {
    display: flex;
    align-items: center;
    gap: 10px;
}
.comment .actions .likes button{
    background-color: transparent;
    cursor: pointer;
    border: none;
}
.comment .actions .likes img{
    --size: 40px;
    width: var(--size);
    height: var(--size);
    filter: grayscale(0.9);
    user-select: none; -ms-user-select: none; -webkit-user-select: none;
    cursor: pointer;
    pointer-events: none;
    transition: all 0.3s ease;
}
.comment .actions .likes button:hover img{
    filter: grayscale(0.5);
}
.comment .actions .likes button.active img{
    filter: grayscale(0);
}
.comment .comment{
    margin-top: 20px;
    margin-bottom: 0;
}
#send-form{
    padding: 20px;
}
form .title{
    font-size: 1.15rem;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-group {
    margin-bottom: 1px;
}
label {
    display: block;
    margin-bottom: 2px;
    color: #555;
}
input[type="text"],
textarea {
    font-family: 'Peyda', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: var(--radius);
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    font-size: 16px;
    transition: border-color 0.3s ease;
}
input[type="text"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}
textarea {
    resize: vertical;
    min-height: 100px;
}
button[type="submit"] {
    font-family: 'Peyda', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s ease;
    display: block;
    width: 100%;
    margin-top: 10px;
    transition: all ease 0.3s;
}
button[type="submit"]:hover {
    background-color: #4D0082;
}
button[type="submit"]:disabled {
    opacity: 0.5;
}
#goDownButton{
    position: fixed;
    left: 40px;
    bottom: 50px;
    width: 35px;
    height: 35px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 2px solid #eee;
    background-color: #fefefe;
    z-index: 99;
    transition: all 0.3s ease;
    cursor: pointer;
}
#goDownButton img{
    width: 100%;
    height 100%;
}
#goDownButton.hide {
    pointer-events: none;
    opacity: 0;
}
@keyframes pulse {
    from {
        scale: 1;
    }
    to {
        scale: 1.8;
    }
}
/* Responsive adjustments */
@media (max-width: 768px) {

    html {
        font-size: 14px;
    }
    
}