.submenu {
    list-style-type: none; /* Loại bỏ dấu chấm */
    padding-left: 0; /* Loại bỏ khoảng cách bên trái */
}

.submenu li {
    padding-left: 0; /* Đảm bảo không có lề bên trái */
}

/* Căn chỉnh menu theo left, center, right */
.menu {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap; /* Không tự động xuống dòng */
}

/* Căn trái */
.menu.left {
    justify-content: flex-start;
}

/* Căn giữa */
.menu.center {
    justify-content: center;
}

/* Căn phải */
.menu.right {
    justify-content: flex-end;
}

.menu > li {
    position: relative;
    display: inline-block;
}

/* Menu chính không có màu nền, chữ màu đen */
.menu > li > a {
    text-decoration: none;
    color: black;
    padding: 10px 20px;
    display: block;
    background-color: transparent;
    border-radius: 5px;
    font-weight: bold;
    transition: box-shadow 0.3s ease;
    display: flex;
    align-items: center;
}

/* Khi di chuột vào menu chính, thêm viền đen mờ */
.menu > li:hover > a,
.menu > li.active > a {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.menu > li > a img {
    margin-right: 8px;
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Submenu ẩn đi mặc định */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    z-index: 1000;
}

.submenu li a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.submenu li a:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Đảm bảo submenu xuất hiện khi di chuột vào ▼ and ▲ */
.menu > li:hover > .submenu {
    display: block;
}

.menu > li > a::after {
    content: ' ▼';
    font-size: 12px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.menu > li.active > a::after {
    content: '▼';
    transform: rotate(180deg);
}

.submenu li a::after {
    content: '';
}

/* Căn thẳng hàng cho các menu con theo class .thanghang */
.thanghang.hedieuhanh, .thanghang.taikhoan, .thanghang.games {
    display: flex;
    align-items: center; /* Căn thẳng hàng các mục con trong menu */
}

/* Căn thẳng hàng riêng cho menu "Hệ điều hành" */
.thanghang.hedieuhanh {
    justify-content: flex-start; /* Căn menu Hệ điều hành về bên trái */
}

/* Căn thẳng hàng riêng cho menu "Tài khoản" */
.thanghang.taikhoan {
    justify-content: flex-start; /* Căn menu Tài khoản về bên trái */
}

/* Thêm căn thẳng hàng cho menu "Games" */
.thanghang.games {
    justify-content: flex-start; /* Căn menu Games về bên trái */
}

/* ===== CSS CHO MOBILE MENU ===== */
.mobile-menu-toggle {
    display: none;
    margin-left: 10px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: #fff;
    padding: 15px;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu ul li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.mobile-menu ul li a {
    color: black;
    text-decoration: none;
    font-weight: bold;
}

/* ===== RESPONSIVE: ẨN/HIỆN THEO MÀN HÌNH ===== */
@media screen and (max-width: 768px) {
    /* Ẩn toàn bộ menu desktop */
    .menu {
        display: none !important;
    }

    /* Hiện hamburger */
    .mobile-menu-toggle {
        display: block;
    }

    /* Hiện mobile menu khi active */
    .mobile-menu.active {
        display: block;
    }
}


.mobile-menu ul ul {
    margin-left: 15px;
    padding-left: 10px;
    border-left: 2px solid #eee;
}

.mobile-menu strong {
    display: block;
    padding: 10px 0 5px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #ccc;
}

/* search-box*/
.mobile-menu .search-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.mobile-menu .search-field {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.mobile-menu .search-submit {
    padding: 8px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

.mobile-menu .search-submit:hover {
    background-color: #005f8d;
}

/* desktop and other */
/* Search form desktop */
.desktop-search-form {
    display: flex;
    align-items: center;
    margin-left: auto; /* đẩy sang bên phải */
    gap: 6px;
}

.desktop-search-form .search-field {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 180px;
}

.desktop-search-form .search-submit {
    padding: 6px 10px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

/* Ẩn trên mobile */
@media screen and (max-width: 768px) {
    .desktop-search-form {
        display: none;
    }
}

.search-form {
    position: relative;
}

.search-form .search-field {
    width: 100%;
    box-sizing: border-box;
}

.search-form div {
    box-sizing: border-box;
}





