body {
    font-family: "Montserrat", sans-serif;
    font-size: 62.5%;
    background-color: #faf6f6;
    /* background-color: #f1efef; */
}

a {
    text-decoration: none;
}

body,
html {
    scroll-behavior: smooth;
}

@media print {
    body {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
}

.content {
    /* nếu bình thường mà độ rộng lớn hơn 1110px thì hiện bth */
    width: 1110px;
    /* nếu như nhỏ hơn thì nó sẽ ăn theo max-width */
    max-width: calc(100%-48px);
    /* trừ cho sidebar */
    margin-left: auto;
    margin-right: auto;
}

/* ======= Navbar ======= */

header {
    padding-top: 15px;
    font-size: 1.5rem;
    display: flex;
    justify-self: center;
    background-color: rgba(255, 255, 255, 0.2);
    background: -webkit-linear-gradient(
        to right,
        #8e44ad,
        #c0392b
    ); /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #8e44ad, #c0392b);
    position: sticky;
    top: -15px;
    z-index: 1;
    border-radius: 0 0 20px 20px;
    min-width: 1110px;
}

.navbar {
    display: flex;
    justify-content: center;
    font-family: "Open Sans", sans-serif;
    margin-left: auto;
    margin-right: auto;
}

header .content {
    width: 70%;
    min-width: 1110px;
}

.navbar ul {
    justify-content: space-around;
    width: 100%;
    display: flex;
    padding: 15px 0;
}

.navbar ul a {
    position: relative;
    /* margin-left: 50px; */
    padding: 5px 20px;
    color: #fff;
}

ul > li > a::before {
    content: "";
    position: absolute;
    width: 85%;
    height: 3px;
    background-color: #fff;
    border-radius: 999px;
    transform: scaleX(0);
    transition: all 0.5s ease-in-out;
    bottom: 0;
    left: 10%;
}
.navbar li:hover > a::before {
    transform: scaleX(0.5);
}

/* ======== Main ======== */
main {
    display: flex;
    justify-content: space-around;
}

main .content {
    margin-left: calc(50vh - 20%);
}

main * {
    color: black;
}

main .content {
    max-width: 1100px;
    width: 55%;
    min-width: 750px;
    font-size: 1.1rem;
    line-height: 1.7;
}
main p,
main h1,
main h2,
main h3,
main img {
    margin-top: 20px;
}

main li {
    margin-top: 10px;
}

.title {
    margin-top: 35px;
    font-size: 3.5rem;
    font-weight: 600;
}

main .sidebar .desc {
    position: relative;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 50px;
}

main .sidebar .desc::after {
    position: absolute;
    left: 0;
    bottom: -10px;
    content: "";
    background-color: #181821;
    height: 4px;
    width: 200px;
    border-radius: 999px;
}

main .sidebar {
    position: sticky;
    position: -webkit-sticky;
    top: 70px;
    left: 0;
    width: 18%;
    min-width: 290px;
    max-width: 450px;
    height: 100%;
    color: #a0aec0;
    margin-top: 50px;
    padding-left: 30px;
    font-size: 1.1rem;
    /* overflow: auto; */
    transform: translateX(-100%);
    opacity: 0;
}

main .sidebar li {
    margin-top: 15px;
    line-height: 1.5;
}

main .sidebar .list {
    margin-top: 20px;
    padding-left: 20px;
}

main .sidebar .list li {
    position: relative;
}

main .sidebar .list li::before {
    left: -15px;
    position: absolute;
    content: "#";
    color: red;
}

main .sidebar .list li a {
    display: inline-block;
    position: relative;
    transition: transform 0.3s ease;
}

main .sidebar .list li a:hover {
    transform: translateX(5px);
    /* color: #8e44ad; */
    color: #c0392b;
}

.sidebar ul li a.active {
    color: #c0392b;
    font-weight: 600;
}
.list {
    margin-top: 20px;
}

.list > li {
    font-size: 1.1rem;
    font-weight: 600;
}

.list li {
    margin-top: 0;
}

.list li::before {
    content: "#";
    color: red;
}

.sub-list {
    padding-left: 30px;
}

.sub-list > li {
    font-weight: 400;
}

main .sub-title {
    position: relative;
    font-weight: 600;
    font-family: "scandia-web", ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 2.7rem;
}

main .sub-title::before {
    content: "#";
    position: absolute;
    left: -4%;
    font-weight: 700;
    color: red;
}

main .content-title {
    position: relative;
    font-family: "scandia-web", ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol", "Noto Color Emoji";
    font-weight: 600;
    font-size: 1.9rem;
}

main .content-title::before {
    content: "#";
    position: absolute;
    font-weight: 700;
    left: -3%;
    color: red;
}

main .subject {
    font-weight: 600;
    font-size: 1.6rem;
}

main .steps,
main .item,
main .steps-out {
    margin-top: 15px;
    padding-left: 35px;
}

main .steps,
main .steps-out {
    counter-reset: item;
}

main .steps > li,
main .steps-out > li {
    position: relative;
    counter-increment: item;
}

main .steps-out > li::before {
    position: absolute;
    top: -5px;
    left: -40px;
    content: counter(item) ".";
    font-weight: bold;
    font-size: 1.9rem;
}

main .steps > li::before {
    position: absolute;
    left: -25px;
    content: counter(item) ".";
    font-weight: bold;
    font-size: 1.2rem;
}

main .item {
    list-style-type: disc;
}

main p,
main .steps li,
main .item li {
    color: rgb(10 10 12);
    /* color: rgb(66, 66, 70); */
    font-weight: 400;
    letter-spacing: 0.03rem;
}

main b {
    font-weight: 600;
}

main i {
    font-style: italic;
}
.wrap {
    padding-left: 30px;
    position: relative;
    margin-top: 70px;
}

.wrap::before {
    position: absolute;
    left: 3%;
    top: -5%;
    content: "";
    width: 300px;
    height: 4px;
    background-color: black;
    border-radius: 999px;
}

.excerpt strong {
    font-style: italic;
    font-weight: 600;
    font-size: 1.2rem;
}

.links {
    padding-left: 40px;
    list-style-type: disc;
    text-decoration: underline;
    color: #e4271b;
}

.links li {
    color: #e4271b;
}

.links li::marker {
    color: black;
}

/* =========== Footer =========== */

footer {
    margin-top: 65px;
    padding: 50px 0 58px;
    font-size: 1.1rem;
    background-color: #181821;
    color: #a9b3bb;
}

footer .row {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

footer .Logo {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Vergilia";
    font-size: 2rem;
    color: #c9c8c8;
}

footer .contact {
    font-weight: 500;
}

footer .social {
    display: flex;
    align-items: center;
    margin-left: 20px;
}
footer .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

footer .social-link + .social-link {
    margin-left: 10px;
}

footer .social-link img {
    width: 25px;
    height: 25px;
}

footer .row > div {
    display: flex;
    align-items: center;
    padding-bottom: 10px;
}

footer .banquyen {
    text-align: center;
    margin-top: 40px;
}

footer .banquyen strong {
    font-weight: 600;
}
/* ========== Termianl ========= */

.code-block {
    background-color: #282c34;
    border-radius: 6px;
    overflow: auto;
    font-family: "Consolas", "Monaco", monospace;
    margin: 30px 0;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background-color: #21252b;
    color: #abb2bf;
}

.language {
    font-size: 14px;
    color: #e3e3e3;
}

.copy-button {
    background-color: transparent;
    border: 1px solid #abb2bf;
    color: #abb2bf;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.copy-button:hover {
    background-color: rgba(171, 178, 191, 0.1);
}

pre,
code {
    background-color: rgb(40, 44, 52) !important;
    word-wrap: normal;
}

/* ====== Scroll cho terminal ===== */
.code-block ::-webkit-scrollbar {
    border-radius: 0;
    height: 3px;
}

.code-block ::-webkit-scrollbar-thumb {
    background-color: #4a4e54; /* Màu sắc thanh cuộn */
    border-radius: 4px;
}

.code-block ::-webkit-scrollbar-track {
    background-color: #282c34;
}
.code-block {
    scrollbar-width: thin;
    scrollbar-color: #4a4e54 #282c34;
}

pre {
    margin: 0;
    padding: 16px;
}

code {
    font-family: inherit;
}

/* ======= scroll ======== */

::-webkit-scrollbar {
    border-radius: 0;
    width: 8px;
}

::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(22, 24, 35, 0.2);
}

::-webkit-scrollbar-track {
    border-radius: 0;
    background-color: rgba(0, 0, 0, 0);
}

.scrolled-to {
    scroll-margin-top: 70px; /* Điều chỉnh giá trị này tùy theo chiều cao của navbar */
}
