﻿body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    /*overflow: hidden; /* Убираем скроллинг */
    font-family: 'Manrope', sans-serif;

    background-color: #eff3fb;
}

/* #region Slpash */
#splash-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #fff;
}

#logo {
    width: 150px;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
/* #endregion */

/* #region tutorial */
/* Контейнер контента */
.content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Равномерное распределение */
    align-items: center;
    height: 80vh; /* Высота фиксируется для предотвращения сдвига */
    max-width: 500px;
    margin: auto;
    position: relative;
    overflow: hidden; /* Скрывает неактивные слайды */
    text-align: center; /* Центрирование текста */
}

/* Слайды */
.onboarding-slide {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: auto; /* Подстраивается под контент */
}

/* Активный слайд */
.onboarding-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

/* Картинка */
.onboarding-slide img {
    margin: 0 auto; /* Центрирование */
    max-width: 100%;
    height: auto;
    display: block;
}

/* Контейнер для текста */
.text-container {
    max-width: 90%;
    text-align: center;
}

/* Заголовок */
.content-wrapper h1 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

/* Описание */
.content-wrapper p {
    font-size: 16px;
    color: #808080;
    margin-bottom: 20px;
}

/* Контейнер для прогресс-бара и кнопки */
.controls-wrapper {
    width: 100%;
    max-width: 400px;
    position: absolute;
    bottom: 200px; /* Поднимаем ближе */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Прогресс-бары */
.progress-bars {
    display: flex;
    justify-content: center;
    gap: 3px;
    width: 100%;
    margin-bottom: 10px;
}

/* Прогресс-бар */
.progress-bar-container {
    width: 30px;
    display: flex;
    justify-content: center;
}

/* Прогресс-бар */
.progress-bar {
    height: 5px;
    background-color: #007bff;
    width: 50%;
    border-radius: 50px;
    transition: transform 0.5s ease, background-color 0.5s ease;
    transform: scaleX(1);
}

#bar1 {
    transform: scaleX(2);
    background-color: #f68b1f;
}

/* Кнопка "Next" */
#next-btn {
    background-color: transparent;
    border: none;
    display: flex;
    justify-content: center;
    cursor: pointer;
    width: 100%;
    max-width: 120px;
    padding: 10px;
}

/* Иконка кнопки */
.button-icon {
    width: 80px;
    height: auto;
    max-width: 100%;
}

/* **Адаптивные стили** */
@media (max-width: 600px) {
    .content-wrapper {
        padding: 10px;
        max-width: 80%;
        height: 80vh; /* Чуть уменьшаем высоту для мобильных */
    }

    .onboarding-slide img {
        max-width: 80%;
    }

    .controls-wrapper {
        bottom: 200px; /* Немного поднимаем кнопку */
    }

    .button-icon {
        width: 80px;
    }

    .content-wrapper h1 {
        font-size: 18px;
    }

    .content-wrapper p {
        font-size: 14px;
    }
}

/* #endregion */

/* #region Login-screen */
/* Основной контейнер для экрана логина */
#login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    background-color: #fff;
    position: relative;
}

/* Контейнер содержимого логина */
.login-content {
    width: 100%;
    padding: 20px;
    padding-top: 70px;
    background-color: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Иллюстрация на экране логина */
.login-illustration {
    width: 100%;
    max-width: 500px;
    margin-bottom: 50px;
}

/* Заголовок логина */
.login-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

/* Форма логина */
.login-form {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center; /* Центрируем содержимое формы */
}

/* Группа ввода (input) */
.input-group {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .input-group input {
        width: 100%;
        height: 30px;
        max-width: 300px;
        padding: 12px 40px 12px 20px;
        border: 2px solid #ddd;
        border-radius: 50px;
        font-size: 16px;
        color: #333;
    }

    .input-group .input-icon {
        position: absolute;
        right: 1px; /* Размещаем иконку справа */
        top: 50%;
        transform: translateY(-50%); /* Центрируем иконку вертикально */
        color: #ccc;
    }

    .input-group input:focus {
        border-color: #6200ea;
        outline: none;
    }

/* Кнопка входа */
.login-button {
    background-color: #6200ea;
    color: #fff;
    height: 60px;
    width: 100%;
    max-width: 60%;
    font-size: 20px;
    padding: 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;

}

    .login-button:hover {
        cursor: pointer;
        background-color: #5a00cc;
    }
/* #endregion */

/* #region Homepage Styles */
/* Основные стили */
.home-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.home-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* Стили для карточки курса */
.home-course-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.home-course-card-title {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center; /* Выравнивание элементов по вертикали */
}

.home-course-tag {
    background-color: #6200ea;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.home-course-title {
    margin-left: 30px; /* регулируйте нужное значение */
    font-size: 20px;
    font-weight: bold;
}

.home-course-image {
    width: 100%; /* Изображение будет занимать всю ширину контейнера */
    max-width: 200px; /* Можно настроить максимальную ширину */
    height: auto;
    margin: 20px auto;
}

.home-course-stats {
    width: 100%; /* Изображение будет занимать всю ширину контейнера */
    max-width: 60%; /* Можно настроить максимальную ширину */
    display: flex;
    justify-content: space-between;
    margin-left: 70px; /* регулируйте нужное значение */
    align-items: center; /* Выравнивание элементов по вертикали */
}

    .home-course-stats span {
        font-size: 14px;
        color: #666;
        display: flex;
        align-items: center;
    }

    .home-course-stats img {
        width: 16px;
        margin-right: 5px;
    }

/* Стили для информации о курсе */
.home-course-info {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
    text-align: left; /* выравнивает текст по левому краю */
}

.home-info-tabs {
    display: flex;
    justify-content: left;
    gap: 15px;
    margin-bottom: 50px;
}

.home-tab {
    background-color: #f4f4f4;
    color: #333;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

    .home-tab.active {
        background-color: #8B5CF6;
        color: #fff;
    }

    .home-course-info-title {    
        font-size: 16px;
        font-weight: 600;
        color: #333;
        margin-bottom: 10px;
    }

.home-course-description {
    
    font-size: 14px;
    color: #5c5c5c;
    margin-bottom: 50px;
}

.home-read-more {
    color: #8B5CF6;
    text-decoration: none;
}

/* Стили для кнопки начала курса */
.home-start-course-btn {
    background: linear-gradient(90deg, #8B5CF6, #4C1D95);
    color: #fff;
    font-size: 18px;
    padding: 15px;
    width: 100%;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .home-start-course-btn:hover {
        background: linear-gradient(90deg, #4C1D95, #8B5CF6);
    }
/* #endregion */

/* #region modules-menu */
.modules-main {
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.modules-main h1{
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.modules-container {
    background-color: #f9fafc;
    padding: 20px;
    border-radius: 12px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.module-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.filter-button.active {
    background-color: #6200ea;
    color: #fff;
}


.module-image-container {
    width: 100px; /* фиксированная ширина */
    height: 100px; /* фиксированная высота */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden; /* чтобы изображения не выходили за границы */
    background-color: #ddd; /* цвет по умолчанию */
}

.module-image {
    max-width: 80%; /* ограничение по ширине */
    max-height: 80%; /* ограничение по высоте */
    object-fit: cover;
}

.module-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    gap: 20px;
    cursor: pointer;
}

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.module-card-left img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.module-card-middle {
    text-align: left; /* Выравниваем содержимое по левому краю */
    flex: 1; /* Даем блоку возможность занимать доступное пространство */
}

.module-card-middle h2 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.module-card-middle .module-rating {
    font-size: 14px;
    color: #ff9800;
}

.module-card-middle p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.module-card-right .module-status {
    font-size: 20px;
    color: #4caf50;
}


/* #endregion */

/* #region module */
/* Основной контейнер страницы */
.module {
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}


.module-container {
    background-color: #f9fafc;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

/* Заголовки */
.module h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 10px;
    color: #333;
}

.module-container h2 {
    font-size: 20px;
    text-align: left;
    color: #333;
    margin-left: 20px;
    margin-bottom: 20px;
}

/* Контейнер для секций */
.module-content {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* Общий стиль для секций */
.module-section {
    width: 45%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    min-height: 150px; /* Минимальная высота карточки */
    overflow: hidden; /* Убираем выход текста за границы */
}

/* Контейнер для видео и тестов */
.video-section, 
.test-section {
    display: flex;
    flex-direction: column;
    
    text-decoration: none; /* Убираем подчеркивание ссылок */
    width: 100%; /* Делаем ширину контейнера на всю карточку */
}

/* Стили для видео секций */
.video-section img,
.test-section img {
    width: 140px;
    height: 80px;
    border-radius: 12px;
    background-color: #dfe7fd;
    border: 1px solid #A2845E;
    align-self: center;
}

/* Название секции */
.video-section h3,
.test-section h3 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    width: 90%; /* Ограничиваем ширину заголовка */
    white-space: nowrap; /* Предотвращаем перенос текста */
    overflow: hidden; /* Скрываем выходящий за границы текст */
    text-overflow: ellipsis; /* Добавляем многоточие */
    display: block;
    text-align: left;
    margin-left: 10px;
}


/* Продолжительность */
.video-section p,
.test-section p {
    font-size: 14px;
    color: #666;
    margin-left: 20px;
}

/* Видео элемент */
.video-section video {
    width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

/* Стили для тестовых секций */
.test-section a {
    display: block;
    background-color: #6200ea;
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    margin-top: auto;
}

/* Ховер для кнопок */
.test-section a:hover {
    background-color: #4b00c4;
}

/* #endregion */

/* #region video */
/* Основной контейнер страницы видео */
.video {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background-color: transparent;
}

/* Навигация (кнопки «назад» и «вперёд») */
.video-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 400px; /* Ширина заголовка ограничена */
    margin: 0 auto; /* Центрируем блок */
    position: relative;
}

/* Стили для кнопок навигации */
.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 40px;
    border-radius: 12px; /* Закругление углов */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
    color: #333;
    font-size: 20px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

/* Добавляем эффект при наведении */
.nav-button:hover {
    background-color: rgba(255, 165, 0, 0.2); /* Оранжевый фон при наведении */
    border-color: rgba(255, 140, 0, 1);
}

/* Чтобы кнопки не прыгали при наведении */
.nav-button:focus {
    outline: none;
}

/* Расположение кнопок по краям */
.nav-button.left {
    margin-right: auto;
}

.nav-button.right {
    margin-left: auto;
}

/* Заголовок видео и навигация */
.video h1 {
    font-size: 24px;
    text-align: center;
    color: #333;
}

/* Контейнер для плеера */
.video-container {
    background-color: #f9fafc;
    padding: 20px;
    border-radius: 12px;
    overflow: hidden; /* Чтобы закругление работало */
    width: 400px;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Видео элемент */
.video-js {
    width: 100% !important; /* Видео занимает всю ширину контейнера */
    height: auto !important; /* Высота автоматически подстраивается */
    border-radius: 16px !important; /* Закругление углов */
    overflow: hidden !important; /* Для применения закругления */
    background-color: #000; /* Фон на случай, если видео не загрузится */
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.video-meta span {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.video-meta i {
    margin-right: 5px;
    color: #6200ea;
}

.video-meta .video-actions i {
    margin-left: 15px;
    font-size: 16px;
    cursor: pointer;
}

/* Описание видео с возможностью прокрутки */
.video-description {
    width: 90%;
    max-width: 400px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-height: 200px; /* Устанавливаем максимальную высоту */
    overflow-y: auto; /* Включаем вертикальную прокрутку */
}

/* Стили для полосы прокрутки (для Webkit-браузеров) */
.video-description::-webkit-scrollbar {
    width: 6px;
}

.video-description::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.video-description::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}


.video-description h2 {
    color: #6A32F9;
    margin-bottom: 10px;
    text-align: left;
    font-size: 18px;
}

.video-description p {
    white-space: pre-line;
    line-height: 1.6;
    font-size: 14px;
    color: #666;
}

/* #endregion */

/* #region Test */
/* Контейнер теста */
.test-container {
    max-width: 400px;
    margin: 30px auto;
    padding: 20px;
    /*background-color: #F5F5FA;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);*/
    text-align: center;
}

/* Вопрос */
.test-container h2 {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 15px;
}

/* Блок вопроса */
.test-question {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    color: #000000;
    margin-bottom: 15px;
    text-align: left;
    max-width: 380px; /* Максимальная ширина */
    /*width: auto; /* Подстраивается по содержимому */
    overflow: hidden; /* Убирает выход за границы */
    word-wrap: break-word; /* Переносит слова */
}

/* Контейнер ответа */
.test-option {
    display: flex;
    align-items:center;
    justify-content: space-between; /* Распределение пространства */
    background: #fff;
    padding: 12px;
    margin: 8px 0;
    border-radius: 12px;
    border: 2px solid #E5E5E5;
    cursor: pointer;
    transition: all 0.3s ease;
    /*max-width: 400px; /* Максимальная ширина 
    max-height: 60px; /* Максимальная ширина 
    width: auto; /* Подстраивается по содержимому */
    min-height: 10px;
    overflow: hidden;
    position: relative;
}

/* Буквы A, B, C, D... */
.option-letter {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    border: 1px solid #FFA042;
    background: #fff;
    color: #FFA042;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0; /* Буква не сжимается */
}

/* Контейнер для текста ответа (ставим flex-grow) */
.option-text {
    flex-grow: 1; /* Занимает всё свободное пространство */
    text-align: left; /* Выравнивание текста влево */
    overflow: hidden;
    word-wrap: break-word;
    max-width: 390px; /* Максимальная ширина */
    /*max-height: 40px; /* Устанавливаем ограничение */
    /*overflow-y: auto; /* Включаем скролл при необходимости */
    padding-right: 5px; /* Отступ для скролла */
}

/* Если текст слишком длинный — скролл 
.test-option .option-text {
    white-space: normal;
    overflow-y: auto;
    max-height: 60px; /* Если текст слишком длинный, появится скролл 
}*/

/* Радиокнопки скрыты */
.test-option input[type="radio"] {
    display: none;
}

/* Добавляем кастомный radio-круг в конец */
.radio-circle {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1px solid #9F9F9F;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto; /* Отодвигаем вправо */
    transition: background 0.3s ease;
    position: relative;
}

/* Внутренний кружок при выборе */
.test-option input[type="radio"]:checked + .radio-circle::after {
    content: "";
    width: 10px; /* Размер внутреннего круга */
    height: 10px;
    background: #FFA042; /* Оранжевый цвет как у рамки */
    border-radius: 50%;
    position: absolute;
}

/* Кнопка "Далее" */
.test-button {
    width: 100%;
    background: #7E57C2;
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    border: none;
    padding: 14px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
}

/* Кнопка завершения теста */
.end-button {
    display: block;
    width: 100%; /* Сделает кнопку широкой */
    max-width: 400px; /* Максимальная ширина */
    margin: 20px auto 0; /* Отодвигаем кнопку вниз и центрируем */
    padding: 14px;
    background: #7E57C2;
    text-decoration: none;
    color: white;
    font-size: 20px;
    font-weight: 400;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s;
}

/* Эффект наведения */
.end-button:hover {
    background: #5E35B1;
}

.test-button:hover {
    background: #5E35B1;
}

.result-container {
    background: #FFFFFF;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 50px;
    text-align: left;
}
.test-container a{
    text-decoration: none; /* Убирает подчёркивание текста */
}

/* #endregion */
