:root{
    --black-blue: #012840;
    --blue: #0367A6;
    --sky-blue: #3F9BBF;
    --light-blue: #C9E2F2;
    --nearly-white: #F4F4F4;
    --blue-soft: #637A9F;
    --beggie: #EADFB4;
    --nearly-black-blue: #153448;
    --trans: all 0.3s ease-in-out;
    --orange: #DD761C;
    --button-sort: #E9C874;
}

/* NAV BAR */
.navbar{
    position: fixed;
    top: 0;
    width: 100%;
    height: 4rem;
    background-color: var(--black-blue);
    z-index: 999;
}

.navbar .container {
    justify-content: space-between;
    height: 64px;
    margin: 0;
}

.site-brand {
    color: var(--nearly-white);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0px;
    margin-left: 20px;
}

.site-brand span {
    font-weight: 300;
}

#navbar-show-btn {
    background: none;
    padding: 20px 20px;
    color: var(--nearly-white);
    font-size: 1.5rem;
    /* transition: var(--trans); */
    border: none;
    /* line-height: 64px; */
}

#navbar-show-btn:hover {
    /* line-height: 64px; */
    background-color: var(--light-blue);
    color: var(--black-blue);
}

#navbar-collapse {
    background-color: var(--light-blue);
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    /* padding: 2rem; */

    transform: translateX(100%);
    transition: var(--trans);
}

/* OPEN NAV */
.navbar-collapse-rmw {
    /* JS RELATED */
    transform: translateX(0) !important;
}

#navbar-close-btn {
    background: none;
    color: var(--black-blue);
    width: 35px;
    height: 35px;
    border: none;
    font-size: 1.8rem;
    /* transition: var(--trans); */
    position: absolute;
    right: 0;
    top: 0;
    padding: 25px;
}

#navbar-close-btn:hover {
    background-color: var(--black-blue);
    color: var(--nearly-white);
}

/* .navbar-nav {
    margin-top: 3rem;
} */

.nav-item {
    /* margin: 1.5rem 0; */
}

.navbar-nav .home-icon {
    margin-right: 10px;
}


/* .nav-link:hover {
    color: var(--blue);
} */


/* HEADER */
header {
    position: relative;
    height: 30rem;
    margin-top: 4rem;
    background: url(/assets/img/bg-VS.jpg) no-repeat top left / cover;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Canh giữa theo chiều dọc */
    align-items: center; /* Canh giữa theo chiều ngang */
    text-align: center;
    letter-spacing: 1px;
}

#header-text h1 {
    font-size: 3em;
    margin: 0;
    font-weight: 900;
    /* animation: fadeIn 0.7s ease-in-out; */
}

/* @keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
} */


#header-text #second-header {
    /* display: block; */
}

#header-text h2 {
    margin-top: 0.5rem;
    opacity: 0.7;
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 0;
    width: 100%;
}

/* CONTENT */
#content {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins';
    line-height: 1.6;
    background-color: var(--nearly-white);
}

#content #about-content {
    max-width: 800px;
    padding: 30px;
}

#content p, ul {
    text-align: justify; /* Justify text alignment */
    margin: 15px 0;
}

#content ul {
    padding-left: 50px;
}

#content ul li {
    margin: 5px 0;
}
/* BODY */
#body-section {
    /* background-color: #EEF7FF; */
    background: url(/assets/img/abstract-textured-backgound.jpg) no-repeat top left / cover;
    width: 100%;
}
/* SORTING SECTION */
#sort-section {
    /* max-width: 800px; */
    margin-top: 4rem;
    margin-left: auto;
    margin-right: auto;
    padding: 30px 0;
    background-color: var(--nearly-white);
    /* background: url(/assets/img/bg-VS.jpg) no-repeat top left / cover; */

}

#sort-section .header_sortname {
    position: relative;
    display: flex;
    flex-direction: column;
    top: 0;
    /* height: 64px; */
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.5rem;
}
#sort-section #ele {
    text-align: center;
    height: 35px;
}

#sort-section h3 {
    display: flex;
    font-family: 'Montserrat';
    margin-top: 20px;
    font-size: 18px;
    padding: 7px 10px;
    font-weight: 600;
    background-color: var(--black-blue);
    color: var(--nearly-white);
    border-radius: 5px;
    letter-spacing: 0.5px;
}
/* #sort-section .sort-part {
    display: flex;
    justify-items: center;
    align-items: center;
    margin-top: 24px;
    margin: 0 auto;
} */

/* Sort Block */
.array {
    /* display: flex;
    justify-items: center;
    align-items: center; */
    margin-left: auto;
    margin-right: auto;
    height: 375px;
    width: calc(30px*20 + 3px*19);
    position: relative;
    
}
.block {
    width: 30px;
    background-color: var(--sky-blue);
    position: absolute;
    bottom: 0;
    transition: 0.2s all ease;
}

.block_id {
    position: absolute;
    color: var(--nearly-black-blue);
    opacity: 0.95;
    font-size: 14px;
    margin-top: -20px;
    width: 100%;
    text-align: center;
}

.controls {
	text-align: center;
	margin-top: 30px;
}

button:disabled {
    background-color: gray !important;
    color: var(--nearly-white) !important;
    cursor: not-allowed !important;
    opacity: 0.6; 
}

/* Sort Button */
.controls button {
    background-color: var(--button-sort);
    color: var(--black-blue);
    border: none;
    padding: 5px 14px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 8px;
    font-weight: 600;
}
.controls button:hover {
    background-color: var(--black-blue);
    color: var(--nearly-white);
    opacity: 0.9;
}

.controls button:disabled:hover {
    opacity: 0.6; 
    cursor: not-allowed !important;
}

.controls select {
    background-color: var(--beggie);
    color: var(--black-blue);
    border: none;
    border-radius: 5px;
    padding: 5px 14px;
    font-size: 18px;
    cursor: pointer;
    margin: 10px 0;
}

.controls select:hover {
    background-color: var(--black-blue);
    color: var(--nearly-white);
    opacity: 0.9;
}
.controls label {
    /* background-color: var(--beggie); */
    color: var(--black-blue);
    border: none;
    padding: 5px 14px;
    padding-right: 0;
    font-size: 18px;
    /* margin: 10px 8px; */
    margin-right: 0;
    font-weight: 600;
}

/* Content_sorting */
#content_sorting {
    margin-left: auto;
    margin-right: auto;
    padding: 30px 30px;
    font-family: 'Poppins';
    line-height: 1.6;


    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
}

#content_sorting h2, #code-content-section h2 {
    font-family: 'Montserrat';
    font-weight: 700;
    font-size: 28px;
    margin-bottom: 10px;
}

/* description */
#content_sorting .description_sort {
    text-align: justify;
    flex: 1 1 65%;
    margin-right: 100px;
    box-sizing: border-box;
    margin-bottom: 50px;

}

.description_sort p, ul {
    text-align: justify;
    margin: 15px 0;
}
.description_sort .numbered-list {
    list-style-type: decimal;
}
.description_sort #first-des {
    margin-top: 0;
}
.description_sort ul {
    padding-left: 50px;
}
.description_sort ul li {
    margin: 5px 0;
}
.description_sort .total-bubble {
    font-weight: 700;
    background-color: var(--beggie);
    padding: 0 5px;
}
/* Description table */
.description_sort table {
    width: 90%;
    border-collapse: collapse;
    margin-top: 20px;
}

.description_sort th, .description_sort td {
    border: 2px solid var(--black-blue);
    padding: 0 1rem;
    text-align: center;
    vertical-align: top;
}
.description_sort th {
    background-color: var(--blue-soft);
    padding: 10px;
    color: var(--nearly-white);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}
.description_sort ul {
    padding-left: 30px;
}
/* Complexity */
#content_sorting .complexity_sort {
    flex: 1 1 30%;
    max-width: 300px;
/    /* margin-left: 100px; */
}

.complexity_sort table {
    width: 100%;
    border-collapse: collapse;
    line-height: 2.5;
    background-color: var(--blue-soft);
    font-size: 18px;
}

.complexity_sort th {
    font-weight: 600;
    letter-spacing: 0.2px;
}

.complexity_sort th, .complexity_sort td {
    color: var(--nearly-white);
    border: 1.7px solid var(--black-blue);
    padding: 0 1rem;
    text-align: center;
    vertical-align: top;
}

.complexity_sort td {
    font-weight: 400;
    text-align: left;
}

/* CODE CONTENT */
#code-content-section {
    margin-left: auto;
    margin-right: auto;
    padding: 30px 30px;
    font-family: 'Poppins';
    line-height: 1.6;
    max-width: 1200px;
}

/* #code-content-section h2 {
    font-family: 'Montserrat';
    font-weight: 600;
    font-size: 23px;
    margin-bottom: 16px;
} */

#code-content-section .tab {
    display: flex;
    /* justify-content: center; */
}

#code-content-section .tab-link {
    background: var(--light-blue);
    border: 3px solid var(--orange);
    /* border-bottom: none; */
    /* border-radius: 15px 15px 0 0; */
    width: 80px;
    cursor: pointer;
    padding: 5px 20px;
    margin-bottom: -3px;
    margin-left: -3px;

    opacity: 0.9;
    transition: opacity 0.3s;
}
#code-content-section .tab-link img:hover {
    transform: scale(1.25);
}

#code-content-section .tab-link:hover {
    background: #b5c9ec;
}

#code-content-section .tab-link.active {
    opacity: 1;
    background: var(--nearly-black-blue);
    border-bottom: none;
}
#code-content-section .tab #first-tab-link {
    border-top-left-radius: 20px;
    margin-left: 0px;
}

#code-content-section .tab-link img {
    height: 40px;
}


#code-content-section .code-container {
    background-color: var(--nearly-black-blue);
    border: 3px solid var(--orange);
    text-align: left;
    padding: 20px 10px;
    display: none;
    max-width: 700px;
}

#code-content-section .code-block {
    display: none;
    color: #fbfbfb;
    padding: 0;
    margin: 0;
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;

}

/* show the active code block */
#code-content-section .code-container .active {
    display: block;
}

/* Footer */
#footer {
    background-color: var(--black-blue);
    color: var(--nearly-white);
    text-align: center;
    padding-bottom: 20px;
}
/* .footer-text h2 {
    padding-bottom: 10px;
} */
.footer-text p{
    padding: 3px 0;
}

.footer-text .email-icon {
    padding-right: 5px;
    font-size: 20px;
}

#footer #contact-icon a{
    font-size: 30px;
    padding: 5px;
}

#footer #contact-icon a:hover {
    color: var(--beggie);
}