body {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

.wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.anime-svg {
    width: 100%;
    height: 100px;
}

.anime-svg svg {
    width: 100%;
    height: 100%;
}

.anime-svg text {
    font-size: 48px;
    font-weight: bold;
    fill: #007bff;
}

.author {
    font-style: italic;
    margin-top: 10px;
}

.content {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 20px;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

h2 {
    font-size: 2rem;
    color: #34495e;
}

h3 {
    font-size: 1.75rem;
    color: #2980b9;
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #3498db;
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 20px;
}
.card-header h3 {
    color: #ffffff;
}
@media (max-width: 1128px) {
    .card{
        width: 100% !important;
    }
    .card-header {
        width: 100% !important;
    }
    .card-header h3 {
        width: 100% !important;
    }
}
.card-body {
    padding: 30px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}

tr:hover {
    background-color: #f5f5f5;
}

.btn {
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.example {
    background-color: #e8f4f8;
    border-left: 5px solid #3498db;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
}

.math-formula {
    background-color: #f9f2f4;
    color: #c7254e;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Fira Code', monospace;
    overflow-x: auto;
}

@media screen and (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 15px;
    }

    .anime-svg text {
        font-size: 36px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }


    .card-body {
        padding: 20px;
    }
}
.downloads {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.downloads h2 {
    margin-bottom: 1rem;
}

.downloads ul {
    list-style-type: none;
    padding-left: 0;
}

.downloads li {
    margin-bottom: 0.5rem;
}

.downloads a {
    color: #007bff;
    text-decoration: none;
}

.downloads a:hover {
    text-decoration: underline;
}


.jumbotron {
    background-color: #f8f9fa;
}

.chapter h3 {
    cursor: pointer;
}

.chapter h3:hover {
    color: #fff4f4;
}

#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
}

#back-to-top:hover {
    background-color: #0056b3;
}

#back-to-top.show {
    display: block;
}
.btn-orange {
    color: #fff;
    background-color: #fd7e14;
    border-color: #fd7e14;
}

.btn-orange:hover {
    color: #fff;
    background-color: #e96b02;
    border-color: #dc6502;
}
.math-formula {
    padding: 10px;
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

#exampleContent {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-top: 15px;
}

#exampleContent h4 {
    color: #007bff;
    margin-bottom: 10px;
}

#exampleContent ul {
    padding-left: 20px;
}

#exampleContent li {
    margin-bottom: 5px;
}

#table-of-contents {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

#table-of-contents h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#table-of-contents ul {
    list-style-type: none;
    padding-left: 0;
}

#table-of-contents ul ul {
    padding-left: 20px;
}

#table-of-contents li {
    margin-bottom: 10px;
}

#table-of-contents a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

#table-of-contents a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.example {
    background-color: #f0f8ff;
    border-left: 4px solid #007bff;
    padding: 10px;
    margin: 10px 0;
}

.example p {
    margin-bottom: 5px;
}

.card-body h4 {
    color: #007bff;
    margin-top: 20px;
}

.card-body h5 {
    color: #0056b3;
    margin-top: 15px;
}

.img-fix{
    aspect-ratio: 5/3;
    width: 450px;

}
#exampleContent2_1 ul {
    list-style-type: none; /* Loại bỏ dấu chấm tròn */
    padding-left: 0; /* Loại bỏ padding mặc định */
}

#exampleContent2_1 li {
    margin-bottom: 5px; /* Thêm khoảng cách giữa các mục */
}

/* Thêm vào cuối file */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: absolute;
        top: 56px; /* Điều chỉnh nếu cần thiết */
        left: 0;
        right: 0;
        background-color: #343a40;
        padding: 10px;
        z-index: 1000;
    }

    .navbar-nav {
        flex-direction: column;
    }

    .navbar-nav .nav-item {
        margin-bottom: 10px;
    }
}

.navbar-toggler {
    border-color: rgba(255,255,255,.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
#table-of-contents {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 20px;
}

#table-of-contents h3 {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

#table-of-contents ul {
    list-style-type: none;
    padding-left: 0;
}

#table-of-contents ul ul {
    padding-left: 20px;
}

#table-of-contents ul ul ul {
    padding-left: 40px;
}

#table-of-contents li {
    margin-bottom: 10px;
}

#table-of-contents a {
    text-decoration: none;
    transition: color 0.3s ease;
}

#table-of-contents a:hover {
    text-decoration: underline;
}

/* Cấp độ 1 */
#table-of-contents > ul > li > a {
    font-weight: bold;
    color: #dc3545; /* Đỏ */
}

/* Cấp độ 2 */
#table-of-contents > ul > li > ul > li > a {
    font-weight: normal;
    color: #007bff; /* Xanh dương */
}

/* Cấp độ 3 */
#table-of-contents > ul > li > ul > li > ul > li > a {
    font-style: italic;
    color: #28a745; /* Xanh lá */
}

/* Hiệu ứng hover cho tất cả các liên kết */
#table-of-contents a:hover {
    color: #ffc107; /* Vàng */
}

.section-divider {
    height: 3px;
    background: linear-gradient(to right, #3498db, #2ecc71);
    margin: 40px 0;
    border-radius: 3px;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

pre {
    background-color: #f8f9fa;
    border-left: 5px solid #3498db;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
}

code {
    font-family: 'Fira Code', monospace;
    color: #e74c3c;
}

#toc {
    position: sticky;
    top: 80px; /* Điều chỉnh khoảng cách từ đỉnh trang */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 1px solid #dee2e6;
}

#toc ul {
    list-style-type: none;
    padding-left: 0;
}

#toc ul li {
    margin-bottom: 10px;
}

#toc .nav-link {
    color: #495057;
    font-size: 0.9rem;
}

#toc .nav-link:hover,
#toc .nav-link.active {
    color: #007bff;
    font-weight: bold;
}

/* Thêm vào cuối file CSS */

/* Nút Back to Top */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    line-height: 50px;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 1000;
}

#back-to-top:hover {
    background-color: #0056b3;
}

/* Cải thiện khả năng đọc */
body {
    font-size: 18px;
    line-height: 1.8;
}

/* Tăng khoảng cách giữa các phần */
.card {
    margin-bottom: 40px;
}

/* Hiệu ứng hover cho các liên kết */
a {
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
}

/* Cải thiện hiển thị trên thiết bị di động */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

/* Cải thiện hiển thị code */
pre {
    background-color: #f8f9fa;
    border-left: 5px solid #007bff;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

.MathJax {
    font-size: 120% !important;
    margin: 0 !important;
}

.MathJax_Display {
    font-size: 140% !important;
}

@media (max-width: 768px) {
    .MathJax {
        font-size: 130% !important;
    }

    .MathJax_Display {
        font-size: 120% !important;
    }
}

.chapter li {
    font-size: 1.1em;
}

.chapter li p {
    font-size: 1.1em;
}

