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) {
    .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;
    }
}

