/* Шрифты */

@font-face {
    font-family: "Furore";
    font-display: swap;
    src: url("/static/fonts/Furore.5363b70db828.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Stengazeta";
    font-display: swap;
    src: url("/static/fonts/Stengazeta-Regular_5.45b01a4d5d6a.woff2") format("woff2"),
         url("/static/fonts/Stengazeta-Regular_5.1853f614a9ed.woff") format("woff");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Roboto";
    font-display: swap;
    src: url("/static/fonts/Roboto-Regular.8fc49bc605c4.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Tolkien";
    font-display: swap;
    src: url("/static/fonts/TOLKIENCYR.558e1714936f.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}




/* Общий стиль */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    font-size: calc(1.5vh);
    overflow-y: scroll; /* показывать прокрутку */
    background: #283037;

    /* background-image: url("/static/img/powerlines.b761c7b949bf.svg");
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;  */
}

.secbody
{   
    /* margin-top: 1vh; */
    width: 100%;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    flex-shrink: 0;
    flex-basis: auto;
    z-index: 0;
    position: relative;
}

.power-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100svh;
}

.power-lines img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: invert(77%) sepia(81%) saturate(1358%)
          hue-rotate(356deg) brightness(104%) contrast(103%)
          drop-shadow(0 1.9vh 0.9vh rgba(0,0,0,0.5))
          drop-shadow(0 0 0.1vh rgba(0,0,0,1));
}

/* Хедер */
header {
    position: relative;
    height: 40vh; /* Высота хедера */
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    overflow: hidden; /* Чтобы ничего не выходило за пределы */
}

/* Текстовые элементы поверх слайдера */
header .left {
    position: absolute;
    z-index: 1; /* Элементы располагаются поверх слайдера */
    top: calc(0.5vh);
    left: calc(1vh) /* Размещаем в левом верхнем углу */
}

header .left span a{
    font-family: Stengazeta;
    text-decoration: none;
    color: #FFD700;
    font-size: calc(8vh);
    line-height: 0.9;
    /* padding: calc(1vh); */
    text-shadow: 
    -0   -0.12vh 0.12vh #000000,
     0   -0.12vh 0.12vh #000000,
    -0    0.12vh 0.12vh #000000,
     0    0.12vh 0.12vh #000000,
    -0.12vh -0   0.12vh #000000,
     0.12vh -0   0.12vh #000000,
    -0.12vh  0   0.12vh #000000,
     0.12vh  0   0.12vh #000000,
    -0.12vh -0.12vh 0.12vh #000000,
     0.12vh -0.12vh 0.12vh #000000,
    -0.12vh  0.12vh 0.12vh #000000,
     0.12vh  0.12vh 0.12vh #000000,
    -0.12vh -0.12vh 0.12vh #000000,
     0.12vh -0.12vh 0.12vh #000000,
    -0.12vh  0.12vh 0.12vh #000000,
     0.12vh  0.12vh 0.12vh #000000;
}

header .right {
    position: absolute;
    top: calc(1vh);
    right: calc(1vh); /* Размещаем в правом верхнем углу */
    z-index: 1; /* Элементы располагаются поверх слайдера */
}

/* Для панели навигации */
.nav-plank {
    height: 7vh;
    display: none;
}

.nav-plank.visible {
    display: block; /* Показываем, когда nav прилипает */
}

/* Навигация */

nav
{
    display: flex;
    justify-content: space-around;
    align-items: center; /*горизонтальное выравнивание по центру*/
    height: 7vh;
    border: 0.5vh solid #FFD700;
    border-radius: 10vh; /* Радиус скругления */
    background-color: rgba(0, 0, 0, 0.95);
    overflow:hidden; /*скрывать то что выходит за рамки*/
    /* transition: all 1s;  */
    margin: 0 auto;
    width: 98%;
    z-index: 1;

}

.nav__container
{
    /* width: 120px; */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__burger{
    display: none;
}

/* nav {
    display: flex;
    justify-content: center;
    height: 5vh;
    background: #000;
    color: #fff;
} */

nav a {
    padding: 0 calc(1vh);
    text-decoration: none;
    color: inherit;
    font-size: calc(2vh); /* Пропорциональный размер текста */
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 3.9vh;
    font-family: Tolkien;
    color: #ffffff;
}

nav.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 98%; /* Сохраняем ширину */
    box-shadow: 0 0.5vh 1vh rgba(0, 0, 0, 0.5);
}

nav a:hover {
    color: #FFD700;
}

nav a.active {
    color: #FFD700; /* Тот же цвет, что и при наведении */
}

/* Сетка для контента */

#content {
    z-index: 0;
    position: relative;
    width: 98%;
}

/* Для уроков */

.lesson
{            
    display: flex;
    margin: 0;
    min-height: 60vh; /* Устанавливает высоту на весь экран */
    border: 0.5vh solid #000000;
    /* border-radius: 5vh;
    overflow:hidden; */
}
#lesson_sidebar_helper {
    flex: 0.2; /* Такая же ширина, как у сайдбара */
    background-color: rgba(255,255,255,1); /* Фон подложки */
    border-right: 1vh solid #ccc; /* Бордер подложки */
    min-height: 100%; /* Растягивается на всю высоту родителя (.lesson) */
    position: relative; /* Для правильного позиционирования sticky внутри */
}

#lesson_sidebar {
    padding: 2vh; /* Внутренние отступы только для контента */
    padding-top: 7vh;
    position: sticky; /* Прилипающий сайдбар */
    top: 0; /* Прилипает к верхнему краю */
    height: fit-content; /* Высота подстраивается под содержимое */
    max-height: 100vh; /* Максимальная высота равна высоте экрана */
    overflow-y: auto; /* Включаем прокрутку по вертикали при переполнении */
    background-color: transparent; /* Фон убираем, он теперь в подложке */
    border-right: none; /* Бордер тоже убираем, он в подложке */
}

#lesson_sidebar h3 {
    padding-bottom: 2vh;
}

#lesson_content {
    flex: 0.55;
    padding: 2vh;
    background-color: rgba(255,255,255,1);
    overflow: auto;
}

#lesson_content h1 {
    padding-bottom: 2vh;
    font-size: 5vh;
    line-height: 5vh;
    word-break: break-word;
}

#lesson_content h2 {
    padding-bottom: 2vh;
    padding-top: 2vh;
}

#lesson_content .lesson-image {
    margin: 0 2vh 0 0; /* Отступы */
}

#lesson_content .image-left {
    float: left; /* Обтекание слева */
    margin: 0 2vh 0 0; /* Отступ справа */
}

#lesson_content .image-right {
    float: right; /* Обтекание справа */
    margin: 0 0 0 2vh; /* Отступ слева */
}

#lesson_content .image-center {
    display: block;  /* Убираем обтекание */
    margin: 0 auto;  /* Центрируем */
    padding: 2vh 0;  /* Отступы сверху и снизу */
}


#lesson_content p {
    white-space: pre-wrap;
    word-break: break-word;
}
.lesson_nav-link {
    display: block;
    margin: 1vh 0;
    color: #007BFF;
    text-decoration: none;
}
.lesson_nav-link:hover {
    text-decoration: underline;
}

.lesson .comments{
    flex: 0.25;
    padding: 2vh;
    border-left: 1vh solid #ccc;
    word-break: break-word;
    background-color: rgba(255,255,255,1);
}

#lesson_content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2vh 0;
    font-family: Arial, sans-serif;
    box-shadow: 0 0 1vh rgba(0,0,0,0.1);
  }
  #lesson_content th {
    background-color: #2c3e50;
    color: white;
    padding: 1vh;
    text-align: left;
    border-bottom: 0.3vh solid #34495e;
  }
  #lesson_content td {
    padding: 1vh;
    border-bottom: 0.1vh solid #dddddd;
    background-color: #f9f9f9;
  }
  #lesson_content tr:nth-child(even) td {
    background-color: #ffffff;
  }
  #lesson_content tr:hover td {
    background-color: #f1f1f1;
    transition: 0.3s;
  }
  #lesson_content td:first-child {
    font-weight: bold;
    color: #2980b9;
  }


.lessons
{            
    display: flex;
    margin: 0;
    flex-wrap: wrap;
    gap: 1vh;
    justify-content: center;
}

.lessons_item
{
    width:30vh;
    height:30vh;
    margin-right:1vh;
    margin-left:1vh;
    margin-top:2vh;
    margin-bottom:2vh;
    background:center center no-repeat #fff;
    -webkit-background-size:cover;
    background-size:cover;
    -webkit-box-shadow: 1vh 1vh 1vh rgba(0, 0, 0, .5);
    box-shadow: 1vh 1vh 1vh rgba(0, 0, 0, .5);
    overflow-y:hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-wrap: wrap;
    border: 0.3vh solid #FFD700;
    border-radius: 2vh;
}

.lessons_post_style
{
    height: 100%;
}

.lessons_post_style a
{
    line-height: 3.5vh;
    text-decoration: none; 
    color: rgb(255, 255, 255);
    /* text-transform: uppercase; */
    text-align: center;
    display: block; /*чтобы на всю длинну*/
    height: 100%; /*чтобы занимал всю высоту*/
    /*равен высоте дочернего чтобы быть по центру*/
    padding: 1vh;
    padding-top: 2vh;
    font-family: Stengazeta;
	font-size: 3.5vh;
    white-space: pre-wrap;
    word-break: break-word;
    text-shadow: 
    -0   -0.12vh 0.12vh #000000,
     0   -0.12vh 0.12vh #000000,
    -0    0.12vh 0.12vh #000000,
     0    0.12vh 0.12vh #000000,
    -0.12vh -0   0.12vh #000000,
     0.12vh -0   0.12vh #000000,
    -0.12vh  0   0.12vh #000000,
     0.12vh  0   0.12vh #000000,
    -0.12vh -0.12vh 0.12vh #000000,
     0.12vh -0.12vh 0.12vh #000000,
    -0.12vh  0.12vh 0.12vh #000000,
     0.12vh  0.12vh 0.12vh #000000,
    -0.12vh -0.12vh 0.12vh #000000,
     0.12vh -0.12vh 0.12vh #000000,
    -0.12vh  0.12vh 0.12vh #000000,
     0.12vh  0.12vh 0.12vh #000000;
}

/* Стили для формы поиска уроков */
.form-lesson-search {
    display: flex;
    gap: 1vh; 
    margin-bottom: 1vh; 
    margin-top: 1vh;
    margin-left: 1vh;
}

/* Стили для поля ввода поиска */
.form-lesson-search input[type="search"] {
    padding: 0.5vh;
    border: 0.1vh solid #ccc;
    box-sizing: border-box;
    padding-block: 1vh;
    padding-inline: 1vh;
    font-size: 2vh;
    border-radius: 1vh; 
}

.form-lesson-btn {
    padding: 1vh;
    background-color: #FFD700; 
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    padding-block: 1.5vh;
    padding-inline: 1vh;
    font-size: 2vh;
    font-weight: bold; 
    text-align: center;
}

.form-lesson-btn:hover {
    background-color: #dbba00; 
}

/*  */
/* Новости */
/*  */

.news-item-test {
    display: flex;
    margin-bottom: 2vh;
    background: #000000de;
}

.image-block {
    width: 40vh;
    height: 40vh;
    margin-right: 1vh;
    flex-shrink: 0;
    box-shadow: -1vh 1vh 1vh rgba(0, 0, 0, .5);
    margin: 1vh;
    border: 0.3vh solid #FFD700;
    position: relative;
}
.image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Сохраняет пропорции изображения */
    z-index: 0;
    position: relative;
}

.time-rectangle {
    position: absolute;
    padding-right: 1vh;
    padding-left: 1.5vh;
    bottom: 10%;
    right: 0%;
    width: auto;
    height: 3vh;
    background-color: #344970;
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    clip-path: polygon(10% 0%, 100% 0%, 100% 100%, 0% 100%); /* Скос слева */
}

.source-rectangle {
    position: absolute;
    padding-right: 1vh;
    padding-left: 1.5vh;
    bottom: calc(10% + 3.5vh); /* Располагаем над time-rectangle с небольшим отступом */
    right: 0%;
    width: auto;
    height: 3vh;
    background-color: #8d2800;
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    clip-path: polygon(10% 0%, 100% 0%, 100% 100%, 0% 100%); /* Тот же скос слева */
    font-size: 1.5vh; /* Размер шрифта, можно настроить */
}

.stream-title-img {
  display: none;
}

.news-all-content
{
    display: block;
}

.content-block {
    display: flex;
    position: relative;
    max-height: 20vh;
    background-color: rgba(255, 255, 255, 0.85);
    border: none;
    /* border-radius: 1vh; */
    box-shadow: 0vh 0vh 2vh rgba(0, 0, 0, .5);
    margin-top: 1vh;
    margin-right: 1vh;
}

.preview {
    width: 100%;
    overflow: hidden;
    color: black;
    padding: 1vh;
    cursor: pointer;
}

.news-nn-block {
    position: relative;
    background-color: rgb(165, 255, 165);
    padding: 1vh;
    color: black;
    margin-top: 1vh;
    margin-right: 1vh;
    margin-bottom: 1vh;
}

/* Добавляем класс для активного состояния */
.content-block.active {
    max-height: none;
    box-shadow: 0vh 0vh 2vh rgba(0, 0, 0, .7);
}

.content-block:hover {
    box-shadow: 0vh 0vh 2vh rgba(0, 0, 0, .7);
}

.content-block.active .chat-block {
    display: none;
}

.content-block.active .preview {
    overflow: visible;
}

.stream-source {
    font-size: 1.5vh;
    color: #757575;
    margin-bottom: 1vh;
}

.source-name {
    color: #1a73e8;
}

.stream-title {
    font-family: Furore;
    font-size: 2.5vh;
    color: #000;
    margin: 0 0 1vh 0;
    line-height: 1.3;
}

.stream-text {
    font-size: 1.7vh;
    color: #333;
    line-height: 1.6;
}

.stream-time {
    font-size: 1.5vh;
    color: #9e9e9e;
    margin-top: 1vh;
}


/*  */
/* Для пользователей */
/*  */

/* Стили для кнопок */

.hidden { display: none !important; }

.icon-button {
  position: relative;
  background: none;
  border: none;
  padding: 0.5em;
  cursor: pointer;
}

/* Подсказка (внизу) */
.icon-button::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 120%; /* вместо bottom → top */
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 1.4vh;
  padding: 0.5vh 1vh;
  border-radius: 0.5vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
  z-index: 1000;
}

/* Стрелочка вверх */
.icon-button::before {
  content: '';
  position: absolute;
  top: 100%; /* чуть выше тултипа */
  left: 50%;
  transform: translateX(-50%);
  border: 0.7vh solid transparent;
  border-bottom-color: rgba(0, 0, 0, 0.75); /* стрелочка вверх */
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 1000;
}

/* Показываем подсказку при наведении или фокусе */
.icon-button:hover::after,
.icon-button:focus::after {
  opacity: 1;
}

.icon-button:hover::before,
.icon-button:focus::before {
  opacity: 1;
}

#modalLoginButton, #modalInfoButton, #modalRegButton, #modalExitButton, #modalMessengerButton {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    width: 6.2vh;
    height: 6.2vh;
    display: inline-block;
    cursor: pointer;
}

#modalLoginButton img, #modalInfoButton img, #modalRegButton img, #modalExitButton img, #modalMessengerButton img {
    display: block;
    width: 100%;
    height: auto;
    filter: invert(77%) sepia(81%) saturate(1358%) hue-rotate(356deg) brightness(104%) contrast(103%) 
            drop-shadow(1.5vh 0.9vh 0.2vh rgb(0, 0, 0, 0.5)) drop-shadow(0vh 0vh 0.1vh rgb(0, 0, 0, 1));
}

#modalLoginButton:hover img, #modalInfoButton:hover img, #modalRegButton:hover img, #modalExitButton:hover img, #modalMessengerButton:hover img {
    filter: invert(87%) sepia(81%) saturate(1358%) hue-rotate(356deg) brightness(104%) contrast(103%) 
            drop-shadow(1.5vh 0.9vh 0.2vh rgb(0, 0, 0, 0.5)) drop-shadow(0vh 0vh 0.1vh rgb(0, 0, 0, 1));
}

/* Общие стили для модальных окон */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Базовые стили для содержимого модальных окон */
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2vh;
    border-radius: 2vh;
    box-shadow: 0 1vh 2vh rgba(0, 0, 0, 0.2);
}

/* Специфичные стили для каждого модального окна */
#loginModal .modal-content {
    width: 50vh;
}

#regModal .modal-content {
    width: 90vh;
}

#infoModal .modal-content {
    width: 80%; /* Новая ширина для окна информации */
    height: 80vh; /* Соответствует высоте таба в #infoModal */
}

/* Стили для форм логина и регистрации */
.form-container {
    display: flex;
    justify-content: space-between;
    gap: 2vh;
}

.form-left, .form-right {
    flex: 1;
    min-width: 0;
}

.form-group {
    margin-bottom: 1vh;
}

.form-group label {
    display: block;
    margin-bottom: 1vh;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.5vh;
    border: 0.1vh solid #ccc;
    box-sizing: border-box;
    padding-block: 1vh;
    padding-inline: 1vh;
    font-size: 2vh;
}

.radio-group {
    display: flex;
    gap: 2vh;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
}

.radio-group input[type="radio"] {
    margin-right: 0.5vh;
}

.modal-content .submit-btn {
    width: 100%;
    padding: 1vh;
    background-color: #FFD700;
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    padding-block: 1.5vh;
    padding-inline: 1vh;
    font-size: 2vh;
    margin-top: 1vh;
}

.modal-content .submit-btn:hover {
    background-color: #dbba00;
}

.google-login-btn {
    display: block;
    width: 100%;
    padding: 1.5vh;
    margin-top: 1vh;
    background-color: #4285F4; /* Цвет Google */
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 1vh;
    font-size: 2vh;
    font-weight: bold;
}

.google-login-btn:hover {
    background-color: #357ABD; /* Темнее при наведении */
}

/* Стили для таб-виджета в окне информации */
.tab-widget {
    width: 100%;
}

.tab-header {
    display: flex;
}

.tab-button {
    flex: 1;
    padding: 1vh;
    background-color: rgb(206, 206, 206);
    border-left: 0.2vh solid #000000; 
    border-right: 0.2vh solid #000000; 
    border-bottom: 0.2vh solid #000000;
    border-top: 0.2vh solid #000000;
    cursor: pointer;
    font-size: 2vh;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s;
    border-radius: 1vh 1vh 0 0;
    word-break: break-word;
}

.tab-button:hover {
    background-color: #FFFACD;
}

.tab-button.active {
    background-color: rgb(255, 255, 255);
    border-bottom: none;
}

.tab-button.active:hover {
    background-color: #FFFACD;
}

.tab-content {
    border-left: 0.2vh solid #000000; 
    border-right: 0.2vh solid #000000; 
    border-bottom: 0.2vh solid #000000;
    background-color: rgb(255, 255, 255);
    border-radius: 0 0 0 1vh;
    padding: 1vh;
    height: 65vh;
    overflow-y: auto;
}

.tab-pane {
    display: none;
    border: none;
}

.tab-pane.active {
    display: block;
}

/* Стили для таблицы внутри табов */
.info-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.info-row {
    display: table-row;
}

.info-label, .info-value {
    font-family: Stengazeta;
    display: table-cell;
    padding: 1vh;
    font-size: 3vh;
    vertical-align: top;
}

.info-label {
    width: 40%;
    color: #333;
}

.info-value {
    color: #555;
}

.info-table span {
    /* font-family: Roboto;
    font-size: calc(2vh) !important; */
    line-height: 0.9 !important;
    text-shadow: none !important;
    /* margin-bottom: 1vh; */
}

h2 {
    font-size: 2.5vh;
    clear: both; /* Отменяет обтекание */
}

/*  */
/* Комментарии */
/*  */

.comments {
    margin-top: 0vh;
}

.comment {
    border-bottom: 0.1vh solid #ccc;
    padding: 1vh 0;
}

.comment p {
    margin: 0.5vh 0;
}

.comments-no-login{
    margin-top: 1vh;
}

#comment-form textarea {
    margin-top: 1vh;
    width: 100%;
    height: 10vh;
    padding: 1vh;
    border: 0.1vh solid #ccc;
    border-radius: 1vh;
    font-size: 2vh;
    box-sizing: border-box;
    resize: none; /* Отключаем изменение размера */
}

#comments-list
{
    margin-top: 1vh;
}

/*  */
/* Специфичные стили для мессенджера */
/*  */

#messengerModal .modal-content {
    width: 80%; /* Соответствует #infoModal */
    height: 80vh; /* Соответствует высоте таба в #infoModal */
    padding: 0; /* Убираем внутренние отступы, чтобы чат занимал всё место */
    overflow: hidden; /* Предотвращаем прокрутку вне чата */
}

.messenger-modal-content .chat-container {
    width: 100%;
    height: 100%;
    display: flex;
    background: #fff;
    box-shadow: none; /* Убираем тень, так как она уже есть у modal-content */
}

/* Стили чата (адаптированы под модальное окно) */
.chat-container {
    font-family: Arial, sans-serif;
}

.sidebar {
    width: 35%;
    background: #f1f1f1;
    border-right: 0.3vh solid #ddd;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5vh;
    background: #bfc0c9;
    color: #fff;
}

.profile-pic {
    width: 5vh;
    height: 5vh;
    border-radius: 50%;
}

.icons span {
    margin: 0 1vh;
    font-size: 2vh;
    cursor: pointer;
}

.search-bar {
    padding: 1vh;
    border-bottom: 0.3vh solid #ddd;
}

.search-bar input {
    width: 100%;
    padding: 0.8vh;
    border: none;
    border-radius: 2vh;
    background: #fff;
    outline: none;
    padding-block: 1vh;
    padding-inline: 2vh;
    font-size: 1.5vh;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 1vh;
    border-bottom: 0.3vh solid #ddd;
    cursor: pointer;
}

/* Стили для активного чата */
.chat-item.active {
    background-color: #e0e0e0; 
}

.chat-item:hover {
    background: #ececec;
}

.chat-item.active:hover {
    background-color: #e0e0e0; 
}

.chat-pic {
    width: 5vh;
    height: 5vh;
    border-radius: 50%;
    margin-right: 1vh;
}

.chat-info h3 {
    font-size: 1.6vh;
}

.chat-info p {
    font-size: 1.4vh;
    color: #666;
    word-break: break-word;
}

.time {
    font-size: 1.2vh;
    color: #666;
    margin-left: auto;
}

.chat-area {
    width: 65%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 0.5vh;
    background: #bfc0c9;
    color: #fff;
    border-bottom: 0.3vh solid #ddd;
}

.chat-header h3 {
    margin-left: 1vh;
}

.messages {
    flex: 1;
    padding: 2vh;
    overflow-y: auto;
    background: #b1b1b1;
    display: flex; /* Поддерживаем flex для align-self */
    flex-direction: column; /* Сообщения в столбец */
    width: 100%;
}

.message {
    display: block; /* Возвращаем блочное поведение для столбца */
    width: fit-content; /* Ширина подстраивается под содержимое */
    margin-bottom: 2vh; /* Отступ снизу для расстояния между сообщениями */
    padding: 0.5vh 1.5vh; /* Минимальные отступы вокруг текста */
    padding-top: 0.9vh;
    max-width: 60%;
    border-radius: 1vh;
    word-break: break-word;
    position: relative;
}

.message.received {
    background: #fff;
    align-self: flex-start;
}

.message.sent {
    background: #dcf8c6;
    align-self: flex-end;
    margin-left: auto;
}

.message p {
    margin: 0; /* Убираем стандартные отступы параграфа */
    font-size: 1.8vh; /* Размер текста, если не задан ранее */
}

.message span {
    font-size: 1vh;
    color: #000000;
    position: absolute;
    bottom: -1.5vh;
    right: 0.5vh;
}

.message-input {
    display: flex;
    align-items: center;
    padding: 1vh;
    background: #f1f1f1;
    border-top: 0.3vh solid #ddd;
}

.message-input input {
    flex: 1;
    padding: 1vh;
    border: none;
    border-radius: 2vh;
    outline: none;
    margin-right: 1vh;
    padding-block: 1vh;
    padding-inline: 2vh;
    font-size: 1.5vh;
}

.message-input span {
    font-size: 2.3vh;
    margin: 0 0.5vh;
    cursor: pointer;
}

/* Стили для модального окна поиска пользователей */
#searchUserModal {
    display: none;
    position: fixed; /* Фиксированное позиционирование для независимости от других элементов */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Затемнение фона */
    z-index: 3; /* На уровне других модальных окон */
}

/* Контент модального окна */
.search-user-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Центрирование по горизонтали и вертикали */
    width: 40vh; /* Фиксированная ширина */
    max-height: 25vh; /* Ограничение высоты */
    padding: 2vh;
    background-color: white;
    border-radius: 2vh;
    box-shadow: 0 1vh 2vh rgba(0, 0, 0, 0.2); /* Тень для глубины */
    overflow-y: auto; /* Прокрутка при переполнении */
}

/* Кнопка поиска */
.search-username-btn {
    width: 100%;
    padding: 1vh;
    background-color: #bfc0c9; /* Ваш цвет */
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    padding-block: 1.5vh;
    padding-inline: 1vh;
    font-size: 2vh;
    margin-top: 1vh;
}

.search-username-btn:hover {
    background-color: #a9aab3; /* Чуть темнее при наведении */
}

/* Результаты поиска */
#search-results {
    margin-top: 1vh;
}

#search-results .result-item {
    padding: 1vh;
    border-bottom: 0.1vh solid #ddd;
    cursor: pointer;
}

#search-results .result-item:hover {
    background: #f1f1f1;
}


/* LaTeX */
.MathJax *::selection {
    background: #0473fc !important;  /* стандартный голубой фон */
    color: black !important;         /* обычный цвет текста */
    border-radius: 5vh!important;
}

.MathJax {
    font-size: 2.5vh !important; 
    display: inline-block !important;
}


/* Оформление кода */

.lesson-code
{
    background: #000000; 
    color: #F8F8F2;
    border: 0.1vh solid #969696;
    border-radius: 0.4vh;
    box-sizing: border-box;
    font-size: 1.5vh;
    line-height: 1.6;
    margin-top: 0.5vh;
    margin-bottom: 0.5vh;
    -moz-tab-size: 4;
    tab-size: 4;
    word-break: normal;
    word-spacing: normal;
    word-wrap: normal;
    position: relative; /* Для позиционирования кнопки */
}

.lesson-code pre::-webkit-scrollbar
{
    height: 1vh;
}

.lesson-code pre::-webkit-scrollbar-track
{
    background:#ccc;
    border-radius: 5vh; 
}

.lesson-code pre::-webkit-scrollbar-thumb
{
    background:#666;
    border-radius: 5vh; 
}

.copy-code-btn {
    position: absolute;
    top: 0.5vh;
    right: 0.5vh;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2vh;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.copy-code-btn:hover {
    opacity: 1;
}

.copy-code-btn svg {
    fill: #ffffff; /* Цвет иконки */
    vertical-align: middle;
    width: 2vh; /* Размер SVG */
    height: 2vh;
}
/*  */
/* Плейлист */
/*  */

/* Стили для вкладки плейлистов */
#playlist-info {
    font-family: Roboto, Arial, sans-serif;
    color: #000000;
}

/* Контейнер для списка плейлистов */
#playlist-info .playlist-row .playlist-content {
    display: block;
    padding: 1vh;
}

/* Список плейлистов */
#playlist-info .playlist-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#playlist-info .playlist-list > li {
    margin-bottom: 1.5vh;
    padding: 1.5vh;
    /* background: rgba(255, 255, 255, 0.9); */
    border: 0.2vh solid #000000;
    border-radius: 1vh;
    box-shadow: 0.3vh 0.3vh 0.8vh rgba(0, 0, 0, 0.5);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* #playlist-info .playlist-list > li:hover {
    transform: translateY(-0.1vh);
    box-shadow: 0.5vh 0.5vh 1vh rgba(0, 0, 0, 0.7);
} */

/* Заголовок плейлиста */
#playlist-info .playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1vh;
}

#playlist-info .playlist-header > a {
    font-family: Furore;
    font-size: 2.2vh;
    color: #000000;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    padding: 0.5vh 1vh;
    border-radius: 1vh;
}

#playlist-info .playlist-header > a:hover {
    background: #FFD700;
    color: #000;
    text-decoration: none;
}

/* Кнопки редактирования и удаления */
#playlist-info .action-buttons {
    display: flex;
    gap: 0.8vh;
}

#playlist-info .edit-btn,
#playlist-info .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.8vh;
    color: #000000;
    padding: 0.5vh;
    border-radius: 0.5vh;
    filter: drop-shadow(0.3vh 0.3vh 0.3vh rgba(0, 0, 0, 0.5));
    opacity: 1; 
    text-decoration: none;
}

#playlist-info .edit-btn i,
#playlist-info .delete-btn i {
    line-height: 1;
}

#playlist-info .edit-btn:hover {
    color: #007bff;
}

#playlist-info .delete-btn:hover {
    color: #dc3545;
}

/* Список песен */
#playlist-info .song-list {
    list-style: none;
    padding: 0 0 0 2vh;
    border-left: 0.3vh solid #000000;
    margin: 0;
}

#playlist-info .song-list > li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8vh 0;
    font-size: 1.7vh;
    color: #000000;
    border-bottom: 0.1vh solid rgba(255, 255, 255, 0.2);
}

#playlist-info .song-list > li:last-child {
    border-bottom: none;
}

#playlist-info .song-list > li > span {
    font-family: Roboto;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

#playlist-info .song-list > li > a {
    font-family: Roboto;
    color: #1a73e8;
    text-decoration: none;
    font-size: 1.6vh;
    margin-left: 0.5vh;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 30%;
}

#playlist-info .song-list > li > a:hover {
    color: #000000;
    text-decoration: underline;
}

/* Пустой плейлист */
#playlist-info .empty-playlist {
    font-family: Roboto;
    font-size: 1.8vh;
    color: #9e9e9e;
    text-align: center;
    padding: 1.5vh;
    background: none;
    border: none;
    box-shadow: none;
}

/* Секция добавления плейлиста */
#playlist-info .create-playlist-btn {
    font-size: 2.2vh;
    color: #000000;
    text-decoration: none;
    padding: 2vh 1vh;
    padding-top: 2.5vh;
    border-radius: 1vh;
    transition: background 0.3s ease, color 0.3s ease;
    text-shadow: none;
}

#playlist-info .create-playlist-btn:hover {
    background: #FFD700;
    color: #000;
    text-decoration: none;
}

/* Выпадающий список для добавления песни */
#playlist-info .playlist-select {
    font-family: Roboto;
    font-size: 1.7vh;
    padding: 0.5vh 1vh;
    background: rgba(255, 255, 255, 0.1);
    border: 0.2vh solid #000000;
    border-radius: 1vh;
    color: #000000;
    width: 25vh;
    cursor: pointer;
}

#playlist-info .playlist-select:focus {
    outline: none;
    border-color: #FFFACD;
}

#playlist-info .playlist-select option {
    background: #ffffff;
    color: #000000;
}

/* Текст "Сначала создайте плейлист" */
#playlist-info .no-playlist-text {
    font-family: Roboto;
    font-size: 1.7vh;
    color: #9e9e9e;
}

/* Стили для модальных окон плейлистов и песен */
#renamePlaylistModal, #deletePlaylistModal, #renameSongModal, #deleteSongModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.rename-playlist-modal-content,
.delete-playlist-modal-content,
.rename-song-modal-content,
.delete-song-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vh;
    padding: 2vh;
    background-color: white;
    border-radius: 2vh;
    box-shadow: 0 1vh 2vh rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.rename-playlist-modal-content h2,
.delete-playlist-modal-content h2,
.rename-song-modal-content h2,
.delete-song-modal-content h2 {
    font-family: Furore, sans-serif;
    font-size: 2.5vh;
    margin-bottom: 1vh;
}

.rename-playlist-modal-content p,
.delete-playlist-modal-content p,
.rename-song-modal-content p,
.delete-song-modal-content p {
    font-family: Roboto, sans-serif;
    font-size: 1.7vh;
    margin-bottom: 1vh;
}

.rename-playlist-modal-content .form-group,
.rename-song-modal-content .form-group {
    margin-bottom: 1vh;
}

.rename-playlist-modal-content .form-group label,
.rename-song-modal-content .form-group label {
    display: block;
    margin-bottom: 1vh;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    font-size: 1.7vh;
}

.rename-playlist-modal-content .form-group input,
.rename-song-modal-content .form-group input {
    width: 100%;
    padding: 0.5vh;
    border: 0.1vh solid #ccc;
    border-radius: 1vh;
    font-size: 1.7vh;
    box-sizing: border-box;
}

#deleteSongForm .submit-btn,
#deletePlaylistForm .submit-btn,
#renameSongForm .submit-btn,
#renamePlaylistForm .submit-btn {
    width: 48%;
    padding: 1vh;
    background-color: #FFD700;
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    font-size: 1.7vh;
    font-family: Roboto, sans-serif;
}

#deleteSongForm .submit-btn:hover,
#deletePlaylistForm .submit-btn:hover,
#renameSongForm .submit-btn:hover,
#renamePlaylistForm .submit-btn:hover {
    background-color: #dbba00;
}

.delete-confirm-btn {
    background-color: #dc3545 !important;
}

.delete-confirm-btn:hover {
    background-color: #c82333 !important;
}

.cancel-btn {
    width: 48%;
    padding: 1vh;
    background-color: #bfc0c9;
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    font-size: 1.7vh;
    font-family: Roboto, sans-serif;
}

.cancel-btn:hover {
    background-color: #a9aab3;
}

/* Модальное окно для создания плейлиста */
#createPlaylistModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.create-playlist-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vh;
    padding: 2vh;
    background-color: white;
    border-radius: 2vh;
    box-shadow: 0 1vh 2vh rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.create-playlist-modal-content h2 {
    font-family: Furore, sans-serif;
    font-size: 2.5vh;
    margin-bottom: 1vh;
}

.create-playlist-modal-content p {
    font-family: Roboto, sans-serif;
    font-size: 1.7vh;
    margin-bottom: 1vh;
}

.create-playlist-modal-content .form-group {
    margin-bottom: 1vh;
}

.create-playlist-modal-content .form-group label {
    display: block;
    margin-bottom: 1vh;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    font-size: 1.7vh;
}

.create-playlist-modal-content .form-group input {
    width: 100%;
    padding: 0.5vh;
    border: 0.1vh solid #ccc;
    border-radius: 1vh;
    font-size: 1.7vh;
    box-sizing: border-box;
}

#createPlaylistForm .submit-btn {
    width: 48%;
    padding: 1vh;
    background-color: #FFD700;
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    font-size: 1.7vh;
    font-family: Roboto, sans-serif;
}

#createPlaylistForm .submit-btn:hover {
    background-color: #dbba00;
}

.create-playlist-modal-content .cancel-btn {
    width: 48%;
    padding: 1vh;
    background-color: #bfc0c9;
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    font-size: 1.7vh;
    font-family: Roboto, sans-serif;
}

.create-playlist-modal-content .cancel-btn:hover {
    background-color: #a9aab3;
}

/* Модальное окно для добавления песни */
#addSongModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.add-song-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vh;
    padding: 2vh;
    background-color: white;
    border-radius: 2vh;
    box-shadow: 0 1vh 2vh rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.add-song-modal-content h2 {
    font-family: Furore, sans-serif;
    font-size: 2.5vh;
    margin-bottom: 1vh;
}

.add-song-modal-content p {
    font-family: Roboto, sans-serif;
    font-size: 1.7vh;
    margin-bottom: 1vh;
}

.add-song-modal-content .form-group {
    margin-bottom: 1vh;
}

.add-song-modal-content .form-group label {
    display: block;
    margin-bottom: 1vh;
    font-family: Roboto, sans-serif;
    font-weight: bold;
    font-size: 1.7vh;
}

.add-song-modal-content .form-group input {
    width: 100%;
    padding: 0.5vh;
    border: 0.1vh solid #ccc;
    border-radius: 1vh;
    font-size: 1.7vh;
    box-sizing: border-box;
}

#addSongForm .submit-btn {
    width: 48%;
    padding: 1vh;
    background-color: #FFD700;
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    font-size: 1.7vh;
    font-family: Roboto, sans-serif;
}

#addSongForm .submit-btn:hover {
    background-color: #dbba00;
}

.add-song-modal-content .cancel-btn {
    width: 48%;
    padding: 1vh;
    background-color: #bfc0c9;
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    font-size: 1.7vh;
    font-family: Roboto, sans-serif;
}

.add-song-modal-content .cancel-btn:hover {
    background-color: #a9aab3;
}


/* Модальное окно для просмотра плейлиста */
#playlistDetailModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.playlist-detail-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50vh;
    max-height: 80vh;
    padding: 2vh;
    background-color: white;
    border-radius: 2vh;
    box-shadow: 0 1vh 2vh rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.playlist-detail-modal-content h2 {
    font-family: Furore, sans-serif;
    font-size: 2.5vh;
    margin-bottom: 1vh;
}

.playlist-detail-modal-content .action-buttons {
    display: flex;
    gap: 0.8vh;
    margin-bottom: 1vh;
}

.playlist-detail-modal-content .add-song-btn,
.playlist-detail-modal-content .edit-btn,
.playlist-detail-modal-content .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.7vh;
    color: #000000;
    padding: 0.5vh 1vh;
    border-radius: 0.5vh;
    font-family: Roboto, sans-serif;
}

.playlist-detail-modal-content .add-song-btn:hover {
    background: #FFD700;
}

.playlist-detail-modal-content .edit-btn:hover {
    background: #007bff;
    color: white;
}

.playlist-detail-modal-content .delete-btn:hover {
    background: #dc3545;
    color: white;
}

.playlist-detail-modal-content .song-list {
    list-style: none;
    padding: 0 0 0 2vh;
    border-left: 0.3vh solid #000000;
    margin: 0;
}

.playlist-detail-modal-content .song-list > li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8vh 0;
    font-size: 1.7vh;
    color: #000000;
    border-bottom: 0.1vh solid rgba(0, 0, 0, 0.2);
}

.playlist-detail-modal-content .song-list > li:last-child {
    border-bottom: none;
}

.playlist-detail-modal-content .song-list > li > span {
    font-family: Roboto;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

.playlist-detail-modal-content .song-list > li > a {
    font-family: Roboto;
    color: #1a73e8;
    text-decoration: none;
    font-size: 1.6vh;
    margin-left: 0.5vh;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 30%;
}

.playlist-detail-modal-content .song-list > li > a:hover {
    color: #000000;
    text-decoration: underline;
}

.playlist-detail-modal-content .song-list > li .action-buttons button {
    font-size: 1.6vh;
    padding: 0.3vh 0.6vh;
}

.playlist-detail-modal-content .empty-playlist {
    font-family: Roboto;
    font-size: 1.7vh;
    color: #9e9e9e;
    text-align: center;
    padding: 1vh;
}

.playlist-detail-modal-content .cancel-btn {
    width: 100%;
    padding: 1vh;
    background-color: #bfc0c9;
    border: none;
    border-radius: 1vh;
    cursor: pointer;
    font-size: 1.7vh;
    font-family: Roboto, sans-serif;
    margin-top: 1vh;
}

.playlist-detail-modal-content .cancel-btn:hover {
    background-color: #a9aab3;
}







/* Адаптивные стили */
@media (max-width: 768px) {
    header h1 {
        font-size: calc(5vh);
    }

    nav {
        position: relative; /* Базовое состояние */
    }

    nav a {
        font-size: calc(2vh);
    }

    nav.sticky {
        position: fixed; /* Прилипающее состояние */
        top: 0;
        /* width: 100%; */
        z-index: 100;
    }

    .nav__burger-container {
        position: relative;
        margin-right: 3vh; /* Отступ от края */
    }

    .burger-pic-op, .burger-pic-cl {
        width: 5vh;
        height: 5vh;
        filter: invert(77%) sepia(81%) saturate(1358%) hue-rotate(356deg) brightness(104%) contrast(103%);
    }

    .burger-pic-op {
        display: none;
    }


    .content-block{
        display: none;
    }

    .news-item-test {
        flex-direction: column;
        align-items: center;
        margin-bottom: 2vh;
        background: #000000de;
    }

    .image-block {
        width: 90vw;
        height: 40vh;
        margin: 1vh auto;
        position: relative;
    }

    .stream-title-img {
        display: block;
        font-family: Furore;
        position: absolute;
        top: 0;        /* теперь сверху */
        left: 0;
        right: 0;
        padding: 1vh;
        background: rgba(0, 0, 0, 0);
        color: #fff;
        font-size: 3vh;
        text-align: center;
        z-index: 1;
        word-break: break-word;
        line-height: 1;

        /* обводка текста */
        -webkit-text-stroke: 0.1vh #000;
        text-shadow:
            -0.05vh -0.05vh 0 #000,
            0.05vh -0.05vh 0 #000,
            -0.05vh  0.05vh 0 #000,
            0.05vh  0.05vh 0 #000;
    }
    .news-nn-block{
        margin: 1vh;
    }

    #lesson_sidebar_helper{
        display: none;
    }
    .lesson .comments{
        display: none;
    }
    #lesson_content{
        flex: 1;
    }

    #infoModal .modal-content{
        width: 100%;
        height: 80svh;
    }

    #messengerModal .modal-content{
        width: 100%;
        height: 80svh;
    }

    nav{
        flex-direction: row;
        justify-content: flex-end;
        overflow: visible;
    }

    .nav__burger {
        display: block;
        margin-right: 2svh;
        width: 5vh;
        height: 5vh;
        background: none;
        border: none;
        cursor: pointer;
        transition: transform 0.2s ease;
        transform-origin: center center;
    }

    .nav__burger.open {
        transform: rotate(90deg);
    }

    .nav__burger.open .burger-pic-cl {
        display: none;
    }
    .nav__burger.open .burger-pic-op {
        display: block;
    }

    .nav__container {
        display: none;
        position: absolute;
        top: 100%; 
        right: 5%; 
        width: 20vh;
        background-color: rgba(0, 0, 0, 1);
        border: 0.5vh solid #FFD700;
    }

    .nav__container.open {
        display: block;
    }

    .icon-button::after, .icon-button::before{
        display: none;
    }
}