body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f4f7fe;
    /*height: 100vh;*/
    /*overflow: hidden;*/
}

/* Сол жақ мәзір (Sidebar) */
.sidebar {
    background: white;
    /*height: 100vh;*/
    border-right: 1px solid #eee;
    padding: 0;
}

.sidebar-header {
    background: linear-gradient(90deg, #c2185b 0%, #e91e63 100%);
    color: white;
    padding: 20px;
    font-weight: 700;
}

.nav-link {
    color: #555;
    padding: 12px 25px;
    font-weight: 500;
    display: flex;
    align-items: center;
    border-radius: 0 50px 50px 0;
    margin: 5px 0;
    margin-right: 15px;
}

.nav-link:hover {
    background-color: #f0f0f0;
}

.nav-link.active {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.nav-link i {
    margin-right: 10px;
}

/* Жоғарғы навигация */
.top-nav {
    background: white;
    padding: 15px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-tabs {
    display: flex;
    gap: 20px;
}

.tab-item {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.tab-item.active {
    color: #7b1fa2;
    border-bottom-color: #7b1fa2;
    font-weight: 600;
}

/* Мазмұн аймағы */
.main-content {
    /*height: calc(100vh - 140px);*/
    overflow-y: auto;
    padding: 40px;
}

.content-card {
    background: white;
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    color: #4a148c;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.formula-box {
    background-color: #fff9fc;
    border-radius: 20px;
    padding: 25px;
    margin-top: 20px;
}

.formula-list {
    list-style: none;
    padding: 0;
}

.formula-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.formula-list b {
    min-width: 120px;
    display: inline-block;
    color: #333;
}

.formula-desc {
    color: #666;
    margin-left: 10px;
}

/* Жоғарғы навигацияны жаңарту */
.top-nav {
    background: white;
    padding: 10px 30px;
    border-bottom: 1px solid #eee;
    display: grid; /* Тор жүйесін қолдану ортаға дәл келтіруге көмектеседі */
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 65px;
}

.content-tabs {
    display: flex;
    gap: 25px;
    justify-content: center;
}

/* Оң жақтағы батырмалар */
.auth-section {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.auth-link {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.link-login {
    color: #7b1fa2;
}

.link-register {
    background: linear-gradient(90deg, #c2185b 0%, #e91e63 100%);
    color: white;
}

.link-logout {
    color: #dc3545;
}

.link-profile {
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}
.footer-nav {
    background: white;
    padding: 10px 30px;
    border-top: 1px solid #eee;
    display: grid; /* Тор жүйесін қолдану ортаға дәл келтіруге көмектеседі */
    align-items: center;
    height: 70px;
}

/* Футер стилі - Хедерге ұқсас */
.bottom-nav {
    background: white;
    padding: 15px 30px;
    border-top: 1px solid #eee;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    /*position: absolute;*/
    bottom: 0;
    width: 100%;
    height: 60px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.social-icons {
    text-align: right;
    font-size: 0.8rem;
    color: #888;
}

/* Форма элементтерін жақсарту */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(123, 31, 162, 0.1);
    border-color: #7b1fa2;
}

/* Айналдыруды (scroll) реттеу */
.main-content {
    /*height: calc(100vh - 125px); !* Хедер мен Футердің биіктігін алып тастаймыз *!*/
    padding-bottom: 80px;
}

/* Кіру мен Тіркелу арасындағы сызық */
.border-end {
    border-right: 1px solid #eee !important;
    padding-right: 30px;
}
.option-item {
    display: block;
    position: relative;
    padding: 15px 20px 15px 50px;
    margin-bottom: 12px;
    background-color: #f8f9fa;
    border: 2px solid #eee;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    background-color: #f3e5f5;
    border-color: #7b1fa2;
}

/* Радио батырманы жасырып, стильдеу */
.option-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-item input:checked ~ .option-text {
    color: #7b1fa2;
    font-weight: 600;
}

.option-item:has(input:checked) {
    background-color: #f3e5f5;
    border-color: #7b1fa2;
    box-shadow: 0 4px 10px rgba(123, 31, 162, 0.1);
}

/* Таңдалған кездегі нүкте */
.option-item::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    background: white;
}


.option-item:has(input:checked)::before {
    border-color: #7b1fa2;
    background: radial-gradient(#7b1fa2 50%, white 50%);
}
.top-nav-mobile {
    display: none;
}
.sidebar-mobile {
    display: none;
}
/* Мобильді құрылғыларға арналған стильдер (768px-ден кіші) */
@media (max-width: 767.98px) {
    .sidebar {
        display: none;
    }
    .auth-section {
        display: none;
    }
    .main-content {
        padding: 0;
    }
    .top-nav-mobile{
        /*display: block;*/
        background: white;
        padding: 10px 30px;
        border-bottom: 1px solid #eee;
        display: grid; /* Тор жүйесін қолдану ортаға дәл келтіруге көмектеседі */
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        height: 65px;
    }
    .top-nav {
        /*display: none;*/
    }
    .sidebar {
        /*display: none; !* Әзірге жасырып қоямыз *!*/
    }

    /* Sidebar-ды мобильдіде жасыру немесе реттеу */
    .sidebar-mobile {
        /*height: auto;*/
        position: relative;
        display: none; /* Әзірге жасырып қоямыз */
        height: calc(100vh - 60px); /* Жоғарғы мәзірдің биігін алып тастау */
        margin-top: 60px; /* Жоғарғы мәзірдің биігі */
    }

    .sidebar-mobile.show {
        display: block;
        position: fixed;
        z-index: 1050;
        width: 80%;
        /*height: 100vh;*/
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        padding-left: 15px;
        background: #fff;
    }


    .content-tabs {
        gap: 10px;
    }

    .tab-item {
        font-size: 0.8rem;
    }

    /* Мазмұн карточкасын мобильдіге лайықтау */
    .content-card {
        padding: 20px;
        margin: 10px;
        border-radius: 15px;
    }

    /* Формалардың (Кіру/Тіркелу) шекарасын алып тастау */
    .border-end {
        border-right: none !important;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 30px;
        margin-bottom: 30px;
    }

    /* Футерді реттеу */
    .bottom-nav {
        font-size: 0.8rem;
        height: auto;
        padding: 15px;
        text-align: center;
        flex-direction: column;
        width: 100% !important;
        left: 0 !important;
    }
    .bottom-nav {
        position: relative;
    }
}


:root {
    --primary-purple: #9b4dca;
    --bg-formula: #fff5ff;
    --bg-info: #f0f7ff;
    --border-info: #4a90e2;
    --text-main: #334155;
    --text-dark: #1e293b;
    --bg-dark-card: #1e293b;
    --text-light: #f8fafc;
    --bg-warning: #fefce8;
    --border-warning: #facc15;
    --text-warning-dark: #854d0e;
}

.lesson-container {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    max-width: 850px;
    margin: 20px auto;
}

/* Стили для иконок-плейсхолдеров */
.icon_formula, .icon_notice {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Если захотите вставить картинку через CSS:
.icon_formula { background-image: url('formula-icon.svg'); }
*/

/* Карточка формул */
.formula-card {
    background-color: var(--bg-formula);
    border-radius: 16px;
    padding: 30px;
    margin: 24px 0;
}

.formula-title {
    color: var(--primary-purple);
    font-size: 1.25rem;
    margin-top: 0;
    display: flex;
    align-items: center;
}

.formula-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.formula-list li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.formula-list li::before {
    content: "•";
    color: var(--primary-purple);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Карточка примечаний */
.info-card {
    background-color: var(--bg-info);
    border-left: 6px solid var(--border-info);
    border-radius: 4px 16px 16px 4px;
    padding: 25px;
}

.info-title {
    color: #2c5282;
    margin-top: 0;
    display: flex;
    align-items: center;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    color: #2a4365;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.info-list li::before {
    content: "•";
    color: var(--border-info);
    position: absolute;
    left: 0;
}

/* Форматирование формул */
b {
    color: var(--text-dark);
    font-family: 'Cambria', 'Georgia', serif; /* Более "математический" шрифт для формул */
}

/* Акцентная карточка (Темная) */
.main-formula-dark {
    background-color: var(--bg-dark-card);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
    margin: 30px 0;
}

.main-formula-dark .subtitle {
    display: block;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.main-formula-dark .big-formula {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.main-formula-dark .formula-desc {
    font-size: 1rem;
    color: #cbd5e1;
}

/* Модификатор для Желтой карточки примечаний */
.info-card--yellow {
    background-color: var(--bg-warning);
    border-left-color: var(--border-warning);
}

.info-card--yellow .info-title {
    color: var(--text-warning-dark);
}

.info-card--yellow .info-list li {
    color: var(--text-warning-dark);
}

.info-card--yellow .info-list li::before {
    color: var(--border-warning);
}

/* Сетка для расположения карточек в ряд */
.formula-grid {
    display: flex;
    gap: 20px; /* Отступ между карточками */
    margin: 30px 0;
}

/* Настраиваем темные карточки внутри сетки */
.formula-grid .main-formula-dark {
    flex: 1; /* Карточки будут равной ширины */
    margin: 0; /* Убираем внешние отступы, так как их контролирует сетка */
    padding: 30px 15px;
}

/* Уменьшаем размер шрифта для формул в сетке, чтобы они влезали */
.formula-grid .big-formula {
    font-size: 2rem;
}

/* Адаптивность: на мобилках карточки встанут друг под другом */
@media (max-width: 600px) {
    .formula-grid {
        flex-direction: column;
    }
}

/* Инфо-плашка (Status bar) */
.status-bar {
    display: flex;
    align-items: center;
    background-color: #e0f2fe; /* Светло-голубой */
    border-radius: 12px;
    padding: 12px 20px;
    margin: 20px 0;
    font-size: 0.95rem;
}

.status-label {
    background-color: #0ea5e9; /* Ярко-голубой акцент */
    color: white;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 8px;
    margin-right: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.status-text {
    color: #0369a1;
    font-weight: 500;
}

/* Фикс для адаптивности на маленьких экранах */
@media (max-width: 480px) {
    .status-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
/* Дополнительные правки для лучшего отображения символов физики */
.big-formula {
    font-family: 'Times New Roman', Times, serif; /* Формулы волн выглядят лучше с засечками */
    font-style: italic; /* Традиционное написание символов типа λ и ν */
}

/* Если в сетке только 2 элемента, они будут чуть шире */
.formula-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Добавь это в конец своего CSS файла */

.main-formula-dark .formula-desc {
    display: block;
    margin-top: 10px;
    font-size: 1.1rem;
    color: #cbd5e1;
    border-top: 1px solid #475569;
    padding-top: 10px;
}

/* Стили для спецсимволов, если нужно */
.info-list li {
    font-weight: 500;
}
/* Добавьте это к существующим стилям .icon_formula и .icon_notice */
/*.icon_formula {*/
/*    background-image: url('../img/formula.svg'); !* Путь к вашей иконке *!*/
/*    background-size: contain;*/
/*    background-repeat: no-repeat;*/
/*    display: inline-block;*/
/*    width: 24px;*/
/*    height: 24px;*/
/*    vertical-align: middle;*/
/*}*/
.icon_formula {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Добавляем сам символ через псевдоэлемент */
.icon_formula::before {
    content: "📌";
    font-size: 1.2rem; /* Можно менять размер иконки */
}

.icon_notice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Добавляем лампочку через контент */
.icon_notice::before {
    content: "💡";
    font-size: 1.2rem;
}

/* Стиль для ссылок */
a {
    text-color: #ffffff; /* Белый цвет текста */
    text-decoration: none; /* Убирает подчеркивание */
    transition: opacity 0.3s ease; /* Плавность при наведении */
}

/* Эффект при наведении (опционально), чтобы пользователь понимал, что это ссылка */
a:hover {
    text-decoration: none; /* Все еще без подчеркивания */
    opacity: 0.8; /* Немного тускнеет при наведении */
}

