:root {
    --bg-dark: #121214;
    --text-white: #ffffff;

    /* ВОТ ОНА, ПРОПУЩЕННАЯ ПЕРЕМЕННАЯ: */
    --text-grey: #a0a0a0;

    --accent-blue: #3E7B99;
    --border-color: rgba(255, 255, 255, 0.15);
}

/* Принудительный шрифт */
body, button, input, textarea, h1, h2, h3, a {
    font-family: 'Montserrat', sans-serif !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    margin: 0;
    position: relative;
    overflow-x: hidden;
    /* Эти 3 строки прижимают футер к низу */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- ФОНЫ --- */

/* 1. Пятна (Слой самый нижний) */
.glow {
    position: fixed;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    z-index: -3;
    pointer-events: none;
    filter: blur(150px);
    opacity: 0.4;
}
.glow-1 { top: -300px; left: -200px; background: #2F00DA; }
.glow-2 { top: 30%; right: -400px; background: #58BFFF; }

/* 2. СЕТКА (Исправленная) */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;


    z-index: -2;


    background-image: url('../img/grid.png');

    background-repeat: repeat;

    background-size: cover;

    opacity: 0.2;

    pointer-events: none;
}
.wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    /* Это заставляет wrapper растягиваться и толкать футер вниз */
    flex: 1;
}

/* --- Хедер (Без изменений) --- */
.header {
    display: flex;
    position: relative;
    z-index: 9999;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    text-transform: uppercase;
    color: white;
    text-decoration: none;
}

.nav-menu { display: flex; gap: 40px; }
.nav-link {
    color: #b0b0b0; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.3s;
}
.nav-link:hover { color: white; }

.btn-small {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;

    text-decoration: none !important;
    display: inline-block;

    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-small:hover {
    border-color: #58BFFF;
    color: #58BFFF;
    box-shadow: 0 0 15px rgba(88, 191, 255, 0.4); /* Свечение */
    transform: translateY(-2px); /* Легкий подъем */
}

/* --- HERO SLIDER (Главный экран) --- */
.hero-slider-container {
    height: 700px; /* Чуть увеличим общую высоту секции, чтобы влез отступ */
    margin-bottom: 80px;
    position: relative;
}

.heroSwiper {
    width: 100%;
    height: 100%;
    border-radius: 20px;
}

.hero-slide {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;

    /* ИСПРАВЛЕНО: Было 130px, стало 220px.
       Это опустит заголовок "Профессиональный форум..." вниз */
    padding-top: 220px;

    background: transparent;
}

.hero-content h1 {
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 50px;
}

.btn-primary {
    font-family: 'Montserrat', sans-serif !important;
    padding: 14px 35px;
    border-radius: 40px;
    background: linear-gradient(90deg, #3E7B99 0%, #2a5a75 100%);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(62, 123, 153, 0.3);
}
.btn-primary:hover { transform: translateY(-3px); }

.center-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 60px;
    position: relative;
    z-index: 2;
}
/* --- ТОЧКИ ПАГИНАЦИИ (Вертикальные справа) --- */

.heroSwiper .swiper-pagination {
    position: absolute;
    right: 30px !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%);

    display: flex;
    flex-direction: column;
    gap: 15px;
    width: auto !important;
    z-index: 10;
}

.heroSwiper .swiper-pagination-bullet {
    width: 14px;
    height: 14px;
    background: white;
    opacity: 0.4;
    margin: 0 !important;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.heroSwiper .swiper-pagination-bullet-active {
    background: #58BFFF;
    opacity: 1;
    transform: scale(1.3);
}
/* --- Точки пагинации --- */
.swiper-pagination-vertical.swiper-pagination-bullets,
.swiper-vertical>.swiper-pagination-bullets {
    right: 20px;
    top: 50%;
    transform: translate3d(0px,-50%,0);
}
.swiper-pagination-bullet {
    width: 10px; height: 10px; background: white; opacity: 0.3; margin: 15px 0 !important;
}
.swiper-pagination-bullet-active { opacity: 1; background: #58BFFF; }

/* --- Заглушки и Футер--- */
.empty-state {
    text-align: center;
    padding: 60px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text-grey);
}
.section-title { text-align: center; margin-bottom: 40px; font-size: 1.6rem; }
.footer {
    border-top: 1px solid rgba(255,255,255,0.1); padding: 40px; margin-top: 50px; background: rgba(0,0,0,0.2);
}
.footer-content { display: flex; justify-content: center; gap: 50px; }
.footer a { color: #a0a0a0; text-decoration: none; font-size: 0.9rem; }
.footer a:hover { color: white; }

/* --- СТРАНИЦА НОВОСТЕЙ --- */

.page-section {
    padding: 120px 0 80px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 50px;
    text-align: center;
    color: white;
}

/* Сетка новостей */
.news-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* --- НОВОСТИ (На главной) --- */
.news-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-card-home {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card-home:hover {
    transform: translateY(-5px);
    border-color: #58BFFF;
    background: rgba(255, 255, 255, 0.05);
}

.news-card-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.news-card-body {
    padding: 25px;
}

.news-date {
    font-size: 0.8rem;
    color: #58BFFF;
    margin-bottom: 10px;
    display: block;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.news-desc {
    font-size: 0.9rem;
    color: #a0a0a0;
    line-height: 1.5;
}


/* --- НОВОСТИ (Отдельная страница) --- */
.page-container {
    padding-top: 50px;
    padding-bottom: 80px;
}

.page-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 60px;
}

.news-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

/* Дизайн карточки */
.news-tile {
    background: linear-gradient(180deg, rgba(30, 30, 35, 0.8) 0%, rgba(20, 20, 25, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-tile:hover {
    box-shadow: 0 10px 40px rgba(62, 123, 153, 0.15);
    border-color: #3E7B99;
    transform: translateY(-5px);
}

.tile-image-wrap {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.tile-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.news-tile:hover .tile-image {
    transform: scale(1.05);
}

.news-section,
.topics-section,
.materials-section {
    margin-bottom: 130px;
}

.tile-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tile-date {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin-bottom: 12px;
}

.tile-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    color: white;
    flex: 1;
}

.read-link {
    font-size: 0.9rem;
    color: #58BFFF;
    font-weight: 600;
}

a.news-card-home,
a.news-tile,
a.forum-card,
a.thread-card,
a.sidebar-card,
a.file-card {
    text-decoration: none !important;
    color: white !important;
}

/* Кнопка на главной (Все новости) */
.btn-secondary {
    padding: 12px 35px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-secondary:hover {
    border-color: #58BFFF;
    background: rgba(88, 191, 255, 0.1);
}
/* Большая заглушка для целой страницы */
.empty-state-large {
    text-align: center;
    padding: 100px 20px;
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 20px;
    background: rgba(255,255,255,0.02);
}
.empty-icon { font-size: 4rem; margin-bottom: 20px; opacity: 0.5; }
.empty-state-large h3 { margin-bottom: 15px; font-size: 1.5rem; }
.empty-state-large p { color: var(--text-grey); max-width: 500px; margin: 0 auto 30px; }

/* --- ПАГИНАЦИЯ (Для страницы новостей) --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover {
    border-color: #58BFFF;
    background: rgba(88, 191, 255, 0.1);
}

.page-link.active {
    background: #58BFFF;
    color: white;
    border-color: #58BFFF;
    box-shadow: 0 0 15px rgba(88, 191, 255, 0.4);
}
/* --- ДЕТАЛЬНАЯ СТРАНИЦА НОВОСТИ --- */

.news-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* --- БЛОК СТАТЬИ --- */
.news-article-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
}

/* Хлебные крошки */
.breadcrumbs {
    color: var(--text-grey);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.breadcrumbs a {
    color: var(--text-grey);
    text-decoration: none;
    transition: color 0.3s;
}
.breadcrumbs a:hover { color: #58BFFF; }

/* Заголовок */
.article-main-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: white;
}

/* Мета (Дата, Автор) */
.article-meta-top {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.meta-date { color: #58BFFF; }

/* Картинка */
.article-main-image {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}
.article-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ТЕКСТ СТАТЬИ (Типографика) */
.article-body-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #e0e0e0;
}

.article-body-text p { margin-bottom: 20px; }
.article-body-text h3 {
    font-size: 1.5rem;
    color: white;
    margin: 40px 0 20px;
}
.article-body-text ul {
    margin-bottom: 25px;
    padding-left: 20px;
}
.article-body-text li {
    margin-bottom: 10px;
    color: #d0d0d0;
}

/* Подвал статьи */
.article-bottom-bar {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-back {
    color: #58BFFF;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(88, 191, 255, 0.3);
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s;
}
.btn-back:hover { background: rgba(88, 191, 255, 0.1); }

.share-links a {
    color: var(--text-grey);
    margin-left: 15px;
    text-decoration: none;
    font-weight: 600;
}
.share-links a:hover { color: white; }


/* --- САЙДБАР (ПРАВАЯ КОЛОНКА) --- */
.news-sidebar {
    position: sticky;
    top: 40px;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-left: 3px solid #58BFFF;
    padding-left: 15px;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    text-decoration: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s;
}

.sidebar-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-date {
    font-size: 0.75rem;
    color: #58BFFF;
    display: block;
    margin-bottom: 8px;
}

.sidebar-news-title {
    font-size: 0.95rem;
    color: white;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

/* АДАПТИВНОСТЬ: На планшетах и телефонах убираем сайдбар вниз */
@media (max-width: 900px) {
    .news-detail-layout {
        grid-template-columns: 1fr;
    }
    .news-sidebar {
        margin-top: 50px;
    }
}

.section-subtitle {
    font-size: 1.5rem;
    color: white;
    margin: 50px 0 25px;
    font-weight: 600;
}

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Файлы */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 20px;
    text-decoration: none;
    transition: all 0.3s;
}

.file-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #58BFFF;
    transform: translateX(5px);
}

.file-icon {
    font-size: 1.8rem;
    margin-right: 20px;
    opacity: 0.8;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.file-size {
    color: var(--text-grey);
    font-size: 0.8rem;
}

.file-download-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(88, 191, 255, 0.1);
    color: #58BFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- LIGHTBOX (Просмотр фото) --- */

.gallery-item {
    position: relative;
}

.zoom-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.gallery-item:hover .zoom-icon {
    opacity: 1;
}

.gallery-item:hover img {
    filter: brightness(0.7);
    transform: scale(1.05);
}

/* Само модальное окно (скрыто по умолчанию) */
/* --- LIGHTBOX --- */

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    cursor: default;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 85vh;
    border-radius: 5px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s;
    user-select: none;
}

/* Кнопка закрытия */
.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}
.close-btn:hover { color: #58BFFF; }

/* НОВОЕ: Стрелки навигации */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 10000;
}

/* Позиция стрелок */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.5);
    color: #58BFFF;
}

/* --- СТРАНИЦА ФОРУМА --- */

/* Заголовок по центру */
.forum-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Список */
.forum-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 60px;
}

/* Карточка форума */
.forum-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: linear-gradient(90deg, rgba(40, 60, 80, 0.9) 0%, rgba(30, 45, 60, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;

    padding: 20px 40px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.forum-card:hover {
    background: linear-gradient(90deg, rgba(62, 123, 153, 0.8) 0%, rgba(40, 60, 80, 0.7) 100%);
    border-color: #58BFFF;
    transform: translateX(10px);
}

.forum-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.forum-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.forum-count {
    color: #a0a0a0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Кнопка со стрелкой */
.forum-arrow-btn {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

/* При наведении меняем только цвет */
.forum-card:hover .forum-arrow-btn {
    background: #58BFFF;
}

.forum-card:hover .forum-arrow-btn svg path {
    stroke: white;
}

/* --- ВНУТРЯНКА РАЗДЕЛА (Список тем) --- */

.threads-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 60px;
}

.thread-card {
    display: flex;
    align-items: center;
    gap: 25px;

    background: linear-gradient(90deg, rgba(40, 60, 80, 0.9) 0%, rgba(30, 45, 60, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 60px;

    padding: 20px 30px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.thread-card:hover {
    background: linear-gradient(90deg, rgba(62, 123, 153, 0.8) 0%, rgba(40, 60, 80, 0.7) 100%);
    border-color: #58BFFF;
    transform: translateX(10px);
}

.thread-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #d9d9d9;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.1);
}

/* Блок с текстом */
.thread-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

/* Верхняя строка (Автор, Дата, Ответы) */
.thread-meta-row {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #a0a0a0;
}

/* Название обсуждения */
.thread-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
}

/* Стрелка наследуется от .forum-arrow-btn, но добавим специфику при наведении */
.thread-card:hover .forum-arrow-btn {
    background: #58BFFF;
}
.thread-card:hover .forum-arrow-btn svg path {
    stroke: white;
}

/* --- СТРАНИЦА ТЕМЫ (Внутрянка) --- */

.thread-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.login-hint a { color: #58BFFF; text-decoration: none; border-bottom: 1px dashed #58BFFF; }

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 60px;
}

/* Карточка сообщения */
.forum-post {
    display: flex;
    background: linear-gradient(180deg, rgba(30, 45, 60, 0.8) 0%, rgba(20, 30, 40, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    min-height: 300px;
}

/* Левая колонка (Автор) */
.post-sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.2);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.author-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    background-color: #d9d9d9;
    margin-bottom: 15px;
    border: 3px solid rgba(255,255,255,0.1);
}

.author-name {
    color: white; font-weight: 700; font-size: 1rem; margin-bottom: 5px;
}
.author-status {
    color: #58BFFF; font-size: 0.85rem; margin-bottom: 20px;
}

.author-stats {
    font-size: 0.75rem; color: #808080; line-height: 1.6; width: 100%; text-align: left; padding-left: 10px;
}

/* Правая колонка (Контент) */
.post-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.post-header {
    display: flex; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px; margin-bottom: 20px;
    color: #808080; font-size: 0.85rem;
}

.post-body-text {
    color: #e0e0e0; font-size: 1rem; line-height: 1.6;
}
.post-body-text ul { padding-left: 20px; margin-top: 10px; }


/* --- МОДАЛЬНОЕ ОКНО ОТВЕТА --- */
.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center; justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-window {
    background: linear-gradient(135deg, #1e2a36 0%, #151b22 100%);
    width: 800px;
    max-width: 95%;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; font-size: 1.2rem; color: white; }
.modal-close {
    background: none; border: none; color: #a0a0a0; font-size: 2rem; cursor: pointer;
}
.modal-close:hover { color: white; }

.modal-body { padding: 30px; }

/* Тулбар редактора */
.editor-toolbar {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 8px 8px 0 0;
    display: flex;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;


    box-sizing: border-box;
    width: 100%;
}
.editor-toolbar button {
    background: none; border: none; color: #ccc; cursor: pointer; font-size: 1rem; padding: 5px;
}
.editor-toolbar button:hover { color: #58BFFF; background: rgba(255,255,255,0.05); border-radius: 4px; }
.separator { color: #444; }

/* --- ВИЗУАЛЬНЫЙ РЕДАКТОР --- */

.reply-textarea {
    width: 100%;
    height: 200px;
    background: rgba(30, 40, 50, 0.5);
    border: 1px solid rgba(255,255,255,0.1);

    border-top: 1px solid rgba(255,255,255,0.05);

    border-radius: 0 0 8px 8px;
    color: white;
    padding: 15px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;

    overflow-y: auto;
    outline: none;
    display: block;

    box-sizing: border-box;
}

.reply-textarea:focus {
    border-color: #58BFFF;
    background: rgba(30, 40, 50, 0.8);
    border-top-color: #58BFFF;
}

/* Показываем placeholder, когда div пустой */
.reply-textarea:empty:before {
    content: attr(data-placeholder);
    color: #808080;
    pointer-events: none;
    display: block;
}

/* Стили внутри редактора */
.reply-textarea ul { padding-left: 20px; list-style-type: disc; margin: 10px 0; }
.reply-textarea a { color: #58BFFF; text-decoration: underline; }
.reply-textarea b { font-weight: 700; color: white; }
.reply-textarea i { font-style: italic; }

/* Блок файлов */
.file-attach-area { margin-top: 20px; }
.file-attach-area h4 { font-size: 0.9rem; margin-bottom: 10px; color: #ccc; }
.file-checkbox-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }

.custom-checkbox {
    display: flex; align-items: center; gap: 10px; cursor: pointer; color: #a0a0a0; font-size: 0.9rem;
}
.btn-attach {
    background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); width: auto; display: inline-block;
}

.modal-footer {
    padding: 20px 30px; border-top: 1px solid rgba(255,255,255,0.1); text-align: right;
}

/* Адаптив для постов */
@media (max-width: 768px) {
    .forum-post { flex-direction: column; }
    .post-sidebar { width: 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); flex-direction: row; padding: 15px; justify-content: flex-start; gap: 20px;}
    .author-avatar { width: 60px; height: 60px; margin: 0; }
    .author-stats { display: none; }
}

/* --- ВЛОЖЕНИЯ В ПОСТАХ (Просмотр) --- */
.post-attachments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255,255,255,0.1);
}

.attachments-title {
    font-size: 0.9rem; color: #808080; margin-bottom: 15px;
}

.attachments-grid {
    display: flex; flex-wrap: wrap; gap: 15px;
}

/* Карточка вложения */
.attachment-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.attachment-item:hover {
    border-color: #58BFFF;
    background: rgba(255,255,255,0.05);
}

/* Если это картинка */
.image-type {
    width: 150px; display: flex; flex-direction: column;
}
.image-type img {
    width: 100%; height: 100px; object-fit: cover;
}
.image-type .attach-name {
    padding: 8px; font-size: 0.75rem; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* --- ВЛОЖЕНИЯ --- */

/* Контейнер файла */
.file-type {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    min-width: 300px;
    max-width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    transition: all 0.2s;
}

.file-type:hover {
    background: rgba(255,255,255,0.05);
    border-color: #58BFFF;
}

/* Группа иконка + текст */
.file-info-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    margin-right: 20px;
    overflow: hidden;
}

/* Кнопка скачивания */
.btn-download {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #58BFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none !important;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;

    position: relative;
}

/* Разделительная черта */
.btn-download::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.btn-download:hover {
    background: #58BFFF;
    color: white;
    border-color: #58BFFF;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 191, 255, 0.3);
}

/* Иконки и текст */
.file-icon-small { font-size: 1.8rem; }
.file-details { display: flex; flex-direction: column; overflow: hidden; }
.file-details .attach-name {
    font-size: 0.95rem;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-details .attach-size { font-size: 0.75rem; color: #808080; margin-top: 2px; }
/* --- ЗАГРУЗКА ФАЙЛОВ (В Модалке) --- */
.file-upload-area {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.upload-controls {
    display: flex; align-items: center; gap: 15px; margin-bottom: 15px;
}
.upload-hint { font-size: 0.8rem; color: #666; }

/* Список выбранных файлов */
.selected-files-list {
    display: flex; flex-direction: column; gap: 8px;
}

.selected-file-row {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.delete-file-btn {
    background: none; border: none; color: #ff5c5c; cursor: pointer; font-weight: bold; font-size: 1.1rem;
}
.delete-file-btn:hover { color: #ff0000; }


/* --- ЗАГОЛОВОК ТЕМЫ--- */

.thread-header-wrapper {
    text-align: center;
    margin-bottom: 50px;
}

/* Ссылка на категорию (над заголовком) */
.category-badge {
    display: inline-block;
    color: #58BFFF;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-decoration: none;
    background: rgba(88, 191, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(88, 191, 255, 0.2);
    transition: all 0.3s;
}

.category-badge:hover {
    background: #58BFFF;
    color: white;
    transform: translateY(-2px);
}

.thread-header-wrapper .page-title {
    margin-bottom: 0;
    font-size: 2rem;
    line-height: 1.3;
}

/* --- СТРАНИЦА МАТЕРИАЛОВ --- */

.materials-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
}
.materials-header .pagination-simple {
    position: absolute;
    right: 0;
    top: 10px;
}

/* СЕТКА КНИГ */
.materials-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 40px 30px;
    margin-bottom: 80px;
}

/* Карточка */
.material-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    width: 100%;
}

.material-card:hover {
    transform: translateY(-10px);
}

/* Обложка */
.material-cover-wrapper {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.material-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* Эффект при наведении на обложку */
.material-card:hover .material-img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.material-hover-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #58BFFF;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: bold;
}
.material-card:hover .material-hover-overlay {
    opacity: 1;
}


/* Текстовая часть */
.material-info {
    padding: 0 5px;
}

.material-author {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.material-book-title {
    color: #a0a0a0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Адаптив для мобилок: центрируем пагинацию */
@media (max-width: 768px) {
    .materials-header .pagination-simple {
        position: static;
        margin-top: 20px;
    }
}

/* --- ДЕТАЛЬНАЯ СТРАНИЦА КНИГИ --- */

/* Большая карточка */
.book-detail-card {
    background: linear-gradient(145deg, #1a1f26 0%, #0d1117 100%);
    border: 1px solid rgba(88, 191, 255, 0.15);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(62, 123, 153, 0.1);

    border-radius: 30px;
    padding: 60px;
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 100px;
}

.book-info-side {
    flex: 1;
}

.book-cover-side {
    width: 300px;
    flex-shrink: 0;
}
.book-cover-side img {
    width: 100%;
    border-radius: 10px;
    box-shadow: -10px 10px 30px rgba(0,0,0,0.5);
    transform: rotate(2deg);
}

/* Тексты */
.book-authors-large {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.book-title-large {
    color: white;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.2;
}

.book-description {
    color: #b0b0b0;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 600px;
}

.btn-download-large {
    display: inline-block;
    padding: 15px 50px;
    font-size: 1.1rem;
}

/* --- СЛАЙДЕР "ДРУГИЕ МАТЕРИАЛЫ" (Обновленный) --- */
.other-materials-section {
    margin-top: 80px;
    padding-bottom: 100px;
}

.slider-external-container {
    position: relative;
    padding: 0 80px;
}

.materialsSwiper {
    width: 100%;
    overflow: hidden;
}

/* Кнопки навигации */
.material-next, .material-prev {
    background: white !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10;
}

/* Позиционирование стрелок СНАРУЖИ */
.material-next, .material-prev {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10;
    margin: 0 !important;
}

/* Левая стрелка за пределы карусели */
.material-prev { left: 0 !important; }
.material-next { right: 0 !important; }

/* Стили самих кнопок (белые круги как в макете) */
.material-next:after, .material-prev:after {
    color: #121214 !important;
    font-size: 1.2rem !important;
    font-weight: bold;
}

/* --- СТРАНИЦА КОНТАКТЫ --- */

.contacts-wrapper {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.contact-card {
    flex: 1;
    min-width: 400px;
    background: linear-gradient(145deg, #1e2832 0%, #151b22 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.city-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    margin-top: 0;
    color: white;
    text-align: center;
}

.contact-section {
    margin-bottom: 30px;
}

.contact-subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

.contact-text {
    font-size: 1rem;
    color: #e0e0e0;
    line-height: 1.5;
}

/* Реквизиты - мелкий шрифт */
.requisites-text {
    font-size: 0.85rem;
    color: #e0e0e0;
    line-height: 1.6;
    white-space: pre-line;
}

/* Нижний блок с телефонами */
.contact-bottom-row {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 30px;
}

.contact-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.col-label {
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s;
}
.contact-link:hover { color: #58BFFF; }

.email-link {
    color: white;
    text-decoration: underline;
    font-size: 1rem;
}
.email-link:hover { color: #58BFFF; }

/* Мессенджеры */
.messengers-block {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.messenger-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.3s;
}
.messenger-row:hover { opacity: 0.8; }

/* Адаптив контактов */
@media (max-width: 900px) {
    .contacts-wrapper {
        flex-direction: column;
    }
    .contact-card {
        min-width: 100%;
        padding: 30px;
    }
    .contact-bottom-row {
        flex-direction: column;
        gap: 20px;
    }
}


/* --- СТРАНИЦА КОНФЕРЕНЦИЙ --- */

/* Главный блок (Hero) */
.conf-hero-section {
    background: linear-gradient(135deg, #1A2530 0%, #10151a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 60px 80px;
    margin-bottom: 80px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* Декоративное пятно на фоне */
.conf-hero-section::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(88,191,255,0.15) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.conf-status {
    display: inline-block;
    background: rgba(88, 191, 255, 0.1);
    color: #58BFFF;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(88, 191, 255, 0.2);
}

.conf-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.conf-subtitle {
    font-size: 1.5rem;
    color: #a0a0a0;
    font-weight: 300;
    margin-bottom: 40px;
}

/* Сетка деталей (Даты, Место) */
.conf-details-grid {
    display: flex;
    gap: 50px;
    margin-bottom: 40px;
}

.conf-detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-icon {
    font-size: 2rem;
}

.detail-text {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
}

/* Кнопки */
.conf-actions {
    display: flex;
    gap: 20px;
}

.btn-outline {
    padding: 14px 30px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-outline:hover {
    border-color: #58BFFF;
    color: #58BFFF;
}

/* --- ИНФО БЛОК --- */
.conf-info-section {
    display: flex;
    gap: 60px;
    margin-bottom: 100px;
    align-items: flex-start;
}

.conf-text-block {
    flex: 2;
}
.conf-text-block h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 30px;
}
.conf-text-block p {
    color: #e0e0e0;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.conf-stats-block {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    background: rgba(255,255,255,0.03);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.stat-item {
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.stat-item:last-child { border-bottom: none; }

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #58BFFF;
}
.stat-desc {
    color: #a0a0a0;
    font-size: 0.9rem;
}

/* --- АРХИВ --- */
.conf-archive-section {
    margin-bottom: 80px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.archive-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s;
}
.archive-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.3);
}

.archive-image {
    height: 180px;
    background-color: #2c3e50;
    background-size: cover;
    background-position: center;
    position: relative;
}

.archive-year {
    position: absolute;
    top: 15px; left: 15px;
    background: #58BFFF;
    color: white;
    padding: 5px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
}

.archive-content {
    padding: 25px;
}

.archive-meta {
    color: #808080;
    font-size: 0.85rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.archive-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    line-height: 1.4;
    min-height: 3.6em;
}

/* Адаптив */
@media (max-width: 900px) {
    .conf-hero-section {
        flex-direction: column;
        padding: 40px;
        text-align: center;
    }
    .conf-details-grid {
        justify-content: center;
        flex-wrap: wrap;
    }
    .conf-actions {
        justify-content: center;
    }
    .conf-info-section {
        flex-direction: column;
    }
    .conf-stats-block {
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- АВТОРИЗАЦИЯ И РЕГИСТРАЦИЯ --- */

.auth-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding-top: 40px;
}

/* Заголовок теперь снаружи, стилизуем как page-title, но с отступом */
.auth-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 20px rgba(88, 191, 255, 0.4);
}

.auth-card {
    background: rgba(30, 48, 65, 0.9);
    border: 1px solid rgba(88, 191, 255, 0.1);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    border-radius: 30px;
    padding: 50px;
    width: 450px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.wide-card { width: 600px; }

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    align-items: start;
}

.auth-form .form-row > .form-group,
.auth-form .form-row > div {
    min-width: 0;
}

.auth-form .form-row > :only-child {
    grid-column: 1 / -1;
}

/* Группа поля (Лейбл + Инпут) */
.form-group {
    text-align: left;
}

.auth-label {
    display: block;
    color: #e0e0e0;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 500;
    margin-left: 5px;
}

/* СТИЛЬ ИНПУТОВ */
.auth-input {
    width: 100%;
    height: 50px;
    background: #324a5e;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 20px;
    color: white;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s;
}

.auth-input:focus {
    border-color: #58BFFF;
    background: #3b566d;
    box-shadow: 0 0 15px rgba(88, 191, 255, 0.2);
}

/* Ссылка "Забыли пароль?" */
.forgot-pass-link {
    display: inline-block;
    margin-top: 10px;
    color: #584a75;
    color: #8daabf !important;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    width: 100%;
    text-align: right;
}
.forgot-pass-link:hover { color: white !important; }

/* Загрузка файла (вернем рамку) */
.file-upload-group {
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px dashed rgba(88, 191, 255, 0.3);
    transition: border-color 0.3s;
}
.file-upload-group:hover {
    border-color: #58BFFF;
    background: rgba(88, 191, 255, 0.05);
}
.file-label {
    cursor: pointer;
    color: #e0e0e0;
    display: block;
    font-size: 0.9rem;
}
.file-icon { font-size: 1.5rem; display: block; margin-bottom: 5px; }

.auth-btn {
    width: 100%; margin-top: 10px; padding: 15px; border-radius: 12px; font-size: 1.1rem;
}

.auth-footer {
    margin-top: 30px;
    color: #808080;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
}
.auth-footer a { color: white; font-weight: 600; text-decoration: none; }

/* --- ПРОФИЛЬ --- */

.profile-card {
    background: #1A222B;
    border-radius: 30px;
    display: flex;
    overflow: hidden;
    min-height: 700px;
    margin-bottom: 80px;
    border: 1px solid rgba(88, 191, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.profile-sidebar {
    width: 350px; flex-shrink: 0; background: rgba(0,0,0,0.2); padding: 60px 30px;
    display: flex; flex-direction: column; align-items: center; border-right: 1px solid rgba(255,255,255,0.05);
}
.avatar-circle {
    width: 160px; height: 160px; border-radius: 50%; background-color: #d9d9d9; margin-bottom: 30px;
}
.profile-name-display { color: white; font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: 30px; }
.profile-stats { margin-top: auto; text-align: center; color: #8daabf; line-height: 2; }

.profile-main { flex: 1; padding: 60px 80px; }
.profile-section-title { color: white; font-size: 1.8rem; margin-bottom: 40px; text-align: center; font-weight: 700; }
.profile-form { display: flex; flex-direction: column; gap: 25px; }
.profile-form label { display: block; color: white; margin-bottom: 10px; font-weight: 600; margin-left: 5px; }

/* --- ТУМБЛЕРЫ (TOGGLE SWITCH) --- */
.visibility-section {
    background: rgba(30, 48, 65, 0.4);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex; flex-direction: column; gap: 20px;
}
.visibility-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.visibility-hint { color: #8daabf; font-size: 0.8rem; }

/* Контейнер поля с тумблером */
.toggle-field-wrapper {
    position: relative;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 5px 60px 5px 5px;
    display: flex; align-items: center;
}
.toggle-field-wrapper .auth-input {
    background: transparent; border: none; height: 40px; padding: 0 10px;
}
.toggle-field-wrapper .auth-input:focus { box-shadow: none; }

/* Сам переключатель */
.switch {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #4a5d6e;
    transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: "";
    height: 16px; width: 16px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
/* Состояние ВКЛ */
input:checked + .slider { background-color: #58BFFF; }
input:checked + .slider:before { transform: translateX(18px); }

/* Ряды */
.form-row { display: flex; gap: 30px; width: 100%; }
.form-row > div { flex: 1; }

@media (max-width: 900px) {
    .profile-card { flex-direction: column; }
    .profile-sidebar { width: 100%; border-right: none; }
    .profile-main { padding: 30px; }
    .form-row { flex-direction: column; gap: 20px; }
}

/* --- АДМИН ПАНЕЛЬ --- */

.admin-card {
    background: rgba(22, 33, 44, 0.95);
    border: 1px solid rgba(88, 191, 255, 0.1);
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    min-height: 700px;
    display: flex;
    overflow: hidden;
    margin-bottom: 80px;
}

/* ЛЕВЫЙ САЙДБАР */
.admin-sidebar {
    width: 300px;
    background: rgba(0,0,0,0.2);
    border-right: 2px solid rgba(255,255,255,0.05);
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: block;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 40px;
    padding-left: 10px;
    text-decoration: none;
    transition: opacity 0.2s;
    cursor: pointer;
}
.sidebar-header:hover {
    opacity: 0.8;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-nav-link {
    display: block;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px 10px;
    transition: color 0.2s;
}

.admin-nav-link:hover {
    color: white;
}

/* Активный пункт меню (Синий) */
.admin-nav-link.active {
    color: #58BFFF;
}

/* Подпункты */
.nav-subitems {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    margin-left: 20px;
    gap: 8px;
    margin-bottom: 10px;
}

.sub-link {
    color: #b0b0b0;
    font-size: 1rem;

    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
    display: block;
    padding: 3px 0;
}

.sub-link:hover {
    color: white;
    transform: translateX(5px);
}

.exit-link {
    margin-top: 40px;
    color: #e0e0e0;
}

/* ПРАВАЯ ЧАСТЬ */
.admin-content-area {
    flex: 1;
    padding: 60px 80px;
}

.admin-section-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    text-align: center;
}

/* ПЛИТКИ НАВИГАЦИИ (БОЛЬШИЕ КНОПКИ) */
.admin-grid-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.three-cols { grid-template-columns: repeat(3, 1fr); }

.admin-tile {
    background: linear-gradient(145deg, #2c3e50 0%, #202b36 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.admin-tile:hover {
    transform: translateY(-5px);
    border-color: #58BFFF;
    box-shadow: 0 15px 40px rgba(88, 191, 255, 0.1);
}

.admin-tile span {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

/* КАРТОЧКИ СТАТИСТИКИ (ДАШБОРД) */
.admin-stats-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.stat-card {
    background: linear-gradient(145deg, #2c3e50 0%, #202b36 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    width: 250px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.stat-card:hover {
    transform: translateY(-5px);
    border-color: #58BFFF;
}

.stat-title {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.stat-value {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Адаптив */
@media (max-width: 900px) {
    .admin-card { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 2px solid rgba(255,255,255,0.05); }
    .admin-grid-menu { grid-template-columns: 1fr; }
    .admin-stats-grid { flex-direction: column; align-items: center; }
}

/* --- СПИСКИ ПОЛЬЗОВАТЕЛЕЙ (ADMIN) --- */

/* Заголовок-хлебные крошки */
.page-breadcrumb {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

/* Поле поиска */
.admin-search-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.admin-search-input {
    width: 100%;
    background: rgba(30, 48, 65, 0.6);
    border: 1px solid rgba(88, 191, 255, 0.2);
    border-radius: 12px;
    padding: 15px 50px 15px 20px;
    color: white;
    font-size: 1rem;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
    transition: all 0.2s;
    height: 54px;
}

.search-icon-svg {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
/* Строка пользователя */
.user-row {
    display: flex;
    align-items: center;
    background: rgba(30, 48, 65, 0.6);
    border-radius: 50px;
    padding: 15px 30px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.2s;
}
.user-row:hover {
    transform: translateX(5px);
    border-color: rgba(88, 191, 255, 0.3);
}

.admin-search-input:focus + .search-icon-svg path {
    stroke: #58BFFF;
    stroke-width: 2.5;
    filter: drop-shadow(0 0 5px rgba(88, 191, 255, 0.8));
    transition: all 0.3s;
}

/* Сама иконка по умолчанию */
.search-icon-svg path {
    stroke: #5a6b7c;
    transition: all 0.3s;
}

/* Цветная полоска статуса слева */
.status-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 8px;
}
.status-wait .status-bar { background: #58BFFF; box-shadow: 0 0 10px #58BFFF; }
.status-accepted .status-bar { background: #4CAF50; box-shadow: 0 0 10px #4CAF50; }
.status-declined .status-bar { background: #F44336; box-shadow: 0 0 10px #F44336; }
.status-blocked .status-bar { background: #808080; }

/* Аватар */
.user-row-avatar {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: #d9d9d9;
    margin-right: 20px;
    margin-left: 10px;
}

/* Инфо */
.user-row-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.info-date { color: white; font-size: 0.75rem; font-weight: 600; }
.info-name { color: white; font-size: 0.95rem; font-weight: 700; }
.info-email { color: #a0a0a0; font-size: 0.85rem; }
.info-status-text { font-size: 0.8rem; margin-top: 2px; }

/* Текст статуса */
.st-wait { color: #58BFFF; }
.st-accept { color: #4CAF50; }
.st-decline { color: #F44336; }

/* Кнопки действий */
.user-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    opacity: 0.7;
    transition: all 0.2s;
    padding: 5px;
}
.action-btn:hover { opacity: 1; transform: scale(1.1); }
.btn-approve:hover { color: #4CAF50; }
.btn-reject:hover { color: #F44336; }
.btn-block:hover { color: #F44336; }

/* Активный подпункт меню */
.active-sub {
    color: #58BFFF !important;
    font-weight: 700;
}

/* --- ПАГИНАЦИЯ (ADMIN) --- */
.admin-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.page-btn:hover {
    background: rgba(88, 191, 255, 0.2);
    border-color: #58BFFF;
}

.page-btn.active {
    background: #58BFFF;
    color: #0f1621;
    font-weight: 700;
    border-color: #58BFFF;
}

/* --- МОДЕРАЦИЯ ТЕМ --- */

.topic-card {
    background: rgba(30, 48, 65, 0.6);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.topic-content {
    flex: 1;
    color: white;
}

.topic-header {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #e0e0e0;
}
.topic-header span { color: white; }

.topic-author {
    font-size: 0.9rem;
    color: #a0a0a0;
    font-weight: 600;
    margin-bottom: 15px;
}
.topic-author span { color: white; }

.topic-text {
    font-size: 0.85rem;
    color: #b0b0b0;
    line-height: 1.5;
    max-width: 90%;
}

/* Вертикальный стек кнопок справа */
.topic-actions-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255,255,255,0.1);
}

/* --- СТРУКТУРА РАЗДЕЛОВ --- */

.structure-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.structure-header-row .page-breadcrumb {
    flex: 1;
    width: auto;
    margin-bottom: 0;
    text-align: left;
}

/* Кнопка Плюс (+) */
.btn-add-section {
    background: none; border: none; cursor: pointer; color: white; transition: 0.2s;
}
.btn-add-section:hover { transform: scale(1.2); color: #58BFFF; }

.structure-row {
    background: rgba(30, 48, 65, 0.6);
    border-radius: 50px;
    padding: 15px 30px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s;
}
.structure-row:hover {
    border-color: rgba(88, 191, 255, 0.3);
    transform: translateX(5px);
}

.structure-title {
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.structure-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Кнопка сохранить внизу */
.structure-save-btn {
    display: block;
    margin: 40px auto 0;
    padding: 12px 40px;
    background: rgba(88, 191, 255, 0.2);
    border: 1px solid #58BFFF;
    color: white;
    border-radius: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}
.structure-save-btn:hover {
    background: #58BFFF;
    color: #0f1621;
}

.sortable-ghost {
    opacity: 0.4;
    background: #58BFFF;
    border: 1px dashed white;
}

/* Типографика для контента поста */
.content-typography {
    color: #e0e0e0;
    font-size: 1.05rem;
    line-height: 1.7;
}

.content-typography p {
    margin-bottom: 20px;
}

.content-typography ul {
    margin-bottom: 20px;
    padding-left: 25px;
}

.content-typography li {
    margin-bottom: 10px;
}

.content-typography b {
    color: white;
}

/* Эффект при наведении на вложения */
.attachment-item:hover img,
.attachment-item.file-card:hover {
    border-color: #58BFFF !important;
    opacity: 0.9;
}

/* --- UI МОДЕРАЦИИ (НОВЫЙ ДИЗАЙН) --- */

/* Контейнер страницы */
.moderation-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding-bottom: 100px;
}

/* Карточка автора (Слева) */
.author-sticky-card {
    width: 280px;
    flex-shrink: 0;
    background: rgba(22, 33, 44, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    position: sticky;
    top: 30px;
    backdrop-filter: blur(20px);
}

.author-meta-row {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: #8daabf;
}

/* Карточка контента (Справа) */
.content-reading-card {
    flex: 1;
    background: #161b22;
    border: 1px solid rgba(88, 191, 255, 0.1);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 0 50px rgba(0,0,0,0.3);
    min-height: 60vh;
}

/* Заголовок темы */
.topic-hero-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: 700;
}

.topic-meta-info {
    color: #5a6b7c;
    font-size: 0.9rem;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- ПЛАВАЮЩАЯ ПАНЕЛЬ ДЕЙСТВИЙ (DOCK) --- */
.moderation-dock-wrapper {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: auto;
}

.moderation-dock {
    background: rgba(30, 48, 65, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-radius: 100px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Кнопки в доке */
.dock-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.dock-btn:hover { transform: translateY(-3px); }

/* Цвета кнопок */
.btn-dock-approve {
    background: #4CAF50;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}
.btn-dock-approve:hover { background: #55c559; }

.btn-dock-reject {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ff6b6b;
}
.btn-dock-reject:hover { background: rgba(244, 67, 54, 0.1); color: #ff8787; }

.btn-dock-delete {
    width: 45px; height: 45px; padding: 0; justify-content: center;
    background: transparent;
    color: #8daabf;
}
.btn-dock-delete:hover { color: #e0e0e0; background: rgba(255,255,255,0.1); }

/* Разделитель в доке */
.dock-divider {
    width: 1px; height: 25px; background: rgba(255,255,255,0.1); margin: 0 5px;
}

/* --- РЕЖИМ ЧТЕНИЯ (LAYOUT) --- */
.reading-mode-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 120px;
}

/* --- РЕЖИМ ЧТЕНИЯ (FIX) --- */

.author-header-card {
    background: rgba(30, 48, 65, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 20px;

    /* ЖЕСТКОЕ ВЫРАВНИВАНИЕ ПО ЦЕНТРУ */
    display: flex;
    justify-content: space-between;
    align-items: center;

    backdrop-filter: blur(10px);
}

.author-info-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.small-avatar {
    width: 55px; height: 55px;
    border-radius: 50%;
    background: #d9d9d9;
    flex-shrink: 0;
    margin: 0;
}

/* Текстовый блок автора */
.author-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.a-name { color: white; font-weight: 700; font-size: 1.15rem; line-height: 1; }
.a-badge {
    background: rgba(88, 191, 255, 0.1); color: #58BFFF;
    font-size: 0.75rem; padding: 3px 10px; border-radius: 6px;
}
.a-meta { color: #8daabf; font-size: 0.95rem; line-height: 1; }


/* --- ЛИНИЯ-РАЗДЕЛИТЕЛЬ (МЯГКАЯ) --- */
.reading-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 30px 0 40px 0;
}

/* --- ВЛОЖЕНИЯ (FIX РАЗМЕРОВ) --- */

.attachments-grid-uniform {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Единая база для карточки */
.attach-card {
    position: relative;
    height: 160px;
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.attach-card:hover {
    border-color: #58BFFF;
    transform: translateY(-3px);
    background: rgba(255,255,255,0.06);
}

/* Картинка внутри карточки */
.attach-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Файл внутри карточки */
.attach-card.file-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.file-icon-box { margin-bottom: 12px; opacity: 0.9; }
.file-info-box { width: 100%; }

.file-name {
    color: white; font-size: 0.9rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-size { color: #5a6b7c; font-size: 0.8rem; margin-top: 5px; }

/* --- СПИСКИ КОНТЕНТА (НОВОСТИ / МАТЕРИАЛЫ) --- */

.content-list-row {
    background: rgba(30, 48, 65, 0.6);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, border-color 0.2s;
}

.content-list-row:hover {
    transform: translateX(5px);
    border-color: rgba(88, 191, 255, 0.3);
}

.content-info-meta { color: #8daabf; font-size: 0.85rem; margin-bottom: 5px; }
.content-info-title { color: white; font-weight: 600; font-size: 1rem; line-height: 1.4; }

/* --- ИНТЕРФЕЙС РЕДАКТОРА --- */

/* --- ИНТЕРФЕЙС РЕДАКТОРА (ОБНОВЛЕННЫЙ) --- */

.editor-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Левая колонка теперь растягивается по высоте */
.editor-main-col {
    flex: 1;
    background: rgba(30, 48, 65, 0.4);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 50px;
    min-height: 600px; /* Чтобы всегда было много места для текста */
    display: flex;
    flex-direction: column;
}

.editor-side-col {
    width: 320px;
    flex-shrink: 0;
    background: rgba(30, 48, 65, 0.4);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 30px;
    position: sticky;
    top: 30px;
}

.editor-section-title {
    color: white; font-size: 1.1rem; font-weight: 700; margin-bottom: 20px;
}

/* Поле заголовка */
.title-input-ghost {
    width: 100%; background: transparent; border: none;
    color: white; font-size: 2rem; font-weight: 700; font-family: 'Montserrat', sans-serif;
    outline: none; margin-bottom: 30px; line-height: 1.3;
}
.title-input-ghost::placeholder { color: #5a6b7c; font-weight: 600; }

/* Обложка */
.cover-upload-box {
    width: 100%; height: 200px;
    background: rgba(0,0,0,0.2); border: 1px dashed rgba(88,191,255,0.3);
    border-radius: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center;
    cursor: pointer; transition: 0.2s; color: white; margin-bottom: 20px;
}
.cover-upload-box:hover { background: rgba(88,191,255,0.1); border-color: #58BFFF; }

/* Выступающая вкладка "Файл" для материалов */
.material-file-tab {
    position: absolute;
    top: -45px;
    left: 20px;
    background: #31526b; /* Цвет активной вкладки из макета */
    color: white;
    padding: 12px 25px;
    border-radius: 12px 12px 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}
.material-file-tab:hover { background: #3b6382; }

/* --- СТИЛИЗАЦИЯ QUILL.JS ПОД ТЕМНУЮ ТЕМУ --- */

#editor-container {
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: #e0e0e0;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
}

/* Скрываем стандартные уродливые рамки Quill */
.ql-container.ql-snow {
    border: none !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1.1rem !important;
}

/* Панель инструментов (Тулбар) */
.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important; /* Только тонкая линия снизу */
    padding: 0 0 15px 0 !important;
    margin-bottom: 20px;
}

/* Цвета иконок на панели */
.ql-snow .ql-stroke { stroke: #8daabf !important; transition: 0.2s; }
.ql-snow .ql-fill { fill: #8daabf !important; transition: 0.2s; }
.ql-snow .ql-picker { color: #8daabf !important; transition: 0.2s; }

/* Ховер эффекты (голубые при наведении) */
.ql-snow button:hover .ql-stroke, .ql-snow button.ql-active .ql-stroke { stroke: #58BFFF !important; }
.ql-snow button:hover .ql-fill, .ql-snow button.ql-active .ql-fill { fill: #58BFFF !important; }
.ql-snow .ql-picker:hover { color: #58BFFF !important; }

/* ПОЛЕ ВВОДА ТЕКСТА (ЖЕСТКИЙ ФИКС) */
.ql-editor {
    padding: 0 !important;
    min-height: 400px !important; /* Увеличили минимальную высоту */
    color: #e0e0e0 !important; /* Текст будет белым/светло-серым */
    font-size: 1.1rem !important;
}

/* Фикс черного плейсхолдера */
.ql-editor.ql-blank::before {
    color: #8daabf !important; /* Светло-голубой вместо черного */
    font-style: normal !important;
    left: 0 !important;
    font-weight: 500 !important;
}

/* Картинки внутри текста (если вставлять по одной) */
.ql-editor img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- БЛОКИ ГАЛЕРЕИ И ФАЙЛОВ ПОД ТЕКСТОМ --- */
.news-extra-blocks {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.extra-block-title {
    color: white; font-weight: 600; font-size: 1.1rem; margin-bottom: 15px;
}

/* Зона загрузки файлов/фото */
.upload-dropzone {
    display: block; /* ВАЖНО: Фикс наезжания на текст */
    width: 100%;
    box-sizing: border-box;
    background: rgba(0,0,0,0.2);
    border: 1px dashed rgba(88,191,255,0.3);
    border-radius: 12px;
    padding: 30px 20px; /* Вернул нормальные отступы сюда */
    text-align: center;
    color: #8daabf;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
}

.upload-dropzone:hover {
    background: rgba(88,191,255,0.1);
    border-color: #58BFFF;
    color: white;
}

/* Сетка загруженных элементов */
.uploaded-items-grid {
    display: flex; gap: 15px; flex-wrap: wrap; margin-top: 15px;
}

.uploaded-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 0.85rem;
}
.uploaded-item .delete-icon {
    color: #F44336; cursor: pointer; margin-left: auto;
}

/* --- ПАНЕЛЬ ФИЛЬТРАЦИИ --- */
.filter-bar {
    display: flex;
    gap: 15px;
    background: rgba(30, 48, 65, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 40px;
    align-items: center;
    flex-wrap: wrap; /* Для адаптивности на мобильных */
}

.filter-group {
    position: relative;
    flex: 1;
    min-width: 150px;
}

.search-group {
    flex: 2; /* Поиск занимает больше места */
    min-width: 250px;
}

.filter-input, .filter-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 15px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
}

.search-group .filter-input {
    padding-left: 45px; /* Место под иконку */
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    stroke: #8daabf;
    pointer-events: none;
}

.filter-input:focus, .filter-select:focus {
    border-color: #58BFFF;
    background: rgba(0, 0, 0, 0.4);
}

/* Стилизация select (убираем дефолтную стрелку браузера и добавляем свою, если нужно, но пока ограничимся базой) */
.filter-select {
    appearance: none;
    cursor: pointer;
}
.filter-select option {
    background: #16212c;
    color: white;
}

.filter-submit {
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 0.95rem;
    height: 100%;
    white-space: nowrap;
}

.filter-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border-radius: 10px;
    text-decoration: none;
    transition: 0.2s;
}
.filter-reset:hover {
    background: #F44336;
    color: white;
}

.no-results {
    color: #8daabf;
    text-align: center;
    padding: 50px;
    font-size: 1.1rem;
    background: rgba(30, 48, 65, 0.3);
    border-radius: 16px;
}

/* Год в карточке материала (3-я строка в сетке) */
.material-year-tag {
    color: #58BFFF;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Год на детальной странице книги (Над авторами) */
.book-year-large {
    color: #58BFFF;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px; /* Отступ до авторов */
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    border-bottom: 1px solid rgba(88, 191, 255, 0.3);
    padding-bottom: 4px;
}

/* --- СТРУКТУРА РЕДАКТОРА --- */
.editor-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.dropzone-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* Зоны загрузки */
.file-dropzone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #1c242c;
    border: 1px dashed #3a4b5c;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    color: white;
    transition: background 0.3s, border-color 0.3s;
}
.file-dropzone.has-file {
    background: #4CAF50;
    border-color: #4CAF50;
}
.cover-dropzone {
    flex: 1;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1c242c;
    border: 1px dashed #3a4b5c;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: 0.3s;
}
.cover-dropzone img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Кнопки удаления файлов и материалов */
.btn-clear-cross {
    display: none;
    align-items: center;
    justify-content: center;
    background: #F44336;
    color: white;
    border: none;
    border-radius: 12px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0;
    transition: background 0.3s;
}
.btn-clear-cross.visible {
    display: flex;
}
.btn-clear-cross:hover {
    background: #d32f2f;
}
.btn-delete-full {
    width: 100%;
    border-radius: 12px;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    background: transparent;
    border: 2px solid #F44336;
    color: #F44336;
    cursor: pointer;
    transition: 0.3s;
}
.btn-delete-full:hover {
    background: #F44336;
    color: white;
}

/* Иконки действий в списках */
.list-actions-group {
    display: flex;
    gap: 15px;
    align-items: center;
}
.btn-icon-white {
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    padding: 0;
    text-decoration: none;
    transition: opacity 0.2s;
}
.btn-icon-white:hover {
    opacity: 0.7;
}
.modal-btn-uniform {
    height: 45px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-cancel-custom {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.btn-cancel-custom:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-save-custom {
    background-color: #58BFFF;
    color: #000;
}
.btn-save-custom:hover {
    background-color: #4AA5E0;
    transform: translateY(-2px);
}

.profile-avatar-wrapper:hover .avatar-overlay { opacity: 1 !important; }

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #8daabf !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 24px;
    height: 24px;
}

.password-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
}

.auth-btn-container {
    width: 100%;
    margin-top: 20px;
}

.btn-primary.auth-btn {
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

input::-ms-reveal,
input::-ms-clear {
    display: none;
}

input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
}

.thread-controls .btn-primary,
.forum-title + .btn-primary,
a.btn-primary[href*="/create"] {
    width: auto !important;
    flex: 0 0 auto !important;
    display: inline-block !important;
    padding: 12px 35px !important;
    white-space: nowrap;
}

/* --- БЕЙДЖИ СТАТУСА ТЕМЫ --- */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-badge.open {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.status-badge.closed {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.thread-closed {
    opacity: 0.6;
    filter: grayscale(30%);
    background: linear-gradient(90deg, rgba(30, 45, 60, 0.8) 0%, rgba(20, 30, 40, 0.5) 100%) !important;
}

.thread-closed:hover {
    opacity: 0.9;
    filter: grayscale(0%);
}

.materials-slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 50px auto;
    padding: 0 60px;
    box-sizing: border-box;

    --swiper-navigation-size: 25px;
}

.materials-slider-container .material-next,
.materials-slider-container .material-prev {
    color: #58BFFF !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    transition: 0.2s;
    margin-top: -12px !important;
}

.materials-slider-container .material-prev {
    left: 10px !important;
}

.materials-slider-container .material-next {
    right: 10px !important;
}

.materials-slider-container .material-next:hover,
.materials-slider-container .material-prev:hover {
    color: white !important;
}

.materials-slider-container .swiper-button-disabled,
.materials-slider-container .swiper-button-lock {
    display: none !important;
}

/* --- RESPONSIVE REFRESH --- */

html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

main {
    width: 100%;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

button,
input,
select,
textarea {
    max-width: 100%;
}

body.menu-open {
    overflow: hidden;
}

.wrapper,
.page-container,
.auth-wrapper {
    width: 100%;
}

.header {
    gap: 24px;
    position: relative;
    flex-wrap: nowrap;
}

.header-meta {
    margin-left: 0;
    display: none;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-shell {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 28px;
    margin-left: 64px;
}

.header-actions,
.header-controls,
.header-user-summary {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-actions {
    justify-content: flex-end;
    min-width: 0;
    margin-left: auto;
}

.nav-menu {
    gap: 40px;
}

.header-controls {
    min-width: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.header-user-summary {
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
}

.header-user-link {
    color: white;
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.25;
    text-decoration: none;
    transition: color 0.2s ease;
    max-width: 240px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-user-link:hover,
.header-admin-link:hover {
    color: #58BFFF;
}

.header-admin-link {
    color: #58BFFF;
    font-weight: 600;
}

.btn-logout {
    border-color: rgba(244, 67, 54, 0.4);
    color: #F44336;
    justify-content: center;
    font-weight: 600;
}

.notification-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%);
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.notification-wrapper:hover {
    border-color: rgba(88, 191, 255, 0.35);
    background: linear-gradient(180deg, rgba(88,191,255,0.14) 0%, rgba(88,191,255,0.05) 100%);
    transform: translateY(-1px);
}

.notification-wrapper svg {
    stroke: #dfe9f2 !important;
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    position: relative;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.menu-toggle:hover {
    border-color: rgba(88, 191, 255, 0.4);
    background: linear-gradient(180deg, rgba(88, 191, 255, 0.18) 0%, rgba(88, 191, 255, 0.06) 100%);
    box-shadow: 0 16px 30px rgba(10, 18, 26, 0.34);
    transform: translateY(-1px);
}

.menu-toggle[aria-expanded="true"] {
    border-color: rgba(88, 191, 255, 0.36);
    background: linear-gradient(180deg, rgba(88, 191, 255, 0.2) 0%, rgba(50, 110, 145, 0.08) 100%);
    box-shadow: 0 18px 34px rgba(8, 17, 24, 0.4);
}

.menu-toggle span {
    position: absolute;
    left: 50%;
    width: 20px;
    height: 2.5px;
    margin-left: -10px;
    border-radius: 999px;
    background: white;
    transform-origin: center;
    transition: top 0.25s ease, transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle span:nth-child(1) {
    top: 16px;
}

.menu-toggle span:nth-child(2) {
    top: 22px;
}

.menu-toggle span:nth-child(3) {
    top: 28px;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    top: 22px;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    top: 22px;
    transform: rotate(-45deg);
}

#notif-dropdown {
    max-width: min(92vw, 320px);
}

.hero-slider-container {
    height: min(78vh, 700px);
    min-height: 560px;
}

.hero-slide {
    padding-inline: 48px;
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(1.55rem, 2.4vw, 2.2rem);
    line-height: 1.16;
    margin-inline: auto;
}

.page-title,
.section-title,
.profile-section-title,
.auth-page-title {
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.news-grid-home,
.news-page-grid,
.archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid,
.attachments-grid-uniform,
.uploaded-items-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.forum-search-form,
.filter-bar,
.thread-controls,
.topic-page-header,
.structure-header-row,
.content-list-row,
.profile-topic-row,
.thread-controls-secondary,
.upload-controls,
.dropzone-container {
    width: 100%;
}

.forum-search-form input,
.filter-group,
.thread-info,
.user-row-info,
.content-info-title {
    min-width: 0;
}

.thread-controls-secondary,
.list-actions-group,
.structure-actions,
.user-actions {
    flex-wrap: wrap;
}

.thread-control-btn {
    white-space: nowrap;
}

.profile-topic-row,
.content-list-row,
.topic-card,
.structure-row,
.user-row {
    gap: 18px;
}

.profile-topic-meta,
.profile-topic-status {
    min-width: 0;
}

.profile-topic-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start !important;
}

.profile-topic-meta {
    flex: 1 1 auto;
}

.profile-topic-status {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-self: flex-start;
    margin-left: 0;
}

.forum-post,
.book-detail-card,
.conf-hero-section,
.contact-bottom-row {
    gap: 32px;
}

.book-description,
.article-body-text,
.post-body-text,
.requisites-text,
.contact-text {
    overflow-wrap: anywhere;
}

.pagination,
.admin-pagination {
    flex-wrap: wrap;
}

.modal-window,
.auth-card,
.wide-card {
    width: min(100%, 100%);
}

.auth-card {
    max-width: 450px;
}

.wide-card {
    width: min(100%, 760px);
    max-width: 760px;
}

.auth-input,
.filter-input,
.filter-select,
.admin-search-input {
    min-width: 0;
}

@media (max-width: 1180px) {
    .header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 16px;
        row-gap: 10px;
        padding: 20px 0;
    }

    .logo {
        justify-self: start;
    }

    .header-meta {
        display: flex;
        justify-self: end;
        margin-left: 0;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: 0;
    }

    .header-shell {
        display: flex;
        grid-column: 1 / -1;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding: 0 20px;
        margin-top: 0;
        margin-left: 0;
        border-radius: 24px;
        background: rgba(18, 28, 38, 0.96);
        border: 1px solid transparent;
        box-shadow: none;
        pointer-events: none;
        transform: translateY(-10px) scale(0.985);
        transform-origin: top center;
        transition: max-height 0.36s ease, opacity 0.24s ease, transform 0.24s ease, padding 0.24s ease, margin-top 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
    }

    .header-shell.is-open {
        max-height: 920px;
        opacity: 1;
        padding: 22px;
        margin-top: 8px;
        border-color: rgba(88, 191, 255, 0.16);
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .nav-menu {
        padding: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        border-radius: 0;
        background: transparent;
        border: none;
    }

    .nav-link {
        display: block;
        padding: 2px 0;
        border-radius: 0;
        border: none;
        background: transparent;
        color: #eef4f9;
        font-size: 1.06rem;
        font-weight: 600;
        letter-spacing: 0;
        transition: color 0.2s ease, opacity 0.2s ease;
    }

    .nav-link:hover {
        color: #58BFFF;
        background: transparent;
        transform: none;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 18px 0 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: transparent;
        border-radius: 0;
    }

    .header-controls {
        width: auto;
        display: flex;
        justify-content: center;
    }

    .header-user-summary {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        text-align: center;
    }

    .header-user-link {
        max-width: min(70vw, 340px);
        font-size: 1.05rem;
        font-weight: 700;
        text-align: center;
    }

    .header-controls .btn-small,
    .header-user-summary .btn-small {
        width: min(100%, 320px);
        text-align: center;
        margin: 0 auto;
    }

    #notif-badge {
        top: -4px !important;
        right: -6px !important;
        left: auto !important;
    }

    #notif-dropdown {
        position: absolute !important;
        top: calc(100% + 10px) !important;
        right: 0 !important;
        left: auto !important;
        transform: none !important;
        width: min(92vw, 340px) !important;
        max-width: min(92vw, 340px) !important;
        margin-top: 0;
        border-radius: 20px !important;
        overflow: hidden;
    }
}

@media (max-width: 1279px) {
    .wrapper {
        padding: 0 32px;
    }

    .hero-slide {
        padding-top: 180px;
    }

    .materials-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .profile-main,
    .admin-content-area {
        padding: 48px 40px;
    }
}

@media (max-width: 1024px) {
    .wrapper {
        padding: 0 24px;
    }

    .hero-slider-container {
        min-height: 0;
        height: auto;
        margin-bottom: 64px;
    }

    .heroSwiper {
        min-height: 560px;
    }

    .hero-slide {
        min-height: 560px;
        padding: 150px 32px 110px;
        align-items: center;
    }

    .heroSwiper .swiper-pagination,
    .swiper-pagination-vertical.swiper-pagination-bullets,
    .swiper-vertical > .swiper-pagination-bullets {
        inset: auto 0 28px 0 !important;
        transform: none !important;
        flex-direction: row;
        justify-content: center;
    }

    .news-grid-home,
    .news-page-grid,
    .archive-grid,
    .admin-grid-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .materials-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .book-detail-card,
    .conf-hero-section,
    .thread-controls,
    .topic-page-header,
    .structure-header-row,
    .contact-bottom-row,
    .content-list-row,
    .topic-card,
    .user-row {
        flex-direction: column;
        align-items: stretch !important;
    }

    .book-detail-card {
        padding: 40px;
    }

    .book-cover-side {
        width: min(100%, 320px);
        margin: 0 auto;
    }

    .structure-header-row {
        flex-direction: row;
        align-items: center !important;
        justify-content: space-between;
        gap: 16px;
    }

    .structure-header-row .page-breadcrumb {
        flex: 1;
        margin-bottom: 0;
    }

    .post-sidebar {
        width: 220px;
    }

    .thread-controls-primary,
    .thread-controls-secondary,
    .list-actions-group,
    .structure-actions,
    .user-actions {
        width: 100%;
    }

    .thread-controls-secondary,
    .list-actions-group,
    .structure-actions,
    .user-actions {
        justify-content: flex-start;
    }

    .auth-card {
        padding: 40px 32px;
    }

    .admin-card {
        border-radius: 24px;
    }

    .admin-sidebar,
    .profile-sidebar {
        padding: 36px 28px;
    }

    .admin-content-area,
    .profile-main {
        padding: 36px 28px;
    }

    .admin-stats-grid {
        flex-wrap: wrap;
    }

    .stat-card {
        width: calc(50% - 15px);
        min-width: 220px;
    }
}

@media (max-width: 768px) {
    .wrapper {
        padding: 0 18px;
    }

    .footer {
        padding: 28px 18px;
    }

    .footer-content {
        flex-wrap: wrap;
        gap: 16px 24px;
    }

    .page-section,
    .page-container {
        padding-top: 32px;
        padding-bottom: 56px;
    }

    .news-section,
    .topics-section,
    .materials-section {
        margin-bottom: 88px;
    }

    .page-title,
    .auth-page-title {
        font-size: 1.8rem;
        margin-bottom: 36px;
    }

    .section-title,
    .profile-section-title {
        font-size: 1.5rem;
        margin-bottom: 28px;
    }

    .heroSwiper {
        min-height: 480px;
    }

    .hero-slide {
        min-height: 480px;
        padding: 126px 18px 88px;
    }

    .hero-content h1 {
        font-size: clamp(1.3rem, 4vw, 1.75rem);
        margin-bottom: 28px;
    }

    .auth-form .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .auth-footer {
        white-space: normal;
    }

    .btn-primary,
    .btn-secondary,
    .btn-small {
        width: 100%;
        text-align: center;
    }

    .forum-search-form,
    .filter-bar,
    .upload-controls,
    .dropzone-container,
    .thread-controls-secondary,
    .post-header,
    .visibility-header {
        flex-direction: column;
        align-items: stretch !important;
    }

    .forum-search-form svg {
        display: none;
    }

    .search-group,
    .filter-group {
        min-width: 100%;
    }

    .filter-submit,
    .filter-reset,
    .forum-search-form .btn-small {
        width: 100%;
    }

    .news-grid-home,
    .news-page-grid,
    .archive-grid,
    .gallery-grid,
    .attachments-grid-uniform,
    .uploaded-items-grid,
    .admin-grid-menu,
    .materials-grid {
        grid-template-columns: 1fr !important;
    }

    .materials-slider-container,
    .slider-external-container {
        padding: 0 18px;
    }

    .materials-slider-container .material-next,
    .materials-slider-container .material-prev,
    .material-next,
    .material-prev {
        display: none !important;
    }

    .book-detail-card,
    .profile-card,
    .admin-card,
    .forum-post {
        border-radius: 22px;
    }

    .profile-topic-row {
        grid-template-columns: 1fr;
        align-items: stretch !important;
    }

    .profile-topic-status {
        width: auto;
        margin-left: 0;
        justify-content: flex-start;
    }

    .book-detail-card,
    .auth-card,
    .editor-main-col,
    .profile-main,
    .admin-content-area,
    .modal-body,
    .modal-footer {
        padding: 24px;
    }

    .profile-sidebar,
    .admin-sidebar {
        padding: 28px 20px;
    }

    .post-sidebar,
    .forum-post {
        width: 100%;
        min-height: 0;
    }

    .post-sidebar {
        padding: 18px;
        gap: 14px;
    }

    .author-stats,
    .author-academic-info {
        width: 100%;
        text-align: left !important;
    }

    .file-type,
    .file-card,
    .attachment-item.file-type {
        min-width: 0;
        width: 100%;
    }

    .file-card,
    .file-type {
        padding: 14px 16px;
    }

    .file-info-group {
        margin-right: 12px;
    }

    .btn-download::before {
        display: none;
    }

    .contact-card,
    .news-article-block,
    .news-sidebar,
    .topic-card,
    .structure-row,
    .user-row,
    .content-list-row {
        padding: 20px !important;
        border-radius: 20px !important;
    }

    .topic-actions-col {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-left: 0;
        padding-top: 16px;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .user-actions,
    .list-actions-group {
        justify-content: flex-start;
    }

    .content-list-row:hover,
    .user-row:hover,
    .forum-card:hover,
    .thread-card:hover,
    .structure-row:hover,
    .file-card:hover,
    .sidebar-card:hover,
    .topic-card:hover,
    .archive-card:hover,
    .news-card-home:hover,
    .news-tile:hover,
    .material-card:hover {
        transform: none;
    }

    .modal-window {
        max-height: 92vh;
        border-radius: 20px;
    }

    .modal-header {
        padding: 18px 24px;
    }

    .stat-card {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .wrapper {
        padding: 0 14px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .header {
        gap: 14px;
    }

    .header-shell {
        padding: 0 16px;
        border-radius: 20px;
    }

    .header-shell.is-open {
        padding: 18px 16px;
    }

    .header-actions,
    .header-controls,
    .header-user-summary {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .header-actions {
        padding: 16px 0 4px;
    }

    .header-user-summary {
        align-items: center;
        text-align: center;
    }

    .notification-wrapper {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .heroSwiper {
        min-height: 420px;
    }

    .hero-slide {
        min-height: 420px;
        padding: 110px 6px 78px;
    }

    .hero-content h1 {
        font-size: 1.12rem;
        line-height: 1.22;
    }

    .page-title,
    .auth-page-title {
        font-size: 1.55rem;
    }

    .pagination,
    .admin-pagination {
        gap: 8px;
    }

    .page-link,
    .page-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .auth-card,
    .book-detail-card,
    .editor-main-col,
    .profile-main,
    .modal-body,
    .modal-footer,
    .admin-content-area {
        padding: 20px;
    }

    .profile-sidebar,
    .admin-sidebar {
        padding: 24px 18px;
    }

    .topic-page-header .btn-primary,
    .thread-controls .btn-primary,
    .thread-control-btn {
        width: 100% !important;
        justify-content: center;
    }

    .status-badge {
        margin-left: 0;
    }

    .thread-card-right-group {
        width: 100%;
        justify-content: space-between;
        margin-left: 0 !important;
    }

    .thread-meta-row,
    .post-header-actions {
        gap: 10px !important;
    }

    .book-title-large {
        font-size: 1.7rem;
    }

    .book-authors-large {
        font-size: 1.2rem;
    }
}

@media (min-width: 1025px) {
    .thread-controls-secondary {
        width: auto !important;
    }
}

@media (max-width: 1024px) {
    .thread-controls {
        gap: 15px;
    }
    .thread-controls-secondary {
        flex-wrap: wrap;
        gap: 10px !important;
    }
}

@media (max-width: 560px) {
    .thread-controls-secondary {
        flex-direction: column;
        align-items: stretch !important;
    }
    .thread-control-btn {
        width: 100% !important;
        justify-content: center;
    }
}

.file-info-group,
.file-details {
    min-width: 0 !important;
}

.file-details .attach-name {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .forum-post {
        flex-direction: column !important;
    }

    .post-sidebar {
        width: 100% !important;
        padding: 15px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        box-sizing: border-box !important;

        display: grid !important;
        grid-template-columns: auto 1fr !important;
        grid-template-rows: auto auto !important;
        row-gap: 4px !important;
        column-gap: 15px !important;
    }

    .post-sidebar img,
    .post-sidebar .avatar-circle {
        width: 50px !important;
        height: 50px !important;
        margin: 0 !important;
        grid-row: 1 / 3 !important;
        grid-column: 1 !important;
    }

    .author-name {
        font-size: 1rem !important;
        margin: 0 !important;
        text-align: left !important;
        grid-row: 1 !important;
        grid-column: 2 !important;
        align-self: end !important;
    }

    .author-status {
        font-size: 0.85rem !important;
        margin: 0 !important;
        text-align: left !important;
        grid-row: 2 !important;
        grid-column: 2 !important;
        align-self: start !important;
    }

    .author-academic-info,
    .author-stats {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        grid-column: 1 / 3 !important;
        width: 100% !important;
        justify-content: flex-start !important;
        text-align: left !important;
        padding: 0 !important;
    }

    .author-academic-info {
        margin-top: 12px !important;
        padding-top: 10px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        gap: 10px 15px !important;
        font-size: 0.8rem !important;
    }

    .author-academic-info div {
        margin: 0 !important;
    }

    .author-stats {
        margin-top: 6px !important;
        gap: 10px 15px !important;
        font-size: 0.75rem !important;
        color: #8daabf !important;
    }

    .post-content {
        padding: 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .post-body-text {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }

    .attachments-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    .file-type,
    .attachment-item {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (min-width: 1181px) {
    .nav-menu {
        margin: 0 auto !important;
    }
}


.topic-actions-col {
    justify-content: center !important;
    gap: 12px !important;
}

.topic-actions-col a,
.topic-actions-col button {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #8daabf !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    text-decoration: none !important;
}

.topic-actions-col a:hover,
.topic-actions-col button:hover {
    background: rgba(88, 191, 255, 0.15) !important;
    border-color: #58BFFF !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(88, 191, 255, 0.2) !important;
}

.topic-actions-col svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
    stroke-width: 2px !important;
    fill: none !important;
}

body, html {
    max-width: 100vw;
    overflow-x: hidden;
}

.article-body-text {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
}

.article-body-text img,
.article-body-text video,
.article-body-text iframe,
.article-body-text table {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

.breadcrumbs,
.article-meta-top {
    display: flex;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

@media (max-width: 768px) {
    .article-main-title {
        font-size: 1.5rem !important; /* Уменьшаем огромный заголовок */
        line-height: 1.3 !important;
    }
    .article-meta-top {
        padding-bottom: 15px !important;
        margin-bottom: 20px !important;
    }

    .conf-hero-section {
        padding: 30px 20px !important; /* Убираем гигантские поля */
    }
    .conf-title {
        font-size: 1.4rem !important; /* Успокаиваем гигантский шрифт */
        line-height: 1.3 !important;
    }
    .conf-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 25px !important;
    }

    .conf-details-grid {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: center !important;
    }
    .conf-detail-item {
        justify-content: flex-start !important;
        width: 100%;
        max-width: 300px;
    }

    .conf-actions {
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }
    .btn-outline, .conf-actions .btn-primary {
        width: 100% !important;
        text-align: center !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }

    .conf-info-section {
        flex-direction: column !important;
        gap: 30px !important;
    }
    .conf-text-block h2 {
        font-size: 1.6rem !important;
    }
    .conf-stats-block {
        padding: 25px 20px !important;
    }
}

.hidden-gallery-item {
    display: none !important;
}

html, body {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

.article-body-text * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.article-body-text img,
.article-main-image img {
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

@media (max-width: 900px) {
    .news-detail-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .news-article-block {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;

        overflow: hidden !important;
    }
}
/* --- МОБИЛЬНАЯ АДАПТАЦИЯ ДЛЯ КУКИ И СОГЛАШЕНИЯ --- */
@media (max-width: 600px) {
    #cookie-banner {
        left: 16px !important;
        right: 16px !important;
        bottom: 24px !important;
        transform: none !important;
        max-width: calc(100% - 32px) !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Уменьшаем тиски отступов в соглашении, чтобы текст задышал */
    .agreement-card {
        padding: 24px 16px !important; /* Текст больше не сжато */
    }

    /* Адаптируем заголовок политики, чтобы он не съезжал */
    .agreement-card h1 {
        font-size: 1.4rem !important;
        line-height: 1.4 !important;
        margin-bottom: 20px !important;
    }

    /* Чуть уменьшаем внешние поля контейнера страницы */
    .page-container {
        padding: 30px 10px !important;
    }
}

/* --- Light theme corrective pass: page-wide background, cards and mobile hero --- */
html[data-theme="light"] body.site-body,
html[data-theme="light"] body.site-body:not(.home-page) {
    background:
        radial-gradient(ellipse 54% 40% at 12% 12%, rgba(121, 105, 232, 0.18), transparent 72%),
        radial-gradient(ellipse 48% 38% at 88% 10%, rgba(88, 191, 255, 0.24), transparent 70%),
        radial-gradient(ellipse 62% 48% at 84% 82%, rgba(34, 166, 204, 0.28), transparent 74%),
        radial-gradient(ellipse 50% 38% at 20% 88%, rgba(80, 131, 214, 0.14), transparent 72%),
        linear-gradient(115deg, #f6fbff 0%, #e9f5fc 44%, #d8edf8 100%) !important;
    background-attachment: fixed !important;
}

html[data-theme="light"] .wrapper,
html[data-theme="light"] .page-container,
html[data-theme="light"] .auth-wrapper,
html[data-theme="light"] .public-profile-page {
    background: transparent !important;
}

html[data-theme="light"] .page-container::before,
html[data-theme="light"] .page-container::after,
html[data-theme="light"] .auth-wrapper::before,
html[data-theme="light"] .auth-wrapper::after {
    content: none !important;
    display: none !important;
}

html[data-theme="light"] .materials-grid .material-card {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
}

html[data-theme="light"] .materials-grid .material-cover-wrapper {
    border: 1px solid rgba(35, 103, 143, 0.22) !important;
    border-radius: 16px !important;
    background:
        radial-gradient(ellipse 70% 54% at 80% 0%, rgba(88, 191, 255, 0.16), transparent 72%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(229, 243, 251, 0.72)) !important;
    box-shadow:
        0 22px 46px rgba(42, 90, 124, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
}

html[data-theme="light"] .materials-grid .material-card:hover .material-cover-wrapper {
    border-color: rgba(16, 111, 160, 0.36) !important;
    box-shadow:
        0 28px 54px rgba(42, 90, 124, 0.17),
        0 0 0 1px rgba(88, 191, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

html[data-theme="light"] .other-materials-section .swiper-slide {
    height: auto;
}

html[data-theme="light"] .other-materials-section .material-card {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
    max-width: 190px;
    margin: 0 auto;
}

html[data-theme="light"] .other-materials-section .material-info {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

html[data-theme="light"] .other-materials-section .material-cover-wrapper {
    border: 1px solid rgba(35, 103, 143, 0.2) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(ellipse 70% 54% at 80% 0%, rgba(88, 191, 255, 0.14), transparent 72%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(229, 243, 251, 0.72)) !important;
    box-shadow:
        0 22px 46px rgba(42, 90, 124, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
}

html[data-theme="light"] .other-materials-section .material-card:hover .material-cover-wrapper {
    border-color: rgba(16, 111, 160, 0.34) !important;
    box-shadow:
        0 28px 54px rgba(42, 90, 124, 0.17),
        0 0 0 1px rgba(88, 191, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

/* Final regression cleanup: search layering, light related cards, notifications. */
.forum-search-wrapper:focus-within {
    z-index: 2200 !important;
}

#live-search-results {
    z-index: 2400 !important;
    padding: 8px !important;
}

.live-search-empty {
    padding: 16px;
    color: #8daabf;
    text-align: center;
}

.live-search-item {
    display: block;
    padding: 13px 14px;
    border-radius: 14px;
    color: #f7fbff !important;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.live-search-item:hover,
.live-search-item:focus-visible {
    background: rgba(88, 191, 255, 0.1);
    transform: translateX(2px);
    outline: none;
}

.live-search-item-title,
.live-search-item-meta {
    display: block;
}

.live-search-item-title {
    margin-bottom: 4px;
    font-weight: 700;
}

.live-search-item-meta {
    color: #8daabf;
    font-size: 0.82rem;
}

.forum-search-page .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.forum-search-summary {
    margin-bottom: 30px;
    color: #8daabf;
    font-size: 1.1rem;
}

.forum-search-summary strong {
    color: #ffffff;
}

.forum-search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    text-decoration: none;
}

.forum-search-card-main {
    min-width: 0;
}

.forum-search-card-meta {
    margin-top: 8px;
    color: #8daabf;
    font-size: 0.88rem;
    line-height: 1.45;
}

.forum-search-empty-state {
    padding: 52px 28px;
    border: 1px dashed rgba(88, 191, 255, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(ellipse 60% 90% at 100% 0%, rgba(88, 191, 255, 0.08), transparent 72%),
        rgba(30, 48, 65, 0.24);
    color: #8daabf;
    text-align: center;
}

.forum-search-empty-state svg {
    margin-bottom: 15px;
    color: #8daabf;
}

.forum-search-empty-state p {
    margin: 6px 0 0;
    color: #5a6b7c;
}

.notif-list {
    max-height: min(420px, 58vh);
    scrollbar-width: thin;
    scrollbar-color: rgba(88, 191, 255, 0.4) transparent;
}

.notif-clear-btn:disabled {
    cursor: wait;
    opacity: 0.58;
}

.app-dialog-mark {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-dialog-mark::before {
    margin: -3px 0 0;
}

.app-dialog-error .app-dialog-mark::before,
.app-dialog-warning .app-dialog-mark::before {
    margin: 0;
}

html[data-theme="light"] .live-search-empty,
html[data-theme="light"] .live-search-item-meta,
html[data-theme="light"] .forum-search-summary,
html[data-theme="light"] .forum-search-card-meta {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .live-search-item,
html[data-theme="light"] .forum-search-summary strong {
    color: var(--light-text) !important;
}

html[data-theme="light"] .live-search-item:hover,
html[data-theme="light"] .live-search-item:focus-visible {
    background: rgba(88, 191, 255, 0.13) !important;
}

html[data-theme="light"] .forum-search-empty-state,
html[data-theme="light"] .no-results {
    border: 1px solid rgba(35, 103, 143, 0.2) !important;
    border-radius: 22px !important;
    background:
        radial-gradient(ellipse 54% 90% at 100% 0%, rgba(88, 191, 255, 0.14), transparent 70%),
        linear-gradient(145deg, rgba(252, 254, 255, 0.82), rgba(224, 242, 250, 0.62)) !important;
    box-shadow:
        0 18px 44px rgba(42, 90, 124, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
    color: var(--light-muted) !important;
}

html[data-theme="light"] .forum-search-empty-state svg {
    color: var(--light-soft) !important;
}

html[data-theme="light"] .forum-search-empty-state p {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .news-sidebar .sidebar-card {
    border: 1px solid rgba(35, 103, 143, 0.2) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(ellipse 58% 80% at 100% 0%, rgba(88, 191, 255, 0.13), transparent 70%),
        linear-gradient(145deg, rgba(252, 254, 255, 0.84), rgba(225, 242, 250, 0.64)) !important;
    box-shadow:
        0 16px 38px rgba(42, 90, 124, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

html[data-theme="light"] .news-sidebar .sidebar-card:hover,
html[data-theme="light"] .news-sidebar .sidebar-card:focus-visible {
    border-color: rgba(16, 111, 160, 0.32) !important;
    background:
        radial-gradient(ellipse 58% 80% at 100% 0%, rgba(88, 191, 255, 0.18), transparent 70%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(216, 239, 249, 0.76)) !important;
    transform: translateY(-2px);
}

html[data-theme="light"] .other-materials-section .material-info {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="light"] .notif-dropdown {
    width: 340px;
    border-color: rgba(35, 103, 143, 0.22) !important;
    background:
        radial-gradient(ellipse 70% 80% at 100% 0%, rgba(88, 191, 255, 0.16), transparent 72%),
        rgba(250, 254, 255, 0.96) !important;
}

html[data-theme="light"] .notif-dropdown-head {
    border-bottom-color: rgba(35, 103, 143, 0.14) !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .notif-clear-btn {
    color: var(--light-accent-dark) !important;
}

html[data-theme="light"] .notif-clear-btn:hover,
html[data-theme="light"] .notif-clear-btn:focus-visible {
    color: var(--light-accent-deep) !important;
}

html[data-theme="light"] .notif-item {
    border-bottom-color: rgba(35, 103, 143, 0.12) !important;
}

html[data-theme="light"] .notif-item:hover,
html[data-theme="light"] .notif-item:focus-visible,
html[data-theme="light"] .notif-item.is-unread {
    background: rgba(88, 191, 255, 0.12) !important;
}

html[data-theme="light"] .notif-item-text,
html[data-theme="light"] .notif-empty {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .notif-item-date {
    color: var(--light-soft) !important;
}

html[data-theme="light"] .app-dialog-mark {
    box-shadow: 0 16px 34px rgba(36, 125, 165, 0.22);
}

/* Final patch: light search, notifications and related cards. */
.forum-search-wrapper:focus-within {
    z-index: 2200 !important;
}

#live-search-results {
    z-index: 2400 !important;
    padding: 8px !important;
}

.live-search-empty {
    padding: 16px;
    color: #8daabf;
    text-align: center;
}

.live-search-item {
    display: block;
    padding: 13px 14px;
    border-radius: 14px;
    color: #f7fbff !important;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.live-search-item:hover,
.live-search-item:focus-visible {
    background: rgba(88, 191, 255, 0.1);
    transform: translateX(2px);
    outline: none;
}

.live-search-item-title {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.live-search-item-meta {
    display: block;
    color: #8daabf;
    font-size: 0.82rem;
}

.forum-search-page .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.forum-search-summary {
    margin-bottom: 30px;
    color: #8daabf;
    font-size: 1.1rem;
}

.forum-search-summary strong {
    color: #ffffff;
}

.forum-search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    text-decoration: none;
}

.forum-search-card-main {
    min-width: 0;
}

.forum-search-card-meta {
    margin-top: 8px;
    color: #8daabf;
    font-size: 0.88rem;
    line-height: 1.45;
}

.forum-search-empty-state {
    padding: 52px 28px;
    border: 1px dashed rgba(88, 191, 255, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(ellipse 60% 90% at 100% 0%, rgba(88, 191, 255, 0.08), transparent 72%),
        rgba(30, 48, 65, 0.24);
    color: #8daabf;
    text-align: center;
}

.forum-search-empty-state svg {
    margin-bottom: 15px;
    color: #8daabf;
}

.forum-search-empty-state p {
    margin: 6px 0 0;
    color: #5a6b7c;
}

.notif-list {
    max-height: min(420px, 58vh);
    scrollbar-width: thin;
    scrollbar-color: rgba(88, 191, 255, 0.4) transparent;
}

.notif-clear-btn:disabled {
    cursor: wait;
    opacity: 0.58;
}

.app-dialog-mark {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-dialog-mark::before {
    margin: -3px 0 0;
}

.app-dialog-error .app-dialog-mark::before,
.app-dialog-warning .app-dialog-mark::before {
    margin: 0;
}

html[data-theme="light"] .live-search-empty,
html[data-theme="light"] .live-search-item-meta {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .live-search-item {
    color: var(--light-text) !important;
}

html[data-theme="light"] .live-search-item:hover,
html[data-theme="light"] .live-search-item:focus-visible {
    background: rgba(88, 191, 255, 0.13) !important;
}

html[data-theme="light"] .forum-search-summary,
html[data-theme="light"] .forum-search-card-meta {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .forum-search-summary strong {
    color: var(--light-text) !important;
}

html[data-theme="light"] .forum-search-empty-state,
html[data-theme="light"] .no-results {
    border: 1px solid rgba(35, 103, 143, 0.2) !important;
    border-radius: 22px !important;
    background:
        radial-gradient(ellipse 54% 90% at 100% 0%, rgba(88, 191, 255, 0.14), transparent 70%),
        linear-gradient(145deg, rgba(252, 254, 255, 0.82), rgba(224, 242, 250, 0.62)) !important;
    box-shadow:
        0 18px 44px rgba(42, 90, 124, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
    color: var(--light-muted) !important;
}

html[data-theme="light"] .forum-search-empty-state svg {
    color: var(--light-soft) !important;
}

html[data-theme="light"] .forum-search-empty-state p {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .news-sidebar .sidebar-card {
    border: 1px solid rgba(35, 103, 143, 0.2) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(ellipse 58% 80% at 100% 0%, rgba(88, 191, 255, 0.13), transparent 70%),
        linear-gradient(145deg, rgba(252, 254, 255, 0.84), rgba(225, 242, 250, 0.64)) !important;
    box-shadow:
        0 16px 38px rgba(42, 90, 124, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

html[data-theme="light"] .news-sidebar .sidebar-card:hover,
html[data-theme="light"] .news-sidebar .sidebar-card:focus-visible {
    border-color: rgba(16, 111, 160, 0.32) !important;
    background:
        radial-gradient(ellipse 58% 80% at 100% 0%, rgba(88, 191, 255, 0.18), transparent 70%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(216, 239, 249, 0.76)) !important;
    transform: translateY(-2px);
}

html[data-theme="light"] .notif-dropdown {
    width: 340px;
    border-color: rgba(35, 103, 143, 0.22) !important;
    background:
        radial-gradient(ellipse 70% 80% at 100% 0%, rgba(88, 191, 255, 0.16), transparent 72%),
        rgba(250, 254, 255, 0.96) !important;
}

html[data-theme="light"] .notif-dropdown-head {
    border-bottom-color: rgba(35, 103, 143, 0.14) !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .notif-clear-btn {
    color: var(--light-accent-dark) !important;
}

html[data-theme="light"] .notif-clear-btn:hover,
html[data-theme="light"] .notif-clear-btn:focus-visible {
    color: var(--light-accent-deep) !important;
}

html[data-theme="light"] .notif-item {
    border-bottom-color: rgba(35, 103, 143, 0.12) !important;
}

html[data-theme="light"] .notif-item:hover,
html[data-theme="light"] .notif-item:focus-visible,
html[data-theme="light"] .notif-item.is-unread {
    background: rgba(88, 191, 255, 0.12) !important;
}

html[data-theme="light"] .notif-item-text,
html[data-theme="light"] .notif-empty {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .notif-item-date {
    color: var(--light-soft) !important;
}

html[data-theme="light"] .app-dialog-mark {
    box-shadow: 0 16px 34px rgba(36, 125, 165, 0.22);
}

html[data-theme="light"] .other-materials-section .material-card,
html[data-theme="light"] .other-materials-section .material-info {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="light"] .file-details .attach-name,
html[data-theme="light"] .image-type .attach-name,
html[data-theme="light"] .attach-name,
html[data-theme="light"] .file-name {
    color: var(--light-text) !important;
}

html[data-theme="light"] .auth-step {
    border-color: rgba(35, 103, 143, 0.18) !important;
    background: rgba(255, 255, 255, 0.34) !important;
    color: var(--light-muted) !important;
}

html[data-theme="light"] .auth-step span {
    color: var(--light-accent) !important;
}

html[data-theme="light"] .file-upload-group {
    border-color: rgba(88, 191, 255, 0.46) !important;
    background: rgba(244, 251, 255, 0.48) !important;
}

html[data-theme="light"] .file-label,
html[data-theme="light"] .file-icon,
html[data-theme="light"] #file-name-text,
html[data-theme="light"] .consent-label {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .menu-toggle span {
    background: var(--light-accent-deep) !important;
}

html[data-theme="light"] .menu-toggle {
    border-color: rgba(35, 103, 143, 0.22) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(222, 241, 251, 0.68)) !important;
    box-shadow: 0 12px 26px rgba(42, 90, 124, 0.12) !important;
}

@media (max-width: 768px) {
    .home-page-surface .home-forum-hero {
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 18px !important;
    }

    .home-page-surface .home-forum-swiper,
    .home-page-surface .home-forum-swiper .swiper-wrapper,
    .home-page-surface .home-forum-slide.hero-slide,
    .home-page-surface .home-forum-shell {
        height: auto !important;
        min-height: 0 !important;
    }

    .home-page-surface .home-forum-slide.hero-slide {
        padding: 0 0 72px !important;
    }

    .home-page-surface .home-forum-swiper .swiper-slide:not(.swiper-slide-active) {
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }

    .home-page-surface .home-forum-shell {
        display: block !important;
        overflow: hidden !important;
    }

    .home-page-surface .home-forum-content.hero-content {
        padding: 60px 12px 72px !important;
        min-height: 0 !important;
        max-width: none !important;
    }

    .home-page-surface .home-forum-content h1 {
        font-size: clamp(2.05rem, 12vw, 3.05rem) !important;
        line-height: 1.04 !important;
        max-width: 100% !important;
    }

    .home-page-surface .home-forum-content p {
        max-width: 100% !important;
    }

    .home-page-surface .home-forum-visual,
    .home-page-surface .hero-knowledge-map,
    .home-page-surface .ndt-hero-3d {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        opacity: 0 !important;
    }

    .home-page-surface .home-forum-controls {
        bottom: 18px !important;
    }

    .home-page-surface .home-forum-hero::after,
    .home-page-surface .home-forum-hero + .news-section::before {
        content: none !important;
        display: none !important;
    }

    .home-page-surface .home-forum-hero + .news-section {
        padding-top: 34px !important;
    }

html[data-theme="light"] .home-page-surface .home-forum-shell {
        background:
            radial-gradient(ellipse 78% 42% at 82% 88%, rgba(88, 191, 255, 0.24), transparent 72%),
            radial-gradient(ellipse 70% 46% at 42% 92%, rgba(111, 97, 227, 0.16), transparent 74%),
            linear-gradient(180deg, #f7fbff 0%, #ebf7fd 58%, #d9eff9 100%) !important;
    }
}

/* --- Final adaptive polish: hero spacing, readable controls, light avatars --- */
@media (min-width: 1400px) and (max-width: 1599px) {
    body.home-page .home-page-surface .home-forum-content h1 {
        width: min(700px, 50vw) !important;
        max-width: min(700px, 50vw) !important;
        font-size: clamp(3.45rem, 4.55vw, 4.8rem) !important;
    }

    body.home-page .home-page-surface .home-forum-content p {
        width: min(540px, 42vw) !important;
        max-width: min(540px, 42vw) !important;
    }

    body.home-page .home-page-surface .hero-knowledge-map {
        right: clamp(64px, 5.2vw, 96px) !important;
        top: 52% !important;
        width: clamp(420px, 32vw, 500px) !important;
        height: clamp(360px, 30vw, 460px) !important;
        transform: translateY(-50%) scale(0.94) !important;
        transform-origin: center !important;
    }
}

@media (min-width: 1600px) and (max-width: 1799px) {
    body.home-page .home-page-surface .home-forum-content h1 {
        width: min(720px, 46vw) !important;
        max-width: min(720px, 46vw) !important;
        font-size: clamp(3.7rem, 4.4vw, 5rem) !important;
    }

    body.home-page .home-page-surface .home-forum-content p {
        width: min(560px, 40vw) !important;
        max-width: min(560px, 40vw) !important;
    }

    body.home-page .home-page-surface .hero-knowledge-map {
        right: clamp(88px, 6vw, 124px) !important;
        top: 52% !important;
        width: clamp(460px, 31vw, 540px) !important;
        height: clamp(390px, 29vw, 480px) !important;
        transform: translateY(-50%) scale(0.96) !important;
        transform-origin: center !important;
    }
}

@media (max-width: 768px) {
    body.home-page .home-page-surface .home-forum-hero {
        height: calc(100svh - 92px) !important;
        min-height: 720px !important;
        margin-bottom: 0 !important;
    }

    body.home-page .home-page-surface .home-forum-swiper,
    body.home-page .home-page-surface .home-forum-swiper .swiper-wrapper,
    body.home-page .home-page-surface .home-forum-slide.hero-slide,
    body.home-page .home-page-surface .home-forum-shell {
        height: 100% !important;
        min-height: 100% !important;
    }

    body.home-page .home-page-surface .home-forum-slide.hero-slide {
        padding: 0 !important;
    }

    body.home-page .home-page-surface .home-forum-shell {
        display: block !important;
        background:
            radial-gradient(ellipse 92% 52% at 85% 52%, rgba(88, 191, 255, 0.18), transparent 72%),
            radial-gradient(ellipse 78% 56% at 64% 46%, rgba(96, 76, 225, 0.38), transparent 74%),
            linear-gradient(90deg, #030305 0%, #06070d 42%, #151340 70%, #123856 100%) !important;
    }

    body.home-page .home-page-surface .home-forum-content.hero-content {
        display: flex !important;
        min-height: 100% !important;
        max-width: none !important;
        padding: 0 12px 150px !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    body.home-page .home-page-surface .home-forum-content h1 {
        max-width: 100% !important;
        font-size: clamp(2.6rem, 12vw, 3.35rem) !important;
        line-height: 1.02 !important;
    }

    body.home-page .home-page-surface .home-forum-content p {
        max-width: 100% !important;
    }

    body.home-page .home-page-surface .home-forum-visual,
    body.home-page .home-page-surface .hero-knowledge-map,
    body.home-page .home-page-surface .ndt-hero-3d {
        display: none !important;
    }

    body.home-page .home-page-surface .home-forum-controls {
        bottom: 24px !important;
    }

    html[data-theme="light"] body.home-page .home-page-surface .home-forum-shell {
        background:
            radial-gradient(ellipse 86% 52% at 86% 52%, rgba(56, 167, 210, 0.24), transparent 72%),
            radial-gradient(ellipse 78% 56% at 62% 48%, rgba(113, 99, 228, 0.28), transparent 74%),
            linear-gradient(90deg, #f9fcff 0%, #edf8fd 40%, #dcecff 70%, #c8edf9 100%) !important;
    }
}

@media (max-width: 480px) {
    body.home-page .home-page-surface .home-forum-hero {
        height: calc(100svh - 100px) !important;
        min-height: 700px !important;
    }

    body.home-page .home-page-surface .home-forum-content.hero-content {
        padding: 0 10px 148px !important;
    }

    body.home-page .home-page-surface .home-forum-content h1 {
        font-size: clamp(2.45rem, 12.2vw, 3.15rem) !important;
    }
}

.home-page-continuation .center-btn .btn-secondary::before,
.home-page-continuation .center-btn .btn-secondary::after {
    content: none !important;
    display: none !important;
}

html[data-theme="light"] a.btn-primary,
html[data-theme="light"] button.btn-primary,
html[data-theme="light"] .btn-download-large,
html[data-theme="light"] .conference-material-card .btn-primary,
html[data-theme="light"] .conf-actions .btn-primary,
html[data-theme="light"] .home-page-continuation .center-btn .btn-secondary {
    color: #ffffff !important;
    text-shadow: 0 1px 0 rgba(0, 37, 58, 0.28) !important;
}

html[data-theme="light"] .notification-wrapper,
html[data-theme="light"] #notif-bell {
    border-color: rgba(21, 102, 142, 0.28) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(219, 241, 252, 0.74)) !important;
    color: var(--light-accent-deep) !important;
}

html[data-theme="light"] .notification-wrapper svg,
html[data-theme="light"] .notification-icon {
    color: var(--light-accent-deep) !important;
    opacity: 1 !important;
}

html[data-theme="light"] .notif-dropdown {
    border-color: rgba(21, 102, 142, 0.28) !important;
    background:
        radial-gradient(ellipse 62% 70% at 92% 0%, rgba(88, 191, 255, 0.18), transparent 72%),
        linear-gradient(145deg, rgba(252, 254, 255, 0.94), rgba(221, 241, 251, 0.9)) !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .notif-dropdown *,
html[data-theme="light"] .notif-dropdown-head,
html[data-theme="light"] .notif-item-text,
html[data-theme="light"] .notif-empty {
    color: var(--light-text) !important;
}

html[data-theme="light"] .notif-clear-btn,
html[data-theme="light"] .notif-item-date {
    color: var(--light-accent-deep) !important;
}

html[data-theme="light"] .avatar-circle,
html[data-theme="light"] .thread-avatar,
html[data-theme="light"] .author-avatar,
html[data-theme="light"] .public-profile-avatar-fallback,
html[data-theme="light"] #profile-avatar-placeholder,
html[data-theme="light"] .user-row-avatar,
html[data-theme="light"] .small-avatar {
    border-color: rgba(21, 102, 142, 0.26) !important;
    background:
        radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.96), rgba(215, 239, 251, 0.88) 45%, rgba(158, 204, 225, 0.72) 100%) !important;
    color: var(--light-accent-deep) !important;
    box-shadow:
        0 14px 32px rgba(42, 90, 124, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

html[data-theme="light"] .archive-year {
    border: 1px solid rgba(21, 102, 142, 0.24) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(209, 237, 250, 0.78)) !important;
    color: var(--light-accent-deep) !important;
    text-shadow: none !important;
    box-shadow:
        0 12px 28px rgba(42, 90, 124, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* --- Final responsive and UI polish pass --- */
.app-dialog-open {
    overflow: hidden;
}

.app-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(2, 6, 12, 0.7);
    backdrop-filter: blur(14px);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.app-dialog-backdrop.is-visible {
    opacity: 1;
}

.app-dialog {
    position: relative;
    width: min(100%, 480px);
    padding: 30px;
    border: 1px solid rgba(88, 191, 255, 0.24);
    border-radius: 26px;
    background:
        radial-gradient(ellipse 70% 60% at 100% 0%, rgba(88, 191, 255, 0.16), transparent 68%),
        linear-gradient(145deg, rgba(24, 38, 54, 0.98), rgba(8, 12, 20, 0.96));
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #f7fbff;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.18s ease;
}

.app-dialog-backdrop.is-visible .app-dialog {
    transform: translateY(0) scale(1);
}

.app-dialog-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: #dfeaf2;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}

.app-dialog-mark {
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(88, 191, 255, 0.95), rgba(62, 123, 153, 0.8));
    box-shadow: 0 16px 34px rgba(88, 191, 255, 0.24);
}

.app-dialog-mark::before {
    content: "";
    display: block;
    width: 18px;
    height: 9px;
    margin: 15px auto 0;
    border-left: 3px solid white;
    border-bottom: 3px solid white;
    transform: rotate(-45deg);
}

.app-dialog-error .app-dialog-mark::before,
.app-dialog-warning .app-dialog-mark::before {
    width: 4px;
    height: 18px;
    margin-top: 12px;
    border: 0;
    border-radius: 999px;
    background: white;
    transform: none;
}

.app-dialog-error .app-dialog-mark {
    background: linear-gradient(135deg, #ff6b6b, #d7364f);
}

.app-dialog-warning .app-dialog-mark {
    background: linear-gradient(135deg, #ffc35a, #e89122);
}

.app-dialog h2 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 1.35rem;
}

.app-dialog p {
    margin: 0;
    color: #c7d5df;
    line-height: 1.6;
}

.app-dialog-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 26px;
}

.app-dialog-confirm {
    min-width: 132px;
}

html[data-theme="light"] .app-dialog-backdrop {
    background: rgba(210, 229, 241, 0.64);
}

html[data-theme="light"] .app-dialog {
    border-color: rgba(35, 103, 143, 0.24);
    background:
        radial-gradient(ellipse 70% 60% at 100% 0%, rgba(88, 191, 255, 0.16), transparent 68%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(229, 243, 251, 0.94));
    box-shadow:
        0 28px 80px rgba(42, 90, 124, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
    color: var(--light-text);
}

html[data-theme="light"] .app-dialog h2 {
    color: var(--light-text);
}

html[data-theme="light"] .app-dialog p {
    color: var(--light-muted);
}

html[data-theme="light"] .app-dialog-close {
    border-color: rgba(35, 103, 143, 0.18);
    background: rgba(255, 255, 255, 0.68);
    color: var(--light-accent-deep);
}

.home-page-continuation .center-btn .btn-secondary::after {
    left: -96%;
    opacity: 0;
}

.home-page-continuation .center-btn .btn-secondary:hover::after,
.home-page-continuation .center-btn .btn-secondary:focus-visible::after {
    opacity: 1;
}

html[data-theme="light"] a.btn-primary,
html[data-theme="light"] button.btn-primary,
html[data-theme="light"] .btn-primary:not(:disabled),
html[data-theme="light"] .conf-actions .btn-primary,
html[data-theme="light"] .conference-material-card .btn-primary,
html[data-theme="light"] .btn-download-large {
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] .notification-wrapper {
    border-color: rgba(35, 103, 143, 0.26) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(222, 241, 251, 0.64)) !important;
    color: var(--light-accent-deep) !important;
    box-shadow:
        0 12px 26px rgba(42, 90, 124, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

html[data-theme="light"] .notification-wrapper svg,
html[data-theme="light"] .notification-icon {
    stroke: var(--light-accent-deep) !important;
    color: var(--light-accent-deep) !important;
    opacity: 1 !important;
}

html[data-theme="light"] .notif-dropdown {
    border-color: rgba(35, 103, 143, 0.24) !important;
    background:
        radial-gradient(ellipse 70% 60% at 94% 0%, rgba(88, 191, 255, 0.14), transparent 68%),
        linear-gradient(145deg, rgba(250, 254, 255, 0.96), rgba(229, 243, 251, 0.94)) !important;
    box-shadow: 0 22px 60px rgba(42, 90, 124, 0.18) !important;
}

html[data-theme="light"] .notif-dropdown-head,
html[data-theme="light"] .notif-item-text,
html[data-theme="light"] .notif-clear-btn {
    color: var(--light-text) !important;
}

html[data-theme="light"] .notif-empty,
html[data-theme="light"] .notif-item-date {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .notif-item:hover,
html[data-theme="light"] .notif-item:focus-visible,
html[data-theme="light"] .notif-item.is-unread {
    background: rgba(88, 191, 255, 0.12) !important;
}

html[data-theme="light"] .avatar-circle,
html[data-theme="light"] .thread-avatar,
html[data-theme="light"] .author-avatar,
html[data-theme="light"] .public-profile-avatar-fallback,
html[data-theme="light"] #profile-avatar-placeholder,
html[data-theme="light"] .user-row-avatar,
html[data-theme="light"] .small-avatar {
    border-color: rgba(35, 103, 143, 0.28) !important;
    background:
        radial-gradient(circle at 38% 28%, rgba(88, 191, 255, 0.28), transparent 44%),
        linear-gradient(145deg, #f7fcff, #cfe6f3) !important;
    color: var(--light-accent-deep) !important;
    box-shadow:
        0 16px 34px rgba(42, 90, 124, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

html[data-theme="light"] .avatar-circle svg,
html[data-theme="light"] .thread-avatar svg,
html[data-theme="light"] .author-avatar svg,
html[data-theme="light"] .public-profile-avatar-fallback svg,
html[data-theme="light"] #profile-avatar-placeholder svg {
    stroke: var(--light-accent-deep) !important;
}

html[data-theme="light"] .public-profile-sidebar {
    border-right-color: rgba(35, 103, 143, 0.18) !important;
    background:
        radial-gradient(ellipse 80% 58% at 50% 0%, rgba(88, 191, 255, 0.18), transparent 68%),
        linear-gradient(180deg, rgba(247, 252, 255, 0.78), rgba(218, 237, 248, 0.48)) !important;
}

html[data-theme="light"] .public-profile-stats div {
    border-color: rgba(35, 103, 143, 0.18) !important;
    background: rgba(255, 255, 255, 0.46) !important;
}

html[data-theme="light"] .agreement-card {
    border-color: rgba(35, 103, 143, 0.24) !important;
    background:
        radial-gradient(ellipse 58% 44% at 100% 0%, rgba(88, 191, 255, 0.14), transparent 70%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(230, 244, 252, 0.78)) !important;
    box-shadow:
        0 24px 70px rgba(42, 90, 124, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .agreement-card h1,
html[data-theme="light"] .agreement-card h2,
html[data-theme="light"] .agreement-card h3,
html[data-theme="light"] .agreement-card strong {
    color: var(--light-text) !important;
}

html[data-theme="light"] .agreement-card p,
html[data-theme="light"] .agreement-card li {
    color: var(--light-muted) !important;
}

@media (max-width: 1180px) {
    .theme-toggle-mobile {
        display: inline-flex !important;
    }

    .theme-toggle-desktop,
    .header-shell .theme-toggle-desktop {
        display: none !important;
    }

    .header-meta {
        display: flex !important;
        align-items: center;
        gap: 12px;
    }

    body.home-page .home-page-surface .hero-knowledge-map {
        display: none !important;
    }

    body.home-page .home-page-surface .home-forum-visual {
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        opacity: 1 !important;
    }
}

@media (min-width: 1181px) and (max-width: 1399px) {
    body.home-page .home-page-surface .home-forum-content h1 {
        width: min(650px, 52vw) !important;
        font-size: clamp(3rem, 4.7vw, 4.75rem) !important;
    }

    body.home-page .home-page-surface .home-forum-content p {
        width: min(520px, 44vw) !important;
    }

    body.home-page .home-page-surface .hero-knowledge-map {
        top: 52% !important;
        right: clamp(24px, 3.6vw, 54px) !important;
        width: clamp(330px, 28vw, 390px) !important;
        height: clamp(320px, 28vw, 370px) !important;
        opacity: 0.84 !important;
        transform: translateY(-50%) scale(0.88) !important;
        transform-origin: center right !important;
    }

    body.home-page .home-page-surface .map-core {
        width: 126px !important;
        height: 126px !important;
        border-radius: 32px !important;
    }

    body.home-page .home-page-surface .map-node {
        min-width: 112px !important;
        padding: 11px 13px !important;
        border-radius: 18px !important;
    }

    body.home-page .home-page-surface .map-node strong {
        font-size: 0.84rem !important;
    }

    body.home-page .home-page-surface .map-node span {
        font-size: 0.58rem !important;
    }
}

@media (max-width: 768px) {
    body.home-page .home-page-surface .home-forum-hero {
        height: calc(100svh - 92px) !important;
        min-height: 720px !important;
        margin-bottom: 0 !important;
    }

    body.home-page .home-page-surface .home-forum-swiper,
    body.home-page .home-page-surface .home-forum-swiper .swiper-wrapper,
    body.home-page .home-page-surface .home-forum-slide.hero-slide,
    body.home-page .home-page-surface .home-forum-shell {
        height: 100% !important;
        min-height: 100% !important;
    }

    body.home-page .home-page-surface .home-forum-slide.hero-slide {
        padding: 0 !important;
    }

    body.home-page .home-page-surface .home-forum-shell {
        display: block !important;
        background:
            radial-gradient(ellipse 78% 72% at 78% 34%, rgba(99, 56, 255, 0.26), transparent 74%),
            radial-gradient(ellipse 62% 58% at 92% 62%, rgba(88, 191, 255, 0.16), transparent 72%),
            linear-gradient(90deg, #040408 0%, #080916 43%, #17164a 72%, #0d2a3c 100%) !important;
    }

    body.home-page .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.84) 56%, rgba(0, 0, 0, 0.44) 82%, rgba(0, 0, 0, 0.18) 100%),
            radial-gradient(ellipse at 28% 52%, rgba(88, 191, 255, 0.08), transparent 44%) !important;
    }

    body.home-page .home-page-surface .home-forum-content.hero-content {
        display: flex !important;
        min-height: 100% !important;
        max-width: none !important;
        justify-content: center !important;
        padding: clamp(136px, 19svh, 220px) 10px 154px !important;
    }

    body.home-page .home-page-surface .home-forum-content h1 {
        width: min(100%, 460px) !important;
        font-size: clamp(2.45rem, 10.6vw, 3.35rem) !important;
        line-height: 1.03 !important;
        letter-spacing: -0.056em !important;
    }

    body.home-page .home-page-surface .home-forum-content p {
        width: min(100%, 450px) !important;
        max-width: 100% !important;
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    body.home-page .home-page-surface .home-forum-actions {
        width: min(100%, 360px) !important;
    }

    body.home-page .home-page-surface .home-forum-actions .btn-primary {
        width: 100% !important;
    }

    body.home-page .home-page-surface .home-forum-controls {
        bottom: 24px !important;
    }

    body.home-page .home-page-surface .home-forum-hero + .news-section,
    body.home-page .home-page-continuation {
        padding-top: 34px !important;
    }

    html[data-theme="light"] body.home-page .home-page-surface .home-forum-shell {
        background:
            radial-gradient(ellipse 82% 74% at 78% 34%, rgba(116, 138, 224, 0.22), transparent 74%),
            radial-gradient(ellipse 66% 58% at 94% 62%, rgba(88, 191, 255, 0.22), transparent 72%),
            linear-gradient(90deg, #f8fcff 0%, #edf8fd 42%, #d9e2fb 70%, #bfe5f5 100%) !important;
    }

    html[data-theme="light"] body.home-page .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(90deg, rgba(248, 252, 255, 0.96) 0%, rgba(246, 251, 255, 0.86) 56%, rgba(235, 245, 252, 0.5) 82%, rgba(235, 245, 252, 0.16) 100%),
            radial-gradient(ellipse at 28% 52%, rgba(88, 191, 255, 0.12), transparent 44%) !important;
    }
}

@media (max-width: 480px) {
    body.home-page .home-page-surface .home-forum-hero {
        height: calc(100svh - 100px) !important;
        min-height: 700px !important;
    }

    body.home-page .home-page-surface .home-forum-content.hero-content {
        padding: clamp(122px, 18svh, 210px) 10px 148px !important;
    }

    body.home-page .home-page-surface .home-forum-content h1 {
        font-size: clamp(2.3rem, 10.4vw, 3rem) !important;
    }
}

/* --- Last-mile mobile hero fit: prevent Swiper from stretching empty space --- */
@media (max-width: 768px) {
    .home-page-surface .home-forum-swiper,
    .home-page-surface .home-forum-swiper .swiper-wrapper,
    .home-page-surface .home-forum-slide.hero-slide {
        height: auto !important;
        min-height: 0 !important;
        align-items: flex-start !important;
    }

    .home-page-surface .home-forum-slide.hero-slide {
        padding: 0 0 72px !important;
    }

    .home-page-surface .home-forum-content.hero-content {
        justify-content: flex-start !important;
        padding: 60px 12px 72px !important;
    }

    .home-page-surface .home-forum-controls {
        bottom: 18px !important;
    }

    .home-page-surface .home-forum-hero {
        margin-bottom: 18px !important;
    }

    .home-page-surface .home-forum-hero + .news-section {
        padding-top: 34px !important;
    }
}

/* --- Mobile hero final fit: keep the first screen compact in both themes --- */
@media (max-width: 768px) {
    .home-page-surface .home-forum-swiper,
    .home-page-surface .home-forum-swiper .swiper-wrapper,
    .home-page-surface .home-forum-slide.hero-slide {
        height: auto !important;
        min-height: 0 !important;
        align-items: flex-start !important;
    }

    .home-page-surface .home-forum-slide.hero-slide {
        padding: 0 0 72px !important;
    }

    .home-page-surface .home-forum-content.hero-content {
        justify-content: flex-start !important;
        padding: 60px 12px 72px !important;
    }

    .home-page-surface .home-forum-controls {
        bottom: 18px !important;
    }

    .home-page-surface .home-forum-hero {
        margin-bottom: 18px !important;
    }

    .home-page-surface .home-forum-hero + .news-section {
        padding-top: 34px !important;
    }
}
/* --- HOME HERO: форумный экран в слайдере --- */
.home-forum-hero {
    height: min(82vh, 720px);
    min-height: 620px;
    margin: 18px 0 100px;
}

.home-forum-swiper {
    overflow: visible;
    border-radius: 34px;
}

.home-forum-slide.hero-slide {
    align-items: stretch;
    justify-content: center;
    min-height: 620px;
    padding: 0 28px 70px;
    text-align: left;
}

.home-forum-shell {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    width: min(100%, 1230px);
    min-height: 590px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(180, 230, 255, 0.16);
    border-radius: 34px;
    background:
        radial-gradient(circle at 17% 58%, rgba(88, 191, 255, 0.18), transparent 31%),
        radial-gradient(circle at 80% 28%, rgba(74, 105, 255, 0.14), transparent 32%),
        linear-gradient(145deg, rgba(12, 17, 27, 0.96), rgba(10, 18, 27, 0.86) 54%, rgba(4, 8, 13, 0.96));
    box-shadow:
        0 38px 90px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 90px rgba(88, 191, 255, 0.06);
}

.home-forum-shell::before,
.home-forum-shell::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.home-forum-shell::before {
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 84px 84px;
    mask-image: radial-gradient(circle at 50% 45%, black, transparent 78%);
    opacity: 0.32;
}

.home-forum-shell::after {
    width: 36%;
    height: 145%;
    right: -12%;
    top: -22%;
    border-left: 1px solid rgba(88, 191, 255, 0.16);
    background: linear-gradient(90deg, rgba(88, 191, 255, 0.07), transparent);
    transform: rotate(10deg);
}

.home-forum-topbar {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent);
}

.home-forum-brand,
.home-forum-tabs,
.home-forum-live {
    display: inline-flex;
    align-items: center;
}

.home-forum-brand {
    gap: 10px;
    color: white;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.home-forum-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background:
        linear-gradient(135deg, #58BFFF, #285d80),
        radial-gradient(circle, white, transparent);
    box-shadow: 0 0 24px rgba(88, 191, 255, 0.34);
}

.home-forum-tabs {
    gap: 8px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
}

.home-forum-tabs span {
    padding: 8px 13px;
    border-radius: 999px;
    color: #aeb9c6;
    font-size: 0.76rem;
    font-weight: 700;
}

.home-forum-tabs .active {
    color: white;
    background: rgba(88, 191, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(88, 191, 255, 0.2);
}

.home-forum-live {
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid rgba(88, 191, 255, 0.22);
    border-radius: 999px;
    color: #c6eaff;
    background: rgba(88, 191, 255, 0.08);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.home-forum-live span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #58BFFF;
    box-shadow: 0 0 0 5px rgba(88, 191, 255, 0.12), 0 0 18px rgba(88, 191, 255, 0.7);
    animation: homeForumPulse 2.4s ease-in-out infinite;
}

.home-forum-content.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
    padding: 54px 20px 0;
    text-align: center;
}

.home-forum-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px 14px;
    border: 1px solid rgba(88, 191, 255, 0.22);
    border-radius: 999px;
    color: #bcecff;
    background: rgba(88, 191, 255, 0.09);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.home-forum-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #58BFFF;
    box-shadow: 0 0 14px rgba(88, 191, 255, 0.8);
}

.home-forum-content h1 {
    max-width: 860px;
    margin: 0 auto 18px;
    color: white;
    font-size: clamp(2rem, 2.75vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.055em;
    text-align: center;
    text-wrap: balance;
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.58);
}

.home-forum-content p {
    max-width: 650px;
    margin: 0 auto 22px;
    color: #b9c7d3;
    font-size: 0.98rem;
    line-height: 1.7;
}

.home-forum-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.home-forum-actions .btn-primary {
    width: auto;
    min-width: 168px;
    padding: 14px 24px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: linear-gradient(92deg, #58BFFF, #357fa8 58%, #1d465f);
    box-shadow: 0 16px 34px rgba(22, 103, 145, 0.34);
}

.home-forum-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #d7e8f2;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.home-forum-link:hover {
    border-color: rgba(88, 191, 255, 0.48);
    background: rgba(88, 191, 255, 0.1);
    transform: translateY(-2px);
}

.home-forum-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(100%, 560px);
    min-height: 50px;
    margin: 0 auto 18px;
    padding: 0 14px 0 18px;
    border: 1px solid rgba(158, 214, 255, 0.2);
    border-radius: 16px;
    color: #94a6b6;
    background: rgba(6, 12, 20, 0.62);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.home-forum-search span {
    position: relative;
    padding-left: 24px;
    font-size: 0.88rem;
}

.home-forum-search span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(188, 236, 255, 0.72);
    border-radius: 50%;
    transform: translateY(-50%);
}

.home-forum-search strong {
    padding: 6px 9px;
    border-radius: 999px;
    color: #ffd88b;
    background: rgba(255, 185, 82, 0.12);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.home-forum-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: min(100%, 520px);
    margin: 0 auto;
}

.home-forum-stats div {
    min-height: 80px;
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: rgba(5, 10, 16, 0.64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.home-forum-stats strong,
.home-forum-stats span {
    display: block;
}

.home-forum-stats strong {
    margin-bottom: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 900;
}

.home-forum-stats span {
    color: #8da2b3;
    font-size: 0.74rem;
    line-height: 1.35;
}

.home-forum-visual {
    position: absolute;
    inset: 72px 0 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.home-forum-visual::before {
    content: "";
    position: absolute;
    left: -8%;
    bottom: 0;
    width: 48%;
    height: 62%;
    opacity: 0.52;
    background:
        radial-gradient(circle, rgba(88, 191, 255, 0.38) 1.5px, transparent 2.5px);
    background-size: 18px 18px;
    mask-image: radial-gradient(ellipse at 30% 66%, black, transparent 68%);
    animation: homeForumDrift 12s ease-in-out infinite;
}

.home-forum-visual::after {
    content: "";
    position: absolute;
    right: 10%;
    top: 9%;
    width: 36%;
    height: 70%;
    border-radius: 46% 54% 61% 39%;
    border: 1px solid rgba(88, 191, 255, 0.1);
    background:
        radial-gradient(circle at 38% 42%, rgba(88, 191, 255, 0.13), transparent 38%),
        rgba(255, 255, 255, 0.018);
    filter: blur(0.2px);
    animation: homeForumBlob 10s ease-in-out infinite;
}

.signal-orbit,
.signal-dot {
    position: absolute;
    display: block;
}

.signal-orbit {
    border: 1px solid rgba(88, 191, 255, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 34px rgba(88, 191, 255, 0.08);
}

.orbit-one {
    width: 260px;
    height: 260px;
    left: 9%;
    top: 18%;
    animation: homeForumOrbit 8s ease-in-out infinite;
}

.orbit-two {
    width: 430px;
    height: 430px;
    right: -6%;
    bottom: -12%;
    border-style: dashed;
    opacity: 0.7;
    animation: homeForumOrbit 12s ease-in-out infinite reverse;
}

.signal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #58BFFF;
    box-shadow: 0 0 0 7px rgba(88, 191, 255, 0.08), 0 0 22px rgba(88, 191, 255, 0.64);
    animation: homeForumPulse 3s ease-in-out infinite;
}

.dot-one {
    left: 33%;
    top: 30%;
}

.dot-two {
    right: 30%;
    top: 50%;
    animation-delay: 0.8s;
}

.dot-three {
    left: 42%;
    bottom: 24%;
    animation-delay: 1.4s;
}

.home-forum-cards {
    position: absolute;
    z-index: 2;
    left: 64px;
    right: 64px;
    bottom: 28px;
    display: none;
    justify-content: space-between;
    pointer-events: none;
}

.home-forum-cards article {
    width: min(270px, 24vw);
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    background: rgba(4, 9, 15, 0.68);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
}

.home-forum-cards article:nth-child(1) {
    animation: homeForumFloat 7s ease-in-out infinite;
}

.home-forum-cards article:nth-child(2) {
    animation: homeForumFloat 8.4s ease-in-out infinite reverse;
}

.home-forum-cards span,
.home-forum-cards strong,
.home-forum-cards em {
    display: block;
}

.home-forum-cards span {
    margin-bottom: 9px;
    color: #58BFFF;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.home-forum-cards strong {
    color: white;
    font-size: 0.94rem;
    line-height: 1.35;
}

.home-forum-cards em {
    margin-top: 12px;
    color: #8da2b3;
    font-size: 0.74rem;
    font-style: normal;
}

.home-forum-slide-standards .home-forum-shell {
    background:
        radial-gradient(circle at 22% 60%, rgba(109, 92, 255, 0.19), transparent 32%),
        radial-gradient(circle at 76% 30%, rgba(88, 191, 255, 0.14), transparent 34%),
        linear-gradient(145deg, rgba(13, 13, 27, 0.96), rgba(12, 18, 31, 0.9) 58%, rgba(4, 8, 13, 0.96));
}

.home-forum-slide-ndt .home-forum-shell {
    background:
        radial-gradient(circle at 18% 58%, rgba(88, 255, 210, 0.12), transparent 31%),
        radial-gradient(circle at 78% 28%, rgba(88, 191, 255, 0.18), transparent 34%),
        linear-gradient(145deg, rgba(8, 18, 23, 0.96), rgba(9, 18, 30, 0.9) 56%, rgba(4, 8, 13, 0.96));
}

.home-forum-swiper .swiper-pagination {
    right: 42px !important;
    gap: 12px;
}

.home-forum-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    opacity: 0.52;
}

.home-forum-swiper .swiper-pagination-bullet-active {
    background: #58BFFF;
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 22px rgba(88, 191, 255, 0.7);
}

@keyframes homeForumPulse {
    0%, 100% {
        opacity: 0.62;
        transform: scale(0.92);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes homeForumDrift {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    50% {
        transform: translate3d(18px, -10px, 0) rotate(2deg);
    }
}

@keyframes homeForumBlob {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        border-radius: 46% 54% 61% 39%;
    }
    50% {
        transform: translate3d(-16px, 10px, 0) scale(1.04);
        border-radius: 56% 44% 48% 52%;
    }
}

@keyframes homeForumOrbit {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    50% {
        transform: translate3d(8px, -12px, 0) rotate(8deg);
    }
}

@keyframes homeForumFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

@media (max-width: 1279px) {
    .home-forum-hero {
        min-height: 620px;
    }

    .home-forum-slide.hero-slide {
        min-height: 620px;
        padding-inline: 14px;
    }

    .home-forum-shell {
        min-height: 590px;
    }

    .home-forum-content.hero-content {
        padding-top: 60px;
    }

    .home-forum-cards {
        left: 38px;
        right: 38px;
    }
}

@media (max-width: 1024px) {
    .home-forum-hero {
        height: auto;
        min-height: 0;
        margin-bottom: 76px;
    }

    .home-forum-swiper {
        min-height: 0;
    }

    .home-forum-slide.hero-slide {
        min-height: 0;
        padding: 0 0 72px;
    }

    .home-forum-shell {
        min-height: 680px;
    }

    .home-forum-tabs {
        display: none;
    }

    .home-forum-content.hero-content {
        max-width: 680px;
        padding-top: 68px;
    }

    .home-forum-content h1 {
        font-size: clamp(2rem, 5vw, 3rem);
    }

    .home-forum-cards {
        left: 28px;
        right: 28px;
        bottom: 28px;
    }

    .home-forum-cards article {
        width: min(300px, 34vw);
    }

    .home-forum-swiper .swiper-pagination {
        inset: auto 0 24px 0 !important;
        flex-direction: row;
        justify-content: center;
    }

    .home-forum-swiper .swiper-pagination-bullet {
        width: 30px;
        height: 9px;
        margin: 0 !important;
    }
}

@media (max-width: 768px) {
    .home-forum-hero {
        margin-top: 8px;
        margin-bottom: 62px;
    }

    .home-forum-slide.hero-slide {
        padding-bottom: 58px;
    }

    .home-forum-shell {
        min-height: 720px;
        border-radius: 28px;
    }

    .home-forum-topbar {
        min-height: 64px;
        padding: 16px 18px;
    }

    .home-forum-brand {
        font-size: 0.92rem;
    }

    .home-forum-live {
        padding: 8px 10px;
        font-size: 0.66rem;
    }

    .home-forum-content.hero-content {
        padding: 54px 20px 0;
    }

    .home-forum-content h1 {
        font-size: clamp(1.72rem, 7vw, 2.34rem);
        line-height: 1.08;
    }

    .home-forum-content p {
        font-size: 0.9rem;
    }

    .home-forum-actions {
        flex-direction: column;
        align-items: stretch;
        width: min(100%, 360px);
        margin-inline: auto;
    }

    .home-forum-actions .btn-primary,
    .home-forum-link {
        width: 100%;
    }

    .home-forum-search {
        min-height: 50px;
    }

    .home-forum-stats {
        grid-template-columns: 1fr;
        max-width: 340px;
    }

    .home-forum-stats div {
        min-height: 72px;
    }

    .home-forum-cards,
    .home-forum-visual::after {
        display: none;
    }

    .home-forum-visual::before {
        width: 72%;
        height: 44%;
        opacity: 0.36;
    }

    .orbit-one {
        width: 190px;
        height: 190px;
        left: -20px;
        top: 16%;
    }

    .orbit-two {
        width: 300px;
        height: 300px;
        right: -150px;
        bottom: -60px;
    }
}

@media (max-width: 560px) {
    .home-forum-shell {
        min-height: 700px;
    }

    .home-forum-topbar {
        gap: 10px;
    }

    .home-forum-brand-mark {
        width: 24px;
        height: 24px;
    }

    .home-forum-live {
        letter-spacing: 0.04em;
    }

    .home-forum-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.09em;
    }

    .home-forum-content.hero-content {
        padding-top: 44px;
    }

    .home-forum-content h1 {
        font-size: 1.56rem;
    }

    .home-forum-search span {
        font-size: 0.78rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-forum-live span,
    .home-forum-visual::before,
    .home-forum-visual::after,
    .signal-orbit,
    .signal-dot,
    .home-forum-cards article {
        animation: none;
    }
}

/* --- HOME HERO: full-bleed версия, не карточка --- */
.home-forum-hero {
    width: 100vw;
    height: calc(100vh - 96px);
    min-height: 620px;
    margin: 0 calc(50% - 50vw) 110px;
}

.home-forum-swiper {
    height: 100%;
    overflow: hidden;
    border-radius: 0;
}

.home-forum-slide.hero-slide {
    min-height: 100%;
    padding: 0 0 70px;
}

.home-forum-shell {
    width: 100%;
    min-height: 100%;
    margin: 0;
    border-width: 1px 0;
    border-radius: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 110px rgba(88, 191, 255, 0.08);
}

.home-forum-topbar {
    padding-inline: max(32px, calc((100vw - 1220px) / 2));
}

.home-forum-content.hero-content {
    max-width: 980px;
    padding-top: clamp(58px, 8vh, 92px);
}

.home-forum-content h1 {
    max-width: 980px;
}

.home-forum-search,
.home-forum-stats {
    position: relative;
    z-index: 4;
}

.home-forum-swiper .swiper-pagination {
    right: max(28px, calc((100vw - 1220px) / 2)) !important;
}

@media (min-width: 1440px) {
    .home-forum-content h1 {
        font-size: clamp(2.6rem, 3.2vw, 4.1rem);
    }

    .home-forum-content p {
        font-size: 1.05rem;
    }
}

@media (max-width: 1024px) {
    .home-forum-hero {
        width: 100vw;
        height: auto;
        min-height: 0;
        margin: 0 calc(50% - 50vw) 80px;
    }

    .home-forum-swiper {
        overflow: hidden;
    }

    .home-forum-slide.hero-slide {
        min-height: 0;
        padding: 0 0 72px;
    }

    .home-forum-shell {
        min-height: 720px;
    }

    .home-forum-topbar {
        padding-inline: 24px;
    }
}

@media (max-width: 768px) {
    .home-forum-hero {
        margin-bottom: 66px;
    }

    .home-forum-shell {
        min-height: 760px;
        border-radius: 0;
    }

    .home-forum-content.hero-content {
        padding-top: 52px;
    }
}

@media (max-width: 560px) {
    .home-forum-shell {
        min-height: 735px;
    }

    .home-forum-topbar {
        padding-inline: 16px;
    }
}

/* --- HOME HERO: минимальная сцена без фиктивных метрик --- */
.home-forum-hero {
    height: calc(100svh - 96px);
    min-height: 620px;
    margin: 0 calc(50% - 50vw) 112px;
}

.home-forum-swiper {
    height: 100%;
    overflow: hidden;
    border-radius: 0;
}

.home-forum-slide.hero-slide {
    min-height: 100%;
    padding: 0;
}

.home-forum-shell {
    position: relative;
    display: block;
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 84% 18%, rgba(99, 56, 255, 0.32), transparent 26%),
        radial-gradient(circle at 18% 82%, rgba(88, 191, 255, 0.16), transparent 32%),
        linear-gradient(112deg, #040409 0%, #070711 42%, #0c1420 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.home-forum-shell::before,
.home-forum-shell::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.home-forum-shell::before {
    inset: 0;
    opacity: 0.72;
    background:
        linear-gradient(90deg, transparent 0 8%, rgba(107, 62, 255, 0.12) 11%, transparent 15% 24%, rgba(88, 191, 255, 0.09) 28%, transparent 34% 48%, rgba(138, 79, 255, 0.16) 52%, transparent 59% 74%, rgba(88, 191, 255, 0.08) 80%, transparent 88%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%);
    filter: blur(0.4px);
    animation: homeForumCurtain 11s ease-in-out infinite;
}

.home-forum-shell::after {
    inset: 0;
    border: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.58) 100%),
        radial-gradient(ellipse at 26% 50%, rgba(88, 191, 255, 0.13), transparent 35%);
    transform: none;
}

.home-forum-visual {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.home-forum-visual::before {
    content: "";
    position: absolute;
    left: 7%;
    right: 7%;
    bottom: 19%;
    height: 1px;
    opacity: 0.55;
    background: linear-gradient(90deg, transparent, rgba(88, 191, 255, 0.56), transparent);
    box-shadow:
        0 -88px 130px rgba(99, 56, 255, 0.22),
        0 54px 110px rgba(88, 191, 255, 0.12);
    animation: homeForumScan 7s ease-in-out infinite;
}

.home-forum-visual::after {
    content: "";
    position: absolute;
    right: 10%;
    top: 13%;
    width: min(36vw, 520px);
    height: min(54vh, 520px);
    border-radius: 48% 52% 44% 56%;
    background:
        radial-gradient(circle at 42% 36%, rgba(129, 83, 255, 0.34), transparent 32%),
        radial-gradient(circle at 58% 70%, rgba(88, 191, 255, 0.16), transparent 42%);
    filter: blur(18px);
    opacity: 0.68;
    animation: homeForumBlob 13s ease-in-out infinite;
}

.home-forum-topbar,
.home-forum-search,
.home-forum-stats,
.home-forum-cards {
    display: none !important;
}

.home-forum-content.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 1220px;
    min-height: calc(100svh - 96px);
    margin: 0 auto;
    padding: clamp(84px, 12vh, 132px) max(28px, calc((100vw - 1220px) / 2)) 110px;
    text-align: left;
}

.home-forum-kicker {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #9fe3ff;
    background: transparent;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.home-forum-kicker::before {
    content: "";
    width: 34px;
    height: 1px;
    border-radius: 0;
    background: #58BFFF;
    box-shadow: 0 0 18px rgba(88, 191, 255, 0.9);
}

.home-forum-content h1 {
    max-width: 780px;
    margin: 0 0 24px;
    color: white;
    font-size: clamp(2.8rem, 6.1vw, 6.4rem);
    line-height: 0.94;
    letter-spacing: -0.075em;
    text-align: left;
    text-wrap: balance;
    text-shadow: 0 20px 70px rgba(0, 0, 0, 0.66);
}

.home-forum-content p {
    max-width: 570px;
    margin: 0 0 34px;
    color: #c4ced9;
    font-size: clamp(1rem, 1.15vw, 1.16rem);
    line-height: 1.75;
}

.home-forum-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    margin-bottom: 0;
}

.home-forum-actions .btn-primary,
.home-forum-actions .home-forum-link {
    width: auto;
    min-width: 0;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.home-forum-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.88);
    color: #081019;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.home-forum-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
}

.home-forum-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e8f4ff;
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(10px);
    transition: border-color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.home-forum-link:hover {
    border-color: rgba(88, 191, 255, 0.5);
    background: rgba(88, 191, 255, 0.1);
    transform: translateY(-2px);
}

.home-forum-swiper .swiper-pagination {
    right: max(28px, calc((100vw - 1220px) / 2)) !important;
    bottom: auto !important;
    top: 50% !important;
    width: auto !important;
    transform: translateY(-50%);
    gap: 12px;
}

.home-forum-swiper .swiper-pagination-bullet {
    width: 7px;
    height: 38px;
    margin: 0 !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    opacity: 0.58;
}

.home-forum-swiper .swiper-pagination-bullet-active {
    background: #58BFFF;
    opacity: 1;
    box-shadow: 0 0 22px rgba(88, 191, 255, 0.72);
}

.home-forum-slide-standards .home-forum-shell {
    background:
        radial-gradient(circle at 78% 15%, rgba(119, 75, 255, 0.3), transparent 28%),
        radial-gradient(circle at 20% 80%, rgba(88, 191, 255, 0.13), transparent 32%),
        linear-gradient(112deg, #050409 0%, #090615 48%, #0c1320 100%);
}

.home-forum-slide-ndt .home-forum-shell {
    background:
        radial-gradient(circle at 82% 20%, rgba(88, 191, 255, 0.28), transparent 27%),
        radial-gradient(circle at 18% 82%, rgba(88, 255, 210, 0.12), transparent 32%),
        linear-gradient(112deg, #030707 0%, #061015 46%, #0b1420 100%);
}

@keyframes homeForumCurtain {
    0%, 100% {
        transform: translateX(-1.5%);
        opacity: 0.58;
    }
    50% {
        transform: translateX(1.5%);
        opacity: 0.82;
    }
}

@keyframes homeForumScan {
    0%, 100% {
        transform: translateY(0) scaleX(0.92);
        opacity: 0.38;
    }
    50% {
        transform: translateY(-36px) scaleX(1);
        opacity: 0.7;
    }
}

@media (min-width: 1440px) {
    .home-forum-content h1 {
        font-size: clamp(4.4rem, 5.7vw, 7.2rem);
    }
}

@media (max-width: 1024px) {
    .home-forum-hero {
        height: auto;
        min-height: 0;
        margin-bottom: 82px;
    }

    .home-forum-shell,
    .home-forum-content.hero-content {
        min-height: 720px;
    }

    .home-forum-content.hero-content {
        padding: 96px 28px 92px;
    }

    .home-forum-content h1 {
        max-width: 720px;
        font-size: clamp(3rem, 9vw, 5rem);
    }

    .home-forum-swiper .swiper-pagination {
        inset: auto 0 28px 0 !important;
        flex-direction: row;
        justify-content: center;
        transform: none;
    }

    .home-forum-swiper .swiper-pagination-bullet {
        width: 32px;
        height: 7px;
    }
}

@media (max-width: 768px) {
    .home-forum-hero {
        margin-top: 0;
        margin-bottom: 66px;
        min-height: max(690px, calc(100svh - 104px));
    }

    .home-forum-shell,
    .home-forum-content.hero-content {
        min-height: max(690px, calc(100svh - 104px));
    }

    .home-forum-content.hero-content {
        justify-content: flex-end;
        padding: 86px 20px 96px;
    }

    .home-forum-content h1 {
        font-size: clamp(2.48rem, 12vw, 4rem);
        line-height: 0.98;
    }

    .home-forum-content p {
        font-size: 0.96rem;
        line-height: 1.68;
    }

    .home-forum-actions {
        flex-direction: column;
        align-items: stretch;
        width: min(100%, 360px);
    }

    .home-forum-actions .btn-primary,
    .home-forum-actions .home-forum-link {
        width: 100%;
    }

    .home-forum-visual::after {
        right: -18%;
        top: 8%;
        width: 92vw;
        height: 42vh;
        opacity: 0.58;
    }
}

@media (max-width: 560px) {
    .home-forum-shell,
    .home-forum-content.hero-content {
        min-height: max(650px, calc(100svh - 104px));
    }

    .home-forum-content.hero-content {
        padding: 72px 16px 90px;
    }

    .home-forum-kicker {
        font-size: 0.64rem;
        letter-spacing: 0.12em;
    }

    .home-forum-kicker::before {
        width: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-forum-shell::before,
    .home-forum-visual::before,
    .home-forum-visual::after {
        animation: none;
    }
}

/* --- HOME HERO: фикс композиции, чтобы сцена не разъезжалась --- */
.home-forum-hero,
.home-forum-hero * {
    box-sizing: border-box;
}

.home-forum-hero {
    min-height: 620px;
}

.home-forum-slide.hero-slide {
    display: block;
    align-items: initial;
    justify-content: initial;
    min-height: 100%;
    padding: 0;
    text-align: left;
}

.home-forum-shell {
    min-height: 100%;
}

.home-forum-content.hero-content {
    width: 100%;
    max-width: none;
    min-height: calc(100svh - 96px);
    margin: 0;
    padding:
        clamp(92px, 12vh, 150px)
        clamp(48px, 9vw, 180px)
        118px;
}

.home-forum-content h1 {
    width: min(860px, 76vw);
    max-width: none;
    font-size: clamp(3rem, 5vw, 5.7rem);
}

.home-forum-content p {
    width: min(620px, 48vw);
    max-width: none;
}

.home-forum-actions .btn-primary {
    min-width: 188px;
    min-height: 50px;
    padding: 0 28px;
    line-height: 1;
}

.home-forum-swiper .swiper-pagination {
    right: clamp(24px, 4vw, 84px) !important;
}

@media (min-width: 1600px) {
    .home-forum-content.hero-content {
        padding-left: clamp(120px, 8vw, 170px);
    }
}

@media (max-width: 1024px) {
    .home-forum-content.hero-content {
        min-height: 720px;
        padding: 96px 28px 96px;
    }

    .home-forum-content h1 {
        width: min(720px, 88vw);
        font-size: clamp(3rem, 9vw, 5rem);
    }

    .home-forum-content p {
        width: min(620px, 78vw);
    }

    .home-forum-swiper .swiper-pagination {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .home-forum-hero {
        min-height: max(690px, calc(100svh - 104px));
    }

    .home-forum-shell,
    .home-forum-content.hero-content {
        min-height: max(690px, calc(100svh - 104px));
    }

    .home-forum-content.hero-content {
        justify-content: center;
        padding: 72px 16px 92px;
    }

    .home-forum-content h1 {
        width: 100%;
        font-size: clamp(2.32rem, 11vw, 3.6rem);
        line-height: 1;
        letter-spacing: -0.068em;
    }

    .home-forum-content p {
        width: 100%;
    }

    .home-forum-actions {
        width: 100%;
    }

    .home-forum-actions .btn-primary {
        width: min(100%, 360px);
        min-height: 50px;
    }
}

@media (max-width: 420px) {
    .home-forum-content h1 {
        font-size: clamp(2.1rem, 10.3vw, 2.85rem);
    }

    .home-forum-kicker {
        gap: 10px;
        letter-spacing: 0.1em;
    }
}

/* --- HOME HERO: слайдер и мягкий переход к странице --- */
.home-forum-hero {
    position: relative;
    margin-bottom: 0;
    overflow: visible;
}

.home-forum-hero::after {
    content: "";
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: -190px;
    width: 100vw;
    height: 280px;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 74% 18%, rgba(88, 191, 255, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(4, 8, 13, 0) 0%, rgba(5, 8, 13, 0.82) 34%, rgba(18, 18, 20, 0.96) 72%, rgba(18, 18, 20, 0) 100%);
    transform: translateX(-50%);
}

.home-forum-hero + .news-section {
    position: relative;
    z-index: 5;
    margin-top: 0;
    padding-top: clamp(118px, 15vh, 178px);
}

.home-forum-hero + .news-section::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: -210px;
    width: 100vw;
    height: clamp(310px, 36vh, 430px);
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 22%, rgba(47, 0, 218, 0.16), transparent 34%),
        radial-gradient(circle at 88% 28%, rgba(88, 191, 255, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(5, 8, 13, 0.92), rgba(18, 18, 20, 0.74) 58%, rgba(18, 18, 20, 0));
    transform: translateX(-50%);
}

.home-forum-hero + .news-section > * {
    position: relative;
    z-index: 1;
}

.home-forum-controls {
    position: absolute;
    z-index: 12;
    right: clamp(42px, 6vw, 104px);
    bottom: clamp(42px, 7vh, 72px);
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-forum-controls .swiper-pagination {
    position: static !important;
    inset: auto !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    width: auto !important;
    height: auto !important;
    transform: none !important;
}

.home-forum-controls .swiper-pagination-bullet {
    width: 30px;
    height: 6px;
    margin: 0 !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    opacity: 0.62;
    transition: width 0.25s ease, background 0.25s ease, opacity 0.25s ease;
}

.home-forum-controls .swiper-pagination-bullet-active {
    width: 44px;
    background: #58BFFF;
    opacity: 1;
    box-shadow: 0 0 22px rgba(88, 191, 255, 0.68);
}

.home-forum-nav {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.045);
    color: white;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: border-color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.home-forum-nav::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.home-forum-prev::before {
    transform: translate(-35%, -50%) rotate(-135deg);
}

.home-forum-next::before {
    transform: translate(-65%, -50%) rotate(45deg);
}

.home-forum-nav:hover {
    border-color: rgba(88, 191, 255, 0.5);
    background: rgba(88, 191, 255, 0.11);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .home-forum-controls {
        left: 28px;
        right: 28px;
        bottom: 34px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .home-forum-hero::after {
        bottom: -142px;
        height: 220px;
    }

    .home-forum-hero + .news-section {
        padding-top: 98px;
    }

    .home-forum-hero + .news-section::before {
        top: -150px;
        height: 270px;
    }

    .home-forum-controls {
        left: 16px;
        right: 16px;
        bottom: 24px;
        gap: 12px;
    }

    .home-forum-nav {
        width: 38px;
        height: 38px;
    }

    .home-forum-controls .swiper-pagination-bullet {
        width: 24px;
    }

    .home-forum-controls .swiper-pagination-bullet-active {
        width: 36px;
    }
}

/* --- HOME PAGE: единая стилистика только для главной --- */
.home-page-surface {
    position: relative;
    isolation: isolate;
    margin: 0 calc(50% - 50vw);
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 8%, rgba(47, 0, 218, 0.26), transparent 28%),
        radial-gradient(circle at 86% 18%, rgba(88, 191, 255, 0.18), transparent 30%),
        radial-gradient(circle at 76% 72%, rgba(88, 191, 255, 0.12), transparent 34%),
        linear-gradient(112deg, #050508 0%, #090a12 48%, #101820 100%);
}

.home-page-surface::before,
.home-page-surface::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.home-page-surface::before {
    opacity: 0.13;
    background-image:
        linear-gradient(115deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
        linear-gradient(22deg, rgba(88, 191, 255, 0.12) 1px, transparent 1px);
    background-size: 190px 190px, 260px 260px;
    mask-image: linear-gradient(180deg, transparent 0%, black 16%, black 88%, transparent 100%);
}

.home-page-surface::after {
    background:
        radial-gradient(ellipse at 52% 24%, rgba(88, 191, 255, 0.07), transparent 34%),
        linear-gradient(180deg, rgba(4, 8, 13, 0) 0%, rgba(4, 8, 13, 0.5) 44%, rgba(5, 7, 11, 0) 100%);
}

.home-page-surface > .home-forum-hero,
.home-page-surface > .home-page-continuation {
    position: relative;
    z-index: 1;
}

.home-page-surface .home-forum-shell::after {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.74) 54%, rgba(0, 0, 0, 0.42) 72%, rgba(0, 0, 0, 0.52) 100%),
        radial-gradient(ellipse at 27% 54%, rgba(88, 191, 255, 0.14), transparent 37%);
}

.home-page-surface .home-forum-hero {
    margin-bottom: 0;
}

.home-page-surface .home-forum-hero::after {
    bottom: -58px;
    height: 120px;
    background:
        radial-gradient(ellipse at 72% 12%, rgba(88, 191, 255, 0.12), transparent 46%),
        linear-gradient(180deg, rgba(4, 8, 13, 0) 0%, rgba(5, 7, 11, 0.62) 62%, rgba(5, 7, 11, 0) 100%);
}

.home-page-continuation {
    width: min(100%, 1400px);
    margin: 0 auto;
    padding: clamp(46px, 6vh, 72px) 40px 1px;
    box-sizing: border-box;
}

.home-page-continuation .news-section,
.home-page-continuation .topics-section,
.home-page-continuation .materials-section {
    position: relative;
    z-index: 1;
}

.home-page-continuation .section-title {
    color: #f7fbff;
    text-shadow: 0 14px 42px rgba(0, 0, 0, 0.5);
}

.home-page-continuation .news-card-home,
.home-page-continuation .forum-card,
.home-page-continuation .material-card {
    border: 1px solid rgba(170, 220, 255, 0.13) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
        rgba(4, 8, 13, 0.52) !important;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(12px);
}

.home-page-continuation .news-card-home,
.home-page-continuation .material-card {
    border-radius: 20px;
}

.home-page-continuation .forum-card {
    border-radius: 22px;
}

.home-page-continuation .news-card-home:hover,
.home-page-continuation .forum-card:hover,
.home-page-continuation .material-card:hover {
    border-color: rgba(88, 191, 255, 0.42) !important;
    background:
        linear-gradient(180deg, rgba(88, 191, 255, 0.075), rgba(255, 255, 255, 0.025)),
        rgba(4, 8, 13, 0.64) !important;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.3),
        0 0 34px rgba(88, 191, 255, 0.08);
}

.home-page-continuation .btn-secondary {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .home-page-continuation {
        padding: 42px 18px 1px;
    }

    .home-page-surface .home-forum-hero::after {
        bottom: -42px;
        height: 92px;
    }
}

/* --- HOME HERO: надежная темная подложка под текст --- */
.home-page-surface .home-forum-shell::after {
    inset: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    transform: none;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.88) 62%, rgba(0, 0, 0, 0.68) 78%, rgba(0, 0, 0, 0.28) 100%),
        radial-gradient(ellipse at 28% 54%, rgba(88, 191, 255, 0.1), transparent 38%);
}

.home-page-surface .home-forum-hero::after {
    display: none;
}

.home-page-surface .home-forum-shell {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 110px rgba(88, 191, 255, 0.045);
}

.home-page-surface .home-forum-visual::before {
    opacity: 0.28;
    box-shadow:
        0 -68px 110px rgba(99, 56, 255, 0.16),
        0 34px 78px rgba(88, 191, 255, 0.07);
}

@media (max-width: 1024px) {
    .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.86) 78%, rgba(0, 0, 0, 0.42) 100%),
            radial-gradient(ellipse at 28% 54%, rgba(88, 191, 255, 0.1), transparent 42%);
    }
}

@media (max-width: 768px) {
    .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.86) 100%),
            radial-gradient(ellipse at 42% 28%, rgba(88, 191, 255, 0.08), transparent 50%);
    }

    .home-page-surface .home-forum-visual::before {
        opacity: 0.18;
    }
}

/* --- HOME HERO: возвращаем яркую правую сцену и фирменные CTA --- */
.home-page-surface .home-forum-shell::after {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.93) 0%, rgba(0, 0, 0, 0.9) 58%, rgba(0, 0, 0, 0.74) 68%, rgba(0, 0, 0, 0.18) 100%),
        radial-gradient(ellipse at 26% 54%, rgba(88, 191, 255, 0.12), transparent 38%);
}

.home-page-surface .home-forum-visual::after {
    display: block;
    right: 0;
    top: 0;
    width: 48vw;
    max-width: none;
    height: 100%;
    border-radius: 0;
    opacity: 0.92;
    filter: none;
    background:
        radial-gradient(circle at 58% 35%, rgba(99, 56, 255, 0.42), transparent 27%),
        radial-gradient(circle at 72% 55%, rgba(88, 191, 255, 0.24), transparent 32%),
        linear-gradient(135deg, rgba(32, 18, 90, 0.72), rgba(7, 26, 38, 0.58));
    animation: homeForumBlob 14s ease-in-out infinite;
}

.home-page-surface .home-forum-visual::before {
    opacity: 0.42;
    box-shadow:
        0 -74px 118px rgba(99, 56, 255, 0.22),
        0 42px 88px rgba(88, 191, 255, 0.11);
}

.home-page-surface .home-forum-hero::after {
    display: block;
    bottom: -42px;
    height: 92px;
    background:
        linear-gradient(180deg, rgba(4, 8, 13, 0) 0%, rgba(5, 7, 11, 0.34) 50%, rgba(5, 7, 11, 0) 100%);
}

.home-page-surface .home-forum-actions .btn-primary {
    border: 1px solid rgba(129, 219, 255, 0.36);
    color: #f7fcff;
    background:
        linear-gradient(92deg, #58BFFF 0%, #3E7B99 48%, #24546f 100%);
    box-shadow:
        0 14px 34px rgba(62, 123, 153, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.home-page-surface .home-forum-actions .btn-primary:hover {
    border-color: rgba(129, 219, 255, 0.62);
    box-shadow:
        0 18px 42px rgba(62, 123, 153, 0.42),
        0 0 24px rgba(88, 191, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

@media (max-width: 1024px) {
    .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(90deg, rgba(0, 0, 0, 0.93) 0%, rgba(0, 0, 0, 0.9) 72%, rgba(0, 0, 0, 0.34) 100%),
            radial-gradient(ellipse at 30% 54%, rgba(88, 191, 255, 0.1), transparent 42%);
    }

    .home-page-surface .home-forum-visual::after {
        width: 56vw;
        opacity: 0.74;
    }
}

@media (max-width: 768px) {
    .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.88) 32%, rgba(0, 0, 0, 0.9) 78%, rgba(0, 0, 0, 0.7) 100%),
            radial-gradient(ellipse at 42% 42%, rgba(88, 191, 255, 0.11), transparent 52%);
    }

    .home-page-surface .home-forum-visual::after {
        right: -28%;
        top: -4%;
        width: 118vw;
        height: 42%;
        opacity: 0.82;
        background:
            radial-gradient(circle at 62% 32%, rgba(99, 56, 255, 0.44), transparent 32%),
            radial-gradient(circle at 78% 58%, rgba(88, 191, 255, 0.24), transparent 36%),
            linear-gradient(135deg, rgba(32, 18, 90, 0.68), rgba(7, 26, 38, 0.46));
    }

    .home-page-surface .home-forum-visual::before {
        opacity: 0.3;
    }

    .home-page-surface .home-forum-content h1 {
        font-size: clamp(2.08rem, 9.2vw, 3rem);
        line-height: 1.03;
        letter-spacing: -0.058em;
    }

    .home-page-surface .home-forum-content p {
        font-size: 0.9rem;
        line-height: 1.58;
    }

    .home-page-surface .home-forum-hero::after {
        bottom: -34px;
        height: 74px;
    }
}

@media (max-width: 420px) {
    .home-page-surface .home-forum-content h1 {
        font-size: clamp(1.86rem, 8.8vw, 2.38rem);
        letter-spacing: -0.052em;
    }

    .home-page-surface .home-forum-actions .btn-primary {
        width: min(100%, 340px);
    }
}

/* --- HOME HERO: возвращаем плоскую цветовую сцену без "пузыря" --- */
.home-page-surface .home-forum-shell::after {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.92) 50%, rgba(0, 0, 0, 0.72) 59%, rgba(0, 0, 0, 0.16) 72%, rgba(0, 0, 0, 0) 100%),
        radial-gradient(ellipse at 27% 54%, rgba(88, 191, 255, 0.09), transparent 40%);
}

.home-page-surface .home-forum-visual::after {
    right: 0;
    top: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    border: 0;
    border-radius: 0;
    opacity: 1;
    filter: none;
    background:
        linear-gradient(90deg, rgba(8, 7, 18, 0) 0%, rgba(24, 16, 62, 0.28) 43%, rgba(44, 35, 101, 0.7) 70%, rgba(7, 24, 36, 0.78) 100%),
        radial-gradient(ellipse 62% 70% at 75% 36%, rgba(98, 72, 235, 0.26) 0%, rgba(58, 48, 130, 0.16) 42%, transparent 76%),
        radial-gradient(ellipse 54% 60% at 86% 58%, rgba(88, 191, 255, 0.12) 0%, transparent 72%);
    animation: none;
}

.home-page-surface .home-forum-actions .btn-primary {
    border: 1px solid rgba(255, 255, 255, 0.86);
    color: #081019;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.home-page-surface .home-forum-actions .btn-primary:hover {
    border-color: rgba(255, 255, 255, 0.96);
    background: #ffffff;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
}

@media (max-width: 1024px) {
    .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.91) 64%, rgba(0, 0, 0, 0.34) 82%, rgba(0, 0, 0, 0.06) 100%),
            radial-gradient(ellipse at 30% 54%, rgba(88, 191, 255, 0.08), transparent 42%);
    }
}

@media (max-width: 768px) {
    .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.36) 24%, rgba(0, 0, 0, 0.9) 48%, rgba(0, 0, 0, 0.94) 100%),
            radial-gradient(ellipse at 42% 54%, rgba(88, 191, 255, 0.08), transparent 52%);
    }

    .home-page-surface .home-forum-visual::after {
        right: 0;
        top: 0;
        width: 100%;
        height: 46%;
        opacity: 1;
        background:
            linear-gradient(90deg, rgba(15, 9, 48, 0.62), rgba(35, 29, 91, 0.84) 58%, rgba(7, 24, 36, 0.7)),
            radial-gradient(ellipse 78% 72% at 74% 32%, rgba(98, 72, 235, 0.25) 0%, transparent 78%),
            radial-gradient(ellipse 64% 62% at 92% 58%, rgba(88, 191, 255, 0.1) 0%, transparent 72%);
    }
}

/* --- HOME PAGE: только главная без старой сетки и glow-фона сайта --- */
body.home-page .glow,
body.home-page .bg-grid {
    display: none;
}

body.home-page {
    background: linear-gradient(112deg, #050508 0%, #090a12 48%, #101820 100%);
}

body.home-page .home-page-surface::before {
    display: none;
}

/* --- HOME HERO: финальные точечные правки --- */
.home-page-surface .home-forum-actions .btn-primary {
    border: none;
    color: #ffffff;
    background: linear-gradient(90deg, #3E7B99 0%, #2a5a75 100%);
    box-shadow: 0 10px 30px rgba(62, 123, 153, 0.34);
}

.home-page-surface .home-forum-actions .btn-primary:hover {
    border: none;
    color: #ffffff;
    background: linear-gradient(90deg, #4b91b2 0%, #31637d 100%);
    box-shadow: 0 14px 34px rgba(62, 123, 153, 0.42);
}

@media (max-width: 768px) {
    .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.92) 60%, rgba(0, 0, 0, 0.58) 82%, rgba(0, 0, 0, 0.16) 100%),
            radial-gradient(ellipse at 28% 54%, rgba(88, 191, 255, 0.08), transparent 42%);
    }

    .home-page-surface .home-forum-visual::after {
        right: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background:
            linear-gradient(90deg, rgba(8, 7, 18, 0) 0%, rgba(24, 16, 62, 0.28) 43%, rgba(44, 35, 101, 0.7) 70%, rgba(7, 24, 36, 0.78) 100%),
            radial-gradient(ellipse 62% 70% at 75% 36%, rgba(98, 72, 235, 0.26) 0%, rgba(58, 48, 130, 0.16) 42%, transparent 76%),
            radial-gradient(ellipse 54% 60% at 86% 58%, rgba(88, 191, 255, 0.12) 0%, transparent 72%);
    }
}

/* --- HOME PAGE: легкое наведение для нижних CTA-кнопок --- */
.home-page-continuation .center-btn .btn-secondary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease,
        box-shadow 0.28s ease,
        color 0.28s ease;
}

.home-page-continuation .center-btn .btn-secondary::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 1px;
    border-radius: inherit;
    background:
        linear-gradient(90deg, rgba(88, 191, 255, 0.16), rgba(62, 123, 153, 0.05) 48%, rgba(255, 255, 255, 0.08));
    opacity: 0;
    transition: opacity 0.28s ease;
}

.home-page-continuation .center-btn .btn-secondary::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: -60%;
    left: -34%;
    width: 28%;
    height: 220%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.34), transparent);
    transform: translateX(-140%) rotate(14deg);
    transition: transform 0.55s ease;
    pointer-events: none;
}

.home-page-continuation .center-btn .btn-secondary:hover,
.home-page-continuation .center-btn .btn-secondary:focus-visible {
    color: #ffffff;
    border-color: rgba(88, 191, 255, 0.62);
    background: rgba(88, 191, 255, 0.09);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.26),
        0 0 28px rgba(88, 191, 255, 0.14);
    transform: translateY(-3px);
}

.home-page-continuation .center-btn .btn-secondary:hover::before,
.home-page-continuation .center-btn .btn-secondary:focus-visible::before {
    opacity: 1;
}

.home-page-continuation .center-btn .btn-secondary:hover::after,
.home-page-continuation .center-btn .btn-secondary:focus-visible::after {
    transform: translateX(520%) rotate(14deg);
}

.home-page-continuation .center-btn .btn-secondary:active {
    transform: translateY(-1px) scale(0.99);
}

@media (prefers-reduced-motion: reduce) {
    .home-page-continuation .center-btn .btn-secondary,
    .home-page-continuation .center-btn .btn-secondary::before,
    .home-page-continuation .center-btn .btn-secondary::after {
        transition: none;
    }

    .home-page-continuation .center-btn .btn-secondary:hover,
    .home-page-continuation .center-btn .btn-secondary:focus-visible,
    .home-page-continuation .center-btn .btn-secondary:active {
        transform: none;
    }
}

/* --- PUBLIC UI FOUNDATION --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footer-copy {
    text-align: center;
    color: #8daabf;
    margin-top: 20px;
    font-size: 0.8rem;
}

.nav-link.is-active {
    color: #ffffff;
    text-shadow: 0 0 18px rgba(88, 191, 255, 0.35);
}

.nav-link.is-active::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    margin-top: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #58BFFF, rgba(88, 191, 255, 0));
}

#notif-bell {
    display: none;
}

.notification-wrapper {
    position: relative;
    cursor: pointer;
}

.notification-icon {
    stroke: #d7e8f5;
    transition: stroke 0.2s ease;
}

.notification-wrapper:hover .notification-icon {
    stroke: #ffffff;
}

.notif-badge {
    display: none;
    position: absolute;
    top: -5px;
    right: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
    background: #F44336;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    right: -10px;
    width: 320px;
    z-index: 1000;
    overflow: hidden;
    cursor: default;
    border: 1px solid rgba(88, 191, 255, 0.2);
    border-radius: 16px;
    background: rgba(30, 48, 65, 0.98);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
}

.notif-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
}

.notif-clear-btn {
    padding: 0;
    border: 0;
    background: none;
    color: #8daabf;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.notif-clear-btn:hover,
.notif-clear-btn:focus-visible {
    color: #ffffff;
}

.notif-list {
    display: flex;
    flex-direction: column;
    max-height: 350px;
    overflow-y: auto;
}

.notif-empty {
    padding: 30px 20px;
    color: #8daabf;
    font-size: 0.9rem;
    text-align: center;
}

.notif-item {
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 15px 20px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: background 0.2s ease;
}

.notif-item:hover,
.notif-item:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

.notif-item.is-unread {
    background: rgba(88, 191, 255, 0.05);
}

.notif-dot {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #58BFFF;
}

.notif-item-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
}

.notif-item-text {
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.notif-item-date {
    color: #5a6b7c;
    font-size: 0.75rem;
}

.cookie-mini {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(88, 191, 255, 0.25);
    border-radius: 50%;
    background: rgba(22, 38, 54, 0.8);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    font-size: 1.5rem;
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cookie-mini:hover,
.cookie-mini:focus-visible {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(88, 191, 255, 0.4);
    outline: none;
}

.cookie-banner {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: none;
    max-width: 380px;
    padding: 24px;
    border: 1px solid rgba(88, 191, 255, 0.25);
    border-radius: 16px;
    background: rgba(22, 38, 54, 0.86);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    font-family: 'Montserrat', sans-serif;
    backdrop-filter: blur(12px);
}

.cookie-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 0;
    background: none;
    color: #8daabf;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.cookie-close:hover,
.cookie-close:focus-visible {
    color: #ffffff;
    outline: none;
}

.cookie-icon {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.cookie-text {
    margin: 0 0 20px;
    color: #b0c4d6;
    font-size: 0.85rem;
    line-height: 1.5;
}

.cookie-link {
    color: #58BFFF;
    text-decoration: none;
    border-bottom: 1px dashed rgba(88, 191, 255, 0.4);
    transition: color 0.2s ease;
}

.cookie-link:hover,
.cookie-link:focus-visible {
    color: #ffffff;
}

.cookie-actions {
    text-align: right;
}

.cookie-accept {
    padding: 10px 24px;
    border: 0;
    border-radius: 8px;
    font-size: 0.85rem;
}

.file-input-hidden {
    display: none;
}

.field-hint {
    margin: 7px 0 0;
    color: #8daabf;
    font-size: 0.82rem;
    line-height: 1.45;
}

.auth-intro-card {
    width: min(100%, 760px);
    margin: 0 0 24px;
    padding: 24px;
    border: 1px solid rgba(88, 191, 255, 0.18);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(88, 191, 255, 0.08), rgba(81, 55, 183, 0.08)),
        rgba(8, 12, 18, 0.58);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

.auth-intro-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #92d9ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.auth-intro-kicker::before {
    content: "";
    width: 30px;
    height: 1px;
    background: #58BFFF;
}

.auth-intro-card p {
    margin: 0 0 18px;
    color: #c3cfda;
    line-height: 1.65;
}

.auth-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.auth-step {
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    color: #e8f3fb;
    font-size: 0.82rem;
    line-height: 1.35;
}

.auth-step span {
    display: block;
    margin-bottom: 5px;
    color: #58BFFF;
    font-weight: 800;
}

.auth-form-section {
    margin-top: 8px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-section-title {
    margin: 0 0 8px;
    color: white;
    text-align: left;
}

.auth-section-note {
    margin: 0 0 20px;
    color: #8daabf;
    font-size: 0.9rem;
    line-height: 1.55;
    text-align: left;
}

.form-error-summary {
    padding: 12px 14px;
    border: 1px solid #FF5252;
    border-radius: 12px;
    background: rgba(255, 82, 82, 0.1);
    color: #ff8f8f;
    text-align: left;
}

.form-error-summary[hidden] {
    display: none;
}

.error-msg {
    display: block;
    min-height: 15px;
    margin-top: 5px;
    color: #FF5252;
    font-size: 12px;
}

.auth-input.invalid {
    border-color: #FF5252;
    box-shadow: 0 0 5px rgba(255, 82, 82, 0.2);
}

.file-upload-note {
    margin: 0 0 10px;
    color: #8daabf;
    font-size: 0.82rem;
    line-height: 1.45;
}

.selected-file-info {
    display: none;
    margin-top: 10px;
}

.selected-file-name {
    color: #58BFFF;
}

.remove-file-btn {
    margin-left: 10px;
    border: 0;
    background: transparent;
    color: #FF5252;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    text-align: left;
}

.privacy-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 2px 0 0;
    cursor: pointer;
}

.consent-label {
    margin: 0;
    color: #8daabf;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
}

.inline-accent-link {
    color: #58BFFF;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.inline-accent-link:hover,
.inline-accent-link:focus-visible {
    color: #ffffff;
}

.auth-footer-compact {
    margin-top: 20px;
    text-align: center;
}

.success-state {
    display: none;
    padding: 40px;
    text-align: center;
}

.success-icon {
    margin-bottom: 20px;
    font-size: 50px;
}

.privacy-modal {
    display: none;
    z-index: 1000;
}

.privacy-modal-window {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    max-height: 80vh;
}

.privacy-modal-body {
    overflow-y: auto;
    padding: 20px;
    color: #b0c4de;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
}

.password-toggle {
    border: 0;
    background: transparent;
    padding: 0;
}

.input-with-toggle,
.password-wrapper .auth-input {
    padding-right: 45px;
}

.auth-helper-link {
    margin-top: 15px;
    text-align: center;
}

.auth-helper-link a {
    color: #8daabf;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-helper-link span {
    color: #58BFFF;
    text-decoration: underline;
}

.auth-helper-link a:hover,
.auth-helper-link a:focus-visible {
    color: #ffffff;
}

.restore-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.restore-modal-window {
    width: min(100%, 400px);
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: linear-gradient(135deg, #1e2a36 0%, #151b22 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.restore-modal-title {
    margin: 0 0 20px;
    color: white;
    font-size: 1.3rem;
    text-align: center;
}

.restore-msg {
    display: none;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.restore-field {
    margin-bottom: 20px;
}

.restore-field-large {
    margin-bottom: 30px;
}

.restore-actions {
    display: flex;
    gap: 15px;
}

.restore-actions .modal-btn-uniform {
    flex: 1;
}

.restore-actions .btn-cancel-custom {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.success-state h3 {
    margin-bottom: 15px;
    color: #4CAF50;
}

.success-state p {
    color: #D9D9D9;
    font-size: 0.95rem;
    line-height: 1.5;
}

body.site-body:not(.home-page) {
    background:
        radial-gradient(ellipse 74% 54% at 82% 18%, rgba(84, 70, 220, 0.5) 0%, rgba(48, 36, 128, 0.24) 42%, transparent 74%),
        radial-gradient(ellipse 62% 52% at 94% 64%, rgba(88, 191, 255, 0.42) 0%, rgba(35, 112, 157, 0.22) 43%, transparent 72%),
        radial-gradient(ellipse 58% 46% at -2% 12%, rgba(47, 0, 218, 0.48) 0%, rgba(45, 20, 126, 0.22) 44%, transparent 72%),
        radial-gradient(ellipse 56% 40% at 38% 96%, rgba(31, 183, 196, 0.22) 0%, transparent 72%),
        radial-gradient(ellipse 42% 32% at 50% 10%, rgba(118, 91, 255, 0.2) 0%, transparent 68%),
        linear-gradient(112deg, #06060c 0%, #0d1020 42%, #16314b 100%);
    background-attachment: fixed;
}

body.site-body:not(.home-page) .bg-grid {
    display: none;
}

body.site-body:not(.home-page) .glow {
    display: none;
}

body.site-body:not(.home-page) .page-container,
body.site-body:not(.home-page) .auth-wrapper {
    position: relative;
    z-index: 1;
}

body.site-body:not(.home-page) .page-container::before,
body.site-body:not(.home-page) .auth-wrapper::before {
    content: none;
}

body.site-body:not(.home-page) .page-title,
body.site-body:not(.home-page) .auth-page-title {
    letter-spacing: -0.02em;
}

body.site-body:not(.home-page) .news-tile,
body.site-body:not(.home-page) .forum-card,
body.site-body:not(.home-page) .thread-card,
body.site-body:not(.home-page) .contact-card,
body.site-body:not(.home-page) .book-detail-card,
body.site-body:not(.home-page) .auth-card {
    border-color: rgba(88, 191, 255, 0.26);
    background:
        radial-gradient(ellipse at 94% 0%, rgba(88, 191, 255, 0.18), transparent 48%),
        radial-gradient(ellipse at 0% 100%, rgba(84, 70, 220, 0.12), transparent 54%),
        linear-gradient(145deg, rgba(26, 43, 64, 0.9), rgba(8, 12, 20, 0.84));
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.34),
        0 0 36px rgba(88, 191, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(12px);
}

body.site-body:not(.home-page) .filter-bar,
body.site-body:not(.home-page) .forum-search-wrapper {
    border: 1px solid rgba(88, 191, 255, 0.28);
    background:
        linear-gradient(90deg, rgba(88, 191, 255, 0.14), rgba(91, 72, 213, 0.12)),
        rgba(8, 14, 22, 0.62);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.22),
        0 0 42px rgba(88, 191, 255, 0.12);
    backdrop-filter: blur(14px);
}

body.site-body:not(.home-page) .btn-primary {
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

body.site-body:not(.home-page) .btn-primary:hover,
body.site-body:not(.home-page) .btn-primary:focus-visible {
    background: linear-gradient(90deg, #4b91b2 0%, #31637d 100%);
    box-shadow: 0 16px 36px rgba(62, 123, 153, 0.38);
}

/* --- HOME + FORUM: brighter atmosphere and modern list cards --- */
body.home-page {
    background:
        radial-gradient(ellipse 72% 54% at 84% 16%, rgba(84, 70, 220, 0.48) 0%, rgba(48, 36, 128, 0.24) 42%, transparent 74%),
        radial-gradient(ellipse 62% 52% at 94% 64%, rgba(88, 191, 255, 0.38) 0%, rgba(35, 112, 157, 0.2) 44%, transparent 72%),
        radial-gradient(ellipse 58% 46% at -2% 12%, rgba(47, 0, 218, 0.44) 0%, rgba(45, 20, 126, 0.2) 44%, transparent 72%),
        radial-gradient(ellipse 56% 40% at 38% 96%, rgba(31, 183, 196, 0.2) 0%, transparent 72%),
        linear-gradient(112deg, #06060c 0%, #0d1020 42%, #16314b 100%);
    background-attachment: fixed;
}

.home-page-surface {
    background:
        radial-gradient(ellipse 74% 56% at 82% 14%, rgba(84, 70, 220, 0.42) 0%, rgba(48, 36, 128, 0.22) 44%, transparent 74%),
        radial-gradient(ellipse 64% 54% at 96% 58%, rgba(88, 191, 255, 0.34) 0%, rgba(35, 112, 157, 0.18) 46%, transparent 74%),
        radial-gradient(ellipse 58% 46% at 0% 16%, rgba(47, 0, 218, 0.4) 0%, rgba(45, 20, 126, 0.18) 44%, transparent 72%),
        radial-gradient(ellipse 50% 34% at 40% 96%, rgba(31, 183, 196, 0.18) 0%, transparent 72%),
        linear-gradient(112deg, #06060c 0%, #0d1020 42%, #16314b 100%);
}

.home-page-surface::after {
    background:
        radial-gradient(ellipse 46% 34% at 76% 18%, rgba(118, 91, 255, 0.2), transparent 68%),
        radial-gradient(ellipse 54% 38% at 88% 78%, rgba(88, 191, 255, 0.16), transparent 70%),
        linear-gradient(180deg, rgba(4, 8, 13, 0) 0%, rgba(4, 8, 13, 0.24) 48%, rgba(5, 7, 11, 0) 100%);
}

.home-page-surface .home-forum-visual::after {
    background:
        linear-gradient(90deg, rgba(8, 7, 18, 0) 0%, rgba(24, 16, 62, 0.32) 42%, rgba(48, 38, 116, 0.76) 70%, rgba(8, 35, 52, 0.82) 100%),
        radial-gradient(ellipse 62% 70% at 75% 36%, rgba(118, 91, 255, 0.34) 0%, rgba(58, 48, 130, 0.2) 42%, transparent 76%),
        radial-gradient(ellipse 54% 60% at 86% 58%, rgba(88, 191, 255, 0.18) 0%, transparent 72%);
}

.home-page-surface .home-forum-shell::after {
    z-index: 1;
}

.home-page-surface .home-forum-visual {
    z-index: 2;
}

.home-page-surface .home-forum-visual::before,
.home-page-surface .home-forum-visual::after {
    z-index: 0;
}

.ndt-hero-3d {
    position: absolute;
    z-index: 2;
    top: 18%;
    right: max(2vw, 28px);
    width: clamp(340px, 31vw, 560px);
    height: clamp(320px, 36vw, 520px);
    opacity: 0.96;
    perspective: 980px;
    pointer-events: none;
}

.ndt-hero-stage,
.ndt-sample,
.ndt-probe {
    transform-style: preserve-3d;
}

.ndt-hero-stage {
    position: absolute;
    inset: 0;
    transform: rotateX(58deg) rotateZ(-11deg);
    animation: ndtSceneFloat 8s ease-in-out infinite;
}

.ndt-orbit {
    position: absolute;
    display: block;
    border: 1px solid rgba(147, 229, 255, 0.2);
    border-radius: 999px;
    box-shadow: 0 0 42px rgba(88, 191, 255, 0.1);
    transform: translateZ(-10px);
}

.ndt-orbit-one {
    left: 15%;
    top: 19%;
    width: 68%;
    height: 42%;
    animation: ndtOrbitPulse 5.8s ease-in-out infinite;
}

.ndt-orbit-two {
    left: 5%;
    top: 30%;
    width: 86%;
    height: 54%;
    border-style: dashed;
    opacity: 0.56;
    animation: ndtOrbitPulse 7.4s ease-in-out infinite reverse;
}

.ndt-sample {
    position: absolute;
    left: 18%;
    top: 48%;
    width: 62%;
    height: 28%;
    transform: translateZ(0);
}

.ndt-sample-face {
    position: absolute;
    display: block;
    border: 1px solid rgba(159, 226, 255, 0.22);
    backface-visibility: hidden;
}

.ndt-sample-top {
    inset: 0;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(88, 191, 255, 0.08) 34%, rgba(10, 24, 39, 0.44) 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 38px);
    box-shadow:
        0 36px 70px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -28px 48px rgba(9, 22, 36, 0.28);
}

.ndt-sample-front {
    left: 5%;
    right: 4%;
    bottom: -52%;
    height: 58%;
    border-radius: 0 0 22px 22px;
    background: linear-gradient(180deg, rgba(50, 105, 136, 0.34), rgba(5, 12, 21, 0.52));
    transform: rotateX(-74deg);
    transform-origin: top;
}

.ndt-sample-side {
    top: 12%;
    right: -12%;
    width: 14%;
    height: 86%;
    border-radius: 0 18px 18px 0;
    background: linear-gradient(90deg, rgba(70, 133, 166, 0.32), rgba(6, 14, 24, 0.5));
    transform: rotateY(68deg);
    transform-origin: left;
}

.ndt-scan-line {
    position: absolute;
    z-index: 3;
    top: 9%;
    bottom: 8%;
    left: 22%;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, transparent, rgba(129, 219, 255, 0.9), transparent);
    box-shadow: 0 0 24px rgba(88, 191, 255, 0.72);
    animation: ndtScanLine 4.8s ease-in-out infinite;
}

.ndt-flaw {
    position: absolute;
    z-index: 4;
    left: 58%;
    top: 42%;
    width: 42px;
    height: 18px;
    border: 1px solid rgba(255, 197, 121, 0.48);
    border-radius: 999px;
    background: radial-gradient(circle at 35% 45%, rgba(255, 209, 136, 0.86), rgba(255, 147, 64, 0.3) 52%, transparent 74%);
    box-shadow:
        0 0 22px rgba(255, 171, 74, 0.34),
        0 0 42px rgba(88, 191, 255, 0.12);
    transform: translateZ(22px) rotateZ(12deg);
    animation: ndtFlawPulse 2.6s ease-in-out infinite;
}

.ndt-probe {
    position: absolute;
    z-index: 6;
    left: 36%;
    top: 20%;
    width: 112px;
    height: 72px;
    border: 1px solid rgba(171, 232, 255, 0.28);
    border-radius: 24px 24px 18px 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(88, 191, 255, 0.12) 36%, rgba(15, 31, 49, 0.64)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
    box-shadow:
        0 28px 52px rgba(0, 0, 0, 0.28),
        0 0 32px rgba(88, 191, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transform: translateZ(104px);
    animation: ndtProbeSweep 4.8s ease-in-out infinite;
}

.ndt-probe span {
    position: absolute;
    left: 50%;
    bottom: -22px;
    width: 54px;
    height: 28px;
    border: 1px solid rgba(129, 219, 255, 0.32);
    border-radius: 0 0 18px 18px;
    background: linear-gradient(180deg, rgba(88, 191, 255, 0.26), rgba(12, 27, 42, 0.72));
    box-shadow: 0 18px 32px rgba(88, 191, 255, 0.18);
    transform: translateX(-50%);
}

.ndt-beam {
    position: absolute;
    z-index: 5;
    left: 37%;
    top: 34%;
    width: 190px;
    height: 210px;
    opacity: 0.72;
    filter: blur(0.2px);
    transform: translateZ(62px) rotateX(-58deg);
    transform-origin: 50% 0;
    animation: ndtBeamPulse 2.4s ease-in-out infinite;
}

.ndt-beam::before {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: polygon(45% 0, 55% 0, 96% 100%, 4% 100%);
    background:
        linear-gradient(180deg, rgba(129, 219, 255, 0.48), rgba(88, 191, 255, 0.16) 52%, transparent 100%),
        repeating-linear-gradient(90deg, transparent 0 23px, rgba(255, 255, 255, 0.1) 23px 24px);
    box-shadow: 0 0 36px rgba(88, 191, 255, 0.24);
}

.ndt-beam span {
    position: absolute;
    left: 50%;
    width: 74%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(194, 243, 255, 0.6), transparent);
    transform: translateX(-50%);
    opacity: 0.72;
}

.ndt-beam span:nth-child(1) { top: 36%; }
.ndt-beam span:nth-child(2) { top: 56%; width: 88%; }
.ndt-beam span:nth-child(3) { top: 76%; width: 102%; }

.ndt-screen {
    position: absolute;
    z-index: 7;
    right: 7%;
    top: 20%;
    width: 134px;
    height: 88px;
    border: 1px solid rgba(159, 226, 255, 0.24);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(88, 191, 255, 0.06)),
        rgba(5, 12, 22, 0.46);
    box-shadow:
        0 22px 42px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transform: translateZ(78px) rotateZ(8deg);
    backdrop-filter: blur(12px);
}

.ndt-screen span,
.ndt-screen i {
    position: absolute;
    display: block;
}

.ndt-screen span {
    left: 14px;
    right: 14px;
    top: 18px;
    height: 34px;
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(88, 191, 255, 0.12) 1px, transparent 1px),
        linear-gradient(0deg, rgba(88, 191, 255, 0.1) 1px, transparent 1px);
    background-size: 14px 14px;
}

.ndt-screen i {
    left: 18px;
    right: 18px;
    top: 34px;
    height: 3px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, #58BFFF 0 18%, transparent 18% 28%, #58BFFF 28% 46%, transparent 46% 56%, #ffd188 56% 70%, transparent 70% 78%, #58BFFF 78% 100%);
    box-shadow: 0 0 18px rgba(88, 191, 255, 0.52);
    animation: ndtSignal 2.4s linear infinite;
}

@keyframes ndtSceneFloat {
    0%, 100% { transform: rotateX(58deg) rotateZ(-11deg) translate3d(0, 0, 0); }
    50% { transform: rotateX(56deg) rotateZ(-9deg) translate3d(0, -10px, 14px); }
}

@keyframes ndtProbeSweep {
    0%, 100% { transform: translate3d(-28px, 0, 104px); }
    50% { transform: translate3d(42px, 0, 104px); }
}

@keyframes ndtScanLine {
    0%, 100% { left: 24%; opacity: 0.5; }
    50% { left: 66%; opacity: 1; }
}

@keyframes ndtBeamPulse {
    0%, 100% { opacity: 0.48; }
    50% { opacity: 0.86; }
}

@keyframes ndtFlawPulse {
    0%, 100% { opacity: 0.62; transform: translateZ(22px) rotateZ(12deg) scale(0.92); }
    50% { opacity: 1; transform: translateZ(28px) rotateZ(12deg) scale(1.08); }
}

@keyframes ndtSignal {
    0% { transform: translateX(-8px); opacity: 0.7; }
    50% { opacity: 1; }
    100% { transform: translateX(8px); opacity: 0.7; }
}

@keyframes ndtOrbitPulse {
    0%, 100% { transform: translateZ(-10px) scale(0.96); opacity: 0.38; }
    50% { transform: translateZ(-10px) scale(1.03); opacity: 0.72; }
}

@media (max-width: 1280px) {
    .ndt-hero-3d {
        right: -22px;
        width: 430px;
        height: 390px;
    }
}

@media (max-width: 1024px) {
    .ndt-hero-3d {
        top: 12%;
        right: -86px;
        width: 400px;
        height: 360px;
        opacity: 0.68;
    }

    .ndt-screen {
        right: 1%;
    }
}

@media (max-width: 768px) {
    .home-page-surface .home-forum-visual {
        z-index: 1;
    }

    .ndt-hero-3d {
        top: 2%;
        right: -34%;
        width: min(520px, 112vw);
        height: 330px;
        opacity: 0.3;
        transform: scale(0.82);
        transform-origin: top right;
    }

    .ndt-screen {
        display: none;
    }
}

@media (max-width: 480px) {
    .ndt-hero-3d {
        right: -46%;
        opacity: 0.22;
        transform: scale(0.72);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ndt-hero-stage,
    .ndt-orbit,
    .ndt-probe,
    .ndt-beam,
    .ndt-scan-line,
    .ndt-flaw,
    .ndt-screen i {
        animation: none;
    }
}

.hero-knowledge-map {
    position: absolute;
    z-index: 2;
    top: 17%;
    right: max(5vw, 70px);
    width: clamp(390px, 38vw, 660px);
    height: clamp(360px, 39vw, 590px);
    opacity: 0.96;
    pointer-events: none;
}

.hero-knowledge-map::before,
.hero-knowledge-map::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 42px;
    pointer-events: none;
}

.hero-knowledge-map::before {
    background:
        radial-gradient(circle at 50% 48%, rgba(88, 191, 255, 0.16), transparent 30%),
        radial-gradient(circle at 76% 30%, rgba(118, 91, 255, 0.2), transparent 30%),
        radial-gradient(circle at 28% 72%, rgba(31, 183, 196, 0.12), transparent 34%);
    filter: blur(4px);
}

.hero-knowledge-map::after {
    inset: 12%;
    border: 1px solid rgba(149, 226, 255, 0.12);
    background:
        linear-gradient(90deg, rgba(149, 226, 255, 0.055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(149, 226, 255, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at center, black, transparent 72%);
    transform: rotate(-5deg);
    opacity: 0.82;
}

.map-ring,
.map-link,
.map-core,
.map-node,
.map-wave {
    position: absolute;
    z-index: 2;
}

.map-ring {
    display: block;
    border: 1px solid rgba(129, 219, 255, 0.22);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(88, 191, 255, 0.08);
    animation: mapRingDrift 9s ease-in-out infinite;
}

.map-ring-one {
    left: 15%;
    top: 15%;
    width: 70%;
    height: 70%;
}

.map-ring-two {
    left: 26%;
    top: 26%;
    width: 48%;
    height: 48%;
    border-style: dashed;
    animation-duration: 12s;
    animation-direction: reverse;
}

.map-link {
    left: 50%;
    top: 50%;
    width: 34%;
    height: 1px;
    transform-origin: 0 50%;
    background: linear-gradient(90deg, rgba(129, 219, 255, 0.72), rgba(129, 219, 255, 0.08), transparent);
    box-shadow: 0 0 18px rgba(88, 191, 255, 0.18);
    opacity: 0.72;
}

.map-link-a { transform: rotate(-30deg); }
.map-link-b { transform: rotate(36deg); }
.map-link-c { transform: rotate(146deg); }
.map-link-d { transform: rotate(212deg); }

.map-core {
    left: 50%;
    top: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 148px;
    height: 148px;
    border: 1px solid rgba(158, 224, 255, 0.32);
    border-radius: 38px;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.18), transparent 36%),
        linear-gradient(145deg, rgba(88, 191, 255, 0.18), rgba(23, 36, 68, 0.42));
    box-shadow:
        0 0 60px rgba(88, 191, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translate(-50%, -50%) rotate(-4deg);
    backdrop-filter: blur(16px);
    animation: mapCoreFloat 6s ease-in-out infinite;
}

.map-core span,
.map-core strong,
.map-node span,
.map-node strong {
    display: block;
}

.map-core span {
    color: #dff6ff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.map-core strong {
    margin-top: 8px;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.2;
}

.map-node {
    min-width: 132px;
    padding: 14px 16px;
    border: 1px solid rgba(158, 224, 255, 0.22);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
        rgba(10, 24, 39, 0.28);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px) saturate(128%);
    animation: mapNodeFloat 7s ease-in-out infinite;
}

.map-node span {
    margin-bottom: 7px;
    color: #8fe0ff;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.map-node strong {
    color: #f7fbff;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.map-node-standards {
    left: 54%;
    top: 6%;
}

.map-node-practice {
    right: 0;
    top: 42%;
    animation-delay: 0.5s;
}

.map-node-defects {
    left: 46%;
    bottom: 5%;
    animation-delay: 1s;
}

.map-node-materials {
    left: 0;
    top: 43%;
    animation-delay: 1.5s;
}

.map-node-signals {
    left: 12%;
    top: 12%;
    animation-delay: 2s;
}

@media (min-width: 1025px) {
    .home-page-surface .home-forum-content h1 {
        width: min(820px, 66vw);
    }

    .home-page-surface .map-node-signals {
        left: 15%;
        top: -8%;
    }
}

.map-wave {
    right: 4%;
    bottom: 16%;
    width: 190px;
    height: 64px;
    border: 1px solid rgba(158, 224, 255, 0.16);
    border-radius: 20px;
    background:
        linear-gradient(90deg, rgba(88, 191, 255, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(88, 191, 255, 0.07) 1px, transparent 1px),
        rgba(3, 10, 18, 0.26);
    background-size: 18px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.map-wave span {
    position: absolute;
    left: -18%;
    right: -18%;
    top: 50%;
    height: 3px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, transparent 0 8%, #58BFFF 8% 20%, transparent 20% 28%, #58BFFF 28% 42%, transparent 42% 52%, #ffd188 52% 62%, transparent 62% 70%, #58BFFF 70% 86%, transparent 86% 100%);
    box-shadow: 0 0 20px rgba(88, 191, 255, 0.5);
    transform: translateY(-50%);
    animation: mapWave 3.4s linear infinite;
}

@keyframes mapCoreFloat {
    0%, 100% { transform: translate(-50%, -50%) rotate(-4deg) translateY(0); }
    50% { transform: translate(-50%, -50%) rotate(-2deg) translateY(-8px); }
}

@keyframes mapNodeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes mapRingDrift {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.58; }
    50% { transform: rotate(6deg) scale(1.03); opacity: 0.82; }
}

@keyframes mapWave {
    0% { transform: translate(-12px, -50%); opacity: 0.64; }
    50% { opacity: 1; }
    100% { transform: translate(12px, -50%); opacity: 0.64; }
}

@media (max-width: 1280px) {
    .hero-knowledge-map {
        right: 22px;
        width: 470px;
        height: 430px;
    }

    .map-node {
        min-width: 118px;
        padding: 12px 14px;
    }
}

@media (max-width: 1024px) {
    .hero-knowledge-map {
        top: 8%;
        right: -58px;
        width: 440px;
        height: 400px;
        opacity: 0.76;
    }

    .map-wave {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-knowledge-map {
        top: 0;
        right: -42%;
        width: min(560px, 126vw);
        height: 360px;
        opacity: 0.28;
        transform: scale(0.82);
        transform-origin: top right;
    }

    .map-node {
        min-width: 108px;
    }
}

@media (max-width: 480px) {
    .hero-knowledge-map {
        right: -58%;
        opacity: 0.22;
        transform: scale(0.74);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-knowledge-map *,
    .hero-knowledge-map::before,
    .hero-knowledge-map::after {
        animation: none !important;
    }
}

.forum-card,
.thread-card,
body.site-body:not(.home-page) .forum-card,
body.site-body:not(.home-page) .thread-card,
.home-page-continuation .forum-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(158, 224, 255, 0.28) !important;
    border-radius: 28px !important;
    background:
        radial-gradient(ellipse 48% 160% at 0% 0%, rgba(88, 191, 255, 0.12), transparent 58%),
        radial-gradient(ellipse 44% 150% at 100% 100%, rgba(118, 91, 255, 0.1), transparent 56%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.028) 48%, rgba(11, 24, 38, 0.34) 100%) !important;
    box-shadow:
        0 16px 42px rgba(0, 0, 0, 0.16),
        0 0 30px rgba(88, 191, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px) saturate(128%);
    transform: translateY(0);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.forum-card {
    min-height: 76px;
    padding: 21px 24px 21px 32px;
}

.thread-card {
    padding: 20px 28px;
}

.forum-card::before,
.thread-card::before {
    content: none;
}

.forum-card::after,
.thread-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.045) 45%, transparent 62%),
        radial-gradient(ellipse 30% 80% at 86% 50%, rgba(88, 191, 255, 0.1), transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.forum-card:hover,
.forum-card:focus-visible,
.thread-card:hover,
.thread-card:focus-visible {
    border-color: rgba(158, 224, 255, 0.5) !important;
    background:
        radial-gradient(ellipse 52% 160% at 0% 0%, rgba(88, 191, 255, 0.18), transparent 60%),
        radial-gradient(ellipse 46% 150% at 100% 100%, rgba(118, 91, 255, 0.16), transparent 58%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0.04) 48%, rgba(11, 24, 38, 0.42) 100%) !important;
    box-shadow:
        0 20px 52px rgba(0, 0, 0, 0.2),
        0 0 40px rgba(88, 191, 255, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    outline: none;
}

.forum-card:hover::after,
.forum-card:focus-visible::after,
.thread-card:hover::after,
.thread-card:focus-visible::after {
    opacity: 1;
}

.forum-name,
.thread-title {
    position: relative;
    z-index: 1;
    min-width: 0;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.forum-meta,
.thread-card .forum-arrow-btn {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
}

.forum-count {
    color: rgba(220, 235, 246, 0.72);
    font-weight: 650;
}

.forum-arrow-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.18), transparent 42%),
        rgba(255, 255, 255, 0.075) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 26px rgba(0, 0, 0, 0.18);
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.forum-arrow-btn svg path {
    stroke: #dff6ff !important;
}

.forum-card:hover .forum-arrow-btn,
.forum-card:focus-visible .forum-arrow-btn,
.thread-card:hover .forum-arrow-btn,
.thread-card:focus-visible .forum-arrow-btn {
    border-color: rgba(129, 219, 255, 0.5);
    background:
        linear-gradient(135deg, rgba(88, 191, 255, 0.88), rgba(62, 123, 153, 0.78)) !important;
    box-shadow:
        0 0 28px rgba(88, 191, 255, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: translateX(3px);
}

.forum-search-wrapper {
    position: relative !important;
    z-index: 30;
    border: 1px solid rgba(126, 220, 255, 0.2) !important;
    border-radius: 24px !important;
    background:
        linear-gradient(90deg, rgba(88, 191, 255, 0.12), rgba(91, 72, 213, 0.1)),
        rgba(8, 14, 24, 0.58) !important;
    box-shadow:
        0 18px 46px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(16px);
}

.forum-list {
    position: relative;
    z-index: 1;
}

#live-search-results {
    top: calc(100% + 10px) !important;
    margin-top: 0 !important;
    z-index: 1200 !important;
    border-radius: 20px !important;
    overflow: hidden auto !important;
    max-height: min(420px, 52vh);
}

#live-search-results a {
    color: #f7fbff !important;
}

@media (max-width: 768px) {
    .forum-card:hover,
    .forum-card:focus-visible,
    .thread-card:hover,
    .thread-card:focus-visible {
        transform: none;
    }
}

@media (max-width: 560px) {
    .forum-card,
    .thread-card,
    body.site-body:not(.home-page) .forum-card,
    body.site-body:not(.home-page) .thread-card,
    .home-page-continuation .forum-card {
        border-radius: 22px !important;
    }

    .forum-card {
        min-height: 70px;
        padding: 18px 16px 18px 22px;
    }

    .thread-card {
        padding: 18px;
    }

    .forum-meta {
        gap: 10px;
    }

    .forum-count {
        font-size: 0.82rem;
    }

    .forum-arrow-btn {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
}

@media (max-width: 768px) {
    .auth-steps {
        grid-template-columns: 1fr;
    }

    .cookie-banner {
        right: 14px;
        bottom: 14px;
        left: 14px;
        max-width: none;
    }

}

/* --- PUBLIC USER PROFILE --- */
.author-profile-link {
    color: inherit;
    text-decoration: none;
    border-radius: 999px;
    transition: transform 0.22s ease, filter 0.22s ease;
}

.author-avatar-link {
    display: block;
}

.author-profile-link:hover,
.author-profile-link:focus-visible {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 18px rgba(88, 191, 255, 0.28));
    outline: none;
}

.author-name {
    display: block;
}

.author-name-link {
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.author-name-link:hover,
.author-name-link:focus-visible {
    color: #58BFFF;
    text-shadow: 0 0 18px rgba(88, 191, 255, 0.28);
    outline: none;
}

.public-profile-page {
    padding-top: 48px;
}

.public-profile-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: #8daabf;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.public-profile-back:hover,
.public-profile-back:focus-visible {
    color: #58BFFF;
    transform: translateX(-3px);
    outline: none;
}

.public-profile-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    overflow: hidden;
    border: 1px solid rgba(88, 191, 255, 0.14);
    border-radius: 30px;
    background:
        radial-gradient(circle at 18% 14%, rgba(88, 191, 255, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(18, 27, 38, 0.96), rgba(12, 17, 24, 0.98));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.public-profile-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, transparent 0%, rgba(88, 191, 255, 0.08) 42%, transparent 62%),
        radial-gradient(circle at 88% 8%, rgba(80, 53, 175, 0.22), transparent 26%);
}

.public-profile-sidebar,
.public-profile-main {
    position: relative;
    z-index: 1;
}

.public-profile-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 52px 34px;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.24);
    text-align: center;
}

.public-profile-avatar {
    width: 142px;
    height: 142px;
    padding: 4px;
    margin-bottom: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #58BFFF, rgba(80, 53, 175, 0.8));
    box-shadow: 0 18px 42px rgba(88, 191, 255, 0.18);
}

.public-profile-avatar img,
.public-profile-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.public-profile-avatar img {
    display: block;
    object-fit: cover;
}

.public-profile-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1E3041;
}

.public-profile-identity h1 {
    margin: 8px 0 16px;
    color: #fff;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.12;
}

.public-profile-kicker {
    margin: 0;
    color: #58BFFF;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.public-profile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 16px;
    border: 1px solid rgba(88, 191, 255, 0.26);
    border-radius: 999px;
    background: rgba(88, 191, 255, 0.1);
    color: #a9ddff;
    font-size: 0.82rem;
    font-weight: 700;
}

.public-profile-stats {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 12px;
    margin: 34px 0 0;
}

.public-profile-stats div {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.public-profile-stats strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-size: 1.25rem;
}

.public-profile-stats span {
    color: #8daabf;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.public-profile-edit {
    width: 100%;
    max-width: 250px;
    margin-top: 28px;
    text-align: center;
}

.public-profile-main {
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding: 52px;
}

.public-profile-section {
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    background: rgba(6, 10, 16, 0.42);
    padding: 30px;
}

.public-profile-section-heading {
    margin-bottom: 24px;
}

.public-profile-section-heading p {
    margin: 0 0 8px;
    color: #58BFFF;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.public-profile-section-heading h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.public-profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.public-profile-info-item {
    min-height: 104px;
    padding: 18px;
    border: 1px solid rgba(88, 191, 255, 0.1);
    border-radius: 18px;
    background: rgba(30, 48, 65, 0.36);
}

.public-profile-info-item-wide {
    grid-column: 1 / -1;
}

.public-profile-info-item span {
    display: block;
    margin-bottom: 10px;
    color: #8daabf;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.public-profile-info-item strong {
    color: #fff;
    font-size: 1rem;
    line-height: 1.45;
}

.public-profile-topic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.public-profile-topic {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.public-profile-topic:hover,
.public-profile-topic:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(88, 191, 255, 0.28);
    background: rgba(88, 191, 255, 0.08);
    outline: none;
}

.public-profile-topic-category {
    display: block;
    margin-bottom: 8px;
    color: #58BFFF;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-profile-topic h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.02rem;
    line-height: 1.35;
}

.public-profile-topic p {
    margin: 0;
    color: #8daabf;
    font-size: 0.86rem;
}

.public-profile-topic-status {
    flex: 0 0 auto;
    align-self: flex-start;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(88, 191, 255, 0.1);
    color: #a9ddff;
    font-size: 0.78rem;
    font-weight: 700;
}

.public-profile-empty {
    padding: 34px;
    border: 1px dashed rgba(88, 191, 255, 0.22);
    border-radius: 18px;
    background: rgba(88, 191, 255, 0.045);
    color: #8daabf;
    text-align: center;
}

@media (max-width: 900px) {
    .public-profile-card {
        grid-template-columns: 1fr;
    }

    .public-profile-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .public-profile-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .public-profile-main {
        padding: 34px;
    }
}

@media (max-width: 600px) {
    .public-profile-page {
        padding-top: 28px;
    }

    .public-profile-sidebar,
    .public-profile-main,
    .public-profile-section {
        padding: 24px;
    }

    .public-profile-avatar {
        width: 118px;
        height: 118px;
    }

    .public-profile-stats,
    .public-profile-info-grid {
        grid-template-columns: 1fr;
    }

    .public-profile-topic {
        flex-direction: column;
    }

    .public-profile-topic-status {
        align-self: flex-start;
    }
}

/* --- Theme toggle and light theme --- */
:root {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg-dark: #f2f7fb;
    --text-white: #07131f;
    --text-grey: #526476;
    --border-color: rgba(14, 43, 67, 0.14);
}

.theme-toggle {
    width: 58px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(158, 224, 255, 0.2);
    border-radius: 999px;
    background:
        radial-gradient(circle at 28% 30%, rgba(88, 191, 255, 0.22), transparent 34%),
        rgba(255, 255, 255, 0.055);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 12px 28px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: rgba(88, 191, 255, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 0 22px rgba(88, 191, 255, 0.24);
    transform: translateY(-1px);
    outline: none;
}

.theme-toggle-track {
    position: relative;
    width: 44px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(6, 14, 24, 0.86), rgba(21, 39, 60, 0.78));
}

.theme-toggle-track::before,
.theme-toggle-track::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    line-height: 1;
}

.theme-toggle-track::before {
    content: "☾";
    left: 7px;
    color: #bfeaff;
}

.theme-toggle-track::after {
    content: "☼";
    right: 7px;
    color: rgba(255, 220, 140, 0.56);
}

.theme-toggle-thumb {
    position: absolute;
    z-index: 1;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #58bfff, #dff6ff);
    box-shadow: 0 0 16px rgba(88, 191, 255, 0.58);
    transition: transform 0.26s ease, background 0.26s ease, box-shadow 0.26s ease;
}

.theme-toggle-mobile {
    display: none;
}

html[data-theme="light"] .theme-toggle {
    border-color: rgba(35, 106, 148, 0.2);
    background:
        radial-gradient(circle at 72% 30%, rgba(255, 194, 91, 0.26), transparent 34%),
        rgba(255, 255, 255, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 12px 28px rgba(49, 93, 125, 0.13);
}

html[data-theme="light"] .theme-toggle-track {
    background: linear-gradient(90deg, rgba(225, 238, 248, 0.95), rgba(255, 246, 225, 0.95));
}

html[data-theme="light"] .theme-toggle-thumb {
    background: linear-gradient(135deg, #ffd071, #fff4c8);
    box-shadow: 0 0 16px rgba(255, 184, 76, 0.5);
    transform: translateX(22px);
}

html[data-theme="light"] body {
    background:
        radial-gradient(ellipse 62% 44% at 82% 10%, rgba(91, 117, 255, 0.2), transparent 72%),
        radial-gradient(ellipse 62% 46% at 92% 64%, rgba(88, 191, 255, 0.24), transparent 72%),
        radial-gradient(ellipse 54% 42% at -4% 14%, rgba(112, 93, 255, 0.16), transparent 72%),
        linear-gradient(112deg, #f8fbff 0%, #eef6fb 48%, #dceef7 100%);
    color: #07131f;
}

html[data-theme="light"] .glow {
    opacity: 0.18;
}

html[data-theme="light"] .bg-grid {
    opacity: 0.08;
    filter: invert(1);
}

html[data-theme="light"] .logo,
html[data-theme="light"] .home-forum-content h1,
html[data-theme="light"] .section-title,
html[data-theme="light"] .page-title,
html[data-theme="light"] .auth-title,
html[data-theme="light"] .auth-page-title,
html[data-theme="light"] .forum-title,
html[data-theme="light"] .public-profile-section-heading h2 {
    color: #07131f;
}

html[data-theme="light"] .nav-link {
    color: rgba(7, 19, 31, 0.68);
}

html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link.active {
    color: #155d86;
}

html[data-theme="light"] .btn-small,
html[data-theme="light"] .menu-toggle,
html[data-theme="light"] .notification-wrapper {
    color: #07131f;
    border-color: rgba(14, 43, 67, 0.2);
    background: rgba(255, 255, 255, 0.44);
}

html[data-theme="light"] .notification-icon {
    stroke: #173043;
}

html[data-theme="light"] .header-shell.is-open {
    background: rgba(245, 250, 255, 0.96);
    border-color: rgba(35, 106, 148, 0.18);
    box-shadow: 0 25px 60px rgba(40, 80, 120, 0.16);
}

html[data-theme="light"] body.site-body:not(.home-page),
html[data-theme="light"] body.home-page,
html[data-theme="light"] .home-page-surface {
    background:
        radial-gradient(ellipse 64% 48% at 82% 12%, rgba(91, 117, 255, 0.22), transparent 72%),
        radial-gradient(ellipse 58% 48% at 96% 60%, rgba(88, 191, 255, 0.26), transparent 72%),
        radial-gradient(ellipse 52% 40% at -2% 16%, rgba(112, 93, 255, 0.18), transparent 70%),
        linear-gradient(112deg, #f8fbff 0%, #edf6fc 50%, #dceef7 100%);
}

html[data-theme="light"] .home-page-surface .home-forum-shell::after {
    background:
        linear-gradient(90deg, rgba(247, 251, 255, 0.96) 0%, rgba(246, 250, 254, 0.9) 48%, rgba(234, 244, 252, 0.46) 64%, rgba(234, 244, 252, 0) 100%),
        radial-gradient(ellipse at 28% 54%, rgba(88, 191, 255, 0.12), transparent 42%);
}

html[data-theme="light"] .home-page-surface .home-forum-visual::after {
    background:
        linear-gradient(90deg, rgba(247, 251, 255, 0) 0%, rgba(192, 211, 255, 0.36) 44%, rgba(113, 104, 234, 0.38) 70%, rgba(93, 187, 235, 0.36) 100%),
        radial-gradient(ellipse 62% 70% at 75% 36%, rgba(118, 91, 255, 0.22) 0%, transparent 76%),
        radial-gradient(ellipse 54% 60% at 86% 58%, rgba(88, 191, 255, 0.2) 0%, transparent 72%);
}

html[data-theme="light"] .home-forum-content p,
html[data-theme="light"] .cookie-text,
html[data-theme="light"] .public-profile-topic p,
html[data-theme="light"] .public-profile-empty {
    color: #526476;
}

html[data-theme="light"] .home-forum-kicker,
html[data-theme="light"] .public-profile-topic-category {
    color: #126d99;
}

html[data-theme="light"] .map-core,
html[data-theme="light"] .map-node {
    border-color: rgba(35, 106, 148, 0.22);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(237, 248, 255, 0.46)),
        rgba(255, 255, 255, 0.46);
    box-shadow:
        0 18px 42px rgba(40, 89, 130, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .map-core span,
html[data-theme="light"] .map-core strong,
html[data-theme="light"] .map-node strong {
    color: #07131f;
}

html[data-theme="light"] .map-node span {
    color: #1179a9;
}

html[data-theme="light"] .news-tile,
html[data-theme="light"] .forum-card,
html[data-theme="light"] .thread-card,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .book-detail-card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .public-profile-card,
html[data-theme="light"] .public-profile-section,
html[data-theme="light"] .public-profile-info-item,
html[data-theme="light"] .forum-search-wrapper,
html[data-theme="light"] .filter-bar,
html[data-theme="light"] .cookie-banner,
html[data-theme="light"] .notif-dropdown {
    border-color: rgba(35, 106, 148, 0.2);
    background:
        radial-gradient(ellipse at 92% 0%, rgba(88, 191, 255, 0.16), transparent 48%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(236, 246, 253, 0.68));
    box-shadow:
        0 24px 70px rgba(39, 82, 118, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: #07131f;
}

html[data-theme="light"] .forum-card,
html[data-theme="light"] .thread-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.58), rgba(235, 247, 255, 0.34)),
        rgba(255, 255, 255, 0.26) !important;
}

html[data-theme="light"] .footer {
    background: rgba(235, 246, 252, 0.54);
    border-top-color: rgba(35, 106, 148, 0.14);
}

/* --- Home hero final layout fixes --- */
.map-wave {
    display: none !important;
}

@media (min-width: 1181px) {
    .home-page-surface .home-forum-content h1 {
        width: min(760px, 58vw);
    }

    .home-page-surface .map-node-signals {
        left: 18%;
        top: 3%;
    }
}

@media (min-width: 769px) and (max-width: 1180px) {
    .hero-knowledge-map {
        top: 50% !important;
        right: 0 !important;
        width: min(420px, 42vw);
        height: min(390px, 42vw);
        opacity: 0.72;
        transform: translateY(-50%) scale(0.92);
        transform-origin: center right;
    }

    .home-page-surface .home-forum-content h1 {
        width: min(620px, 58vw);
        font-size: clamp(2.7rem, 5.8vw, 4.6rem);
    }

    .home-page-surface .home-forum-content p {
        width: min(520px, 54vw);
    }
}

@media (max-width: 768px) {
    .home-forum-hero {
        height: auto;
        min-height: 0;
    }

    .home-forum-slide.hero-slide {
        min-height: 0;
        padding-bottom: 88px;
    }

    .home-forum-shell {
        display: flex;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
    }

    .home-forum-content.hero-content {
        order: 1;
        min-height: 0;
        padding: 76px 16px 24px;
    }

    .home-forum-visual {
        position: relative;
        order: 2;
        inset: auto;
        z-index: 2;
        height: 320px;
        margin: 0 0 58px;
        overflow: visible;
        pointer-events: none;
    }

    .hero-knowledge-map {
        position: relative;
        top: auto !important;
        right: auto !important;
        left: 50%;
        width: min(390px, 92vw);
        height: 310px;
        opacity: 0.82;
        transform: translateX(-50%) scale(0.88);
        transform-origin: center;
    }

    .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.9) 42%, rgba(0, 0, 0, 0.24) 72%, rgba(0, 0, 0, 0) 100%),
            radial-gradient(ellipse at 54% 62%, rgba(88, 191, 255, 0.1), transparent 52%);
    }

    html[data-theme="light"] .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(180deg, rgba(247, 251, 255, 0.96) 0%, rgba(246, 250, 254, 0.88) 42%, rgba(234, 244, 252, 0.34) 72%, rgba(234, 244, 252, 0) 100%),
            radial-gradient(ellipse at 54% 62%, rgba(88, 191, 255, 0.14), transparent 52%);
    }

    .home-forum-controls {
        bottom: 22px;
    }

    .theme-toggle-desktop {
        display: none;
    }

    .theme-toggle-mobile {
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .home-forum-visual {
        height: 292px;
        margin-bottom: 54px;
    }

    .hero-knowledge-map {
        width: min(360px, 96vw);
        height: 286px;
        opacity: 0.76;
        transform: translateX(-50%) scale(0.8);
    }
}

@media (max-width: 1180px) {
    .header-shell .theme-toggle-desktop {
        display: none;
    }
}

/* --- Light theme polish: readable, calm blue surface --- */
html[data-theme="light"] {
    --bg-dark: #e9f4fb;
    --text-white: #071827;
    --text-grey: #52697a;
    --accent-blue: #247da5;
    --border-color: rgba(36, 98, 133, 0.18);
    --light-bg-1: #f3f9fd;
    --light-bg-2: #e4f1f8;
    --light-surface: rgba(242, 249, 253, 0.78);
    --light-surface-strong: rgba(249, 253, 255, 0.9);
    --light-surface-tint: rgba(218, 237, 248, 0.62);
    --light-text: #071827;
    --light-muted: #51697b;
    --light-soft: #6e8292;
    --light-border: rgba(42, 111, 151, 0.2);
    --light-accent: #247da5;
    --light-accent-dark: #155f86;
    --light-shadow: rgba(50, 99, 134, 0.13);
}

html[data-theme="light"] body,
html[data-theme="light"] body.site-body:not(.home-page),
html[data-theme="light"] body.home-page,
html[data-theme="light"] .home-page-surface {
    background:
        radial-gradient(ellipse 74% 54% at 82% 10%, rgba(116, 138, 224, 0.2) 0%, transparent 72%),
        radial-gradient(ellipse 62% 50% at 96% 64%, rgba(83, 181, 225, 0.22) 0%, transparent 72%),
        radial-gradient(ellipse 56% 42% at -4% 18%, rgba(133, 118, 224, 0.13) 0%, transparent 72%),
        linear-gradient(112deg, var(--light-bg-1) 0%, var(--light-bg-2) 100%) !important;
    color: var(--light-text);
}

html[data-theme="light"] .glow,
html[data-theme="light"] .bg-grid {
    display: none;
}

html[data-theme="light"] .header {
    color: var(--light-text);
}

html[data-theme="light"] .logo,
html[data-theme="light"] .nav-link,
html[data-theme="light"] .header-user-link,
html[data-theme="light"] .page-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .forum-title,
html[data-theme="light"] .auth-title,
html[data-theme="light"] .auth-page-title,
html[data-theme="light"] .profile-section-title,
html[data-theme="light"] .book-title-large,
html[data-theme="light"] .public-profile-section-heading h2 {
    color: var(--light-text) !important;
    text-shadow: none !important;
}

html[data-theme="light"] .nav-link {
    color: rgba(7, 24, 39, 0.64) !important;
}

html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link.active,
html[data-theme="light"] .header-user-link:hover,
html[data-theme="light"] a:not(.btn-primary):not(.btn-small):not(.btn-outline):hover {
    color: var(--light-accent-dark) !important;
}

html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] .content-typography,
html[data-theme="light"] .content-typography p,
html[data-theme="light"] .book-description,
html[data-theme="light"] .auth-subtitle,
html[data-theme="light"] .field-hint,
html[data-theme="light"] .file-upload-note,
html[data-theme="light"] .consent-label,
html[data-theme="light"] .footer-copy {
    color: var(--light-muted) !important;
}

html[data-theme="light"] [style*="color: white"],
html[data-theme="light"] [style*="color: #ffffff"],
html[data-theme="light"] [style*="color:#ffffff"] {
    color: var(--light-text) !important;
}

html[data-theme="light"] [style*="color: #8daabf"],
html[data-theme="light"] [style*="color:#8daabf"],
html[data-theme="light"] [style*="color: #a0a0a0"],
html[data-theme="light"] [style*="color:#a0a0a0"],
html[data-theme="light"] [style*="color: #e0e0e0"],
html[data-theme="light"] [style*="color:#e0e0e0"] {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .btn-primary {
    border: 1px solid rgba(21, 95, 134, 0.24) !important;
    background: linear-gradient(92deg, #2f8db4 0%, #1f6f96 58%, #155f86 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 14px 30px rgba(31, 111, 150, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

html[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .btn-primary:focus-visible {
    background: linear-gradient(92deg, #399cc4 0%, #247da5 58%, #17658d 100%) !important;
    box-shadow:
        0 18px 38px rgba(31, 111, 150, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

html[data-theme="light"] .btn-primary:disabled,
html[data-theme="light"] button.btn-primary[disabled] {
    border-color: rgba(73, 95, 111, 0.18) !important;
    background: rgba(129, 151, 166, 0.22) !important;
    color: rgba(36, 55, 70, 0.58) !important;
    box-shadow: none !important;
}

html[data-theme="light"] .btn-small,
html[data-theme="light"] .btn-outline,
html[data-theme="light"] .menu-toggle,
html[data-theme="light"] .notification-wrapper {
    border-color: rgba(42, 111, 151, 0.24) !important;
    background: rgba(246, 251, 254, 0.62) !important;
    color: var(--light-text) !important;
    box-shadow: 0 10px 24px rgba(50, 99, 134, 0.08);
}

html[data-theme="light"] .btn-small:hover,
html[data-theme="light"] .btn-small:focus-visible,
html[data-theme="light"] .btn-outline:hover,
html[data-theme="light"] .btn-outline:focus-visible {
    border-color: rgba(36, 125, 165, 0.45) !important;
    color: var(--light-accent-dark) !important;
    background: rgba(231, 244, 251, 0.82) !important;
    box-shadow: 0 14px 30px rgba(50, 99, 134, 0.12);
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] .auth-input,
html[data-theme="light"] .reply-textarea,
html[data-theme="light"] .visual-editor {
    border-color: rgba(42, 111, 151, 0.22) !important;
    background: rgba(248, 253, 255, 0.74) !important;
    color: var(--light-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder,
html[data-theme="light"] .visual-editor:empty::before {
    color: rgba(81, 105, 123, 0.7) !important;
}

html[data-theme="light"] .news-tile,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .book-detail-card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .public-profile-card,
html[data-theme="light"] .public-profile-section,
html[data-theme="light"] .public-profile-info-item,
html[data-theme="light"] .cookie-banner,
html[data-theme="light"] .notif-dropdown,
html[data-theme="light"] .modal-window,
html[data-theme="light"] .archive-card,
html[data-theme="light"] .journal-publications-block,
html[data-theme="light"] .proceedings-download-block,
html[data-theme="light"] .conf-stats-block {
    border-color: var(--light-border) !important;
    background:
        radial-gradient(ellipse at 92% 0%, rgba(88, 191, 255, 0.12), transparent 46%),
        linear-gradient(145deg, var(--light-surface-strong), var(--light-surface)) !important;
    box-shadow:
        0 18px 44px var(--light-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .forum-search-wrapper,
html[data-theme="light"] .filter-bar {
    border-color: rgba(42, 111, 151, 0.22) !important;
    background:
        linear-gradient(90deg, rgba(229, 243, 251, 0.88), rgba(220, 235, 248, 0.72)),
        rgba(244, 251, 255, 0.76) !important;
    box-shadow:
        0 18px 42px rgba(50, 99, 134, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

html[data-theme="light"] .forum-search-form svg {
    stroke: #44718b !important;
}

html[data-theme="light"] #live-search-results {
    border-color: rgba(42, 111, 151, 0.22) !important;
    background:
        radial-gradient(ellipse 80% 80% at 100% 0%, rgba(88, 191, 255, 0.16), transparent 68%),
        rgba(248, 253, 255, 0.98) !important;
    box-shadow:
        0 24px 56px rgba(50, 99, 134, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

html[data-theme="light"] #live-search-results a {
    color: var(--light-text) !important;
}

html[data-theme="light"] #live-search-results a:hover {
    background-color: rgba(88, 191, 255, 0.12) !important;
}

html[data-theme="light"] .forum-card,
html[data-theme="light"] .thread-card,
html[data-theme="light"] body.site-body:not(.home-page) .forum-card,
html[data-theme="light"] body.site-body:not(.home-page) .thread-card,
html[data-theme="light"] .home-page-continuation .forum-card {
    border-color: rgba(42, 111, 151, 0.2) !important;
    background:
        radial-gradient(ellipse 36% 140% at 100% 50%, rgba(67, 113, 177, 0.13), transparent 62%),
        radial-gradient(ellipse 45% 150% at 0% 50%, rgba(88, 191, 255, 0.1), transparent 58%),
        linear-gradient(135deg, rgba(248, 253, 255, 0.72), rgba(225, 241, 249, 0.58)) !important;
    box-shadow:
        0 14px 34px rgba(50, 99, 134, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .forum-card:hover,
html[data-theme="light"] .forum-card:focus-visible,
html[data-theme="light"] .thread-card:hover,
html[data-theme="light"] .thread-card:focus-visible {
    border-color: rgba(36, 125, 165, 0.34) !important;
    background:
        radial-gradient(ellipse 38% 140% at 100% 50%, rgba(67, 113, 177, 0.16), transparent 62%),
        radial-gradient(ellipse 45% 150% at 0% 50%, rgba(88, 191, 255, 0.14), transparent 58%),
        linear-gradient(135deg, rgba(252, 254, 255, 0.86), rgba(226, 244, 252, 0.72)) !important;
    box-shadow:
        0 18px 42px rgba(50, 99, 134, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="light"] .forum-name,
html[data-theme="light"] .thread-title,
html[data-theme="light"] .thread-card h3,
html[data-theme="light"] .forum-count,
html[data-theme="light"] .thread-meta-row,
html[data-theme="light"] .thread-meta-row span {
    color: var(--light-text) !important;
}

html[data-theme="light"] .forum-count,
html[data-theme="light"] .thread-meta-row,
html[data-theme="light"] .thread-meta-row span {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .forum-arrow-btn {
    border-color: rgba(42, 111, 151, 0.22) !important;
    background:
        radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.72), transparent 42%),
        rgba(236, 247, 253, 0.82) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 10px 24px rgba(50, 99, 134, 0.1) !important;
}

html[data-theme="light"] .forum-arrow-btn svg path {
    stroke: var(--light-accent-dark) !important;
}

html[data-theme="light"] .status-badge.open {
    color: #176a48 !important;
    background: rgba(47, 172, 112, 0.14) !important;
    border-color: rgba(47, 172, 112, 0.28) !important;
}

html[data-theme="light"] .status-badge.closed {
    color: #8a4c12 !important;
    background: rgba(227, 154, 68, 0.16) !important;
    border-color: rgba(227, 154, 68, 0.3) !important;
}

html[data-theme="light"] .conf-hero-section {
    border-color: rgba(42, 111, 151, 0.18) !important;
    background:
        radial-gradient(ellipse 42% 70% at 88% 20%, rgba(88, 191, 255, 0.14), transparent 70%),
        linear-gradient(135deg, rgba(248, 253, 255, 0.88), rgba(226, 241, 249, 0.72)) !important;
    box-shadow:
        0 22px 52px rgba(50, 99, 134, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

html[data-theme="light"] .conf-title,
html[data-theme="light"] .conf-text-block h2,
html[data-theme="light"] .conf-text-block h3,
html[data-theme="light"] .conf-stats-block h3,
html[data-theme="light"] .detail-value,
html[data-theme="light"] .archive-title,
html[data-theme="light"] .section-subtitle,
html[data-theme="light"] .journal-publications-block h3,
html[data-theme="light"] .proceedings-download-block h3,
html[data-theme="light"] .modal-header h3 {
    color: var(--light-text) !important;
}

html[data-theme="light"] .conf-subtitle,
html[data-theme="light"] .detail-label,
html[data-theme="light"] .conf-text-block p,
html[data-theme="light"] .conf-text-block li,
html[data-theme="light"] .archive-card p,
html[data-theme="light"] .archive-meta,
html[data-theme="light"] .journal-publications-block p,
html[data-theme="light"] .proceedings-download-block p {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .gallery-item {
    border-color: rgba(42, 111, 151, 0.18) !important;
    background: rgba(239, 249, 254, 0.6) !important;
}

html[data-theme="light"] .footer {
    border-top-color: rgba(42, 111, 151, 0.14) !important;
    background: rgba(225, 240, 248, 0.68) !important;
}

html[data-theme="light"] .home-forum-content h1 {
    color: var(--light-text) !important;
    text-shadow: none !important;
}

html[data-theme="light"] .home-forum-content p {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .home-forum-kicker,
html[data-theme="light"] .map-node span {
    color: #177aa5 !important;
}

html[data-theme="light"] .map-node {
    min-width: 146px;
}

html[data-theme="light"] .map-node span {
    font-size: 0.62rem;
}

html[data-theme="light"] .home-page-surface .home-forum-shell::after {
    background:
        linear-gradient(90deg, rgba(239, 248, 253, 0.98) 0%, rgba(233, 244, 251, 0.88) 44%, rgba(222, 234, 249, 0.42) 62%, rgba(222, 234, 249, 0) 100%),
        radial-gradient(ellipse at 28% 54%, rgba(88, 191, 255, 0.1), transparent 44%) !important;
}

html[data-theme="light"] .home-page-surface .home-forum-visual::after {
    background:
        linear-gradient(90deg, rgba(239, 248, 253, 0) 0%, rgba(198, 216, 246, 0.34) 42%, rgba(101, 122, 203, 0.32) 68%, rgba(46, 107, 143, 0.48) 100%),
        radial-gradient(ellipse 58% 70% at 74% 42%, rgba(87, 94, 201, 0.22) 0%, transparent 74%),
        radial-gradient(ellipse 56% 62% at 88% 58%, rgba(88, 191, 255, 0.18) 0%, transparent 72%) !important;
}

@media (min-width: 1181px) {
    .hero-knowledge-map {
        top: 50% !important;
        transform: translateY(-50%);
        right: clamp(58px, 7vw, 150px);
    }
}

@media (min-width: 1500px) {
    .hero-knowledge-map {
        top: 55% !important;
    }
}

@media (max-width: 768px) {
    html[data-theme="light"] .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(180deg, rgba(239, 248, 253, 0.98) 0%, rgba(233, 244, 251, 0.9) 42%, rgba(222, 234, 249, 0.36) 72%, rgba(222, 234, 249, 0) 100%) !important;
    }
}

/* --- Light theme finishing pass: readable text and cleaner glass surfaces --- */
html[data-theme="light"] {
    --light-muted: #314d61;
    --light-soft: #536d80;
    --light-border: rgba(38, 107, 146, 0.24);
    --light-shadow: rgba(42, 90, 124, 0.1);
}

html[data-theme="light"] .content-typography,
html[data-theme="light"] .content-typography p,
html[data-theme="light"] .content-typography li,
html[data-theme="light"] .conf-info-section,
html[data-theme="light"] .conf-info-section p,
html[data-theme="light"] .conf-info-section li,
html[data-theme="light"] .conf-text-block,
html[data-theme="light"] .conf-text-block p,
html[data-theme="light"] .conf-text-block li {
    color: var(--light-muted) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .content-typography h1,
html[data-theme="light"] .content-typography h2,
html[data-theme="light"] .content-typography h3,
html[data-theme="light"] .content-typography h4,
html[data-theme="light"] .content-typography strong,
html[data-theme="light"] .content-typography b,
html[data-theme="light"] .conf-info-section h2,
html[data-theme="light"] .conf-info-section h3,
html[data-theme="light"] .conf-info-section strong,
html[data-theme="light"] .conf-info-section b,
html[data-theme="light"] .conf-stats-block strong,
html[data-theme="light"] .archive-title {
    color: var(--light-text) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .conf-info-section b[style*="#58BFFF"],
html[data-theme="light"] .conf-info-section a[style*="#58BFFF"],
html[data-theme="light"] .journal-publications-block a,
html[data-theme="light"] .proceedings-download-block a {
    color: var(--light-accent-dark) !important;
}

html[data-theme="light"] .conf-stats-block span,
html[data-theme="light"] .archive-meta,
html[data-theme="light"] .journal-publications-block p,
html[data-theme="light"] .proceedings-download-block p,
html[data-theme="light"] .footer a {
    color: var(--light-soft) !important;
    opacity: 1 !important;
}

html[data-theme="light"] .forum-search-wrapper input,
html[data-theme="light"] .forum-search-wrapper input[type="text"],
html[data-theme="light"] .forum-search-wrapper .forum-search-input {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .forum-search-wrapper input::placeholder {
    color: rgba(49, 77, 97, 0.66) !important;
}

html[data-theme="light"] .forum-card,
html[data-theme="light"] .thread-card {
    background:
        radial-gradient(ellipse 32% 120% at 100% 50%, rgba(67, 113, 177, 0.1), transparent 64%),
        radial-gradient(ellipse 42% 130% at 0% 50%, rgba(88, 191, 255, 0.08), transparent 60%),
        linear-gradient(135deg, rgba(250, 254, 255, 0.68), rgba(222, 240, 249, 0.46)) !important;
    box-shadow:
        0 12px 30px rgba(42, 90, 124, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

html[data-theme="light"] .forum-card:hover,
html[data-theme="light"] .thread-card:hover,
html[data-theme="light"] .forum-card:focus-visible,
html[data-theme="light"] .thread-card:focus-visible {
    background:
        radial-gradient(ellipse 34% 130% at 100% 50%, rgba(67, 113, 177, 0.13), transparent 64%),
        radial-gradient(ellipse 42% 130% at 0% 50%, rgba(88, 191, 255, 0.12), transparent 60%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(223, 244, 253, 0.62)) !important;
}

html[data-theme="light"] .home-page-surface .home-forum-hero::after {
    background:
        radial-gradient(ellipse at 72% 12%, rgba(88, 191, 255, 0.12), transparent 48%),
        linear-gradient(180deg, rgba(232, 245, 252, 0) 0%, rgba(212, 234, 247, 0.28) 56%, rgba(232, 245, 252, 0) 100%) !important;
}

@media (max-width: 768px) {
    html[data-theme="light"] .home-page-surface .home-forum-shell {
        background:
            radial-gradient(ellipse 84% 40% at 82% 68%, rgba(92, 122, 210, 0.18), transparent 70%),
            radial-gradient(ellipse 76% 44% at 96% 74%, rgba(88, 191, 255, 0.16), transparent 72%),
            linear-gradient(180deg, #f2f9fe 0%, #eaf5fb 52%, #dcecf6 100%) !important;
    }

    html[data-theme="light"] .home-page-surface .home-forum-visual {
        background:
            linear-gradient(90deg, rgba(238, 248, 253, 0.72) 0%, rgba(198, 216, 247, 0.52) 58%, rgba(60, 112, 150, 0.36) 100%) !important;
    }
}

@media (min-width: 1181px) {
    .hero-knowledge-map {
        right: clamp(76px, 8.5vw, 210px);
    }
}

@media (min-width: 1500px) {
    .hero-knowledge-map {
        top: 52% !important;
    }
}

/* --- Light theme full audit: public pages, forms, articles and mobile hero --- */
html[data-theme="light"] {
    --light-bg-1: #f0f8fd;
    --light-bg-2: #dff1fa;
    --light-text: #061725;
    --light-muted: #29475d;
    --light-soft: #4d6b7f;
    --light-border: rgba(35, 103, 143, 0.26);
    --light-card: rgba(246, 252, 255, 0.74);
    --light-card-strong: rgba(251, 254, 255, 0.9);
    --light-accent: #1688ba;
    --light-accent-dark: #0f668f;
    --light-accent-deep: #0b4e75;
}

html[data-theme="light"] body,
html[data-theme="light"] body.site-body,
html[data-theme="light"] .home-page-surface,
html[data-theme="light"] .page-container,
html[data-theme="light"] .public-profile-page {
    background:
        radial-gradient(ellipse 42% 34% at 14% 16%, rgba(119, 104, 231, 0.16), transparent 72%),
        radial-gradient(ellipse 44% 36% at 88% 14%, rgba(88, 191, 255, 0.22), transparent 72%),
        radial-gradient(ellipse 55% 42% at 80% 88%, rgba(34, 166, 204, 0.22), transparent 74%),
        radial-gradient(ellipse 50% 38% at 18% 82%, rgba(80, 131, 214, 0.12), transparent 72%),
        linear-gradient(115deg, #f4faff 0%, #e8f5fc 42%, #d8edf8 100%) !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .page-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .section-subtitle,
html[data-theme="light"] .article-main-title,
html[data-theme="light"] .sidebar-title,
html[data-theme="light"] .sidebar-news-title,
html[data-theme="light"] .news-title,
html[data-theme="light"] .tile-title,
html[data-theme="light"] .city-title,
html[data-theme="light"] .contact-subtitle,
html[data-theme="light"] .col-label,
html[data-theme="light"] .auth-page-title,
html[data-theme="light"] .auth-section-title,
html[data-theme="light"] .auth-label,
html[data-theme="light"] .profile-name-display,
html[data-theme="light"] .profile-section-title,
html[data-theme="light"] .profile-form label,
html[data-theme="light"] .thread-title,
html[data-theme="light"] .forum-title,
html[data-theme="light"] .author-name,
html[data-theme="light"] .post-body-text h1,
html[data-theme="light"] .post-body-text h2,
html[data-theme="light"] .post-body-text h3,
html[data-theme="light"] .article-body-text h1,
html[data-theme="light"] .article-body-text h2,
html[data-theme="light"] .article-body-text h3,
html[data-theme="light"] .material-book-title,
html[data-theme="light"] .material-author,
html[data-theme="light"] .book-authors-large,
html[data-theme="light"] .book-title-large,
html[data-theme="light"] .extra-block-title,
html[data-theme="light"] .attachments-title,
html[data-theme="light"] .content-info-title,
html[data-theme="light"] .modal-header h3,
html[data-theme="light"] .restore-modal-title {
    color: var(--light-text) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] .article-body-text,
html[data-theme="light"] .article-body-text p,
html[data-theme="light"] .article-body-text li,
html[data-theme="light"] .news-desc,
html[data-theme="light"] .contact-text,
html[data-theme="light"] .requisites-text,
html[data-theme="light"] .auth-footer,
html[data-theme="light"] .auth-intro-card p,
html[data-theme="light"] .auth-section-note,
html[data-theme="light"] .auth-helper-link a,
html[data-theme="light"] .field-hint,
html[data-theme="light"] .file-upload-note,
html[data-theme="light"] .privacy-modal-body,
html[data-theme="light"] .profile-stats,
html[data-theme="light"] .visibility-hint,
html[data-theme="light"] .thread-meta-row,
html[data-theme="light"] .thread-meta-row span,
html[data-theme="light"] .author-status,
html[data-theme="light"] .author-stats,
html[data-theme="light"] .author-academic-info,
html[data-theme="light"] .post-date,
html[data-theme="light"] .post-body-text,
html[data-theme="light"] .post-body-text p,
html[data-theme="light"] .post-body-text li,
html[data-theme="light"] .attach-size,
html[data-theme="light"] .book-description,
html[data-theme="light"] .material-year-tag,
html[data-theme="light"] .book-year-large,
html[data-theme="light"] .content-info-meta,
html[data-theme="light"] .breadcrumbs,
html[data-theme="light"] .breadcrumbs a {
    color: var(--light-muted) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html[data-theme="light"] [style*="color: white"],
html[data-theme="light"] [style*="color:white"],
html[data-theme="light"] [style*="color: #fff"],
html[data-theme="light"] [style*="color:#fff"],
html[data-theme="light"] [style*="color: #ffffff"],
html[data-theme="light"] [style*="color:#ffffff"],
html[data-theme="light"] [style*="color: rgb(255, 255, 255)"] {
    color: var(--light-text) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

html[data-theme="light"] [style*="color: #8daabf"],
html[data-theme="light"] [style*="color:#8daabf"],
html[data-theme="light"] [style*="color: #a0a0a0"],
html[data-theme="light"] [style*="color:#a0a0a0"],
html[data-theme="light"] [style*="color: #e0e0e0"],
html[data-theme="light"] [style*="color:#e0e0e0"],
html[data-theme="light"] [style*="color: #888"],
html[data-theme="light"] [style*="color:#888"],
html[data-theme="light"] [style*="color: #808080"],
html[data-theme="light"] [style*="color:#808080"],
html[data-theme="light"] [style*="color: #5a6b7c"],
html[data-theme="light"] [style*="color:#5a6b7c"] {
    color: var(--light-muted) !important;
    opacity: 1 !important;
}

html[data-theme="light"] .meta-date,
html[data-theme="light"] .news-date,
html[data-theme="light"] .sidebar-date,
html[data-theme="light"] .inline-accent-link,
html[data-theme="light"] .auth-footer a,
html[data-theme="light"] .auth-helper-link span,
html[data-theme="light"] .forgot-pass-link,
html[data-theme="light"] .contact-link,
html[data-theme="light"] .email-link,
html[data-theme="light"] .messenger-row,
html[data-theme="light"] .btn-back,
html[data-theme="light"] .selected-file-name,
html[data-theme="light"] .file-download-btn,
html[data-theme="light"] .btn-download {
    color: var(--light-accent-dark) !important;
}

html[data-theme="light"] .selected-file-row {
    border: 1px solid rgba(42, 111, 151, 0.18);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(230, 244, 252, 0.58));
    color: var(--light-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .selected-file-row span {
    color: var(--light-text) !important;
}

html[data-theme="light"] .selected-file-row .delete-file-btn {
    color: #ff5a5a !important;
}

html[data-theme="light"] .news-article-block,
html[data-theme="light"] .news-sidebar,
html[data-theme="light"] .sidebar-card,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .auth-intro-card,
html[data-theme="light"] .profile-card,
html[data-theme="light"] .profile-sidebar,
html[data-theme="light"] .public-profile-card,
html[data-theme="light"] .public-profile-section,
html[data-theme="light"] .public-profile-info-item,
html[data-theme="light"] .public-profile-topic,
html[data-theme="light"] .visibility-section,
html[data-theme="light"] .forum-post,
html[data-theme="light"] .post-sidebar,
html[data-theme="light"] .post-content,
html[data-theme="light"] .thread-closed-banner,
html[data-theme="light"] .file-card,
html[data-theme="light"] .attachment-item,
html[data-theme="light"] .material-card,
html[data-theme="light"] .filter-bar,
html[data-theme="light"] .news-extra-blocks,
html[data-theme="light"] .upload-dropzone,
html[data-theme="light"] .uploaded-item,
html[data-theme="light"] .modal-window,
html[data-theme="light"] .privacy-modal-window,
html[data-theme="light"] .profile-topic-row,
html[data-theme="light"] .topic-empty-state,
html[data-theme="light"] .topic-card,
html[data-theme="light"] .reading-mode-wrapper,
html[data-theme="light"] .content-card,
html[data-theme="light"] .notif-dropdown {
    border-color: var(--light-border) !important;
    background:
        radial-gradient(ellipse 46% 70% at 92% 0%, rgba(88, 191, 255, 0.11), transparent 68%),
        linear-gradient(145deg, var(--light-card-strong), var(--light-card)) !important;
    box-shadow:
        0 18px 46px rgba(42, 90, 124, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .news-card-home,
html[data-theme="light"] .news-tile,
html[data-theme="light"] .home-page-continuation .news-card-home,
html[data-theme="light"] .home-page-continuation .material-card,
html[data-theme="light"] .home-page-continuation .forum-card {
    border-color: rgba(35, 103, 143, 0.24) !important;
    background:
        radial-gradient(ellipse 46% 70% at 94% 0%, rgba(88, 191, 255, 0.14), transparent 70%),
        linear-gradient(145deg, rgba(252, 254, 255, 0.84), rgba(223, 240, 249, 0.62)) !important;
    box-shadow:
        0 18px 44px rgba(42, 90, 124, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .auth-btn,
html[data-theme="light"] .home-page-surface .home-forum-actions .btn-primary {
    border: 1px solid rgba(255, 255, 255, 0.34) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 36%),
        linear-gradient(92deg, #43b9df 0%, #1688ba 48%, #0b5c86 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 18px 38px rgba(18, 126, 176, 0.28),
        0 0 0 1px rgba(13, 105, 150, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

html[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .btn-primary:focus-visible,
html[data-theme="light"] .auth-btn:hover,
html[data-theme="light"] .auth-btn:focus-visible,
html[data-theme="light"] .home-page-surface .home-forum-actions .btn-primary:hover,
html[data-theme="light"] .home-page-surface .home-forum-actions .btn-primary:focus-visible {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 34%),
        linear-gradient(92deg, #55c8ed 0%, #1a95c8 48%, #0d6796 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 22px 46px rgba(18, 126, 176, 0.34),
        0 0 0 1px rgba(13, 105, 150, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
}

html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .btn-outline,
html[data-theme="light"] .btn-small,
html[data-theme="light"] .btn-back,
html[data-theme="light"] .page-btn,
html[data-theme="light"] .thread-control-btn,
html[data-theme="light"] .btn-cancel-custom {
    border-color: rgba(16, 111, 160, 0.32) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(222, 241, 251, 0.72)) !important;
    color: var(--light-accent-deep) !important;
    box-shadow: 0 12px 26px rgba(42, 90, 124, 0.1) !important;
}

html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .btn-outline:hover,
html[data-theme="light"] .btn-small:hover,
html[data-theme="light"] .btn-back:hover,
html[data-theme="light"] .page-btn:hover,
html[data-theme="light"] .thread-control-btn:hover,
html[data-theme="light"] .btn-cancel-custom:hover {
    border-color: rgba(16, 111, 160, 0.5) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(204, 235, 249, 0.88)) !important;
    color: var(--light-accent-deep) !important;
}

html[data-theme="light"] .center-btn .btn-secondary {
    border-color: rgba(255, 255, 255, 0.38) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 38%),
        linear-gradient(92deg, #48bee5 0%, #178bbd 52%, #0c638f 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 18px 38px rgba(18, 126, 176, 0.22),
        0 0 0 1px rgba(13, 105, 150, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

html[data-theme="light"] .center-btn .btn-secondary:hover,
html[data-theme="light"] .center-btn .btn-secondary:focus-visible {
    border-color: rgba(255, 255, 255, 0.52) !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 34%),
        linear-gradient(92deg, #5acced 0%, #1a97c9 52%, #0e6b99 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 24px 48px rgba(18, 126, 176, 0.3),
        0 0 0 1px rgba(13, 105, 150, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.36) !important;
}

html[data-theme="light"] .btn-primary:disabled,
html[data-theme="light"] button.btn-primary[disabled],
html[data-theme="light"] .disabled {
    border-color: rgba(79, 105, 122, 0.2) !important;
    background: rgba(158, 183, 199, 0.24) !important;
    color: rgba(44, 67, 82, 0.62) !important;
    box-shadow: none !important;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] .auth-input,
html[data-theme="light"] .filter-input,
html[data-theme="light"] .filter-select,
html[data-theme="light"] .reply-textarea,
html[data-theme="light"] .visual-editor,
html[data-theme="light"] .toggle-field-wrapper {
    border-color: rgba(35, 103, 143, 0.28) !important;
    background: rgba(244, 251, 255, 0.82) !important;
    color: var(--light-text) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 20px rgba(42, 90, 124, 0.06) !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder,
html[data-theme="light"] .visual-editor:empty::before {
    color: rgba(49, 77, 97, 0.68) !important;
}

html[data-theme="light"] .password-toggle,
html[data-theme="light"] .modal-close,
html[data-theme="light"] .btn-dock-delete {
    color: var(--light-soft) !important;
}

html[data-theme="light"] svg path[stroke="white"],
html[data-theme="light"] svg line[stroke="white"],
html[data-theme="light"] svg circle[stroke="white"] {
    stroke: var(--light-accent-dark) !important;
}

html[data-theme="light"] .article-main-image,
html[data-theme="light"] .news-card-img,
html[data-theme="light"] .tile-image,
html[data-theme="light"] .material-cover-wrapper,
html[data-theme="light"] .gallery-item {
    box-shadow: 0 16px 36px rgba(42, 90, 124, 0.12);
}

html[data-theme="light"] .home-page-continuation .section-title,
html[data-theme="light"] .home-page-continuation .forum-name,
html[data-theme="light"] .home-page-continuation .forum-count,
html[data-theme="light"] .home-page-continuation .material-book-title,
html[data-theme="light"] .home-page-continuation .news-title {
    color: var(--light-text) !important;
    text-shadow: none !important;
}

html[data-theme="light"] .public-profile-identity h1,
html[data-theme="light"] .public-profile-stats strong,
html[data-theme="light"] .public-profile-info-item strong,
html[data-theme="light"] .public-profile-topic h3 {
    color: var(--light-text) !important;
}

html[data-theme="light"] .public-profile-back,
html[data-theme="light"] .public-profile-kicker,
html[data-theme="light"] .public-profile-topic-category,
html[data-theme="light"] .public-profile-topic-status {
    color: var(--light-accent-dark) !important;
}

html[data-theme="light"] .public-profile-badge,
html[data-theme="light"] .public-profile-topic-status {
    border-color: rgba(16, 111, 160, 0.28) !important;
    background: rgba(88, 191, 255, 0.14) !important;
}

html[data-theme="light"] .public-profile-stats span,
html[data-theme="light"] .public-profile-info-item span,
html[data-theme="light"] .public-profile-topic p,
html[data-theme="light"] .public-profile-empty {
    color: var(--light-muted) !important;
}

@media (max-width: 768px) {
    .home-page-surface .home-forum-visual,
    .home-page-surface .hero-knowledge-map {
        display: none !important;
    }

    .home-page-surface .home-forum-shell {
        min-height: calc(100vh - 72px);
        background:
            radial-gradient(ellipse 76% 42% at 82% 92%, rgba(88, 191, 255, 0.2), transparent 72%),
            radial-gradient(ellipse 80% 48% at 62% 88%, rgba(97, 76, 231, 0.34), transparent 74%),
            linear-gradient(180deg, #050509 0%, #06070d 50%, #11143a 74%, #17375b 100%) !important;
    }

    .home-page-surface .home-forum-content.hero-content {
        padding-bottom: 148px !important;
    }

    .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.54) 45%, rgba(42, 34, 128, 0.18) 74%, rgba(42, 34, 128, 0) 100%) !important;
    }

    html[data-theme="light"] .home-page-surface .home-forum-shell {
        background:
            radial-gradient(ellipse 74% 42% at 84% 88%, rgba(88, 191, 255, 0.22), transparent 72%),
            radial-gradient(ellipse 72% 44% at 48% 92%, rgba(111, 97, 227, 0.2), transparent 74%),
            linear-gradient(180deg, #f3faff 0%, #eaf6fc 58%, #d8edf8 100%) !important;
    }

    html[data-theme="light"] .home-page-surface .home-forum-shell::after {
        background:
            linear-gradient(180deg, rgba(246, 251, 255, 0.82) 0%, rgba(232, 245, 252, 0.46) 54%, rgba(184, 221, 240, 0.16) 78%, rgba(184, 221, 240, 0) 100%) !important;
    }
}

/* --- Final light theme correction: remove inset panels, restore card shapes --- */
html[data-theme="light"] body.site-body,
html[data-theme="light"] body.site-body:not(.home-page) {
    background:
        radial-gradient(ellipse 54% 40% at 12% 12%, rgba(121, 105, 232, 0.18), transparent 72%),
        radial-gradient(ellipse 48% 38% at 88% 10%, rgba(88, 191, 255, 0.24), transparent 70%),
        radial-gradient(ellipse 62% 48% at 84% 82%, rgba(34, 166, 204, 0.28), transparent 74%),
        radial-gradient(ellipse 50% 38% at 20% 88%, rgba(80, 131, 214, 0.14), transparent 72%),
        linear-gradient(115deg, #f6fbff 0%, #e9f5fc 44%, #d8edf8 100%) !important;
    background-attachment: fixed !important;
}

html[data-theme="light"] .wrapper,
html[data-theme="light"] .page-container,
html[data-theme="light"] .auth-wrapper,
html[data-theme="light"] .public-profile-page {
    background: transparent !important;
}

html[data-theme="light"] .page-container::before,
html[data-theme="light"] .page-container::after,
html[data-theme="light"] .auth-wrapper::before,
html[data-theme="light"] .auth-wrapper::after {
    content: none !important;
    display: none !important;
}

html[data-theme="light"] .materials-grid .material-card {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
}

html[data-theme="light"] .materials-grid .material-cover-wrapper {
    border: 1px solid rgba(35, 103, 143, 0.22) !important;
    border-radius: 16px !important;
    background:
        radial-gradient(ellipse 70% 54% at 80% 0%, rgba(88, 191, 255, 0.16), transparent 72%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(229, 243, 251, 0.72)) !important;
    box-shadow:
        0 22px 46px rgba(42, 90, 124, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
}

html[data-theme="light"] .materials-grid .material-card:hover .material-cover-wrapper {
    border-color: rgba(16, 111, 160, 0.36) !important;
    box-shadow:
        0 28px 54px rgba(42, 90, 124, 0.17),
        0 0 0 1px rgba(88, 191, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

html[data-theme="light"] .file-details .attach-name,
html[data-theme="light"] .image-type .attach-name,
html[data-theme="light"] .attach-name,
html[data-theme="light"] .file-name {
    color: var(--light-text) !important;
}

html[data-theme="light"] .auth-step {
    border-color: rgba(35, 103, 143, 0.18) !important;
    background: rgba(255, 255, 255, 0.34) !important;
    color: var(--light-muted) !important;
}

html[data-theme="light"] .auth-step span {
    color: var(--light-accent) !important;
}

html[data-theme="light"] .file-upload-group {
    border-color: rgba(88, 191, 255, 0.46) !important;
    background: rgba(244, 251, 255, 0.48) !important;
}

html[data-theme="light"] .file-label,
html[data-theme="light"] .file-icon,
html[data-theme="light"] #file-name-text,
html[data-theme="light"] .consent-label {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .menu-toggle span {
    background: var(--light-accent-deep) !important;
}

html[data-theme="light"] .menu-toggle {
    border-color: rgba(35, 103, 143, 0.22) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(222, 241, 251, 0.68)) !important;
    box-shadow: 0 12px 26px rgba(42, 90, 124, 0.12) !important;
}

@media (max-width: 768px) {
    .home-page-surface .home-forum-hero {
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 18px !important;
    }

    .home-page-surface .home-forum-swiper,
    .home-page-surface .home-forum-swiper .swiper-wrapper,
    .home-page-surface .home-forum-slide.hero-slide,
    .home-page-surface .home-forum-shell {
        height: auto !important;
        min-height: 0 !important;
    }

    .home-page-surface .home-forum-slide.hero-slide {
        padding: 0 0 72px !important;
    }

    .home-page-surface .home-forum-shell {
        display: block !important;
        overflow: hidden !important;
    }

    .home-page-surface .home-forum-content.hero-content {
        padding: 60px 12px 72px !important;
        min-height: 0 !important;
        max-width: none !important;
    }

    .home-page-surface .home-forum-content h1 {
        font-size: clamp(2.05rem, 12vw, 3.05rem) !important;
        line-height: 1.04 !important;
        max-width: 100% !important;
    }

    .home-page-surface .home-forum-content p {
        max-width: 100% !important;
    }

    .home-page-surface .home-forum-visual,
    .home-page-surface .hero-knowledge-map,
    .home-page-surface .ndt-hero-3d {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        opacity: 0 !important;
    }

    .home-page-surface .home-forum-controls {
        bottom: 18px !important;
    }

    .home-page-surface .home-forum-hero::after,
    .home-page-surface .home-forum-hero + .news-section::before {
        content: none !important;
        display: none !important;
    }

    .home-page-surface .home-forum-hero + .news-section {
        padding-top: 34px !important;
    }

    html[data-theme="light"] .home-page-surface .home-forum-shell {
        background:
            radial-gradient(ellipse 78% 42% at 82% 88%, rgba(88, 191, 255, 0.24), transparent 72%),
            radial-gradient(ellipse 70% 46% at 42% 92%, rgba(111, 97, 227, 0.16), transparent 74%),
            linear-gradient(180deg, #f7fbff 0%, #ebf7fd 58%, #d9eff9 100%) !important;
    }
}

/* Final UI fixes: forum search dropdown, selected files, related materials. */
.forum-search-wrapper {
    position: relative !important;
    z-index: 30 !important;
}

.forum-list {
    position: relative;
    z-index: 1;
}

#live-search-results {
    top: calc(100% + 10px) !important;
    margin-top: 0 !important;
    z-index: 1200 !important;
    border-radius: 20px !important;
    overflow: hidden auto !important;
    max-height: min(420px, 52vh);
}

#live-search-results a {
    color: #f7fbff !important;
}

html[data-theme="light"] #live-search-results {
    border-color: rgba(42, 111, 151, 0.22) !important;
    background:
        radial-gradient(ellipse 80% 80% at 100% 0%, rgba(88, 191, 255, 0.16), transparent 68%),
        rgba(248, 253, 255, 0.98) !important;
    box-shadow:
        0 24px 56px rgba(50, 99, 134, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

html[data-theme="light"] #live-search-results a {
    color: var(--light-text) !important;
}

html[data-theme="light"] #live-search-results a:hover {
    background-color: rgba(88, 191, 255, 0.12) !important;
}

html[data-theme="light"] .selected-file-row {
    border: 1px solid rgba(42, 111, 151, 0.18);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(230, 244, 252, 0.58));
    color: var(--light-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .selected-file-row span {
    color: var(--light-text) !important;
}

html[data-theme="light"] .selected-file-row .delete-file-btn {
    color: #ff5a5a !important;
}

.other-materials-section .swiper-slide {
    height: auto;
}

html[data-theme="light"] .other-materials-section .material-card {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
    max-width: 190px;
    margin: 0 auto;
}

html[data-theme="light"] .other-materials-section .material-cover-wrapper {
    border: 1px solid rgba(35, 103, 143, 0.2) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(ellipse 70% 54% at 80% 0%, rgba(88, 191, 255, 0.14), transparent 72%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(229, 243, 251, 0.72)) !important;
    box-shadow:
        0 22px 46px rgba(42, 90, 124, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden !important;
}

html[data-theme="light"] .other-materials-section .material-card:hover .material-cover-wrapper {
    border-color: rgba(16, 111, 160, 0.34) !important;
    box-shadow:
        0 28px 54px rgba(42, 90, 124, 0.17),
        0 0 0 1px rgba(88, 191, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

/* EOF regression cleanup: search layering, light related cards, notifications. */
.forum-search-wrapper:focus-within {
    z-index: 2200 !important;
}

#live-search-results {
    z-index: 2400 !important;
    padding: 8px !important;
}

.live-search-empty {
    padding: 16px;
    color: #8daabf;
    text-align: center;
}

.live-search-item {
    display: block;
    padding: 13px 14px;
    border-radius: 14px;
    color: #f7fbff !important;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.live-search-item:hover,
.live-search-item:focus-visible {
    background: rgba(88, 191, 255, 0.1);
    transform: translateX(2px);
    outline: none;
}

.live-search-item-title,
.live-search-item-meta {
    display: block;
}

.live-search-item-title {
    margin-bottom: 4px;
    font-weight: 700;
}

.live-search-item-meta {
    color: #8daabf;
    font-size: 0.82rem;
}

.forum-search-page .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.forum-search-summary {
    margin-bottom: 30px;
    color: #8daabf;
    font-size: 1.1rem;
}

.forum-search-summary strong {
    color: #ffffff;
}

.forum-search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    text-decoration: none;
}

.forum-search-card-main {
    min-width: 0;
}

.forum-search-card-meta {
    margin-top: 8px;
    color: #8daabf;
    font-size: 0.88rem;
    line-height: 1.45;
}

.forum-search-empty-state {
    padding: 52px 28px;
    border: 1px dashed rgba(88, 191, 255, 0.18);
    border-radius: 22px;
    background:
        radial-gradient(ellipse 60% 90% at 100% 0%, rgba(88, 191, 255, 0.08), transparent 72%),
        rgba(30, 48, 65, 0.24);
    color: #8daabf;
    text-align: center;
}

.forum-search-empty-state svg {
    margin-bottom: 15px;
    color: #8daabf;
}

.forum-search-empty-state p {
    margin: 6px 0 0;
    color: #5a6b7c;
}

.notif-list {
    max-height: min(420px, 58vh);
    scrollbar-width: thin;
    scrollbar-color: rgba(88, 191, 255, 0.4) transparent;
}

.notif-clear-btn:disabled {
    cursor: wait;
    opacity: 0.58;
}

.app-dialog-mark {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-dialog-mark::before {
    margin: -3px 0 0;
}

.app-dialog-error .app-dialog-mark::before,
.app-dialog-warning .app-dialog-mark::before {
    margin: 0;
}

html[data-theme="light"] .live-search-empty,
html[data-theme="light"] .live-search-item-meta,
html[data-theme="light"] .forum-search-summary,
html[data-theme="light"] .forum-search-card-meta {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .live-search-item,
html[data-theme="light"] .forum-search-summary strong {
    color: var(--light-text) !important;
}

html[data-theme="light"] .live-search-item:hover,
html[data-theme="light"] .live-search-item:focus-visible {
    background: rgba(88, 191, 255, 0.13) !important;
}

html[data-theme="light"] .forum-search-empty-state,
html[data-theme="light"] .no-results {
    border: 1px solid rgba(35, 103, 143, 0.2) !important;
    border-radius: 22px !important;
    background:
        radial-gradient(ellipse 54% 90% at 100% 0%, rgba(88, 191, 255, 0.14), transparent 70%),
        linear-gradient(145deg, rgba(252, 254, 255, 0.82), rgba(224, 242, 250, 0.62)) !important;
    box-shadow:
        0 18px 44px rgba(42, 90, 124, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
    color: var(--light-muted) !important;
}

html[data-theme="light"] .forum-search-empty-state svg {
    color: var(--light-soft) !important;
}

html[data-theme="light"] .forum-search-empty-state p {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .news-sidebar .sidebar-card {
    border: 1px solid rgba(35, 103, 143, 0.2) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(ellipse 58% 80% at 100% 0%, rgba(88, 191, 255, 0.13), transparent 70%),
        linear-gradient(145deg, rgba(252, 254, 255, 0.84), rgba(225, 242, 250, 0.64)) !important;
    box-shadow:
        0 16px 38px rgba(42, 90, 124, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

html[data-theme="light"] .news-sidebar .sidebar-card:hover,
html[data-theme="light"] .news-sidebar .sidebar-card:focus-visible {
    border-color: rgba(16, 111, 160, 0.32) !important;
    background:
        radial-gradient(ellipse 58% 80% at 100% 0%, rgba(88, 191, 255, 0.18), transparent 70%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(216, 239, 249, 0.76)) !important;
    transform: translateY(-2px);
}

html[data-theme="light"] .other-materials-section .material-info {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="light"] .notif-dropdown {
    width: 340px;
    border-color: rgba(35, 103, 143, 0.22) !important;
    background:
        radial-gradient(ellipse 70% 80% at 100% 0%, rgba(88, 191, 255, 0.16), transparent 72%),
        rgba(250, 254, 255, 0.96) !important;
}

html[data-theme="light"] .notif-dropdown-head {
    border-bottom-color: rgba(35, 103, 143, 0.14) !important;
    color: var(--light-text) !important;
}

html[data-theme="light"] .notif-clear-btn {
    color: var(--light-accent-dark) !important;
}

html[data-theme="light"] .notif-clear-btn:hover,
html[data-theme="light"] .notif-clear-btn:focus-visible {
    color: var(--light-accent-deep) !important;
}

html[data-theme="light"] .notif-item {
    border-bottom-color: rgba(35, 103, 143, 0.12) !important;
}

html[data-theme="light"] .notif-item:hover,
html[data-theme="light"] .notif-item:focus-visible,
html[data-theme="light"] .notif-item.is-unread {
    background: rgba(88, 191, 255, 0.12) !important;
}

html[data-theme="light"] .notif-item-text,
html[data-theme="light"] .notif-empty {
    color: var(--light-muted) !important;
}

html[data-theme="light"] .notif-item-date {
    color: var(--light-soft) !important;
}

html[data-theme="light"] .app-dialog-mark {
    box-shadow: 0 16px 34px rgba(36, 125, 165, 0.22);
}


/* Ростехдиагностика: shared brand mark and responsive wordmark. */
.header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 0;
    text-transform: none;
    font-size: 1.2rem;
    line-height: 1.2;
    letter-spacing: -0.035em;
}
.brand-mark {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex: 0 0 auto;
    background: #f5f6f8;
    border-radius: 50%;
    padding: 3px;
}
.brand-name { white-space: nowrap; }
.header .logo:focus-visible {
    outline: 2px solid #c99d46;
    outline-offset: 5px;
    border-radius: 8px;
}
@media (min-width: 1181px) {
    .header { gap: 20px; }
    .header-shell { margin-left: 0; gap: 20px; }
    .nav-menu { gap: 20px; }
}
@media (max-width: 560px) {
    .header .logo { gap: 7px; font-size: clamp(0.82rem, 3.65vw, 1.05rem); }
    .brand-mark { width: 36px; height: 36px; padding: 2px; }
    .header { column-gap: 8px; }
    .header .header-meta { gap: 6px; }
}
@media (max-width: 350px) {
    .header .logo { gap: 5px; font-size: 0.72rem; }
    .brand-mark { width: 30px; height: 30px; }
    .header .header-meta { gap: 4px; }
}
