/* ===== NAVBAR MODERN ===== */

/* Navbar đồng bộ nền body */
.wrap {
    position: relative;
    height: 80px; /* cố định chiều cao navbar */
}
/* Ẩn nút mặc định */
.wrap .button-show-hide {
    display: none;
}
.user-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.user-dropdown .avatar:hover {
    transform: scale(1.05);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    width: 180px;
    background: #1e293b;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.3s ease;
    z-index: 999;
}

/* Hiện menu khi hover */
.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Item */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.dropdown-item:hover {
    background: #334155;
}

/* Nút logout màu khác */
.logout {
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #ff4d4f;
}

.logout:hover {
    background: rgba(255,77,79,0.1);
}
/* Dropdown menu */
.dropdown-menu-custom {
    position: absolute;
    top: 55px;
    right: 0;
    width: 220px;
    background: #1e293b;
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.25s ease;
    z-index: 9999;
}

.dropdown-menu-custom.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Item hiện đại */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

/* Icon to hơn */
.dropdown-item i {
    font-size: 18px;
}

/* Profile button */
.dropdown-item:not(.logout) {
    background: rgba(59,130,246,0.1);
    color: #3b82f6;
}

.dropdown-item:not(.logout):hover {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 0 15px rgba(59,130,246,0.5);
}

/* Logout button */
.logout {
    margin-top: 8px;
    background: rgba(255,77,79,0.1);
    color: #ff4d4f;
}

.logout:hover {
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    color: #fff;
    box-shadow: 0 0 15px rgba(255,77,79,0.6);
}
/* Khi menu bị tắt thì hiện nút */
body.menu-collapsed .wrap .button-show-hide {
    display: block !important;
}
.navbar-fixed-right {
    position: fixed;
    right: 30px;
    top: 60px; /* chỉnh theo chiều cao navbar */
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 999;
    top: 17px;   /* lên cao hơn */
}
.wrap .button-show-hide {
    width: 44px !important;
    height: 44px !important;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.3) 100%) !important;
    border: 2px solid rgba(56, 189, 248, 0.4) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3) !important;
    font-size: 20px !important;
    top: 40px;
}
.wrap .button-show-hide:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.5) !important;
}
/* Không để float */
.floating-controls {
    display: flex;
    align-items: center;
}
/* ===== FLOATING CONTROLS ===== */
.button-show-hide {
  margin-left: auto;
}

/* ===== LANGUAGE FLOAT ===== */
.language-btn {
    height: 48px;
    padding: 0 24px;
    border-radius: 50px;
    border: 1px solid rgba(0,255,255,.25);
    background: rgba(10,25,45,.6);
    backdrop-filter: blur(15px);
    color: #00eaff;
    font-weight: 600;
    transition: .3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

.language-btn:hover {
    background: linear-gradient(135deg,#00cfff,#0066ff);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,150,255,.5);
}

/* css thanh search */
/* ==== CONTAINER ==== */

.floating-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* ==== ICON BUTTON ==== */

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: #fff;
    cursor: pointer;
    transition: 0.3s ease;
}

.icon-btn:hover {
    background: rgba(14,165,233,0.25);
    border-color: rgba(14,165,233,0.6);
    transform: translateY(-2px);
}

/* ==== SEARCH ==== */

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    
}

.search-box input {
    width: 0;
    opacity: 0;
    margin-left: 0;
    padding: 0;
    border-radius: 30px;
    border: none;
    background: rgba(255,255,255,0.07);
    color: #fff;
    transition: 0.4s ease;
}
/* ==== CONTAINER ==== */
.floating-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ==== BUTTON CHUNG ==== */
.icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 3px solid rgba(0, 255, 255, 0.534);
    z-index: 10;

    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    color: #00f7ff;

    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover effect */
.icon-btn:hover {
    background: rgba(0, 247, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 247, 255, 0.6);
    transform: translateY(-2px);
}
.header {
    overflow: visible;
}
/* ==== LOGO / AVATAR ==== */
.nav-logo img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid rgba(0, 255, 255, 0.534);
    z-index: 10;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    padding: 6px;
    transition: all 0.3s ease;
}
.avatar-modern {
    width: 48px;
    height: 48px;

    border-radius: 14px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;

    color: #fff;

    /* Gradient nền nếu là chữ */
    background: linear-gradient(135deg, #1e293b, #312e81);

        border: 3px solid rgba(0, 255, 255, 0.534);

    box-shadow:
        0 0 10px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(59, 130, 246, 0.2);

    cursor: pointer;

    transition: all 0.3s ease;
}

.avatar-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hiệu ứng nhẹ khi hover */
.avatar-modern:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 14px rgba(99, 102, 241, 0.6),
        0 0 26px rgba(59, 130, 246, 0.4);
}

.nav-logo img:hover {
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.7);
    transform: scale(1.05);
}

/* ==== SEARCH BOX ==== */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    position: relative;
    margin-left: auto; /* đẩy search sang phải */
}
#searchResult {
    display: none;
}

.show {
    display: block !important;
}
#searchInput {
    width: 0;
    opacity: 0;
    margin-left: 0;
    padding: 10px 14px;

    border-radius: 14px;
    border: 1px solid rgba(0,255,255,0.2);

    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);

    color: #fff;
    outline: none;

    transition: all 0.3s ease;
}
.search-box.expanded #searchInput {
    width: 450px;
    opacity: 1;
    margin-left: 10px;
}
.floating-controls {
    display: flex;
    align-items: center;
    float: left; /* Nằm ở bên trái */
}

/* ===== GUEST CTA BUTTONS (ĐĂNG NHẬP & ĐĂNG KÝ) ===== */
.nav-guest-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
}

/* NÚT ĐĂNG NHẬP */
.btn-nav-login-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    border-radius: 8px; /* Bo góc nhẹ 8px */
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0 !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    user-select: none;
}

.btn-nav-login-cta:hover {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn-nav-login-cta:active {
    transform: translateY(0);
    background: rgba(14, 165, 233, 0.1);
}

/* NÚT ĐĂNG KÝ */
.btn-nav-register-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 8px; /* Bo góc nhẹ 8px */
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4), 0 0 12px rgba(56, 189, 248, 0.2);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.25s ease;
    white-space: nowrap;
    user-select: none;
}

.btn-nav-register-cta:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6), 0 0 18px rgba(56, 189, 248, 0.4);
}

.btn-nav-register-cta:active {
    transform: translateY(0);
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

@media (max-width: 768px) {
    /* Ẩn nút search trên điện thoại */
    .search-box {
        display: none !important;
    }

    .nav-guest-actions {
        gap: 6px;
        margin-left: 4px;
    }
    .btn-nav-login-cta,
    .btn-nav-register-cta {
        height: 36px;
        padding: 0 12px;
        font-size: 13px;
        border-radius: 6px;
    }
}
