:root {
  /* --- НАСТРОЙКИ ДИЗАЙНА (меняйте только здесь) --- */
  --comment-gap: 12px;       /* Расстояние между серединами аватарок. длина видимой линии=comment-gap - avatar-size/2 */ 
  --line-width: 1px;         /* Толщина линии */
  --line-color: #e1e8ed;     /* Цвет линии */
  --avatar-size: 40px;       /* Размер аватара */
  --avatar-bg: #ffffff;      /* Фон аватара (должен совпадать с фоном сайта) */
  --comment-hr-divider-borer: 1px solid #e1e8edc7;
}

.content-column{
    max-width: 85%; 
    width: 100%;
    /* border-bottom: 2px solid #e1e8ed; */
    margin-top: -12px;
    padding-top: 12px;
    border-top: var(--comment-hr-divider-borer);
    /* border-bottom: var(--comment-hr-divider-borer); */
}

.thread-reply-container {
    /* padding-left: 16px;  */
    /* margin-left: 12px; */
    background: white;
    border: 1px groove #8580852d;
    border-radius: 24px; 
    padding: 18px;
    padding-top: 12px;
    margin-top: 6px;
    /* margin-bottom: 1; */
    padding-bottom: 4px;
    /* padding-right: 20px; */
    /* margin-bottom: 16px; */
    /* margin-right: 30px; */
    /* max-width: 700px; */
    /* min-width:min-content; */
    width: fit-content; 
    margin-right: 10px;
    /* box-shadow: 0 1px 3px rgba(0,0,0,0.1); */
    background: linear-gradient(165deg, #f0f1f3 30%, #eaf2ff9f 228%);
    
}

/* Контейнер комментариев */
#comment-container {
  display: flex;
  flex-direction: column;
  max-width: 800px;
  margin: 12px;
  margin-left: 28px;
}

/* Строка одного комментария */
.comment {
  display: flex;
  flex-direction: row;
  /* Используем переменную для нижнего отступа */
  padding-bottom: var(--comment-gap); 
  padding-top: var(--comment-gap); 
  /* background-color: white;
  margin-bottom: 24px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  border-radius: 12px; */
}

/* Левая колонка с аватаром */
.avatar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  /* Ширина колонки чуть больше аватара, чтобы был баланс */
  width: calc(var(--avatar-size) + 10px); 
  flex-shrink: 0;
  
}

/* Аватар */
.avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  position: relative; 
  z-index: 3; 
  background-color: var(--avatar-bg);
  border: 1px solid #5a68740e; 
  /* box-shadow: 1p 1px 1px rgba(0,0,0,0.1); */
}

/* Универсальная сквозная линия */
.avatar-column::after {
  content: "";
  position: absolute;
  /* Линия уходит вверх и вниз ровно на величину отступа */
  top: calc((var(--comment-gap) * -1) - (var(--avatar-size) / 2));
  bottom: calc((var(--comment-gap) * -1) - (var(--avatar-size) / 2)); 
  
  width: var(--line-width);
  background-color: var(--line-color);
  z-index: 1; 
}

/* --- Настройка краев цепочки --- */
/* .comment:first-child {
    margin-top: 12px;
} */

.comment:last-child .avatar-column::after {
  bottom: auto; 
  /* Вычисляем: высота верхнего отступа + половина высоты аватара */
  height: calc(var(--comment-gap) + (var(--avatar-size) / 2)); 
}

/* У самого последнего комментария аккуратно останавливаем линию на центре аватара */
.comment:last-child .avatar-column::after {
  bottom: auto; 
  /* Вычисляем: высота верхнего отступа + половина высоты аватара */
  height: calc(var(--comment-gap) + (var(--avatar-size) / 2)); 
}

.comment:first-child  .content-column{
    border-top: none;
    
}




body {
    font-family: Arial, sans-serif;
    /* font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; */
    margin: 0px;
    /* border-left: 0.01px solid; */
    box-shadow: 1 2px 4px rgba(0,0,0,0.1);
    margin-top: 0px;
    
    background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%); 
    /* #f5f5f5; */
    /* padding: 20px; */
        align-items: center;
    justify-content: center;
    /* -webkit-overflow-scrolling: touch; */
}

.main-input-lenta {
    margin-left: 2px;
    margin-right: 2px;
}

/* body h1 {

    max-width: 800px;
    width: 100%;   
    margin-left: auto;
    margin-right: auto;
    
} */


a {
    -webkit-tap-highlight-color: transparent;
}

* {
    -webkit-tap-highlight-color: transparent;
}

h1 {
    margin-bottom: 10px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.main {
  /* resize: horizontal;    */
  /* overflow: auto;      */
  /* min-width: 920px;     
  max-width: 50%;       */
      /* min-width: 50vh;     
    max-width: 100vh;    */
max-width: 800px;
    width: 100%; 
  margin-left: auto;
  margin-right: auto;  
  /* background-image: linear-gradient(180deg, #0a357a63 0%, #ff917e9d 50%); */
  /* border: 1px solid #ccc; */
  /* box-shadow: 0 3px 6px rgba(0,0,0,0.1); */
  
  /* padding: 10px;         */
}

/* header {
  display: flex;
  align-items: center;     
  gap: 1rem;               
  flex-wrap: wrap;        
}

header h1 {
  margin: 0;              
  margin-right: auto;     
}

header h1 a {
    text-decoration: none;
    color: black;
} */

#unauthorized-header-small, #unauthorized-header {
    white-space: nowrap;
}

#unauthorized-header-small a, #unauthorized-header a {
    text-decoration: none;
    color: auto;
}

#unauthorized-header-small a:active, #unauthorized-header a:active {
    text-decoration: none;
    color: black;
}

/* .unauthorized-header a:visited {
    text-decoration: none;
} */


.post {
    background: white;
    padding: 24px;
    padding-right: 20px;
    padding-top: 20px;
    padding-bottom: 16px;
    /* padding-left: 40px; */
    /* overflow:visible; */
    margin-bottom: 18px;
    border-radius: 0px;
    resize: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    
}

/* attachments */
.post-img-container {

    /* overflow:scroll; */
    /* max-width: 800px; */
    /* width:fit-content; */
    /* padding-bottom: 10px; */
    /* display: block;
  width: auto;
  height: auto;
  max-width: none;
  object-fit: none;
  object-position: center;  */
  margin-bottom: 6px;
  margin-top: 6px;
  padding-bottom: 6px;
  padding-top: 6px;

}

.post-img {
      display: inline-block;
  max-width: 800px;
  overflow: hidden;
  /* padding-bottom: 10px; */

}

.post-img img {
    display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  min-width: 240px;
  max-height: 800px;
  /* margin-bottom: 10px; */
  /* background-color: gray; */
  /* box-shadow: 5px 22px 42px rgba(0,0,0,0.1); */
  /* padding-bottom: 10px;  */
    /* max-width: 800px; */
      -webkit-tap-highlight-color: transparent;
  
  /* Отключает системное меню при долгом нажатии */
  -webkit-touch-callout: none;
  
  /* Запрещает выделение текста (необязательно) */
  user-select: none;
  
  /* Чтобы элемент вел себя как блочный (для корректного позиционирования) */
  display: block;
  width: 100%;

}



.post-text {
    font-size: 20px;
    margin-bottom: 6px;
    white-space: pre-wrap;
    /* white-space: pre-line; */
    hyphens: none;
    overflow-wrap: break-word;
    word-break: break-word;
    /* word-break: break-all; */
    font-family: Arial, sans-serif;
}

.post-date {
    font-size: 16px;
    color: gray;
    padding-bottom: 6px;
    padding-left: 2px;
    margin-bottom: 6px;
}

.post-input-area {
    background: white;
    padding: 10px;
    border-radius: 24px;
    /* width: 10px; */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 5px;
    resize: none;
    flex-wrap: wrap;
    align-items: flex-start;
    position: relative;
    /* height: auto */
    /* overflow-y: visible;  */
}

.post-input-area textarea {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 20px;
    font-family: Arial, sans-serif;
    outline: 0;
    transition: border-color 0.2s;
    resize: none;
    height: 60px;
    min-height: 60px;
    /* height: auto; */
    /* max-height: 30vh; */
    /* y: inherit; */
    /* overflow-y: auto;  */
    &::-webkit-scrollbar {
    display: none;
    }

  /* Hide for IE, Edge, and Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     
    
}

.post-input-area textarea:focus {
    border-color: #9d73ffab;
    /* border-inline-color: #a100a1; */
}

/* .post-input-area textarea:focus {
    border-top-color: #c2c2c2;
    border-inline-color: blue;
    border-bottom-color: red;
} */


/* .post-input-area-textarea {
    max-height: 40vh;

} */

.post-input-area button {
    /* background-color: #9900ff;  */
    /* background:  linear-gradient(60deg, #5473ffab 10%, #2d1effd2 100%); */
    background:  linear-gradient(30deg, #7d73ffab 10%, #2d1effd2 100%);
    color: white;
    border-width: 0.0px;
    padding: 8px 16px;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    border-radius: 50%;
    font-size: 25px;
    cursor: pointer;
    transition: background-color 0.2s;
    align-self: center;
    height: 50px;
    width: 50px;
}
.post-input-area button:disabled {
  /* Shows a "blocked" cursor to the user */
  cursor: not-allowed; 
  opacity: 0.6;        /* Makes the button look "faded" */
}

.post-input-area button:hover {
    background:  linear-gradient(30deg, #7c73ffe3 10%, #2d1effd2 100%);
}

.post-input-area .counter {
    position: absolute;
    bottom: 10px;
    right: 5px;
    /* margin-left: auto; */
    /* margin-right: auto ; */
    /* margin-top: 5px; */
    font-size: 15px;
    color: #5c5c5c;
    display: none; /* по умолчанию скрыт */
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Header Styles */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-bottom: 8px;
    gap: 1rem;
    padding: 0.65rem 1.2rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    /* font-family:  -apple-ssystem, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; */
    /* font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; */
}

header h1,  
#profile-owner-right-top-props, 
#unauthorized-header,
#unauthorized-header-small,
#usercontainer-header {
    flex-basis: 15%;
}


.post-usercontainer {
  display: flex;
  align-items: center;        /* вертикальное выравнивание */
  flex-wrap:nowrap;          /* запрещаем перенос строк */
  width: 100%;                /* или задайте max-width */
    flex-shrink: 0;
    
    flex: 0 1 auto;
    /* flex-wrap: ;  */
    /* position: sticky; */
    top: 0;
    z-index: 100;
    /* display: flex; */
    align-items: center;
    /* padding-right: 0px; */
    justify-content: space-between;
    /* white-space: pre-wrap;
    hyphens: auto;
    overflow-wrap: break-word;
    word-break: break-word; */
    /* flex-wrap: nowrap; */
    /* text-overflow: ellipsis; */
    margin-bottom: 8px;
    padding-bottom: 12px;
    /* margin-right: 0px; */
    /* padding-right: 0px; */
    gap: 3rem;
    /* padding-top: 10px; */
    /* padding-bottom: 10px; */
    /* vertical-align:middle; */
    font-size: 18px;
    /* background: rgba(255, 255, 255, 0.96); */
    /* backdrop-filter: blur(8px); */
    /* border-bottom: 1px solid rgba(0, 0, 0, 0.1); */
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02); */
    font-family: Arial, sans-serif;
    /* font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; */
}

.post-usercontainer-authordata {
  display: flex;
  /* justify-content:baseline !important; */
  align-items: center;
  /* flex: 1 1 auto; */
  min-width: 0;               /* разрешает сжатие содержимого */
  /* gap: 8px;                   */

    /* display: flex; */
    /* flex-direction:row; */
    /* align-items:; */
    /* gap: 1rem; */
    /* border */
    /* остальные стили… */
    margin: 0;
    /* max-width: fit-content; */
    width: 100%;
        /* flex: 1 1 auto; */
    min-width: 0;
}

.post-author-name {
  flex: 1 1 auto;
  /* float: left; */
  min-width: 0;               /* ключевое свойство для обрезки текста */
}

/* Обрезка для каждого текстового поля, если они в колонку */
.post-author-displayname,
.post-author-username,
.thread-reply-username {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

}

.post-author-link-img {
    flex-shrink: 0;
}

/* Если имя и username должны быть в одной строке друг за другом */
/* .post-author-name можно сделать flex row, но проще оставить как есть */

.post-usercontainer-properties {
  flex-shrink: 0;             /* иконка не сжимается */
  margin-left: 8px;           /* отступ слева */
}


.post-author-link,.post-repost-original-link, .post-reply-original-link {
    text-decoration: none;
    outline: none;
    color: inherit; 
}

.userlink {
    text-decoration: none;
    outline: none;
    color: inherit; 
}

.post-author-name {
    /* margin-left: 100px; */
    min-width: 0;
    overflow: hidden;
}



.post-author-link,.post-repost-original-link {
    min-width: 0;
}

.post-author-avatarcontainer {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #eef2fa42;
    margin-right: 12px;
    /* margin-bottom: 12px; */
    display: flex;
    align-items: center;
    /* justify-content: center; */
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-author-avatarimg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); */
}

.post-repost-container {
    border-left: 3px groove #ffffffb4; 
    padding-left: 16px; 
    margin-left: 12px;
}

.post-repost-title-container, .post-reply-title-container {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; 
    color:#3f3f3f; 
    margin: 8px; 
    display: flex; 
    flex-wrap: nowrap; 
    gap: 6px; 
    align-items: center;

}
.post-repost-title-container-static, .post-reply-title-container-static {
    /* font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; 
    color:#3f3f3f;  */
    /* margin: 8px;  */
    display: flex; 
    flex-wrap:nowrap; 
    gap: 6px; 
    align-items: center;
    min-width: 0;
        white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.post-repost-original-displayname, .post-reply-original-displayname, .thread-reply-username {
    font-weight: bold; 
    opacity: 0.9;
    cursor: pointer;
    min-width: 0;
        white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-repost-title-container u,
.post-reply-title-container u{

    text-underline-offset: 3px; cursor: pointer;
}
.post-repost-oaa, .post-reply-oaa {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eef2fa42;
    /* margin-right: 12px; */
    /* margin-bottom: 12px; */
    display: flex;
    align-items: center;
    /* justify-content: center; */
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(12px);
}

.post-repost-oaa-img, .post-reply-oaa-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); */
    /* filter: blur(0.2px); */
}

.post-reply-container {
    padding-left: 16px; 
    margin-left: 12px;
    background: linear-gradient(165deg, #f0f1f3 30%, #eaf2ff9f 228%); 
    /* border: 1px solid #353535b4; */
    border-radius: 24px; 
    padding: 18px;
    padding-top: 12px;
    padding-bottom: 4px;
    padding-right: 20px;
    margin-bottom: 16px;
    margin-right: 30px;
    width: fit-content;
    /* box-shadow: 1px 1px 1px rgba(0,0,0,0.1);  */
}

.post-reply-container-root {
    border-left: 3px groove #ffffffb4; 
    /* padding-left: 16px;  */
    margin-left: 12px;
}



.post-author-name {
    /* padding-left: 10px; */
    display: flex;
    gap: 0.1rem;
    flex-direction: column;
    /* align-items: center; */
    vertical-align:middle;
}

/* .post-author-displayname {
    font-weight: 550;
} */

.post-author-username {
    font-weight: 550;
    font-size: 16px;
    color: rgba(51, 51, 51, 0.8);
}


        .post-usercontainer-properties {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            /* background: #ffffffdd; */
            backdrop-filter: blur(8px);
            border-radius: 60px;
            /* padding: 0.5rem; */
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            /* border: 1px solid rgba(0,0,0,0.08); */
            /* box-shadow: 0 2px 6px rgba(0,0,0,0.05); */
            width: 24px;
            opacity: 0.6;
            height: 24px;
        }

        .post-usercontainer-properties:hover {
            /* background: #ffffff; */
            opacity: 0.95;
            transition: 0.1s ease;
            /* transform: scale(1.02); */
            /* box-shadow: 0 8px 20px rgba(0,0,0,0.1); */
            /* border-color: #cbd5e1; */
        }

        /* active/tap feedback */
        .post-usercontainer-properties:active {
            transform: scale(0.96);
            transition: 0.05s;
        }

        /* SVG style – inherits currentColor from parent, we set color */
        .post-usercontainer-properties svg {
            display: block;
            width: 24px;
            height: 24px;
            color: #2c3e4e;
            transition: color 0.2s;
        }

        .post-usercontainer-properties:hover svg {
            color: #0f2b38;
        }

.custom-context-menu {
    position: fixed;
    z-index: 10000;
    background: rgba(30, 30, 35, 0.96);
    backdrop-filter: blur(12px);
    background: #1e1f24;
    border-radius: 20px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    display: none;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.12s ease, transform 0.1s ease;
    pointer-events: auto;
    transform-origin: top left;
}

.custom-context-menu.show {
    display: block;
    opacity: 1;
    transform: scale(1);
}

.context-menu-item {
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #f0f2f5;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.context-menu-item:first-of-type {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.context-menu-item:last-of-type {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.context-menu-item:hover {
    background: #2c2f36;
}

.context-menu-item:active {
    background: #3a3f48;
}

/* simple icon-like emoji or text for nicer appearance (optional) */
.menu-icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,0.2));
}

hr.menu-divider {
    margin: 8px 0;
    border: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
}
/* .post-usercontainer-properties {
    padding-right: 0px;
    margin-right: 0px;
    border-radius: 50%;
    opacity: 0.5;
}

.post-usercontainer-properties:hover {
    padding-right: 0px;
    margin-right: 0px;
    border-radius: 50%;
    opacity: 0.9;
    transition: 0.0.5s ease;
}

.post-usercontainer-properties:hover {
            transform: scale(1.02);
            border-color: #cbd5e1;
}

.post-usercontainer-properties:active {
    transform: scale(0.95);
    transition: 0.05s;
} */

.post-footercontainer, .thread-reply-footercontainer {
    padding-left: 4px;
    padding-right: 4px;
    flex-direction: row;
    display: flex;
    vertical-align:middle;
    gap: 18px;
}

/* #repost {
    opacity: 0.65;
} */

.post-footercontainer-like, .thread-reply-footercontainer-like {
    flex-direction: row;
    display: flex;
    vertical-align: middle;
    gap: 0.5rem;
    -webkit-tap-highlight-color: transparent;
}

.post-footercontainer-likes-count, .thread-reply-footercontainer-likes-count {
    padding: auto;
    margin: auto;
    /* font-family:  'Segoe UI'; */
    font-family: Arial, sans-serif;
    opacity: 0.96;
    /* font-weight: ; */
}

.post-footercontainer-like svg,
.thread-reply-footercontainer-like svg {
    /* opacity: 0.9; */
        /* fill: red; */
    width: 24px;
    height: 24px;
    /* fill: rgba(128, 128, 128, 0.452); */
    backdrop-filter: blur(8px);
     /* border-radius: 60px; */
            /* padding: 0.5rem; */
    cursor: pointer;
    
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.post-footercontainer-like:not(.liked) svg,
.thread-reply-footercontainer-like:not(.liked) svg {
    opacity: 0.65;
}

.post-footercontainer-like.liked,
.thread-reply-footercontainer-like.liked {
    color: #ff3b30
}

.post-footercontainer-like.liked svg,
.thread-reply-footercontainer-like.liked svg {
    fill: #ff3b30 !important;    
    color: #ff3b30 !important;
    /* stroke: #ff3b30; */
    stroke: none;
    opacity: 0.96 !important;
}


.post-footercontainer-like svg:hover,
.thread-reply-footercontainer-like svg:hover {
    opacity: 0.8;
    /* transform: scale(1.01); */
    /* box-shadow: 1px 1px 1px rgba(0,0,0,0.2);     */
}

.post-footercontainer-like svg:active,
.thread-reply-footercontainer-like svg:active {
    transform: scale(0.97);
    transition: all 0.02s;
}


.post-footercontainer-repost,
.thread-reply-footercontainer-repost {
    flex-direction: row;
    display: flex;
    vertical-align: middle;
    gap: 0.5rem;
    -webkit-tap-highlight-color: transparent;
}

.post-footercontainer-repost-count,
.thread-reply-footercontainer-repost-count {
    padding: auto;
    margin: auto;
    /* font-family:  'Segoe UI'; */
    font-family: Arial, sans-serif;
    opacity: 0.96;
    /* font-weight: ; */
}

.post-footercontainer-repost svg,
.thread-reply-footercontainer-repost svg {
    /* opacity: 0.9; */
        /* fill: red; */
    width: 24px;
    height: 24px;
    /* fill: rgba(128, 128, 128, 0.452); */
    backdrop-filter: blur(8px);
     /* border-radius: 60px; */
            /* padding: 0.5rem; */
    cursor: pointer;
    opacity: 0.65;
    
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}


.post-footercontainer-repost svg:hover,
.thread-reply-footercontainer-repost svg:hover {
    opacity: 0.8;
    /* transform: scale(1.01); */
    /* box-shadow: 1px 1px 1px rgba(0,0,0,0.2);     */
}
.post-footercontainer-repost svg:oncli {
    opacity: 0.8;
    /* transform: scale(1.01); */
    /* box-shadow: 1px 1px 1px rgba(0,0,0,0.2);     */
}
.post-footercontainer-repost svg:active,
.thread-reply-footercontainer-repost svg:active {
    transform: scale(0.97);
    transition: all 0.02s;
}

.post-footercontainer-reply,
.thread-reply-footercontainer-reply {
    flex-direction: row;
    display: flex;
    vertical-align: middle;
    gap: 0.5rem;
    -webkit-tap-highlight-color: transparent;
}

.post-footercontainer-reply-count,
.thread-reply-footercontainer-reply-count {
    padding: auto;
    margin: auto;
    /* font-family:  'Segoe UI'; */
    font-family: Arial, sans-serif;
    opacity: 0.96;
    /* font-weight: ; */
}

.post-footercontainer-reply svg,
.thread-reply-footercontainer-reply svg {
    /* opacity: 0.9; */
        /* fill: red; */
    width: 24px;
    height: 24px;
    /* fill: rgba(128, 128, 128, 0.452); */
    backdrop-filter: blur(8px);
     /* border-radius: 60px; */
            /* padding: 0.5rem; */
    cursor: pointer;
    opacity: 0.65;
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}


.post-footercontainer-reply svg:hover,
.thread-reply-footercontainer-reply svg:hover {
    opacity: 0.8;
    /* transform: scale(1.01); */
    /* box-shadow: 1px 1px 1px rgba(0,0,0,0.2);     */
}

.post-footercontainer-reply svg:active,
.thread-reply-footercontainer-reply svg:active {
    transform: scale(0.97);
    transition: all 0.02s;
}

.post-footercontainer-reply-count, .post-footercontainer-repost-count, .post-footercontainer-likes-count,
.thread-reply-footercontainer-reply-count, .thread-reply-footercontainer-repost-count, .thread-reply-footercontainer-likes-count {
    opacity: 0.55;
    /* font: smaller; */
    /* font-weight:bold; */
    /* font-style:normal; */
    font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol',sans-serif;
}

.post-repost-title-item , .post-reply-title-item{
    flex-direction: row;
    display: flex;
    vertical-align: middle;
    /* gap: 0.5rem; */
    -webkit-tap-highlight-color: transparent;
}

.post-repost-title-item svg,
.post-reply-title-item svg {
    opacity: 0.65;
    width: 18px;
    height: 20px;
    /* fill: rgba(128, 128, 128, 0.452); */
    /* backdrop-filter: blur(1px); */
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* Logo */
header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

header h1 a {
    /* color: #1e1e2f; */
    text-decoration: none;
    transition: color 0.2s ease;
    /* background-color: black;  */
    /* background: linear-gradient(167deg, rgba(87, 87, 87, 0.973) 19%, rgba(0, 0, 0, 0.824) 40%);;    */
    /* display: flex; */
    color: black; 
    border-radius: 3px; 
    padding: 2px;
    /* font-weight: bold; */
    
    /* border: 2px groove #88888877; */
    padding-left: 3px;
    padding-right:5.5px;
    size: 1rem;
    /* margin-right: -10px;  */
    /* font-family: Arial; */
    /* font-family: -apple-system, BlinkMacSystemFont, Ubuntu, 'Segoe UI', Roboto, 
  'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', 
  Oxygen, Cantarell, 'Fira Sans', 'Droid Sans', 
  'Open Sans', sans-serif, 
  'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 
  'Noto Color Emoji'; */
    letter-spacing: -0.5px;
    /* box-shadow: 2px 1px 1px rgb(255, 230, 0); */
}

header h1 a:hover {
    /* color: rgb(255, 230, 0); */
    /* #f3e300; */
    color: rgba(0, 0, 0, 0.521); 
    /* box-shadow: 1px 1px 0px rgb(255, 230, 0); */
     /* rgb(255, 230, 0); */
}


/* User Container (right side) */
#usercontainer-header:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: end;
    /* border */
    /* остальные стили… */
}

/* Username */
.usercontainer-username {
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e50;
    background: #f0f2f5;
    padding: 0.3rem 0.8rem;
    border-radius: 24px;
    transition: background 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    white-space: nowrap;
}

.usercontainer-username:hover {
    background: #e4e6e9;
}

/* Avatar Container */
.usercontainer-avatarcontainer {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef2fa42;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.usercontainer-avatarcontainer:hover {
    /* transform: scale(1.02); */
    box-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}


/* a {
    color:#00000000
} */
.usercontainer-avatarimg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); */
}

/* Logout Link */
#logoutLink {
    font-size: 0.85rem;
    font-weight: 500;
    color: #5a6874;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 24px;
    background: transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#logoutLink:hover {
    background: #fee2e2;
    color: #d32f2f;
}

/* Optional: placeholder avatar (if src missing) */
.usercontainer-avatarimg:not([src]), 
.usercontainer-avatarimg[src=""] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.7;
}

/* .reply-img {
    max-width: 550px;
    max-height: 600px;
} */
/* Responsive */
@media (max-width: 600px) {
    header {
        padding: 0.6rem 0.55rem;
    }

    header h1 a {
        font-size: 1.4rem;
    }

    .usercontainer-username {
        display: none; /* hide username on very small screens, keep avatar */
    }

    #usercontainer-header {
        gap: 0.6rem;
    }

    .usercontainer-avatarcontainer {
        width: 36px;
        height: 36px;
    }

    #logoutLink {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    #comment-container {
        margin-left: 10px;
    }
    /* .reply-img {
        max-width: 400px !important;
        max-height: 400px !important;
    } */

    .post-img-container {
        margin-bottom: 0px;
        margin-top: 0px;
        padding-bottom: 0px;
        padding-top: 4px;
    }
    /* .post-text { */
        /* margin-bottom: 4px; */
    /* } */
    .post-usercontainer {
        padding-bottom: 0px;
    }
    .post-date {
        margin-bottom: 2px;
        padding-bottom: 2px;
    }

    .post-footercontainer, .thread-reply-footercontainer {
        /* margin-top: 60px; */
        padding-top: 4px;
    }
}

/* Optional: dark mode support (users will appreciate) */
/* @media (prefers-color-scheme: dark) {
    header {
        background: rgba(18, 18, 24, 0.96);
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    header h1 a {
        color: #f0f0f0;
    }

    header h1 a:hover {
        color: #66b0ff;
    }

    .usercontainer-username {
        background: #2a2a35;
        color: #e0e0e0;
    }

    .usercontainer-username:hover {
        background: #3a3a48;
    }

    .usercontainer-avatarcontainer {
        background: #2c2c38;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    #logoutLink {
        color: #b0b8c5;
    }

    #logoutLink:hover {
        background: #3a2a2a;
        color: #ff8585;
    }
} */


/* .post-text {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    text-overflow: clip;
    -webkit-box-orient: vertical;
    line-clamp: 5;
}

.post-text.expanded {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    text-overflow: clip;
    line-clamp: 5;
} */

.load-circle {
width: 36px;
height: 36px;
display: flex;
margin: 81px;
margin-left: auto;
margin-right: auto;
border-radius: 50%;
border: 6px solid #88888877;
border-top-color: #e0e0e0;
animation: spin 0.65s linear infinite;
}

@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}

.post-text-expand {
    font-size: 16px;
    color: rgba(48, 48, 48, 0.767);
    cursor: pointer;
    padding-top: 3px;
    padding-bottom: 3px;
    font-weight:lighter;
}


.posts-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    opacity: 0.8;
}

.posts-not-found-title {
    font-size: 20px;
    font-weight: 550;
    font-size: medium;
    margin-bottom: 8px;
}

.posts-not-found-subtitle {
    font-size: 14px;
    opacity: 0.7;
    /* font-size: medium; */
}