/* ========================================
   XFIT HEADER
======================================== */
body{
    font-family:'Inter',sans-serif !important;
}
.xfit-header{
    position:sticky;
    top:0;
    z-index:1030;
    background:#111827;
    border-bottom:1px solid rgba(255,255,255,.08);
    backdrop-filter:blur(15px);
}
.xfit-navbar{
    height:80px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}
.xfit-logo{
    color:#f59e0b;
    font-size:32px;
    font-weight:700;
    text-decoration:none;
}
.xfit-logo:hover{
    color:#ffb020;
}
/* ========================================
   DESKTOP MENU
======================================== */
.xfit-menu {
    display: flex;
    gap: 10px;
}

.xfit-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all .25s ease;
}

.xfit-menu a:hover {
    background: rgba(255, 158, 11, .12);
    color: #ff9e0b;
}

.xfit-menu a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: .3s;
}

.xfit-menu a.active {
    background: rgba(255,158,11,.12);
    color: #ff9e0b;
    border-left: 3px solid #ff9800;
}

.xfit-menu a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: #ff9e0b;
    border-radius: 0 4px 4px 0;
}
/* ========================================
   USER AREA
======================================== */
.xfit-right{
    display:flex;
    align-items:center;
    gap:15px;
}
.btn-login{
    color:#fff;
    text-decoration:none;
    transition:.3s;
}
.btn-login:hover{
    color:#f59e0b;
}
.btn-register{
    background:#f59e0b;
    color:#fff;
    text-decoration:none;
    padding:10px 18px;
    border-radius:10px;
    font-weight:600;
    transition:.3s;
}
.btn-register:hover{
    background:#ffb020;
    color:#fff;
}
/* ========================================
   USER DROPDOWN
======================================== */
.xfit-user{
    position:relative;
}
.user-btn{
    display:flex;
    align-items:center;
    gap:10px;
    background:none;
    border:none;
    color:#fff;
    cursor:pointer;
}
.user-btn img{
    width:40px;
    height:40px;
    border-radius:50%;
    object-fit:cover;
}
.user-dropdown{
    position:absolute;
    top:60px;
    right:0;
    width:220px;
    background:#1f2937;
    border-radius:12px;
    padding:10px;
    display:none;
    box-shadow:
    0 10px 30px rgba(0,0,0,.3);
}
.user-dropdown.show{
    display:block;
}
.user-dropdown a{
    display:block;
    color:#fff;
    text-decoration:none;
    padding:5px;
    border-radius:8px;
    transition:.3s;
    margin-top: 5px;
}
.user-dropdown a:hover{
    background:#ffb020;
}
.logout-btn{
    width:100%;
    border:none;
    background:none;
    color:#ef4444;
    text-align:left;
    padding:5px;
    cursor:pointer;
}
/* ========================================
   MOBILE TOGGLE
======================================== */
.mobile-toggle{
    display:none;
    background:none;
    border:none;
    color:#fff;
    font-size:30px;
    cursor:pointer;
}
/*==================================================
    MOBILE MENU
==================================================*/
.mobile-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:9998;
}
.mobile-overlay.active{
    opacity:1;
    visibility:visible;
}
.mobile-menu{
    position:fixed;
    top:0;
    left:-340px;
    width:320px;
    max-width:90%;
    height:100vh;
    background:#111827;
    display:flex;
    flex-direction:column;
    transition:left .3s ease;
    z-index:9999;
    box-shadow:8px 0 30px rgba(0,0,0,.4);
}
.mobile-menu.active{
    left:0;
}
/*==================================================
    HEADER
==================================================*/
.mobile-header{
    height:64px;
    padding:0 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid rgba(255,255,255,.06);
}
.mobile-header span{
    color:#ff9f1a;
    font-size:30px;
    font-weight:700;
}
.mobile-header button{
    border:none;
    background:none;
    color:#fff;
    font-size:24px;
}
/*==================================================
    USER
==================================================*/
.mobile-user-card{
    padding:20px;
    display:flex;
    align-items:center;
    gap:15px;
    border-bottom:1px solid rgba(255,255,255,.06);
}
.mobile-user-card img{
    width:60px;
    height:60px;
    border-radius:50%;
    object-fit:cover;
}
.mobile-user-card strong{
    color:#fff;
    font-size:17px;
}
/*==================================================
    TAB
==================================================*/
.mobile-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
    margin:16px;
    border-radius:12px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.08);
}
.mobile-tab{
    height:48px;
    border:none;
    background:#1d2437;
    color:#aeb8c9;
    font-size:15px;
    font-weight:600;
    transition:.25s;
}
.mobile-tab.active{
    background:#ff9f1a;
    color:#fff;
}
/*==================================================
    CONTENT
==================================================*/
.mobile-tab-content{
    display:none;
    flex:1;
    overflow-y:auto;
    padding:0 16px 20px;
    -webkit-overflow-scrolling:touch;
}
.mobile-tab-content.active{
    display:block;
    flex:1;
    overflow-y:auto;
    overflow-x:hidden;
    height:calc(100vh - 180px);
    -webkit-overflow-scrolling:touch;
}
/*==================================================
    HOME MENU
==================================================*/
.mobile-home-menu{
    display:flex;
    flex-direction:column;
}
.mobile-home-menu a{
    color:#fff;
    text-decoration:none;
    padding:16px 8px;
    border-bottom:1px solid rgba(255,255,255,.06);
    transition:.25s;
}
.mobile-home-menu a:hover{
    color:#ff9f1a;
}
/*==================================================
    LOGIN
==================================================*/
.mobile-auth{
    padding:20px 0;
}
.mobile-login,
.mobile-register{
    display:block;
    text-align:center;
    text-decoration:none;
    padding:14px;
    border-radius:10px;
    margin-bottom:12px;
}
.mobile-login{
    color:#fff;
    border:1px solid rgba(255,255,255,.15);
}
.mobile-register{
    background:#ff9f1a;
    color:#fff;
}
/*==================================================
    SIDEBAR TRONG MOBILE
==================================================*/
.mobile-tab-content .user-sidebar{
    width:100%;
    background:transparent;
    padding:0;
    margin:0;
    box-shadow:none;
}
.mobile-tab-content .sidebar-menu{
    margin-bottom:12px;
}

/* ========================================
   RESPONSIVE
======================================== */
@media(max-width:991px){

    .xfit-menu{
        display:none;
    }

    .xfit-right{
        display:none;
    }

    .xfit-navbar{
        position:relative;
        height:70px;
        display:flex;
        align-items:center;
    }

    .mobile-toggle{
        display:block;
        font-size:30px;
        z-index:10;
    }

    .xfit-left{
        position:absolute;
        left:50%;
        transform:translateX(-50%);
    }

    .xfit-logo{
        font-size:28px;
    }

}
/* ===========================
   Mobile User Action
=========================== */

.mobile-user-action{
    display: none;
    margin-left: auto;
    align-items: center;
}

.mobile-user-btn{
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-user-btn:hover{
    color: #f59e0b;
}
@media (max-width: 991.98px){
    .mobile-user-action{
        display: flex;
    }

    /* Ẩn Login / Join Now trên mobile */
    .xfit-right{
        display: none;
    }
}
.guest-popup-actions{
    display:flex;
    gap:12px;
    margin-top:20px;
}

.guest-popup-actions .btn{
    flex:1;
}
/*=====================================
    MOBILE GUEST DROPDOWN
=====================================*/
.mobile-user-action{
    position:relative;
}
.guest-dropdown{
    position:absolute;
    top:55px;
    right:0;
    width:300px;
    background:#1E2435;
    border-radius:16px;
    padding:18px;
    box-shadow:0 15px 35px rgba(0,0,0,.35);
    display:none;
    z-index:9999;
}
.guest-dropdown.show{
    display:block;
}
.guest-dropdown h6{
    color:#fff;
    font-size:18px;
    margin-bottom:10px;
}
.guest-dropdown p{
    color:#c8d0df;
    font-size:14px;
    margin-bottom:18px;
    line-height:1.5;
}
.guest-actions{
    display:flex;
    gap:10px;
}
.guest-actions .btn{
    flex:1;
}
.header-avatar{
    width:42px;
    height:42px;
    border-radius:50%;
    overflow:hidden;
    flex-shrink:0;
}
.header-avatar img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}
.header-avatar-placeholder{
    width:42px;
    height:42px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#ffbf3f,#ff9800);
    color:#fff;
    font-size:18px;
    font-weight:700;
}
.mobile-user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar-placeholder {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    max-width: 42px;
    max-height: 42px;
    border-radius: 50%;
    flex: 0 0 42px;
}
/*=====================================
    ACCOUNT DRAWER
=====================================*/
.account-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none; 
    transition: .3s;
    z-index: 9998;
}

.account-overlay.active{
    opacity: 1;
    visibility: visible;
    pointer-events: auto; 
}
.account-menu{
    position: fixed;
    top: 0;
    right: -340px;
    width: 280px;
    max-width: 85%;
    height: 100vh;
    background: #111827;
    display: flex;
    flex-direction: column;
    transition: right .3s ease;
    z-index: 9999;
    box-shadow: -8px 0 30px rgba(0,0,0,.4);
}
.account-menu.active{
    right: 0;
}
.account-header{
    height:64px;
    padding:0 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid rgba(255,255,255,.06);
}
.account-header span{
    color:#ff9f1a;
    font-size:24px;
    font-weight:700;
}
.account-header button{
    border:none;
    background:none;
    color:#fff;
    font-size:24px;
    cursor:pointer;
}
.account-content{
    flex:1;
    overflow-y:auto;
    padding:20px;
}
.account-content a{
    display:block;
    color:#fff;
    text-decoration:none;
    padding:14px 10px;
    border-radius:10px;
    transition:.25s;
}
.account-content a:hover{
    background:#ff9f1a;
}
.account-content hr{
    border-color:rgba(255,255,255,.08);
    margin:16px 0;
}

