/* Основни настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body {
  scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f9f9;
    padding: 20px;
}

/* Основни заглавия */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 10px;
    color: #444;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.5rem;
}

/* Параграфи и линкове */
p {
    margin-bottom: 15px;
}

a {
    color: #d63384;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #a0225b;
}


header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.header-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.mobile-quick-actions {
    display: none;
}

footer{
    display: flex;
    flex-direction: row;
}
/* -----------------------------------
Деактивирани елементи
---------------------------------------*/
.disabled-container {
    pointer-events: none; /* Блокира всички кликвания */
    opacity: 0.6; /* Прави елементите визуално заглушени */
}

.disabled-container input,
.disabled-container textarea,
.disabled-container select,
.disabled-container button {
    background-color: #ddd; /* Оцветява полетата, за да изглеждат неактивни */
    cursor: not-allowed;
}


/* -----------------------------------
Главно меню
---------------------------------------*/
nav {
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    
}


/* Бутон за мобилно меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
    background: #d63384;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
}

/* Контейнер за навигацията */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
}

nav ul li {
    margin: 0 5px;
    position: relative;
}
ul li a {
    
    text-decoration: none;
    padding: 5px; /* За по-добър клик-зон */
}

nav ul li:not(:last-child)::after {
    content: "|";
    color: #ccc;
    margin-left: 5px;
}

nav a {
    color: #333;
    font-weight: bold;
    padding: 8px 12px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #d63384;
}

/* Бутони */
button {
    background: #d63384;
    color: #fff;
    padding: 10px 20px;
    margin:2px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    min-width: 110px;
}

button:hover {
    background: #a0225b;
}

/* Списъци */
ul, ol {
    margin: 10px 0;
    padding-left: 20px;
}

/* Таблици */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table tr {
    transition: background-color 0.3s ease; 
}

table tr:hover {
    background-color: #f8bbd0;
}


table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 10px;
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    
}

th {
    background: #eee;
}

/* контейнери за данни*/
.data-container {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Разстояние между картите */
    padding: 20px;
}

.data-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    word-wrap: break-word; white-space: normal; overflow-wrap: break-word;
}

.data-card:hover {
    transform: translateY(-3px);
    box-shadow: 3px 5px 15px rgba(0, 0, 0, 0.15);
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 5px; /* Разстояние между редовете */
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.data-item:last-child {
    border-bottom: none;
}

/* Подреждаме label и value на един ред */
.data-row {
    display: flex;
    /* align-items: center; */
    gap: 10px; 
}

/* Уверяваме се, че .data-value остава ляво подравненa */
.data-value {
    flex-grow: 1;  
    text-align: left; 
    color: #333;
    font-size: 1em;
    font-weight: bolder;
}
.data-value input {
    width:unset;
}

/* Описанието остава под label и value */
.data-description {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}



/* Форма */
textarea, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #d63384;
}

/* -----------------------------------
Панел под менюто - начална страница
---------------------------------------*/
/* Панел под менюто */
.front-panel {
    display: flex;
    background: #fff;
    padding: 6px;
    gap:4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.front-panel > div {
    flex: 1;
    min-width: 200px;
}

/* Заглавия в панела */
.front-panel h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #d63384;
}

/* Формата за логин */
.login-form input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-form button {
    width: 100%;
    background: #d63384;
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 5px;
}

.login-form button:hover {
    background: #a0225b;
}

/* Линкове за последни разкази и коментари */
.latest-links {
    display: flex;
    flex-direction: column;
    gap: 6px; /* малко разстояние между разказите */
}

.latest-links a {
    display: block;
    padding: 6px 8px;
    background: #fafafa;       /* светъл фон за всяка връзка */
    border: 1px solid #eee;    /* лек контур */
    border-radius: 8px;        /* заоблени ъгли */
    text-decoration: none;
    color: #222;
    transition: background 0.2s ease;
}

.latest-links a:hover {
    background: #f1f1f1; /* леко потъмняване при hover */
}

.latest-links a img {
    vertical-align: middle;
    margin-right: 3px;
    opacity: 0.8;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.latest-links a img:hover {
    transform: scale(1.2);
    opacity: 1;
}

/* -----------------------------------
Контейнер за общо ползване - без специфична
---------------------------------------*/
.common-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

/* -----------------------------------
Регистрация
---------------------------------------*/
.register-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }



  .err-cont {
    background-color: #f8d7da;
    border-left: 5px solid #dc3545;
    color: #721c24;
    padding: 15px;
    margin: 20px 0;
    font-family: 'Arial', sans-serif;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

.err-cont h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.err-cont p {
    margin: 5px 0 0;
    font-size: 14px;
}

.announce-cont {
    background-color: #fff3cd;             /* Светложълт фон (анонс, внимание) */
    border-left: 5px solid #ffc107;        /* Акцентна оранжево-жълта лента */
    color: #856404;                        /* Топъл кафяв текст */
    padding: 15px;
    margin: 20px 0;
    font-family: 'Arial', sans-serif;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

.announce-cont a {
    color: #554001;
    font-weight: bold;
    text-decoration: underline;
}

.announce-cont a:hover {
    color: #211700;
    text-decoration: none;
}
.announce-cont h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.announce-cont p {
    margin: 5px 0 0;
    font-size: 14px;
}

/* -----------------------------------
Начална страница и списък разкази
---------------------------------------*/



/* -----------------------------------
Админ и модератори
---------------------------------------*/
/* Основен контейнер */
.admin-cont {
    display: flex;
    min-height: calc(100vh - 100px); /* Предполагаем размер на хедъра и футъра */
}

/* Странично меню на десктоп */
.admin-sidebar {
    width: 250px;
    background-color: #f4f4f4;
    padding: 20px;
    border-right: 2px solid #ddd;
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-sidebar ul li {
    margin-bottom: 2px;
    padding: 2px;
    background: #ffffff;
    border-radius: 5px;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s ease;
}

.admin-sidebar ul li:hover {
    background: #ddd;
}
.menu-admin-toggle{
    display:none;
}
.admin-input-text{
    padding: 0;
    width:85%;
}

/* Работното съдържание */
.admin-work {
    flex: 1;
    padding: 20px;
}

.admin-sidebar-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    padding-left: 5px;
    border-left: 4px solid #007bff; /* Синя линия за акцент */
}

.admin-sidebar-title a {width:100%;}
/*-----------------------------
Редактор
-------------------------------*/
.dropdown {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
}

.dropdown-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Разстояние между елементите */
    padding: 5px;
}

.dropdown-content label {
    display: flex;
    align-items: center;
    gap: 5px; /* Разстояние между чекбокса и текста */
    white-space: nowrap; /* Предотвратява пренасянето на текста */
    font-size: 14px;
}

.dropdown-content input[type="checkbox"] {
    width: 16px; /* Фиксирана ширина на чекбокса */
    height: 16px; /* Фиксирана височина */
}

.editor-cont {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}
.comment-label {
    display: flex;
    align-items: center;
    font-size: 18px;
    margin-top: 10px;
    gap: 8px; /* Разстояние между чекбокса и текста */
}

.comment-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
}
.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 5%;
    object-fit: cover;
    border: 1px solid #c2185b; /* Акцентна рамка */
    box-shadow: 0 2px 6px rgba(214, 51, 132, 0.3);
}

/*СТРАНИРАНЕ*/
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

.pagination a, .pagination span {
    margin: 0 8px;
    padding: 8px 14px;
    text-decoration: none;
    color: #e91e63;
    border-radius: 5px;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pagination a:hover {
    background-color: #f8bbd0;
    color: #ad1457;
}

.pagination span {
    padding: 8px 14px;
    color: #ffffff;
    background-color: #e91e63;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.pagination a:active {
    background-color: #f48fb1;
}

.pagination a:first-child {
    border-left: none;
}

.pagination a:last-child {
    border-right: none;
}

/* ЧЕТЕЦ */
.story-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.story-title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: #333;
    margin-bottom: 15px;
}

.story-meta {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
}

.story-meta span {
    display: block;
    margin: 5px 0;
}
.story-author {
    font-weight: bold;
    color: #444;
}

.story-content {
    font-size: 18px;
    line-height: 1.6;
    color: #222;
    text-align: justify;
}

/* -----------------------------------
Начална страница и списък разкази
---------------------------------------*/
.stories-list {
    max-width: 800px;
    margin: 20px auto;
    padding: 10px;
}

.stories-list__item {
    background: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stories-list__title a {
    text-decoration: none;
    color: #e91e63;
    font-size: 20px;
}

.stories-list__meta, 
.stories-list__tags {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.stories-list__tags a {
    color: #e91e63;
    text-decoration: none;
}

.stories-list__excerpt {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
}

.stories-list__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stories-list__word-count {
    font-size: 14px;
    color: #666;
}

.stories-list__read-more {
    background: #e91e63;
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
}

.stories-list__read-more:hover {
    background: #ffafca;
}
/* -----------------------------------
Анкети
---------------------------------------*/
.polls-list {
    max-width: 800px;
    margin: 20px auto;
    padding: 10px;
    background: #eef6ff; /* Светлосин фон */
    border: 1px solid #b5d7f0; /* По-наситен синкав кант */
    border-radius: 10px;
}

.polls-list__item {
    background: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.polls-list__item h2 {
    margin-top: 0;
    color: #225588;
}

.polls-list__item .poll-form {
    margin-top: 10px;
}

.poll-question {
    margin-bottom: 15px;
}

.poll-question p {
    font-weight: bold;
    margin-bottom: 5px;
}
.poll-question h3 {
  color: #223;
  margin:0; padding:0;
  font-size: 1.2em;
}
.poll-question ul li div:first-child {
  font-size: 0.85em;
  font-weight: 600;
  margin-bottom: 0.3em;
}

/* --------------------------------
            КОМЕНТАРИ 
 ---------------------------------*/
.story-comments {
    margin-top: 20px;
    border-top: 1px solid #ccc;
    background: #f9f9f9;
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
}

.comment-watch-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 8px 0 18px;
    padding: 10px 12px;
    border: 1px solid #ead1dc;
    border-left: 4px solid #d63384;
    border-radius: 8px;
    background: #fff7fb;
}

.comment-watch-box button {
    width: auto;
    min-width: 80px;
    padding: 7px 12px;
}

.comment-watch-box small {
    color: #777;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-input {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical;
}

.comments-list {
    margin: 10px 0;
    padding-left: 0;
}

.comment {
    background: #ffe6f0;
    border-left: 3px solid #ff66a3;
    padding-left: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    position: relative;
}

.comment.new-comment {
    background: #fff7cc;
    border-left: 5px solid #ffc107;
    box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.35);
}

.new-comment-badge {
    display: inline-block;
    margin: 0 8px 4px 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ffc107;
    color: #4f3e00;
    font-size: 0.78rem;
    font-weight: bold;
}

.copy-link {
    cursor: pointer;
    font-size: 18px;
    color: #e91e63; /* Розово */
    transition: color 0.3s;
}

.copy-link:hover {
    color: #c2185b; /* По-тъмно розово */
}

.comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: bold;
    color: #d14b7a;
    margin-bottom: 5px;
}
.copy-tooltip {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}


.comment-user {
    color: #b30059;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    border-bottom: 1px solid #b30059; /* Фина елегантна линия */
    
}
.comment-date {
    font-size: 12px;
    color: #8c004d;
}

.comment-content {
    font-size: 16px;
    color: #660033;
}

.comment-children {
    
    border-left: 2px dashed #ff99c2;
    padding-left: 2px;
}

/* Визуално увеличаваме отстъпката за дълбочина */
.depth-1 .comment-children { margin-left: 1px; }
.depth-2 .comment-children { margin-left: 2px; }
.depth-3 .comment-children { margin-left: 3px; }
.depth-4 .comment-children { margin-left: 4px; }
.depth-5 .comment-children { margin-left: 5px; }

.comment.spoiler {
    background: rgba(233, 30, 99, 0.1); /* Леко розов фон */
    border-left: 4px solid #e91e63; /* Акцентен цвят */
    opacity: 0.7; /* Полупрозрачност */
    position: relative;
}

.comment.spoiler::before {
    content: "СКРИТ";
    position: absolute;
    top: 50%;
    right:0;
    transform: translateY(-50%);
    background: #e91e63;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 5px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.comment-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 16px;
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.3s, box-shadow 0.3s;
}

.comment-actions .approve {
    background: #4caf50; /* Зелен */
    color: #fff;
}

.comment-actions .approve:hover {
    background: #388e3c;
}

.comment-actions .reject {
    background: #f44336; /* Червен */
    color: #fff;
}

.comment-actions .reject:hover {
    background: #d32f2f;
}

.edit-comment {
    display: none; /* Скрит по подразбиране */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* ...........................................
go top and bottom
..........................................*/
.scroll-btn {
    position: fixed;
    z-index: 9999;
    right: 20px;
    max-width: 60px;
    min-width: 60px;
    font-size: 16px;
    font-weight: bold;
    background: #e91e63; /* Ярко розово */
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    display: none;
    transition: opacity 0.3s, transform 0.3s, background 0.3s;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3);
}

.scroll-btn:hover {
    background: #c2185b;
    box-shadow: 0 4px 14px rgba(194, 24, 91, 0.4);
}

.scroll-btn.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Подреждане на бутоните */
#scrollTopBtn {
    bottom: 100px;
}

#scrollCommentsBtn {
    bottom: 60px;
}

#scrollBottomBtn {
    bottom: 20px;
}

/*USER RANKS*/
.user-rank {
    display: inline-block;
    padding: 3px 8px;
    margin-left: 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 8px;
    text-transform: uppercase;
    color: white;
    background: gray;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        
}

/* Стилове за различните рангове */
.rank-registered { background: #6c757d; }  /* Сиво */
.rank-verified { background: #17a2b8; }    /* Синьо */
.rank-moderator { background: #ffc107; }  /* Жълто */
.rank-expert { background: #28a745; }      /* Зелено */
.rank-admin { background: #dc3545; }       /* Червено */

/* аватари по подразбиране*/
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    padding: 10px;
    max-width: 400px;
    margin: auto;
}

.avatar-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.avatar-grid img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* profile*/
.profile-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 800px;
    margin: auto;
    background: #fff5f8; /* Леко розов фон */
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(214, 51, 132, 0.15);
}

.profile-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 15%;
    object-fit: cover;
    border: 2px solid #c2185b; /* Акцентна рамка */
    box-shadow: 0 2px 6px rgba(214, 51, 132, 0.3);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #c2185b;
    margin-top: 10px;
}

quote {
    display: block;
    font-style: italic;
    color: #c2185b;
    font-size: 1.1rem;
    text-align: center;
    padding: 10px;
    background: linear-gradient(to right, rgba(255, 182, 193, 0.2), rgba(214, 51, 132, 0.15));
    border-radius: 12px;
    margin-top: 8px;
    font-family: "Playfair Display", serif;
    position: relative;
}

quote::before, quote::after {
    content: "“";
    font-size: 2rem;
    color: #c2185b;
    position: absolute;
}

quote::before {
    left: -8px;
    top: -8px;
}

quote::after {
    right: -8px;
    bottom: -8px;
}

.profile-right {
    display: flex;
    flex-direction: column;
    /* justify-content: center;*/
    text-align: left;
    padding: 15px;
}

.profile-info {
    background: rgba(214, 51, 132, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #c2185b;
}

/*Лични съобщения и чат*/
.pm-image {
    max-width: 100%;
    height: auto;
    margin: 5px 0;
    border-radius: 6px;
}

.mail-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: 100vh;
}
.user-list {
    background: #ff69b4;
    color: white;
    padding: 15px;
    overflow-y: auto;
    height:100vh;
}
.active-user {
    background: #d6006d !important; /* По-тъмен розов цвят */
    font-weight: bold;
    color: #fff;
    border-left: 5px solid #ffdbed; /* Светлорозова линия отляво */
    border-radius: 5px;
}

.user-list-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #d6006d; 
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    font-family: "Comic Sans MS", cursive, sans-serif;
}


.user-list ul {
    padding: 0;
}

.conversation-search {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 0 0 10px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid rgba(214, 0, 109, 0.35);
    border-radius: 18px;
}

.conversation-search-icon {
    flex: 0 0 auto;
    font-size: 14px;
}

.conversation-search input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #333;
    font-size: 16px;
}

.conversation-search-empty {
    margin: 8px 0;
    color: #fff;
    font-size: 13px;
    text-align: center;
}

.user-list li {
    display: flex;
    justify-content: space-between; /* Подравнява съдържанието и брояча */
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #ff1493;
    position: relative;
}

.user-list li[hidden] {
    display: none;
}

.user-list li:hover {
    background: #ff1493;
}
.chat-area {
    background: #fff;
    padding: 20px;
    position: relative;
}
.open-list, .close-list {
    display: none;
    background: #ff69b4;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
}
.close-list {
    position: absolute;
    top: 10px;
    right: 10px;
}
.unread-count {
    background: #ff1493;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 50%;
    margin-left: 8px;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}
.messages {
    background: #f4f7f9;
    padding: 15px;
    border-radius: 8px;
    min-height: 300px;
    max-width: 600px;
    margin: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.message {
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out;
}

.message.message-incoming,
.message.message-outgoing {
    width: fit-content;
    min-width: min(280px, 78%);
    max-width: 78%;
    overflow-wrap: anywhere;
}

.message.message-incoming {
    margin-right: auto;
    background: #fff;
    border-top-left-radius: 2px;
}

.message.message-outgoing {
    margin-left: auto;
    background: #fff0f7;
    border-top-right-radius: 2px;
}

.message.message-outgoing .message-header {
    flex-direction: row-reverse;
}

.message.message-outgoing .username {
    text-align: right;
}

.edit-mail-btn {
    flex: 0 0 auto;
    min-width: 30px;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: #a0225b;
    font-size: 14px;
}

.edit-mail-btn:hover {
    background: rgba(214, 51, 132, 0.12);
}

.mail-read-status {
    flex: 0 0 auto;
    color: #999;
    font-size: 13px;
    letter-spacing: -2px;
    cursor: help;
}

.mail-read-status.is-read {
    color: #d63384;
}

.edit-mail-textarea {
    width: 100%;
    min-height: 80px;
    max-height: 220px;
    padding: 8px;
    resize: vertical;
    font: inherit;
}

.edit-mail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
}

.edit-mail-actions button {
    min-width: 0;
    padding: 6px 10px;
    font-size: 13px;
}

.message:hover {
    transform: translateY(-2px);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ccc;
    object-fit: cover;
}

.username {
    flex-grow: 1;
    color: #0073e6;
}

.timestamp {
    font-size: 12px;
    color: #888;
}

.message-body {
    margin-top: 5px;
    font-size: 15px;
    color: #444;
    line-height: 1.4;
}
.unread {
    background: #e6f3ff; /* Светлосин фон */
    font-weight: bold; /* По-дебел шрифт */
    border-left: 4px solid #0073e6; /* Синя линия вляво */
}
.msg-select {
    margin-right: 8px;
}

.msg-checkbox {
    cursor: pointer;
}

.message {
    position: relative;
}
.message:has(.msg-checkbox:checked) {
    outline: 2px solid #c33;
    background: rgba(204, 51, 51, 0.05);
}


/*attention*/
.attention-emoji {
    display: inline-block;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.3);
    }
}


/*birthday*/
.bday-cont {
    background-color: #fff3cd; /* Светложълто за празнично настроение */
    border-left: 5px solid #ffc107; /* Златисто за акцент */
    color: #856404; /* Топъл кафеникав цвят */
    padding: 15px;
    margin: 20px 0;
    font-family: 'Arial', sans-serif;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.bday-cont h3 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: #d39e00; /* Златисто-оранжево за заглавието */
}

.bday-cont p {
    margin: 5px 0 0;
    font-size: 16px;
}


/*series*/
.story-series {
    background: rgba(255, 240, 245, 0.5);
    border-left: 4px solid #d63384;
    padding: 15px;
    margin-top: 30px;
    border-radius: 10px;
    font-family: 'Georgia', serif;
}

.story-series h3 {
    font-size: 1.3em;
    color: #a41655;
    margin-bottom: 12px;
}

.series-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.series-item {
    background: white;
    padding: 14px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background 0.3s;
}

.series-item:hover {
    background: rgba(255, 182, 193, 0.3);
    transform: translateY(-2px);
}

.series-item a {
    text-decoration: none;
    font-weight: bold;
    color: #d63384;
    font-size: 1.1em;
}

.series-item a:hover {
    text-decoration: underline;
}

.series-count {
    font-size: 0.9em;
    color: #666;
}

.series-stories {
    margin-top: 8px;
    padding-left: 20px;
    list-style-type: none;
}

.series-stories li {
    padding: 5px 0;
}

.series-stories a {
    color: #333;
    text-decoration: none;
}

.series-stories a:hover {
    text-decoration: underline;
    color: #d63384;
}

.current-story {
    font-weight: bold;
    color: #a41655;
    position: relative;
}

.current-story::after {
    content: "📖";
    color: #d63384;
    font-size: 1.1em;
    
}

/*.............................
ВИДЕО ЗА ФОН
~~~~~~~~~~~~~~~~~~~~~~~~~~*/

.story-video {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 800px; /* намалена ширина */
    margin: 2em auto;
    padding: 1em;
    background: #f9f9f9;
    border-left: 4px solid #3a78c9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #333;
    gap: 1em;
    flex-wrap: wrap;
    animation: fadeIn 1s ease-in;
}

.video-icon {
    font-size: 1.3rem;
}
/*------------------------------------
            ЧАТ
------------------------------------*/
.chat-toggle-btn{
    display:none;
}
/* Контейнер за чат - левия панел с каналите и дясната зона за чат */
.chat-container {
    display: flex;
    gap: 10px;
    padding: 4px;
    max-width: 1600px;
    margin: 0 auto;
}


/* Левият панел с каналите - светъл, розово-червен фон */
.chat-channels {
    flex: 0 0 280px;
    background: linear-gradient(135deg, #ffe6eb 0%, #f9c5d1 100%);
    border-radius: 10px;
    padding: 20px 25px;
    color: #8b2a35; /* тъмно червено за текст */
    box-shadow: 0 3px 10px rgba(235, 118, 129, 0.4);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

/* Заглавие панела с логото */
.chat-channels h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #8b2a35;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Лого над каналите */
.chat-channels h2 img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(235, 118, 129, 0.6);
    object-fit: contain;
    background: white;
    padding: 4px;
}

/* Списък с каналите */
.chat-channels ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Всеки канал в листа */
.chat-channels ul li {
    margin-bottom: 6px;
}

/* Връзките към каналите */
.chat-channels ul li a.channel-link {
    display: block;
    text-decoration: none;
    color: #8b2a35;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: inset 0 0 0 0 #8b2a35;
    user-select: text;
}

/* Hover ефект върху канала */
.chat-channels ul li a.channel-link:hover,
.chat-channels ul li a.channel-link:focus,
.chat-channels ul li a.channel-link.active {
    background-color: #e14b59; /* по-наситено розово-червено */
    color: white;
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 0 8px 2px #fcd0d9;
}
/* Дясна част - чат зоната */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff0f3;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(225, 75, 89, 0.3);
    padding: 4px 10px;
     height: 100%; /* запълва родителя */
    max-height: 100vh; /* премахва ограничението */
}

/* Хедър на чата с името и темата */
.chat-header {
    border-bottom: 2px solid #e14b59;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.chat-header h2 {
    font-size: 1.4rem;
    color: #8b2a35;
    margin: 0 0 5px 0;
}

.chat-topic {
    font-size: 0.9rem;
    color: #bf575f;
    font-style: italic;
    margin: 0;
}

/* Секция за съобщенията */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: inset 0 0 10px #f9c5d1;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    color: #5a2029;
    outline: none;
}

/* Когато няма съобщения */
.no-messages {
    text-align: center;
    color: #bf575f;
    margin-top: 50px;
    font-style: italic;
}

/* Отделно съобщение */
.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 6px;
    border-radius: 8px;
    background: #ffe6eb;
    box-shadow: 0 1px 3px rgba(225, 75, 89, 0.2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    color: #5a2029;
    max-width: 100%;
    word-break: break-word;
}
.chat-message .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.chat-message .message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-message .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 2px;
}
.delete-msg-btn,.edit-msg-btn{
    cursor:pointer;
}
/* Име на автора */
.chat-message .meta .author {
    font-weight: 600;
    color: #8b2a35;
}

/* Време на съобщението */
.chat-message .meta .time {
    color: #bf575f;
    font-style: italic;
    white-space: nowrap;
    margin-left: 10px;
}

/* Текст на съобщението */
.chat-message .text {
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}


/* Форма за писане на съобщения */
.chat-form {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.chat-form textarea {
    flex: 1;
    resize: none;
    border-radius: 8px;
    border: 2px solid #e14b59;
    padding: 10px;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #5a2029;
    background: #fff0f3;
    transition: border-color 0.3s ease;
}

.chat-form textarea:focus {
    border-color: #bf575f;
    outline: none;
    background: #ffe6eb;
}

.chat-form button {
    background-color: #e14b59;
    border: none;
    border-radius: 8px;
    color: white;
    padding: 0 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chat-form button:disabled {
    background-color: #f4a3aa;
    cursor: not-allowed;
}

.chat-form button:hover:not(:disabled) {
    background-color: #bf575f;
}







/* Анимация при появяване */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.story-video p {
    margin: 0;
    flex: 1 1 auto;
    font-size: 1rem;
    font-family: 'Patrick Hand', cursive;
    line-height: 1.4;
}

.story-video .video-box {
    flex: 0 0 auto;
    max-width: 200px;
    aspect-ratio: 16 / 9;
    position: relative;
    width: 100%;
}

.story-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 6px;
    display: block;
}

.beta-badge {
    background: #e91e63;
    color: #fff;
    font-size: 0.65em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    cursor: default;
    position: relative;
    display: inline-block;
    transition: background 0.3s;
}

.beta-badge::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    font-size: 0.75em;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 10;
}

.beta-badge:hover::after {
    opacity: 1;
}

/*------------------------------------
        ОЦЕНКА НА РАЗКАЗИ
------------------------------------*/
/* ----- Rating panel ----- */
.story-rating {
    margin: 20px 0;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.story-rating strong { color: #444; margin-right:8px; }

/* hearts */
.story-rating .heart {
    cursor: pointer;
    font-size: 26px;
    color: #d6d6d6; /* бледи по подразбиране */
    transition: color 0.15s ease, transform 0.12s ease;
    user-select: none;
    display: inline-block;
    padding: 2px;
}

.story-rating .heart:hover {
    transform: translateY(-2px);
}

/* активирани (пълни) сърца */
.story-rating .heart.active {
    color: #e60073; /* наситено розово/червено */
}

/* когато панелът е заключен */
.story-rating.locked {
    opacity: 0.85;
    pointer-events: none; /* блокира всички кликове */
}
/* Индикатор при изпращане (временно блокира кликовете и изсветлява) */
.story-rating.sending {
    opacity: 0.6;
    pointer-events: none;
}

/* показване на средна оценка и брой */
.story-rating .rating-info { color: #666; font-size: 0.95em; }
.story-rating .rating-avg { margin-left: 6px; color: #888; font-size: 0.9em; }

.rating-stats {
    margin-left: 10px;
    font-size: 14px;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rating-stats .avg-label {
    font-weight: 500;
    color: #444;
}

.rating-stats .rating-avg {
    font-weight: bold;
    color: #e60073;
}

.rating-stats .rating-count {
    font-style: italic;
    color: #777;
}

/* Любими разкази - бутон */
.story-fav {
  margin: 20px 0;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}
.fav-btn {
  font-size:22px;
  background:transparent;
  border:none;
  cursor:pointer;
  padding:6px;
  line-height:1;
  transition: transform 0.12s ease, color 0.12s ease;
  color:#d6d6d6;
}
.fav-btn:hover { transform:translateY(-2px); color:#e60073; }
.fav-btn.active { color:#e60073; text-shadow:0 0 6px rgba(230,7,115,0.2); }
.fav-login-prompt { color:#d63384; text-decoration:none; }
#fav-count { font-size:0.95em; color:#666; }


/*----------------
ЕКСПЕРТИ
------------------*/
.expert-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.panel-btn {
    display: inline-block;
    padding: 14px 18px;
    border-radius: 6px;
    background: var(--btn-bg, #ab0194);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    flex: 1 1 220px;
}

.panel-btn:hover {
    opacity: 0.85;
    color: #fff3cd
}

.announce-cont a.panel-btn {
    color: #fff;
    text-decoration: none;
}

.announce-cont a.panel-btn:hover {
    color: #fff3cd;
    text-decoration: none;
}

#mail-reply-form textarea[name="msg"] {
    min-height: 48px;
    max-height: 180px;
    resize: none;
    overflow-y: hidden;
}

.message-compose {
    position: fixed;
    right: auto;
    bottom: 10px;
    z-index: 100;
    margin: 0;
    border: 1px solid rgba(214, 51, 132, 0.2);
    box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.14);
}

.message-compose form {
    margin: 0;
}

.new-mail-messages-btn {
    position: fixed;
    z-index: 110;
    transform: translateX(-50%);
    min-width: 0;
    padding: 7px 12px;
    border-radius: 18px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    white-space: nowrap;
}

.new-mail-messages-btn[hidden] {
    display: none;
}

.expert-suggestion-card {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #ddd;
    border-left: 5px solid #d63384;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.expert-suggestion-card .data-value {
    font-size: 1.15rem;
    color: #333;
}

.collective-project-card > .data-row {
    align-items: flex-start;
}

.collective-admin-remove-form,
.collective-coauthor-remove-form {
    display: inline-flex;
    margin: 0;
}

.collective-admin-remove-form {
    flex: 0 0 auto;
}

.collective-admin-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid #d63384;
    border-radius: 8px;
    background: #fff5f8;
    color: #d63384;
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.collective-admin-remove-btn:hover,
.collective-admin-remove-btn:focus-visible {
    border-color: #a0225b;
    background: #fce7f0;
    outline: none;
}

.collective-coauthor-list {
    line-height: 2;
}

.collective-coauthor {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.collective-coauthor-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    min-width: 19px;
    max-width: 19px;
    height: 19px;
    margin: 0;
    flex: 0 0 19px;
    box-sizing: border-box;
    padding: 0 0 1px;
    border: 1px solid #d63384;
    border-radius: 50%;
    background: transparent;
    color: #d63384;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.collective-coauthor-remove-btn:hover,
.collective-coauthor-remove-btn:focus-visible {
    border-color: #a0225b;
    background: #fce7f0;
    color: #a0225b;
    outline: none;
}

.expert-decision-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
    gap: 14px;
    align-items: start;
    margin-top: 14px;
}

.expert-decision-grid h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.expert-approve-form,
.expert-reject-form,
.expert-restore-form {
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fafafa;
}

.expert-approve-form {
    border-left: 4px solid #198754;
}

.expert-reject-form {
    border-left: 4px solid #dc3545;
}

.expert-decision-grid .login-form button,
.expert-restore-form button {
    width: 100%;
}

.expert-approve-btn {
    background: #198754;
}

.expert-approve-btn:hover {
    background: #146c43;
}

.expert-reject-btn {
    background: #dc3545;
}

.expert-reject-btn:hover {
    background: #b02a37;
}

.expert-restore-btn {
    background: #0d6efd;
}

.expert-restore-btn:hover {
    background: #0b5ed7;
}

.expert-publish-btn {
    background: #6f42c1;
}

.expert-publish-btn:hover {
    background: #59359a;
}

.expert-public-list {
    margin: 24px 0;
}

.expert-public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.expert-public-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
}

.expert-public-card-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0;
    background: #eee;
}

.expert-public-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.expert-public-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 16px;
}

.expert-public-card h3 {
    margin: 0 0 10px;
    font-size: 1.18rem;
    line-height: 1.35;
}

.expert-public-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 12px;
    color: #666;
    font-size: 0.86rem;
}

.expert-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: bold;
}

.expert-status-badge.is-testing {
    background: #ffc107;
    color: #4f3e00;
}

.expert-status-badge.is-published {
    background: #d1e7dd;
    color: #0f5132;
}

.expert-status-badge.is-archived {
    background: #e2e3e5;
    color: #41464b;
}

.expert-public-card-announcement {
    margin: 0 0 16px;
    color: #333;
    line-height: 1.55;
}

.expert-public-card-link {
    margin-top: auto;
    font-weight: bold;
}

.expert-public-article {
    max-width: 760px;
    margin: 0 auto;
}

.expert-article-hero {
    margin-top: 8px;
}

.expert-article-hero .expert-featured-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 18px;
}

.expert-article-hero .profile-avatar {
    width: 120px;
    height: 120px;
    max-width: 120px;
    border-radius: 15%;
    object-fit: cover;
    display: inline-block;
    margin: 8px 0 0;
}

.expert-article-hero-text {
    text-align: center;
}

.expert-article-content {
    margin-top: 24px;
}

.expert-article-content img,
.expert-article-content iframe,
.expert-article-content video {
    max-width: 100%;
}

.expert-bibliography {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid #ddd;
}

.expert-bibliography h2 {
    font-size: 1.35rem;
}

.expert-source-box {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #ddd;
    border-left: 4px solid #0d6efd;
    border-radius: 8px;
    background: #fafafa;
}

.expert-source-box h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.expert-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.expert-source-tile {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    min-height: 150px;
    max-height: 240px;
    overflow: auto;
}

.expert-source-tile .data-value {
    font-size: 0.98rem;
    line-height: 1.3;
}

.expert-source-tile .data-description {
    font-size: 0.82rem;
}

.expert-source-tile p {
    font-size: 0.92rem;
    line-height: 1.45;
}

.expert-editor-form {
    margin-top: 18px;
}

.expert-editor-form > label {
    display: block;
    margin-top: 12px;
}

.expert-editor-form #expert_article_bibliography {
    min-height: 110px;
    font-family: Arial, sans-serif;
}

.expert-editor-form textarea {
    min-height: 420px;
}

.expert-editor-form #expert_article_announcement {
    min-height: 70px;
}

.expert-editor-form #expert_article_bibliography {
    min-height: 110px;
}

.expert-save-status {
    display: inline-block;
    margin-left: 10px;
    color: #198754;
    font-weight: bold;
}

.expert-test-notice {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #ffc107;
    border-left: 5px solid #ffc107;
    border-radius: 8px;
    background: #fff8db;
    color: #5f4b00;
}

.expert-archive-notice,
.expert-discussion-notice {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
}

.expert-archive-notice {
    border: 1px solid #6c757d;
    border-left: 5px solid #6c757d;
    background: #f1f3f5;
    color: #343a40;
}

.expert-discussion-notice {
    border: 1px solid #0d6efd;
    border-left: 5px solid #0d6efd;
    background: #eaf2ff;
    color: #084298;
}

.expert-lifecycle-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 18px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

.expert-lifecycle-panel button {
    width: auto;
    margin: 0;
}

.expert-edit-article-btn {
    width: auto;
    margin: 0;
}

.expert-editor-state {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 16px 0;
    padding: 12px 14px;
    border-left: 5px solid #6f42c1;
    background: #faf7ff;
}

.expert-editor-actions {
    margin-top: 16px;
}

.expert-final-publish-btn {
    background: #198754;
    color: #fff;
}

.expert-reopen-count {
    margin-left: auto;
}

.expert-reopen-box {
    margin-top: 28px;
    padding: 16px;
    border: 1px dashed #6f42c1;
    border-radius: 8px;
    background: #faf7ff;
}

.expert-question-box {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.expert-question-box textarea {
    min-height: 130px;
}

.expert-inline-edit {
    margin-top: 8px;
}

.expert-inline-edit-open,
.expert-inline-edit-cancel {
    width: auto;
    padding: 7px 12px;
    margin: 4px 6px 4px 0;
}

.expert-inline-edit-box {
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

.expert-inline-edit-text {
    width: 100%;
    min-height: 110px;
    box-sizing: border-box;
}

.expert-inline-edit-save {
    width: auto;
    margin: 8px 6px 0 0;
}

.expert-test-badge {
    display: inline-block;
    margin: 2px 0 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ffc107;
    color: #4f3e00;
    font-size: 0.8rem;
    font-weight: bold;
}

.expert-question-list {
    margin-top: 20px;
}

.expert-question-item {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid #ddd;
    border-left: 5px solid #6f42c1;
    border-radius: 8px;
    background: #fff;
}

.expert-question-item p {
    margin: 12px 0 0;
    line-height: 1.55;
}

.expert-question-list-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.expert-question-list-actions .panel-btn {
    flex: 0 1 auto;
    min-width: 210px;
    padding: 10px 14px;
}

.expert-discussion {
    margin-top: 36px;
    padding-top: 22px;
    border-top: 2px solid #ddd;
}

.expert-qa-item {
    margin: 18px 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.expert-qa-thread {
    margin: 20px 0 28px;
    padding-left: 12px;
    border-left: 4px solid #6f42c1;
}

.expert-qa-thread .expert-qa-item {
    margin: 0 0 12px;
}

.expertFollowupForm {
    margin-top: 12px;
    padding: 14px;
    border: 1px dashed #aaa;
    border-radius: 8px;
    background: #fafafa;
}

.expertFollowupForm textarea {
    min-height: 100px;
}

.expert-qa-item.is-pending {
    border-color: #ffc107;
}

.expert-qa-question,
.expert-qa-answer {
    padding: 16px;
}

.expert-qa-answer {
    border-top: 1px solid #ddd;
    background: #f7f3ff;
}

.expert-qa-label {
    margin-bottom: 4px;
    color: #6f42c1;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.expert-qa-question p,
.expert-qa-answer p {
    margin: 10px 0 0;
    line-height: 1.6;
}

.expertQuestionModerationForm {
    padding: 0 16px 16px;
}

.expertQuestionModerationForm textarea {
    min-height: 120px;
}

.expert-question-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.expert-question-actions button {
    flex: 1 1 220px;
}

@media (max-width: 720px) {
    .expert-decision-grid {
        grid-template-columns: 1fr;
    }

    .expert-public-card {
        grid-template-columns: 1fr;
    }

    .expert-save-status {
        display: block;
        margin: 8px 0 0;
    }
}


/*КАТАЛОГ*/
.catalog-controls {
    margin-bottom: 12px;
    font-size: 14px;
}

.catalog-controls a {
    text-decoration: none;
    margin: 0 4px;
}

.catalog-controls a.active {
    font-weight: bold;
    text-decoration: underline;
}

.sort-dir label {
    margin-left: 6px;
    cursor: pointer;
}

.sort-dir input {
    vertical-align: middle;
}
.catalog-controls input[type=text] {
    padding: 4px 6px;
    margin-left: 8px;
    width: 220px;
}

.myworld_ann{
    text-align:center;
    padding:15px; 
    border-radius:16px;
    background: linear-gradient(135deg, #ff4d6d, #ff8fa3, #ffc2d1);
    color:#fff;
    font-family: Arial, sans-serif;
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
    animation: pulseGlow 2.5s infinite;
}
.myworld_ann a{
    color:#ffffff;
    text-decoration:none;
    font-weight:600;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.35),
        0 0 8px rgba(255,255,255,0.4);
    transition: all 0.25s ease;
}

.myworld_ann a:hover{
    text-shadow:
        0 3px 6px rgba(0,0,0,0.45),
        0 0 12px rgba(255,255,255,0.6);
    letter-spacing:0.5px;
}

.my-titles-editor {
    background: #fff5f8;
    border: 1px solid rgba(214, 51, 132, 0.22);
    border-radius: 14px;
    padding: 16px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(214, 51, 132, 0.12);
}

.my-title-row {
    display: grid;
    grid-template-columns: 34px 64px 130px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid rgba(214, 51, 132, 0.18);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(214, 51, 132, 0.10);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.my-title-row:last-of-type {
    margin-bottom: 12px;
}

.my-title-row:hover {
    box-shadow: 0 5px 14px rgba(214, 51, 132, 0.18);
}

.my-title-row.is-dragging {
    opacity: 0.55;
    transform: scale(0.99);
}

.my-title-drag {
    cursor: grab;
    color: #c2185b;
    font-size: 1.25rem;
    line-height: 1;
    text-align: center;
    user-select: none;
}

.my-title-drag:active {
    cursor: grabbing;
}

.my-title-move-buttons {
    display: flex;
    gap: 4px;
}

.my-title-move-buttons button {
    padding: 3px 7px;
    min-width: 28px;
}

.my-title-visible {
    color: #c2185b;
    font-size: 0.95rem;
}

.my-title-preview {
    font-weight: bold;
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(214, 51, 132, 0.08);
    border: 1px solid rgba(214, 51, 132, 0.12);
}

.my-titles-editor button[type="submit"] {
    margin-top: 6px;
}


/* New paragraph-format stories only. Legacy story spacing stays unchanged. */
.story-content.story-paragraphs > p {
    margin: 0;
    min-height: 1em;
}
.story-content.story-paragraphs > p:last-child {
    margin-bottom: 15px;
}
