/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    /* Основные переменные */
    --transition-default: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --modal-animation-duration: 0.3s;
    
    /* Переменные фильтров */
    --filter-height: 32px;
    --filter-font-size: 13px;
    --filter-icon-size: 13px;
    --filter-padding: 0 12px;
    --filter-border-radius: 16px;
    --filter-bg: white;
    --filter-color: #666;
    --filter-hover-bg: rgba(0, 0, 0, 0.05);
    --filter-hover-color: #333;
    --filter-active-bg: var(--bg-badge);
    --filter-active-color: white;

    /* Основные цвета */
    --primary-color: #3d78ea;
    --secondary-color: #5925c4;
    --gradient-bg: white;
    --gradient-btn: linear-gradient(135deg, #3d78ea 0%, #5925c4 100%);
    --gradient-btn-red: linear-gradient(135deg, #ff6b6b, #c44569);
    --gradient-btn-second: linear-gradient(135deg, #3d78ea 0%, #5925c4 100%);
    --spinner-color: #5925c4;
    
    /* Цвета фона */
    --bg-card: #f3f2fe;
    --bg-badge: rgba(52, 35, 220, 1);
    --bg-footer-icons: linear-gradient(135deg, #3d78ea 0%, #5925c4 100%);
    --bg-footer-icons-hover: rgba(255, 255, 255, 0.24);
    
    /* Акцентные цвета */
    --accent-color: #3423dc;
    --accent-light: rgba(89, 37, 196, 0.1);
    --accent-medium: rgba(89, 37, 196, 0.2);
    --title-hover-color: #6b7280;
    
    /* Дополнительные цвета */
    --gray-light: #e5e7eb;
    --gray-medium: #6b7280;
    --gray-dark: #1f2937;
    --white: #ffffff;
    --dark-blue: #3423dc;
    
    /* Общие настройки */
    --transition: all 0.3s ease;
    --border-radius: 6px;
    --box-shadow: 0 10px 25px rgba(61, 120, 234, 0.3);
    --ripple-animation: ripple 0.6s ease-out;

    /* Цвета текста */
    --text-header: #ffffff;
    --text-header-size: 1.2rem;
    --text-header-weight: 600;
    --text-card-title: #1f2937;
    --text-card-title-size: 1.1rem;
    --text-card-body: #4b5563;
    --text-card-footer: #6b7280;
    --text-badge: #ffffff;
    --text-footer: white;
    --text-filter-btn-active: #5925c4;
    --text-filter-title: #fff;
    --text-send-btn: #fff;
    --text-no-result: #fff;
    --text-gradient-btn: #fff;
    --text-3xl-size: 3rem;
    --text-bold-weight: 700;
    --text-medium-weight: 500;
    --text-dark: #1f2937;

    /* Размеры текста */
    --text-xl-size: 18px;
    --text-lg-size: 16px;
    --text-md-size: 14px;
    --text-sm-size: 0.9rem;
    --text-xs-size: 0.8rem;
    --text-normal-weight: 400;
    --text-semibold-weight: 600;

    /* Фильтры */
    --filter-btn-bg: var(--bg-card);
    --filter-btn-bg-active: var(--accent-color);
    --filter-btn-text: var(--text-card-body);
    --filter-btn-text-active: white;
    --filter-btn-opacity: 0.5;
    --filter-btn-height: 32px;
    --filter-btn-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --filter-ripple-color: rgba(0, 0, 0, 0.1);
    --filter-toggle-color: var(--gray-light);
    --filter-toggle-hover-color: var(--white);
    --filter-divider-color: var(--gray-light);
    --filter-divider-opacity: 0.7;

    /* Формы */
    --menu-buttons-color: linear-gradient(135deg, #3d78ea 0%, #5925c4 100%);
    --background-color: #ffffff;
    --text-color: #1f2937;
    --label-color: #374151;
    --border-color: #e5e7eb;
    --focus-border-color: #3d78ea;
    --focus-shadow-color: rgba(61, 120, 234, 0.08);
    --error-border-color: #ff4757;
    --error-shadow-color: rgba(255, 71, 87, 0.1);
    --disabled-bg-color: #f9fafb;
    --secondary-btn-bg: #f3f4f6;
    --secondary-btn-color: #111827;
    --primary-btn-bg: linear-gradient(135deg, #3d78ea 0%, #5925c4 100%);
    --primary-btn-color: #fff;
    --modal-overlay-bg: rgba(0, 0, 0, 0.8);
    --modal-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);

    /* Таблицы */  
    --color-white: #ffffff;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-accent: #3423dc;
    --color-pushed: #5925c4;
    --color-accent-rgba: rgba(52, 35, 220, 0.1) !important;
    --color-header-overlay: rgba(255,255,255,0.1);
    --color-row-even: #f9fafb;
    --color-hover: #f3f4f6;
    --text-header-color: var(--text-header, #ffffff);
    --header-bg-color-var: var(--header-bg-color, #3423dc);
}

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

li { padding-top: 5px; padding-bottom: 10px;}
ul, ol { 
    list-style: disc;
    padding-left: 20px;
    padding-top: 5px;
    padding-bottom: 5px;
}
a { text-decoration: none; color: inherit; }
p { padding-bottom: 10px;}
button { background: none; border: none; font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; border: none; outline: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: inherit; font-size: inherit; }
img, video, iframe { width: 80px; height: auto; display: block; }
table { border-collapse: collapse; border-spacing: 0; }

h1, h2 { color: var(--accent-color)}
h1 { font-size: 1.5rem;}
h2 { 
    font-size: 1.2rem;
    font-weight: var(--text-header-weight);
    margin: 0;
    color: var(--accent-color);
    overflow: hidden;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* ===== ГЛОБАЛЬНЫЕ СТИЛИ ===== */
html, body {
    height: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
   
    
}

body {
    background: var(--gradient-bg) fixed;
    display: flex;
    flex-direction: column;
}

.banner-image {
    max-height: 300px;
    width: 100%;
}

/* ===== LAYOUT ===== */
.layout-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0px
}

.content-main {
    flex: 0 0 80%;
    max-width: 80%;
    min-width: 0;
    padding: 10px;
}

.content-inner { width: 100%; }

.sidebar-right {
    flex: 0 0 20%;
    max-width: 20%;
    min-width: 0;
    padding-top: 10px;
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 120px);
    padding-bottom: 20px;
    scrollbar-width: thin;
}

.ad-banner {
    width: 100%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
}

.ad-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ===== СЕКЦИИ КОНТЕНТА ===== */
.section {
    gap: 10px;
    display: grid;
    padding-bottom: 30px;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    margin-top: 70px;
    gap: 15px;
}

.content-wrapper.loaded { opacity: 1; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(24, 0, 243, 0.2);
}

.section-title-left, .section-title-right {
    word-wrap: break-word;
    display: flex;
    flex-wrap: wrap;
    gap:10px
}

.section-title-left h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.section-title-left h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
}

.section-title { text-align: center; }

.section-header.participants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

.section-title-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
}




    /* Эти стили только для новой структуры, они не меняют существующие классы */
    .section-layout {
        display: flex;
        gap: 10px; /* Сохраняем отступы как в исходном макете */
        padding: 10px; /* Небольшие отступы по бокам */
    }
    
    .section-content {
        flex: 0 0 80%; /* 80% ширина, как у .content-main */
        min-width: 0; /* Предотвращает переполнение */
    }
    
    .section-sidebar {
        flex: 0 0 20%; /* 20% ширина, как у .sidebar-right */
        min-width: 0;
    }
    
    /* Медиа-запрос для мобильных устройств (скрываем сайдбар) */
    @media (max-width: 768px) {
        .section-layout {
            flex-direction: column;
        }
        .section-content {
            flex: 0 0 100%;
        }
        .section-sidebar {
            display: none; /* Скрываем правую колонку на мобильных */
        }
    }
    
    /* Сохраняем стили для .section-header и других внутренних элементов */
    .section {
        width: 100%; /* Секция занимает всю ширину родителя */
    }


/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(18, 14, 48, 0.5);
    backdrop-filter: blur(10px);
    padding: 10px;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    color: var(--text-header);
    font-size: var(--text-header-size);
    font-weight: var(--text-header-weight);
    flex-wrap: nowrap;
    gap: 15px;
    height: 50px;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    height: 50px;
    flex-shrink: 0;
}

.header-title {
    font-size: var(--text-header-size);
    font-weight: var(--text-header-weight);
    margin: 0;
    line-height: 1.2;
    color: var(--text-header);
    overflow: hidden;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    color: var(--color-white);
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: var(--text-3xl-size);
    font-weight: var(--text-bold-weight);
    color: var(--text-header);
    text-decoration: none;
    transition: var(--transition);
}

.logo span { color: var(--dark-blue); }

.logo img {
    height: 50px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

header.scrolled .logo { color: var(--primary-color); }

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-header);
    font-size: var(--text-header-size);
    font-weight: var(--text-medium-weight);
    white-space: nowrap;
    transition: var(--transition);
}

.nav-links a:hover { color: #D50DFA; }

header.scrolled .nav-links a { color: var(--text-dark); }
header.scrolled .nav-links a:hover { color: var(--primary-color); }

/* ===== ПЕРЕКЛЮЧАТЕЛИ ===== */
.language-switcher,
.user-switcher,
.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 15px;
    background: var(--menu-buttons-color);
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-size: var(--text-header-size);
    font-weight: var(--text-header-weight);
    color: var(--text-header);
    white-space: nowrap;
    flex-shrink: 0;
    height: 40px;
    box-sizing: border-box;
    justify-content: center;
    border: none;
}

.language-switcher:active::after,
.user-switcher:active::after,
.toolbar-btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    border-radius: 100%;
    transform-origin: 50% 50%;
    animation: var(--ripple-animation);
    flex-shrink: 0;
}

.current-language, .fa-globe,
.current-user, .fa-user {
    margin: 0;
    font-weight: var(--text-header-weight);
    color: var(--text-header);
    min-width: 20px;
}

.current-user {
    display: inline-block;
    max-width: 5ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.user-switcher.menu-open,
.user-switcher.push {
    opacity: 0.7;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    background-color: var(--title-hover-color);
}

.toolbar-btn:hover { color: white; }

.fa-globe, .fa-user {
    font-family: 'Font Awesome 6 Free' !important;
}

/* ===== НАВИГАЦИОННОЕ МЕНЮ ===== */
.nav-menu {
    display: flex;
    align-items: center;
}

/* Бургер-меню */
.burger-menu, .nav-item  {
    display: flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    cursor: pointer;
    height: 50px;
    color: white;
    font-size: 1.2rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    padding: 15px;
    
}

.nav-item, .header-title {
    font-family: 'Helvetica', 'Arial', sans-serif;
}

.burger-menu:hover, .nav-item:hover { background-color: rgba(255, 255, 255, 0.1); }

/* ===== SIDE MENU ===== */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(18, 14, 48, 0.8);
    z-index: 2001;
    overflow-y: auto;
    scrollbar-width: thin;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.side-menu.active { right: 0; }

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.side-menu-header-left {
    flex: 1;
}

.side-menu-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 20px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.side-menu-close:hover { background-color: rgba(255, 255, 255, 0.1); }

.side-menu-items { padding: 20px; }

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    font-weight: normal;
}

.side-nav-item i {
    width: 20px;
    font-size: 1rem;
}

.side-nav-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.side-menu-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}

/* ===== ФИЛЬТРЫ И ПОИСК ===== */
.digest-filters { width: 100%; }

.digest-filters-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Общий базовый стиль для всех */
.digest-filter,
.filter-btn,
.search-input,
.filter-group-toggle {
    height: var(--filter-height);
    border-radius: var(--filter-border-radius);
    font-size: var(--filter-font-size);
    line-height: var(--filter-height);
    background-color: var(--accent-light);
    color: var(--filter-color);
    border: none;
    outline: none;
    box-shadow: none;
    transition: all 0.3s ease;
    max-width: 200px;

    white-space: nowrap;        /* Запрещаем перенос текста */
    overflow: hidden;           /* Скрываем выходящий текст */
    
    /* Для flex-контейнера */
    flex: 0 1 auto;
    min-width: 0;     
}

.filter-text {
    width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.digest-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--filter-padding);
    cursor: pointer;
}

.digest-filter i,
.filter-btn i {
    font-size: var(--filter-icon-size);
    line-height: 1;
    color: inherit;
    min-width: 20px;
}

.filter-btn {
    padding: 0 15px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding-left: 10px;
    padding-right: 12px;
    border: none !important;
}

.filter-btn.search {
    padding-left: 15px;
}

.form-control {
    background: transparent;
  
}

.search-input::placeholder {
    color: var(--filter-color);
    transition: inherit;
}

.filter-group-toggle {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Единый ховер для всех */
.digest-filter:hover,
.filter-btn:hover,
.search-input:hover,
.filter-group-toggle:hover {
    opacity: 1;
    color: var(--filter-hover-color);
    background-color: var(--accent-medium);
    border: none;
    outline: none;
    box-shadow: none;
}

.search-container:hover .fa-search,
.search-input:hover + .fa-search {
    opacity: 0.7;
    color: var(--filter-hover-color);
}

.search-input:hover::placeholder {
    opacity: 0.7;
    color: var(--filter-hover-color);
}

/* Единое активное состояние */
.digest-filter.active,
.filter-btn.active {
    background-color: var(--filter-active-bg);
    color: var(--filter-active-color);
    opacity: 1;
    border: none;
    outline: none;
    box-shadow: none;
}

.digest-filter.active i,
.filter-btn.active i { color: var(--filter-active-color); }

/* Фокус поиска */
.search-input:focus {
    background-color: var(--filter-bg);
    color: var(--filter-color);
    opacity: 1;
    border: none;
    outline: none;
    box-shadow: none;
}

.search-input:focus::placeholder {
    opacity: 0.5;
    color: var(--filter-color);
}

.search-input:focus + .fa-search {
    opacity: 1;
    color: var(--filter-hover-color);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 8px 35px 8px 35px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #999;
    font-size: 1rem;
}

.clear-search-icon {
    position: absolute;
    right: 12px;
    color: #999;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.clear-search-icon:hover { color: #dc3545; }
.clear-search-icon.visible { display: block; }

.filter-buttons-container {
    gap: 10px;
    display: flex;
}

.filter-buttons {
    gap: 10px;
    display: flex;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== ITEMS ===== */
.items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    width: 100%;
}

.item {
    background-color: var(--bg-card);
    color: var(--text-card-body);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-height: 100px;
}

.item:hover { transform: translateY(-2px); }

.item-main {
    gap: 10px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.item-content-container {
    gap: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-main-horizontal {
    display: flex;
    flex-direction: row;
    gap: 15px;
    height: 100%;
}

.item-secondary { background-color: transparent; }

/* Анимация картинки */
.item-image {
    width: 100%;
    border-radius: 6px;
    max-height: 200px;
    object-fit: cover;
    object-position: top;
    transform: scale(1);
    transition: transform 2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.item-image.in-view { transform: scale(1.03); }

.item-image.zooming-out {
    transform: scale(1);
    transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.modal-item-image {
    max-height: none;
    max-width: 100%;
}

.item-image-container {
    flex-shrink: 0;
    height: 100%;
}

.item-image-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-title {
    font-size: var(--text-card-title-size);
    font-weight: 600;
    color: var(--text-card-title);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-description-container { position: relative; }
.item-meta-row { display: flex; flex-direction: row; }

.item-description {
    overflow: hidden;
    display: block;
    transition: var(--transition);
    line-height: 1.4;
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-card-body);
    white-space: initial;
    position: relative;
}

.loadmore-btn {
    display: inline-flex;
    align-items: end;
    gap: 8px;
    background: transparent;
    border: none;
    color: black;
    cursor: pointer;
    font: inherit;
    padding: 0;
    font-size: 0.8rem;
}

.loadmore-btn i { font-size: 0.8rem; }
.loadmore-btn:hover { color: var(--accent-color); }
.loadmore-btn { color: white; }

.item-footer {
    display: flex;
    flex-direction: column;
    width: 100%;
    color: var(--text-card-footer);
    font-size: 0.9rem;
    padding-top: 5px;
    margin-top: 10px;
    border-top: 1px solid rgba(24, 0, 243, 0.2);
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.item-footer-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 5px;
}

.item-footer-left, .item-footer-right { display: flex; align-items: center; }

.item-footer-left i,
.item-footer-right i {
    transition: transform 0.2s ease, color 0.2s ease;
}

.item-footer-left i:active,
.item-footer-right i:active {
    transform: scale(0.9);
    color: var(--accent-color);
}

.item-date-container-articles { flex-direction: column; }
.item-place-margin { margin-top: 5px; }
.item-place { color: var(--bg-badge); }
.item-place:hover { color: var(--accent-color); }

.create-card-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.create-icon-center { align-self: center; }

.create-card {
    cursor: pointer;
    background-color: transparent;
    border: 1px solid white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.create-card:hover {
    color: white;
    background-color: white;
}

.create-icon {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 10px;
}

.create-text {
    font-size: 16px;
    color: #495057;
    font-weight: 500;
}

/* ===== BADGES ===== */
.badges,
.item-badges,
.badges-container {
    flex-wrap: wrap;
    gap: 5px;
    width: 100%;
    padding-top: 0;
    display: flex !important;
    align-items: center;
    justify-items: center;
}

.badge,
.item-badge,
.item-tag {
    flex: 0 1 auto;
    min-width: 0;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1 !important;
    background: var(--bg-badge);
    color: var(--text-badge);
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: normal;
}


/* Плавное изменение прозрачности */
.badge.item-tag {
    transition: opacity 0.2s ease;
}

/* Неактивные теги будут получать opacity через JS, но можно и через CSS */
.badge.item-tag.inactive {
    opacity: 0.5 !important;
}

.badge.item-tag:hover {
    cursor: pointer;
}


/* Специфические бейджи */
.badge.me { background-color: #3bafda; }
.badge.leader { background-color: #60007d; }
.badge.popular { background-color: #0700dc; }
.badge.interesting { background-color: #007428; }
.badge.actual { background-color: #746100e5; }
.badge.original { background-color: #740032e5; }
.badge.trending { background-color: #927400; }
.badge.best { background-color: #760a00f0; }
.badge.attention { background: linear-gradient(45deg, #58f4d4, #9137e4); }
.badge.speaker { background-color: #760066ad; }
.badge.organisator { background-color: #589f00; }
.badge.moderator { background-color: #797d00; }
.badge.participant { background-color: #194b3f; }

/* ===== INTERACTIVE BUTTONS ===== */
.comments-toggle,
.messages-toggle,
.like-btn,
.bell-btn,
.add-transcript-btn,
.rss-btn,
.tags-btn,
.bookmark-btn,
.download-btn,
.transcript-btn,
.footer-btn,
.questions-toggle,
.delete-btn,
.edit-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.comments-toggle:hover,
.messages-toggle:hover,
.like-btn:hover,
.bell-btn:hover,
.add-transcript-btn:hover,
.rss-btn:hover,
.tags-btn:hover,
.bookmark-btn:hover,
.download-btn:hover,
.transcript-btn:hover,
.footer-btn:hover,
.questions-toggle:hover,
.delete-btn:hover,
.edit-btn:hover {
    background-color: var(--accent-light);
}

.comments-toggle:active i,
.messages-toggle:active i,
.like-btn:active i,
.bell-btn:active i,
.bookmark-btn:active i,
.footer-btn:active i,
.transcript-btn:active i,
.download-btn:active i,
.questions-toggle:active i {
    transform: scale(0.9);
    color: var(--accent-color);
}

.comments-toggle i,
.messages-toggle i,
.like-btn i,
.bell-btn i,
.delete-btn i,
.edit-btn i,
.add-transcript-btn i,
.bookmark-btn i,
.download-btn i,
.transcript-btn i,
.questions-toggle i {
    transition: transform 0.2s ease, color 0.2s ease;
}

.transcript-btn .fa-file.has-transcript { color: var(--accent-color); }

.comments-toggle.active,
.messages-toggle.active,
.questions-toggle.active {
    background-color: var(--accent-medium);
    color: var(--accent-color);
}

.comments-toggle.active i,
.messages-toggle.active i,
.questions-toggle.active i { color: var(--accent-color); }

.questions-count,
.comments-count {
    font-size: 1rem;
    font-weight: 500;
    color: inherit;
}

.questions-toggle.active .questions-count,
.messages-toggle.active,
.comments-toggle.active .comments-count { color: var(--accent-color); }

.bookmark-btn[data-liked="true"],
.like-btn[data-liked="true"],
.bell-btn[data-status="sent"] { color: var(--accent-color); }

.bookmark-btn[data-liked="true"] i,
.like-btn[data-liked="true"] i,
.like-btn[data-liked="true"] .likes-count,
.bell-btn[data-status="sent"] i { color: var(--accent-color); }

.bookmark-btn.disabled,
.like-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-question-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #ccc;
}

.send-question-btn.disabled:hover { background-color: #ccc; }

/* ===== COMMON SECTION STYLES ===== */
.event { display: flex; flex-direction: column; gap: 5px; }

.item-comments-section,
.item-questions-section,
.item-transcript-section,
.item-messages-section,
.item-participants-section {
    width: 100%;
    max-height: 0;
    margin-top: 5px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, max-height 0.4s ease;
}

.item-comments-section.active,
.item-messages-section.active,
.item-questions-section.active,
.item-transcript-section.active,
.item-participants-section.active {
    max-height: 500px;
    opacity: 1;
    gap: 10px;
}

.comments-header h4,
.questions-header h4,
.transcript-header h4,
.participants-header h4 {
    padding-top: 10px;
    padding-bottom: 10px;
    color: var(--text-card-title);
    font-weight: bold;
    font-size: 0.9rem;
    margin: 0;
}

.comments-list,
.questions-list,
.transcript-list,
.participants-list {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.comment,
.question,
.transcript {
    margin-top: 5px;
    margin-bottom: 5px;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 10px;
}

.comment { background-color: #f8f9fa; }

.comment-author,
.question-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-avatar,
.question-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar-icon,
.question-avatar-icon {
    color: #6c757d;
    font-size: 20px;
}

.comment-text,
.question-text,
.transcript-text {
    color: var(--text-card-body);
    margin-bottom: 5px;
    margin-top: 5px;
    line-height: 1.4;
    font-size: 0.85rem;
    color: black;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-date,
.question-date {
    font-size: 0.6rem;
    text-align: left;
    color: var(--gray-medium);
}

.user-info {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.user-info-badges {
    display: flex;
    flex-direction: row;
    font-size: 0.8rem;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.user-name {
    display: flex;
    font-weight: 500;
    color: #495057;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    vertical-align: middle;
    text-wrap: auto;
}

.user-details {
    font-size: 0.8rem;
    font-weight: normal;
    text-wrap: auto;
}

.user-pic {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fields-with-action {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.fields-with-action-col {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.fields-with-action-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* ===== ADD SECTION STYLES ===== */
.add-comment,
.add-question {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.comment-input,
.question-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    min-height: 40px;
    font-family: inherit;
    font-size: 1rem;
}

.comment-input:focus,
.question-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.send-comment-btn,
.send-question-btn,
.send-section-btn {
    padding: 10px 12px;
    background-color: var(--accent-color);
    color: var(--text-send-btn);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    overflow: hidden;
}

.send-comment-btn:hover,
.send-question-btn:hover,
.send-section-btn:hover { background-color: #b90bd9; }

.send-comment-btn:active::after,
.send-question-btn:active::after,
.send-section-btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    border-radius: 100%;
    transform-origin: 50% 50%;
    animation: var(--ripple-animation);
}

.send-comment-btn:disabled,
.send-question-btn:disabled,
.send-section-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.no-comments,
.no-questions {
    text-align: center;
    color: var(--gray-medium);
    font-style: italic;
    padding: 20px;
}

.no-items-message {
    position: relative;
    padding: 50px;
    font-size: 1rem;
    color: #666;
    text-align: center;
}

/* ===== QUESTION SPECIFIC STYLES ===== */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.question-author-name {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-card-title);
}

.question-answer {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border-left: 2px solid #4caf50;
    margin-top: 8px;
}

.answer-label {
    font-weight: 600;
    font-size: 12px;
    color: #4caf50;
    margin-bottom: 5px;
}

.answer-text {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-card-body);
    margin: 0;
}

/* ===== TRANSCRIPT STYLES ===== */
.transcript-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.transcript-content.active {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    padding-top: 5px;
    padding-bottom: 5px;
}

.transcript-inner {
    border-top: 1px solid var(--gray-light);
    padding: 10px 0;
    margin-top: 10px;
    box-sizing: border-box;
}

.transcript-loading,
.transcript-theses {
    text-align: left;
    font-size: 0.8rem;
}

.transcript-theses p {
    margin: 0;
    line-height: 1.6;
}

/* ===== USER CARD STYLES ===== */
.user-card {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.default-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #6c757d;
    color: white;
    font-size: 12px;
    border-radius: 50%;
    text-align: center;
}

.participant-details {
    flex: 1;
    min-width: 0;
}

.participant-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.participant-name-form {
    font-weight: 500;
    font-size: 1rem;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-title-form {
    font-size: 0.9rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.distance {
    font-size: 12px;
    color: #888;
    padding: 4px 8px;
    white-space: nowrap;
}

.item-participants-section .participants-list .user-card .badge {
    font-size: 0.7rem;
}

/* ===== QUESTION BUBBLE STYLES ===== */
.question-bubble { margin-bottom: 16px; }

.answers-container {
    margin-left: 20px;
    margin-top: 8px;
}

.message-bubble {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
    position: relative;
}

.answer-message {
    background: #ffffff;
    border-color: #dee2e6;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}

.message-date {
    font-size: 0.85rem;
    color: #6c757d;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.message-text {
    font-size: 1rem;
    line-height: 1.4;
    color: #212529;
}

/* ===== MODAL STYLES ===== */
.modal-overlay,
.form-modal-overlay,
.item-modal-overlay,
.tag-modal-overlay,
.participant-modal-overlay,
.place-modal-overlay,
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    scrollbar-width: none;
    overflow-y: scroll;
    padding: 20px;
    display: none;
    opacity: 0;
    transition: opacity var(--modal-animation-duration) ease;
}

.auth-modal-overlay { background: rgba(0,0,0,0.5); }

.modal-overlay.show,
.form-modal-overlay.show,
.item-modal-overlay.show,
.tag-modal-overlay.show,
.participant-modal-overlay.show,
.place-modal-overlay.show,
.auth-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-container,
.form-container,
.item-modal,
.tag-modal,
.participant-modal,
.place-modal,
.auth-modal {
    width: 50%;
    max-width: calc(100% - 40px);
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--modal-shadow);
    color: #222;
    margin: auto;
    position: relative;
    transform: scale(0.7);
    opacity: 0;
    transition: transform var(--modal-animation-duration) ease, 
                opacity var(--modal-animation-duration) ease;
}

.auth-modal { width: 380px; }
.item-modal--wide { width: 80%; }
.item-modal--meeting { width: 80%; height: 100%; }
.item-screen--meeting { height: 100%; }
.item-form--meeting { height: 100%; }

.modal-overlay.show .modal-container,
.form-modal-overlay.show .form-container,
.item-modal-overlay.show .item-modal,
.tag-modal-overlay.show .tag-modal,
.participant-modal-overlay.show .participant-modal,
.place-modal-overlay.show .place-modal,
.auth-modal-overlay.show .auth-modal {
    transform: scale(1);
    opacity: 1;
}

.tag-modal,
.participant-modal,
.place-modal {
    width: 400px;
    max-width: 90%;
    max-height: 80vh;
}

.tag-modal h3,
.participant-modal h3,
.auth-modal-title {
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2rem;
    color: #333;
}

.auth-modal-title {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: -20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--menu-buttons-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: white;
    z-index: 1001;
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition-fast);
    border: none;
}

.modal-close:hover { transform: translateY(-1px); }

.modal-close:active i {
    transform: scale(0.9);
    color: var(--accent-color);
}

.modal-close i {
    transition: transform 0.2s ease, color 0.2s ease;
}

.close-comments-modal-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #666;
    position: relative;
    overflow: hidden;
}

.close-comments-modal-btn:hover { color: var(--gray-dark); }

.close-comments-modal-btn:active i {
    transform: scale(0.9);
    color: var(--accent-color);
}

.close-comments-modal-btn i {
    transition: transform 0.2s ease, color 0.2s ease;
}

/* ===== MODAL COMMENTS ===== */
.comments-modal-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.comments-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.comments-modal-content {
    background-color: #f9f9f9;
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 80vh;
}

.comments-modal-overlay.active .comments-modal-content { transform: translateY(0); }

.comments-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
    background-color: var(--bg-card);
    border-radius: 8px;
}

/* ===== SCREENS ===== */
.screen,
.registration-screen,
.verification-screen,
.item-screen {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    transition: transform var(--modal-animation-duration) ease;
}

/* ===== FORMS ===== */
.form,
.item-form,
.registration-form,
#registrationModalForm,
#itemMainForm,
#itemDetailsForm,
#pollOptionsForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.form-col {
    flex: 1;
    align-items: center;
}

.form-group {
    width: 100%;
    margin-bottom: 0;
}

.form-section {
    overflow-y: auto;
    height: auto;
    max-height: 400px;
}

.form-label,
.item-label,
.auth-label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--label-color);
    font-weight: normal;
}

.auth-label {
    margin-bottom: 15px;
    font-size: 1rem;
}

/* ===== FORM INPUTS ===== */
.form-input,
.form-select,
.item-input,
.item-select,
.form-textarea,
.item-textarea,
.tag-input,
.participant-input,
.place-input,
.auth-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition-default);
    background-color: var(--background-color);
    box-sizing: border-box;
}

.auth-input { margin-top: 6px; }

.form-textarea,
.item-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-input:focus,
.form-select:focus,
.item-input:focus,
.item-select:focus,
.form-textarea:focus,
.item-textarea:focus,
.tag-input:focus,
.place-input:focus,
.participant-input:focus,
.auth-input:focus {
    outline: none;
    border-color: var(--focus-border-color);
    box-shadow: 0 0 0 3px var(--focus-shadow-color);
}

.form-input.error,
.form-select.error,
.item-input.error,
.item-select.error,
.tag-input.error,
.place-input.error,
.participant-input.error,
.auth-input.error {
    border-color: var(--error-border-color);
    box-shadow: 0 0 0 3px var(--error-shadow-color);
}

.auth-input.error {
    animation: shake 0.5s ease-in-out;
}

.auth-input.error:focus {
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
}

.form-input[readonly],
.form-input:disabled,
.form-select:disabled,
.item-input:disabled,
.item-select:disabled,
.auth-input:disabled {
    background-color: var(--disabled-bg-color);
    cursor: not-allowed;
}

/* ===== FORM ACTIONS ===== */
.form-actions,
.item-actions,
.tag-modal-actions,
.participant-modal-actions,
.auth-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.item-actions { margin-top: auto; }

.tag-modal-actions {
    justify-content: space-between;
    margin-top: 20px;
}

.participant-modal-actions {
    justify-content: flex-end;
    gap: 10px;
}

.auth-actions { margin-top: 14px; }

/* ===== FORM BUTTONS ===== */
.form-btn,
.item-btn,
.tag-btn,
.participant-btn,
.place-btn,
.auth-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.btn-primary,
.form-btn-primary,
.item-btn-primary,
.tag-btn-add,
.participant-btn-add,
.place-btn-add,
.auth-submit {
    background: var(--primary-btn-bg);
    color: var(--primary-btn-color);
    min-width: 80px;
}

.form-btn-primary:hover,
.item-btn-primary:hover,
.tag-btn-add:hover,
.participant-btn-add:hover,
.place-btn-add:hover,
.auth-submit:hover { transform: translateY(-1px); }

.auth-submit:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.form-btn-secondary,
.item-btn-secondary,
.tag-btn-cancel,
.participant-btn-cancel,
.auth-cancel {
    background: var(--secondary-btn-bg);
    color: var(--secondary-btn-color);
}

.form-btn-secondary:hover,
.item-btn-secondary:hover,
.tag-btn-cancel:hover,
.participant-btn-cancel:hover,
.auth-cancel:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.form-btn:disabled,
.item-btn:disabled,
.tag-btn:disabled,
.participant-btn:disabled,
.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.tag-btn:active,
.participant-btn:active { transform: scale(0.98); }

/* ===== CHECKBOXES ===== */
input[type="checkbox"] {
    accent-color: var(--color-accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 8px;
}

.checkbox-label,
.auth-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-text { display: flex; align-items: center; }

.auth-checkbox {
    margin-top: 3px;
    flex-shrink: 0;
}

.policy-link,
.auth-policy-link {
    color: var(--color-accent);
    text-decoration: none;
}

.policy-link:hover,
.auth-policy-link:hover { color: var(--accent-color, #007bff); }

.checkbox-error {
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
    border-color: #e74c3c !important;
}

/* ===== LANGUAGE GROUPS ===== */
.language-group {
    margin-top: 0;
    padding-bottom: 10px;
}

.language-group label {
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-language-group,
.participant-language-group,
.place-language-group { margin-bottom: 15px; }

.tag-language-group label,
.participant-language-group label,
.place-language-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #666;
}

/* ===== TRANSLATE BUTTON ===== */
.yandex-translate-btn,
.yandex-translate-btn-transcript,
.yandex-translate-poll-btn {
    margin-left: 8px;
    background-color: rgba(74, 137, 220, 0.4);
    border-radius: 16px;
    font-size: 0.7rem;
    padding: 4px 8px;
    margin: 5px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.yandex-translate-btn:hover,
.yandex-translate-btn-transcript:hover,
.yandex-translate-poll-btn:hover {
    background-color: rgba(74, 137, 220, 0.6);
}

/* ===== SUGGESTIONS ===== */
.places-list-overlay,
.tags-list-overlay {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    max-height: 260px;
    overflow: auto;
    display: none;
    padding: 6px 0;
    margin-top: 6px;
}

.places-list-overlay.visible,
.tags-list-overlay.visible { display: block; }

.suggestion,
.participant-suggestion,
.tag-suggestion,
.place-suggestion {
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    font-size: 0.8rem;
}

.suggestion:hover,
.participant-suggestion:hover,
.tag-suggestion:hover,
.place-suggestion:hover { background: #f5f7fb; }

.name {
    font-size: 0.8rem;
    color: #333;
}

.lang {
    color: #666;
    font-size: 0.8rem;
}

.participants-name,
.hint { font-size: 0.8rem; }

/* ===== SELECTED ITEMS ===== */
.participants-selecteds,
.tags-selecteds {
    margin-top: 6px;
    overflow-y: auto;
    max-height: 130px;
}

.participants-selected,
.tags-selected {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    padding: 4px 6px;
    margin-bottom: 4px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.tags-selected-row,
.participants-selected-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.remove {
    background: transparent;
    border: none;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: var(--transition-fast);
}

.remove:hover { color: #e74c3c; }

/* ===== TOOLBAR ===== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.toolbar-btn {
    background-color: var(--menu-buttons-color);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

.toolbar-btn.active {
    background-color: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.toolbar-btn#on_mode.active i { color: white !important; }

.toolbar-btn#on_mode.active::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.action-buttons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.functional-btn {
    padding: 0.15rem 0.3rem;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.functional-btn:hover {
    background-color: var(--color-accent-rgba) !important;
    border-radius: 6px;
}

.functional-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.functional-btn i { color: var(--color-accent) !important; }

/* ===== TABLE ===== */
.table-container {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    background: var(--accent-color);
}

#report-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    --bs-table-border-color: transparent !important;
    border-color: transparent !important;
}

#report-table.table,
#report-table.table > :not(caption) > * > *,
#report-table.table > :not(caption) > * > th,
#report-table.table > :not(caption) > * > td {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

#report-table th,
#report-table td {
    padding: 8px 6px !important;
    border: none !important;
    vertical-align: middle !important;
}

#report-table thead {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--color-accent) !important;
    background: var(--color-header-overlay);
}

#report-table thead tr {
    border-bottom: 2px solid var(--color-accent) !important;
    background: var(--color-header-overlay);
}

#report-table thead th {
    color: var(--text-header-color);
    font-size: 0.85rem !important;
    font-weight: var(--text-header-weight) !important;
    padding: 12px 8px !important;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    background: transparent;
    border: none !important;
    vertical-align: middle;
}

#report-table tbody tr:nth-child(even) {
    background-color: var(--color-row-even) !important;
}

#report-table tbody tr:nth-child(odd) {
    background-color: var(--color-white) !important;
}

#report-table tbody tr:hover {
    background-color: var(--color-hover) !important;
    cursor: pointer;
}

#report-table tbody td {
    padding: 8px 6px;
    vertical-align: top;
    line-height: 1.4;
    font-size: 0.8rem;
    word-wrap: break-word;
    border: none !important;
}

#report-table tbody tr:last-child td:first-child { border-bottom-left-radius: 8px; }
#report-table tbody tr:last-child td:last-child { border-bottom-right-radius: 8px; }

.col-checkbox {
    width: 30px;
    text-align: center;
}

th.sortable {
    white-space: nowrap !important;
    min-width: 100px !important;
}

/* ===== TOOLTIP ===== */
.tooltip { position: relative; display: inline-block; }

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: var(--header-bg-color-var);
    color: var(--color-white);
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    white-space: nowrap;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--header-bg-color-var) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ===== SPINNERS ===== */
.global-spinner,
.preloader {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 3000;
    transition: opacity 0.5s ease-out;
    opacity: 0;
}

.preloader {
    background: var(--gradient-bg);
    z-index: 9999;
}

.global-spinner {
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.global-spinner.show,
.preloader.fade-out { opacity: 0; }

.preloader.fade-out { pointer-events: none; }

.global-spinner.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.spinner-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
}

.spinner,
.spinner-border {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--spinner-color);
    animation: spin 1s ease-in-out infinite;
}

.spinner-border {
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    width: 3rem;
    height: 3rem;
    color: white;
}

/* ===== FLOATING BUTTONS ===== */
.floating-btn-wrapper {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8) rotateX(-15deg);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    filter: blur(5px);
    perspective: 1000px;
    z-index: 10000;
}

.floating-btn-wrapper.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0px);
    pointer-events: auto;
    z-index: 10001;
}

.floating-btn-wrapper:not(.show) { display: none !important; }

.floating-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-btn);
    border-radius: 30px;
    padding: 8px 15px;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    height: 35px;
    gap: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.floating-btn-container:hover { transform: translateY(-2px); }

.btn-tooltip,
.btn-icon {
    display: flex;
    align-items: center;
    line-height: 1;
}

/* ===== CONTESTS ===== */
.contests {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
}

.contests > div {
    background-color: var(--bg-card);
    color: var(--text-card-body);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: var(--transition);
    position: relative;
    min-height: 200px;
    box-shadow: var(--box-shadow);
}

.contests h1 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-card-title);
    margin: 0;
    line-height: 1.3;
}

.contests h2 {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-card-body);
    margin: 0;
    line-height: 1.4;
    opacity: 0.9;
}

.contests > div:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.reactions_leaderboard { border-top: 4px solid #ff6b6b; }
.best_comment { border-top: 4px solid #4ecdc4; }
.most_reactions_event { border-top: 4px solid #45b7d1; }
.most_bookmarks_event { border-top: 4px solid #40ea4c; }

.result_table {
    width: 100%;
    margin-top: 15px;
}

.result_table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.result_table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.result_table tr:last-child td { border-bottom: none; }

.result_table tr:hover { background-color: #f8f9fa; }

.result_table .position {
    width: 35px;
    text-align: center;
    color: var(--text-card-title);
}

.result_table .user {
    color: var(--text-card-title);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result_table .reactions {
    width: 60px;
    text-align: center;
    color: var(--gray-medium);
    font-size: 0.85rem;
}

.contest-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.contest-stat {
    font-size: 12px;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 8px;
}

.contest-badges {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.reactions-badge,
.bookmarks-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background-color: var(--color-pushed);
    padding: 6px 10px;
    border-radius: 16px;
    min-width: 40px;
    height: fit-content;
}

.reactions-count-text,
.bookmarks-count-text { color: #ffffff; font-weight: 500; }

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    font-size: 1rem;
}

/* ===== SLOTS ===== */
.slots-container {
    margin-top: 10px;
    overflow-y: auto;
}

.time-slot-group {
    padding: 10px;
    border-radius: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.time-slot-header {
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.time-range {
    font-size: 1rem;
    color: #555;
}

.room-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.room-button {
    padding: 8px 16px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f4f4f4;
    color: black;
    border: none;
    border-bottom: #ddd;
    border-width: 1px;
}

.room-button:hover { transform: translateY(-1px); }

.room-button.selected { background-color: #d5f4e6; }

.room-button:disabled {
    border-color: #ccc;
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.no-slots-message {
    color: #7f8c8d;
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: normal;
    text-align: center;
    width: 100%;
    padding: 20px;
}

.room-button.shake-anim,
.room-button-removing {
    animation: slot-remove 0.3s ease-in-out forwards;
    overflow: hidden;
}

@keyframes slot-remove {
    0% {
        opacity: 1;
        transform: scale(1);
        max-height: 50px;
        margin-bottom: 5px;
    }
    50% {
        opacity: 0.5;
        transform: scale(0.95);
        background-color: #ffebee;
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
        max-height: 0;
        margin-bottom: 0;
        padding: 0;
        border-width: 0;
    }
}

/* ===== GROUPS INFO ===== */
.groups-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-groups {
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.status-with-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: column;
}

.status-with-action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-text { flex: 1; text-align: center; }

.status-buttons { display: flex; gap: 4px; }

.status-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.status-btn-approve { color: #28a745; }

.status-btn-approve:hover {
    background-color: var(--color-accent-rgba) !important;
    border-radius: 8px;
}

.status-btn-reject { color: #dc3545; }

.status-btn-reject:hover { background-color: #dc354631; }

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #3d78ea 0%, #5925c4 100%);
    color: var(--text-footer);
    margin-top: auto;
    gap: 15px;
    padding: 10px;
    width: 100%;
    flex-shrink: 0;
}

.networks {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 5px 0;
}



.links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding-top: 10px;
}

.link-decorated {
    font-size: smaller;
    line-height: 1;
    display: block;
    text-indent: 0;
    white-space: normal;
    word-break: break-word;
    margin: 0;
    padding: 0;
    color: inherit;
    text-decoration: none;
}

.link-decorated:hover { color: var(--accent-color, #007bff); }

.buttons-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px);
    gap: 5px;
    width: 100%;
    justify-content: start;
}

.gradient-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gradient-btn);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-gradient-btn);
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 10px;
    box-sizing: border-box;
    margin: 0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.gradient-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.gradient-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform-origin: 50% 50%;
}

.gradient-btn:active::after { animation: var(--ripple-animation); }

.btn-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    font-size: 3.5rem;
    transition: transform 0.2s ease;
}

.gradient-btn:active .btn-icon-container { transform: scale(0.9); }

.btn-icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.btn-text {
    display: block;
    text-align: center;
    line-height: 1.2;
}

/* ===== UTILITY CLASSES ===== */
.hidden-item { display: none !important; }

.no-results {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--text-no-result);
}

.under-label {
    text-align: right;
    margin-bottom: 20px;
}

.under-label-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8rem;
}

.under-label-link:hover { color: #0066cc; }

.error-field { border: 1px solid #ff4444 !important; }

.ms-auto { margin-left: auto; }

.chevron-icon {
    margin-left: 10px;
    color: #666;
    transition: transform 0.3s ease;
}

.row {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.col-12 {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Дополнительные стили для элементов */
.item-place-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #666);
    font-size: 0.95em;
}

.item-place-container i {
    color: var(--accent-color, #007bff);
    font-size: 1rem;
}

.item-place-link {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.item-place-link:hover { color: var(--accent-color, #007bff); }

.item-link-container { margin: 12px 0; }

.item-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--accent-color, #007bff);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s;
    font-size: 0.95em;
}

.item-link:hover {
    background-color: var(--accent-hover-color, #0056b3);
    text-decoration: none;
    color: white;
}

.item-link i { font-size: 1rem; }

.item-date-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #666);
    font-size: 0.95em;
    flex-wrap: wrap;
}

.item-date-container .item-date,
.item-date-container .item-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.item-time i { color: var(--accent-color, #007bff); }

/* Единый класс для всех кнопок действий в модальном окне */
.modal-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 15px;
    background: var(--menu-buttons-color);
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    color: var(--text-header);
    white-space: nowrap;
    flex-shrink: 0;
    height: 40px;
    box-sizing: border-box;
    justify-content: center;
    border: none;
    max-width: fit-content;
    text-decoration: none;
}

.modal-action-btn:hover { transform: translateY(-1px); }
.modal-action-btn:active { transform: translateY(0); }

.modal-action-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--gray-medium);
    transform: none;
    box-shadow: none;
}

.modal-actions-container {
    gap: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lottery-empty-btn { background: var(--gray-medium); }
.lottery-state { justify-items: center; }

.lottery-gift-btn {
    background: linear-gradient(135deg, #965a05 0%, #fff70e 100%) !important;
}

.lottery-gift-btn:hover {
    transform: translateY(0px);
    cursor: auto;
}

.lottery-instruction {
    padding-top: 10px;
    padding-bottom: 10px;
}

.read-more-btn {
    background: linear-gradient(135deg, #3CB371 0%, #2E8B57 100%) !important;
    transform: translateY(-1px);
}

.join-lead-btn, .join-registration-btn {
    background: linear-gradient(135deg, #3CB371 0%, #2E8B57 100%) !important;
    transform: translateY(-1px);
}

.cancel-lead-btn, .cancel-registration-btn {
    background: linear-gradient(135deg, #B22222 0%, #8B0000 100%) !important;
    transform: translateY(-1px);
}

.join-lead-btn i { color: white !important; }

.join-lead-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
}

/* Основные стили для карточек настроек */
.settings-group {
    width: 100%;
    padding: 20px;
    background: var(--accent-light);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    box-sizing: border-box;
}

.settings-group-title {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.2rem;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    margin-bottom: 20px;
    width: 100%;
}

.cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    align-items: stretch;
}

.settings-card-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
}

.settings-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.settings-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    height: auto;
    min-height: 240px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.settings-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
}

.settings-card-description {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.settings-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.settings-card-icon {
    margin-bottom: 15px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-card-title {
    color: #333333;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
    white-space: normal;
    line-height: 1.3;
}

.settings-card-description {
    color: #666666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0;
    word-wrap: break-word;
    white-space: normal;
    flex: 1;
}

/* Стили для иконок-кружков */
.icon-circle {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
    margin: 0 auto;
}

.icon-circle i {
    font-size: 24px;
    color: white;
    display: block;
}

.icon-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.5);
}

.icon-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    font-family: sans-serif;
}

.icon-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

.icon-circle:hover .icon-tooltip {
    opacity: 1;
    visibility: visible;
    top: -35px;
}

.item-readmore { text-align: right; margin-top: auto; }
.item-main { cursor: pointer; }
.item > * { cursor: auto; }

.itemLanguageFields { height: 100%; }

/* Скрытые данные */
.item-hidden-data,
.time-badge-hidden,
.place-badge-hidden,
.participants-list-hidden { display: none; }

/* Стили для описания с градиентом */
.description-wrapper {
    flex: 1;
    min-height: 100px;
    max-height: none;
    position: relative;
    overflow: hidden;
}

.description-wrapper-questions {
   flex: 1;
    min-height: 40px;
    max-height: none;
    position: relative;
    overflow: hidden; 
}

.item-description {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 3em), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black calc(100% - 3em), transparent 100%);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.participants-list { display: none; }

.create-card { border-width: 1px; border-color: var(--accent-light); }

/* Стили для двухколоночного блока */
.article-content {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    align-items: flex-start;
}

.article-image-column {
    max-width: 30%;
    flex-shrink: 0;
}

.article-image-column .item-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.article-description-column {
    flex: 1;
    min-width: 0;
    height: 0;
    min-height: 100%;
    position: relative;
}

.participants-badges-container { padding-top: 10px; }

/* Стили для кнопок */
.bookmark-btn,
.like-btn,
.comments-toggle,
.edit-btn { pointer-events: auto; }

/* ===== FEATURES SECTION ===== */
.features {
    background: var(--gradient-btn);
    backdrop-filter: blur(15px);
    padding: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.feature-card {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.feature-title {
    font-size: var(--text-2xl-size);
    font-weight: var(--text-semibold-weight);
    margin-bottom: 25px;
    text-align: center;
    color: var(--text-header);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: left;
    gap: 15px;
}

.feature-list li {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-size: var(--text-lg-size);
    font-weight: var(--text-normal-weight);
    position: relative;
    z-index: 2;
    text-align: left;
}

.feature-list strong {
    color: var(--white);
    font-weight: var(--text-semibold-weight);
    display: block;
    margin-bottom: 3px;
}

.feature-bg-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15rem;
    opacity: 0.06;
    color: var(--white);
    z-index: 1;
    transition: all 0.5s ease;
    pointer-events: none;
    width: 100%;
    text-align: center;
}

.feature-card:hover .feature-bg-icon {
    opacity: 0.1;
    transform: translate(-50%, -50%) scale(1.05);
}

/* ========== TECHNOLOGIES SECTION ========== */
.technologies {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    padding: 20px;
    min-height: 100vh;
}

.technologies::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(74,137,220,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(213,13,250,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.tech-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.tech-item {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    text-align: center;
}

.tech-icon {
    font-size: var(--text-4xl-size);
    color: var(--white);
    margin-bottom: 25px;
    background: var(--gradient-btn);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: transform 0.3s ease;
}

.tech-item:hover .tech-icon { transform: scale(1.1); }

.tech-item h3 {
    font-size: var(--text-2xl-size);
    font-weight: var(--text-semibold-weight);
    margin-bottom: 20px;
    color: var(--text-header);
}

.tech-item p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: var(--text-base-size);
    font-weight: var(--text-normal-weight);
    text-align: justify;
}

.tech-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-btn);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-item:hover::after { opacity: 1; }

/* ========== BENEFITS SECTION ========== */
.benefits {
    background: var(--gradient-btn);
    color: white;
    padding: 20px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-item h3 {
    font-size: var(--text-xl-size);
    font-weight: var(--text-semibold-weight);
    margin-bottom: 15px;
    color: var(--text-header);
}

.benefit-item p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-size: var(--text-base-size);
    font-weight: var(--text-normal-weight);
}

/* ========== DEMO GALLERY SECTION ========== */
.demo-gallery {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.demo-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 20%, rgba(213,13,250,0.08) 0%, transparent 50%),
                radial-gradient(circle at 30% 80%, rgba(74,137,220,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.demo-subtitle {
    text-align: center;
    font-size: var(--text-xl-size);
    font-weight: var(--text-normal-weight);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.demo-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.demo-cta {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.demo-cta h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #3423dc;
}

.demo-cta p {
    font-size: var(--text-lg-size);
    font-weight: var(--text-normal-weight);
    color: #666;
    margin-bottom: 20px;
}

/* FEATURES */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.feature-card {
    background: linear-gradient(135deg, #3d78ea 0%, #5925c4 100%);
    color: white;
    padding: 20px 20px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(61,120,234,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(61,120,234,0.4);
}

.feature-card h3 {
    font-size: 1.2rem;
    line-height: 1.2;
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: bold;
}

.feature-items { list-style: none; }

.feature-items li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.feature-items li:last-child { border-bottom: none; }

.feature-items h4 {
    color: #ffffff;
    margin-bottom: 5px;
    font-size: 1rem;
}

.feature-items p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* TECH & BENEFITS */
.tech-grid, .benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

/* Контейнер для изображения (делаем его квадратным) */
.tech-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.tech-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tech-card {
    background: #e3e3e3;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-card:hover { transform: translateY(-5px); }

.benefit-card {
    background: linear-gradient(135deg, #e0ebfc 0%, #e6def7 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(224,235,252,0.5);
    transition: transform 0.3s ease;
}

.benefit-card:hover { transform: translateY(-8px); }

.tech-card h3, .benefit-card h3 {
    color: #3423dc;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.header-cta {
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #3d78ea 0%, #5925c4 100%);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(61,120,234,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(61,120,234,0.55);
}

/* ===== ANIMATIONS ===== */
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(15, 15);
        opacity: 1;
    }
    100% {
        transform: scale(25, 25);
        opacity: 0;
    }
}

@keyframes shake-animation {
    0% { transform: translateX(0); }
    15% { transform: translateX(-8px); }
    30% { transform: translateX(8px); }
    45% { transform: translateX(-6px); }
    60% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

.shake-anim { animation: shake-animation 0.45s ease; }

.shake-animation { animation: shake 0.5s ease-in-out; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== МЕДИА ЗАПРОСЫ (ОБЪЕДИНЕНЫ) ===== */
@media (max-width: 1024px) {
    .ms-auto { margin-left: 0 !important; }
}


@media (max-width: 768px) {
    /* Layout */
    .desktop-menu { display: none; }

    .sidebar-right { display: none; }
    .search { width: 100%; }
    .content-main {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .layout-container { padding: 0px; }


    
    .header {
        flex-direction: row;
        gap: 6px !important;
        justify-content: space-between;
        flex-wrap: nowrap !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .header-left {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        height: 50px !important;
        padding-left: 5px;
    }
    
    .header-right {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex: 0 1 auto !important;
        height: 40px !important;
    }
    
    .header-title {
        font-size: var(--text-header-size);
        line-height: 1.1;
        white-space: normal;
        word-wrap: break-word;
    }

    .language-switcher,
    .user-switcher,
    .toolbar-btn {
        height: 36px;
        padding: 6px 12px;
        font-size: var(--text-header-size);
    }

    .nav-menu {
        gap: 10px;
        margin-right: 10px;
    }
    
    .nav-item {
        font-size: 1rem;
        padding: 6px 8px;
    }

    .burger-menu {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.5rem;
    }
    
    .burger-menu i { font-size: 1.5rem; }

    /* Стили для side-menu на мобильных */
    .side-menu { width: 280px; right: -280px; }

    /* Кнопки в хедере на мобильных */
    .language-switcher,
    .user-switcher,
    .burger-menu,
    .toolbar-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        font-size: 16px !important;
    }
    
    .user-switcher .current-user { display: none !important; }
    .user-switcher i {
        margin: 0 !important;
        font-size: 16px !important;
    }
    
    .language-switcher .fa-globe { display: none !important; }
    
    .language-switcher .current-language {
        display: block !important;
        font-size: 16px !important;
        font-weight: bold !important;
        margin: 0 !important;
        min-width: auto !important;
    }

    .news-logo-container {
        max-width: 120px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .news-logo {
        max-width: 100% !important;
        max-height: 40px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* Filters */
    .digest-filters-container {
        justify-content: flex-start;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .digest-filters-right { flex: 1; max-width: 100%; }
    .filter-buttons-left { justify-content: center; }
    .digest-filter { flex: 0 1 auto !important; }
    
    .filter-btn.search {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        margin-top: 4px;
        position: relative;
    }

    .form-control {
        width: 100% !important;
        max-width: none !important;  /* Убираем любые ограничения */
        flex: 1;  /* Позволяем input растягиваться */
        padding-right: 25px;
    }
   
    /* Items */
    .items {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .item {
        min-height: 150px;
        padding: 12px;
        display: flex;
        flex-direction: column;
        -webkit-tap-highlight-color: transparent;
        transition: none !important;
    }

    .item:active { background-color: var(--bg-card) !important; }
    .item-main { width: 100%; -webkit-tap-highlight-color: transparent; }

    .item-main-horizontal {
        flex-direction: column;
        width: 100%;
    }

    .item-image-container { width: 100%; height: auto; }

    .item-image {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        transform: scale(1);
        transition: transform 2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .item-image.in-view { transform: scale(1.03); }

    .item-image.zooming-out {
        transform: scale(1);
        transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
    }

    .item-content-container { width: 100%; }
    .item-footer { width: 100%; }

    .item-footer-top {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* Article styles */
    .article-content {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .article-image-column {
        width: 100% !important;
        max-width: 100% !important;
        flex-shrink: 1 !important;
    }
    
    .article-description-column {
        width: 100% !important;
        min-height: 150px !important;
    }
    
    .item-image {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
    }

    /* Contests */
    .contests {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contests > div {
        padding: 15px;
        min-height: 180px;
    }

    .contests h1 { font-size: 1.2rem; }
    .contests h2 { font-size: 0.9rem; }

    .result_table table { font-size: 0.75rem; }
    .result_table td { padding: 6px 8px; }
    .result_table .position { width: 30px; }
    .result_table .user,
    .result_table .reactions { font-size: 0.8rem; }
    .result_table .reactions { width: 50px; }
    .result_table .user {
        gap: 6px;
        flex-wrap: wrap;
    }

    /* Forms */
    .under-label { margin-top: 0; }
    .form-group { margin-bottom: 0 !important; }

    .form-row {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px !important;
    }

    .modal-container,
    .form-container,
    .item-modal {
        width: calc(100% - 24px);
        padding: 16px;
        min-width: 100%;
    }

    .form-actions,
    .item-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .form-btn,
    .item-btn { min-width: unset; }

    /* Toolbar */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 15px;
    }

    .toolbar-actions { margin-left: unset; }

    /* Comments */
    .question-header,
    .comment-header { align-items: flex-start; gap: 5px; }

    .question-date,
    .comment-date { align-self: flex-end; }

    .add-comment,
    .add-question {
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
    }

    .send-comment-btn,
    .send-question-btn,
    .send-section-btn { align-self: center; }

    /* Slots */
    .slots-container { height: 250px !important; }
    .room-buttons-container { gap: 6px; }
    .room-button {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* Floating buttons */
    .floating-btn-container {
        height: 36px;
        padding: 6px 12px;
    }

    /* Modal */
    .tag-modal,
    .participant-modal {
        width: 95%;
        margin: 0 10px;
        padding: 15px;
    }

    .tag-modal h3,
    .participant-modal h3 { font-size: 1rem; }

    .tag-input,
    .participant-input,
    .place-input {
        font-size: 0.8rem;
        padding: 8px;
    }

    .tag-btn,
    .participant-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .item-modal--meeting {
        width: 80%;
        height: 700px;
    }

    /* Footer */
    .buttons-list {
        grid-template-columns: repeat(auto-fill, 80px);
        justify-content: center;
    }

    .gradient-btn { font-size: 12px; }

    .btn-icon-container {
        width: 35px;
        height: 35px;
        font-size: 2.5rem;
    }

    .banner-image {
        width: 100%;
        height: 200px !important;
        object-fit:fill;
        object-position: bottom;
    }

    .settings-group {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .settings-group-title {
        font-size: 1.1rem;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    .cards-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .settings-card-link { width: 100%; }
    
    .settings-card {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: auto;
        padding: 18px;
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 15px;
        height: 100%;
        min-height: 140px;
    }
    
    .cards-row { align-items: stretch; }
    .settings-card-link { height: auto; }
    
    .settings-card-icon {
        margin-bottom: 0;
        height: auto;
        flex-shrink: 0;
    }
    
    .settings-card-body { flex: 1; }
    
    .settings-card-title {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    .settings-card-description {
        font-size: 0.9rem;
        line-height: 1.3;
        flex: 1;
    }
    
    .icon-circle {
        width: 55px;
        height: 55px;
    }
    
    .icon-circle i { font-size: 22px; }
    
    .icon-tooltip { display: none; }

    /* FEATURES SECTION - мобильная адаптация */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .feature-card {
        min-height: auto !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .feature-title {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }

    .feature-list { gap: 10px !important; }
    .feature-list li { font-size: 0.95rem !important; }

    /* TECHNOLOGIES SECTION - мобильная адаптация */
    .technologies {
        min-height: auto !important;
        padding: 20px !important;
    }

    .tech-container { gap: 20px !important; }

    .tech-item {
        min-width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .tech-icon {
        width: 70px !important;
        height: 70px !important;
        font-size: 2rem !important;
        margin: 0 auto 15px !important;
    }

    .tech-item h3 {
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
    }

    .tech-item p {
        font-size: 0.9rem !important;
        text-align: left !important;
    }

    /* BENEFITS SECTION - мобильная адаптация */
    .benefits-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .benefit-card {
        padding: 20px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .benefit-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
        margin-top: 0 !important;
    }

    .benefit-card p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }

    /* DEMO GALLERY SECTION - мобильная адаптация */
    .demo-gallery { padding: 20px !important; }

    .demo-subtitle {
        font-size: 1rem !important;
        margin-bottom: 30px !important;
        padding: 0 10px !important;
    }

    .demo-container {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-bottom: 20px !important;
    }

    .demo-cta { padding: 30px 20px !important; }

    .demo-cta h3 {
        font-size: 1.5rem !important;
        margin-bottom: 10px !important;
    }

    .demo-cta p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }

    /* TECH CARDS - мобильная адаптация */
    .tech-card {
        width: 100% !important;
        padding: 15px !important;
    }

    .tech-card-image { margin-bottom: 10px !important; }

    .tech-card h3 {
        font-size: 1.1rem !important;
        margin-top: 5px !important;
        margin-bottom: 5px !important;
    }

    .feature-bg-icon {
        font-size: 10rem !important;
        opacity: 0.03 !important;
    }

    .tech-item::after { display: none !important; }

    /* Мобильные классы */
    .mobile-only { display: block; }
    .desktop-only { display: none !important; }
}

@media (max-width: 480px) {
    .logo img { height: 40px; }

    .language-switcher,
    .user-switcher,
    .toolbar-btn {
        height: 32px;
        padding: 4px 10px;
    }

    .nav-menu {
        gap: 5px;
    }
    
    .nav-item {
        font-size: 12px;
        padding: 4px 6px;
    }

    .burger-menu {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px;
    }

    .side-menu { width: 250px; right: -250px; }
    .side-nav-item {
        padding: 10px 12px;
        font-size: 1rem;
    }

    .item { padding: 15px; }
    .item-title { font-size: 1rem; }

    .item-image {
        max-height: none;
        transform: scale(1);
        transition: transform 2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .item-image.in-view { transform: scale(1.03); }

    .item-image.zooming-out {
        transform: scale(1);
        transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
    }

    .buttons-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .gradient-btn { width: 100%; }

    .modal-close {
        right: 10px;
        top: -15px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .auth-modal {
        width: calc(100% - 24px);
        padding: 16px;
    }

    .auth-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .floating-btn-container {
        height: 32px;
        padding: 4px 10px;
    }

    .form-col { margin-bottom: 0; }
    .form-row { margin-bottom: 10px !important; }

    .slots-container {
        height: 200px !important;
        padding: 8px !important;
    }

    .room-button {
        padding: 5px 10px;
        font-size: 12px;
    }

    .time-slot-group { padding: 8px; }

    .digest-filters-container { gap: 5px; }

    .digest-filter,
    .filter-btn {
        font-size: 12px;
        padding: 0 15px;
    }

    .search-container { min-width: 100px; }
    .search-input { font-size: 12px; }
    .search-container .fa-search { font-size: 11px; }

    /* Settings */
    .settings-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
        min-height: 200px;
    }
    
    .settings-card-icon { margin-bottom: 5px; }
    .settings-card-title { font-size: 1rem; }
    .settings-card-description { font-size: 0.85rem; }
    
    .icon-circle {
        width: 50px;
        height: 50px;
    }
    
    .icon-circle i { font-size: 20px; }

    /* Дополнительная адаптация для очень маленьких экранов */
    .feature-card { padding: 15px !important; }
    .feature-title { font-size: 1.2rem !important; }
    .feature-list li {
        font-size: 0.9rem !important;
        padding: 8px 0 !important;
    }

    .tech-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.8rem !important;
    }

    .benefit-card { padding: 15px !important; }
    .demo-cta { padding: 20px 15px !important; }
    .demo-cta h3 { font-size: 1.3rem !important; }
    .demo-cta p { font-size: 0.9rem !important; }
    .tech-card { padding: 12px !important; }
    .tech-card h3 { font-size: 1rem !important; }

    @media (max-width: 360px) {
        .language-switcher { display: none !important; }
        .news-logo-container { max-width: 90px !important; }
        .header-right { gap: 2px !important; }
        
        .language-switcher,
        .user-switcher,
        .burger-menu {
            width: 32px !important;
            height: 32px !important;
            min-width: 32px !important;
        }
    }
}

@media (min-width: 1600px) {
    .layout-container { padding: 0 40px; }
    .settings-card {
        width: 320px;
        min-width: 320px;
        max-width: 320px;
        min-height: 260px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .settings-card {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        min-height: 240px;
    }
    
    .cards-row { gap: 15px; }
}

/* Мобильные классы */
.mobile-only { display: none; }
.desktop-only { display: block; }

/* ===== PROFILE HEADER ITEM ===== */
.profile-header-item {
    display: flex;
    flex-direction: row;        /* располагаем в строку */
    align-items: center;         /* выравниваем по центру вертикали */
    gap: 12px;                   /* отступ между аватаром и текстом */
    width: 100%;
    color: white;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
    text-align: left;
}

.profile-header-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.profile-header-item .user-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

.profile-header-item .user-avatar img,
.profile-header-item .default-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-header-item .default-avatar {
    background-color: #6c757d;
    color: white;
    font-size: 20px;
}

.profile-header-item .participant-details {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

/* RSS Messages Styling */
.rss-messages {
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    background: var(--white, #ffffff);
}

.rss-message {
    padding: 16px;
    border-radius: var(--border-radius, 6px);
    background: var(--bg-card, #f3f2fe);
    border-left: 4px solid var(--gray-light, #e5e7eb);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: var(--transition, all 0.3s ease);
    animation: slideInUp 0.3s ease;
    max-width: 100%;
    word-wrap: break-word;
}




/* Error message */
.rss-message-error {
    border-left-color: #ff4757; /* Цвет ошибки */
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1) 0%, var(--white, #ffffff) 100%);
}

.rss-message-error .rss-message-user {
    color: #ff4757;
    font-weight: var(--text-semibold-weight, 600);
}

/* Comment message - используем secondary color */
.rss-message-comment {
    border-left-color: var(--secondary-color, #5925c4);
    background: linear-gradient(135deg, var(--accent-medium, rgba(89, 37, 196, 0.2)) 0%, var(--white, #ffffff) 100%);
}

.rss-message-comment .rss-message-user {
    color: var(--secondary-color, #5925c4);
    font-weight: var(--text-semibold-weight, 600);
}

.rss-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: var(--text-sm-size, 0.9rem);
}

.rss-message-user {
    font-weight: var(--text-semibold-weight, 600);
    color: var(--text-card-body, #4b5563);
    display: flex;
    align-items: center;
    gap: 6px;
  
}

.rss-message-question {
    border-left-color: var(--accent-color);
}

.rss-message-time {
    color: var(--gray-medium, #6b7280);
    font-size: 0.8rem;
    background: var(--gray-light, #e5e7eb);
    padding: 4px 8px;
    border-radius: 20px;
}

.rss-message-text {
    color: var(--text-dark, #1f2937);
    line-height: 1.5;
    font-size: var(--text-md-size, 14px);
}

/* Анимация появления */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для скроллбара */
.rss-messages::-webkit-scrollbar {
    width: 8px;
}

.rss-messages::-webkit-scrollbar-track {
    background: var(--gray-light, #e5e7eb);
    border-radius: 10px;
}

.rss-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color, #3d78ea);
    border-radius: 10px;
    opacity: 0.7;
}

.rss-messages::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color, #5925c4);
}


/* MEETINGS */

.status-confirmed {
    background-color: #d4edda;
    color: #155724;
}

.status-declined {
    background-color: #f8d7da;
    color: #721c24;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-container {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
}

.active-status {
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
}

.active-status:hover {
    transform: translateY(-1px);
}

.status-arrow {
    font-size: 10px;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.alternative-statuses {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    z-index: 20;
    min-width: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    padding-bottom: 20px;
}

.status-option {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    margin-bottom: 5px;
    white-space: nowrap;
    text-align: right;
    display: block;
    margin-left: auto;
    width: fit-content;
}

.status-option:hover {
    transform: translateX(-2px);
}

.meeting-participants {
    padding-top: 15px;
}

.participants-header {
    font-weight: 600;
    margin-bottom: 10px;
    color: #666;
}

.participant-item {
    display: flex;
    align-items: center;
    padding: 5px 0;
    width: 100%;
    gap: 8px;
}




.participant-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.participant-title {
    font-size: 1rem;
    font-weight: normal;
}

.participant-status {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.item-place-link:hover {
    opacity: 0.8;
}


.item-modal--meeting {
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  height: auto;
}

.meeting-user-card {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.meeting-user-card:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.meeting-user-card.selected {
  background-color: #d5f4e6;

}

.selected {
    background-color: #d5f4e6;
}

.participant-name-form {
  font-weight: 600;
  color: #2c3e50;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.participant-title-form {
  font-size: 14px;
  color: #7f8c8d;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Стили для слотов переговорных */
.time-slot-group {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.time-slot-header {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.time-range {
  font-weight: 600;
  color: #2c3e50;
  font-size: 16px;
}

.room-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.room-button {
  padding: 8px 16px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #495057;
}

.room-button:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  transform: translateY(-1px);
}

.room-button.selected {
  background: #27ae60;
  color: white;
  border-color: #27ae60;
}

.room-button-removing {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Стили для ошибок */
.error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1) !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Стили для спиннера */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {
  .item-modal--meeting {
    width: 95%;
    height: 95vh;
  }
  
  .users-grid {
    grid-template-columns: 1fr !important;
  }
  
  .room-buttons-container {
    flex-direction: column;
  }
  
  .room-button {
    width: 100%;
  }
}

.item-description-alt {
    overflow: hidden;
    display: block;
    max-height: 145px;
    transition: var(--transition);
    line-height: 1.4;
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-card-body);
    white-space: pre-wrap;
    position: relative;
}

.main-banner {
    width: 100%; /* Или нужная вам ширина */
    max-height: 350px;
  
}

.banner-button {
    display: block; /* Чтобы ссылка занимала всё пространство */
    width: 100%;
    height: 100%;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Сохраняет пропорции и заполняет контейнер, обрезая лишнее */
    object-position: bottom; /* Выравнивание по нижнему краю (обрежется верх) */
}

.underline-label {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 5px;
}

.under-label-link {
  display: inline-flex;
  align-items: center;
  gap: 10px; 
}


/* Стили для двухколоночного расположения полей в языковой группе */
.language-group {
  margin-bottom: 20px;
  padding: 10px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.language-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.language-title {
  font-weight: 600;
  color: #495057;
  font-size: 16px;
}

.fields-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.field-col {
  flex: 1;
  min-width: 200px;
}

.field-col .item-label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  color: #6c757d;
}

.field-col .item-input {
  width: 100%;
}

/* Добавьте в ваш основной CSS файл или в тег <style> */
.fields-locked .ql-toolbar,
.fields-locked .ql-container {
  opacity: 0.7;
  pointer-events: none;
  background-color: #f5f5f5;
}

.fields-locked .ql-toolbar button,
.fields-locked .ql-toolbar .ql-picker {
  pointer-events: none;
  opacity: 0.5;
}

/* Для визуального отображения заблокированного состояния */
.quill-editor.ql-container[contenteditable="false"] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.ql-toolbar.disabled {
  background-color: #f5f5f5;
  pointer-events: none;
  opacity: 0.7;
}

.ql-toolbar.disabled button,
.ql-toolbar.disabled .ql-picker {
  pointer-events: none;
  opacity: 0.5;
}

    /* НОВЫЙ СЕЛЕКТОР: policy-card */
        .policy-card {
           background: linear-gradient(135deg, #e0ebfc 0%, #e6def7 100%);
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 15px 35px rgba(224,235,252,0.5);
            transition: transform 0.3s ease;
        }
        
        /* Убираем границу у последней карточки */
        .policy-card:last-child {
            border-bottom: none;
        }
        
        /* Заголовки в карточках */
        .policy-card h3 {
            font-family: inherit;
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 20px;
            color: #1a2634;
            letter-spacing: -0.02em;
            line-height: 1.3;
        }
        
        /* Параграфы */
        .policy-card p {
            font-family: inherit;
            font-size: 1rem;
            line-height: 1.3;
            margin-bottom: 10px;
            color: #2c3e50;
        }
        
        /* Основные списки */
        .policy-card ul {
            font-family: inherit;
            list-style: none;
            margin: 0 0 20px 0;
            padding: 0;
        }
        
        /* Элементы основного списка */
        .policy-card > ul > li {
            font-family: inherit;
            font-size: 1rem;
            line-height: 1.3;
            padding-left: 10px;
            color: #2c3e50;
        }
        
        .policy-card ul ul li::before { content: "•"; margin-right: 8px; }

        /* Вложенные списки */
        .policy-card ul ul {
            margin: 8px 0 8px 25px;
            padding: 0;
        }
        
        /* Элементы вложенных списков */
        .policy-card ul ul li {
            font-family: inherit;
            font-size: 1rem;
            line-height: 1.3;
            margin-bottom: 6px;
            padding-left: 10px;
            color: #2c3e50;
        }
        
        /* Жирный текст */
        .policy-card strong {
            font-family: inherit;
            font-weight: 600;
            color: #1a2634;
        }
        
        /* Специальный класс для важных заметок */
        .policy-card .important-note {
            padding: 15px 20px;
            border-left: 4px solid #007bff;
            margin: 25px 0 15px 0;
            font-family: inherit;
            font-size: 1rem;
            line-height: 1.3;
            color: #2c3e50;
        }
        
        .policy-card .important-note strong {
            color: #007bff;
        }
        
        /* Стили для пунктов с нумерацией */
        .policy-card li {
            font-family: inherit;
            font-size: 1rem;
            line-height: 1.3;
            color: #2c3e50;
        }
        
        /* Адаптивность */
        @media (max-width: 768px) {
       
            
            .policy-card h3 {
                text-align: center;
            }
            
            .policy-card p,
            .policy-card li,
            .policy-card .important-note {
                font-size: 0.95rem;
            }
            
          
        }

.link {
    color: var(--accent-color);
}

.link:hover {
    color: var(--secondary-color);
}

.under-label-link:hover {
    color: var(--secondary-color);
}