/* Main Navigation Styles */
.main-nav {
    background-color: #0B181B;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sidebar expand button in main-nav */
.main-nav .sidebar-expand-btn-wrapper {
    padding: 0;
    border-bottom: none;
    background-color: transparent;
    width: 2.7702em; /* Match sidebar-nav width */
}

.main-nav .sidebar-expand-btn {
    width: 100%;
    height: 2.4948rem; /* Match sidebar-expand-btn height */
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.main-nav .sidebar-expand-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.main-nav .sidebar-expand-btn {
    position: relative;
}

.main-nav .arrow-left-icon {
    opacity: 0;
    transition: all 0.3s ease;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* When sidebar is expanded, show left arrow */
.sidebar-nav.expanded ~ * .main-nav .arrow-right-icon,
body.sidebar-expanded .main-nav .arrow-right-icon {
    opacity: 0;
}

.sidebar-nav.expanded ~ * .main-nav .arrow-left-icon,
body.sidebar-expanded .main-nav .arrow-left-icon {
    opacity: 1;
}

.logo {
    border-radius: 8px;
    width: auto;
    height: auto;
    cursor: pointer;
    display:flex;
    align-items: center;
}

.logo-img {
    width: 25vw;
    height: auto;
    object-fit: contain;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

#loggedInButtons{
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

#guestButtons{
    gap: 0.5rem;
}

.login-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.625rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    height: 2.5rem;
    width: 6.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}


.join-btn {
    background: var(--primary-color);
    border: none;
    color: #0B181B;
    padding: 0.625rem 0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    height: 2.3125rem;
    width: 6.25rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 174, 0.3), 0 3px 0 #02B085, inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logged In Navigation Styles */
.main-nav.logged-in {
    background: #0B181B;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #354959;
}

/* Apply logged-in styles to main-nav elements */
.main-nav.logged-in .wallet-section {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding-bottom: 0.2rem;
    position: relative;
}

.main-nav.logged-in .balance-btn {
    background: transparent;
    padding: 0.5rem 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    border-radius: 8px;
}

.main-nav.logged-in .flag-icon {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
}

.main-nav.logged-in .balance-text {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
}

.main-nav.logged-in .balance-section {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
    position: relative;
}

.balance-btn .user-dropdown-arrow {
    margin:0;
}

.balance-section.active .user-dropdown-arrow {
    transform: rotate(270deg);
}

.main-nav.logged-in .dropdown-arrow {
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(90deg);
}


.main-nav.logged-in .deposit-btn {
    background: var(--primary-color);
    border: none;
    color: #0B181B;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    height: 2rem;
    width: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 255, 174, 0.3), 0 3px 0 #02B085, inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.main-nav.logged-in .wallet-log-icon {
    width: 1rem;
    height: 1rem;
}

.main-nav.logged-in .notification-btn:hover {
    background: #2a2a2a;
}


.main-nav.logged-in .user-section {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
    position: relative;
}

.main-nav.logged-in .profile-picture {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
}

.wallet-btn{
    gap: 0.2rem;
}

.user-dropdown-arrow {
    width: 0.8rem;
    height: 0.8rem;
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    transform: rotate(90deg);
}

.user-section.active .user-dropdown-arrow {
    transform: rotate(270deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--profile-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    min-width: 200px;
    max-width: 90vw;
    box-shadow: none;
    z-index: 1001;
    overflow: hidden;
    padding: 0.5rem;
    user-select: none;
}



.user-dropdown-header {
    padding: 0 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: none;
}

.user-dropdown-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-top:-5px;
}

.user-dropdown-tier {
    background: var(--primary-color);
    color: #0B181B;
    padding: 0.1rem 1rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-dropdown-id {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
}

.user-dropdown-items {
    padding: 0.5rem 0;
    background-color:#354959;
    border-radius: 8px;
}

.user-dropdown-item {
    padding: 0.5rem 1rem;
    color: #ffffff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 8px;
}

.user-dropdown-item:hover {
    color: var(--primary-color);
}

.wallet-section .user-dropdown-menu {
    left: 0;
    right: 0;
    width: 100%;
}

.wallet-section .user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.balance-dropdown-flag {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    object-fit: cover;
}

.balance-dropdown-currency {
    flex: 1;
    transition: color 0.3s ease;
}

/* Settings Dropdown Styles */
.settings-dropdown-wrapper {
    position: relative;
}

.settings-dropdown-item {
    padding:0.5rem;
    color: #ffffff;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #354959;
    min-height: 2.5rem;
    height: 2.5rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.2rem;
}


.settings-dropdown-item:last-child {
    margin-bottom: 0rem;
}

.settings-dropdown-item:hover {
    background: var(--secondary-bg-color);
    border: 1px solid var(--primary-color);
}

.settings-dropdown-flag {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.settings-dropdown-icon {
    width: 1.2rem;
    height: 1.2rem;
    color: #929AAA;
    flex-shrink: 0;
}

.settings-dropdown-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.settings-dropdown-label {
    color: #929AAA;
    font-size: 0.6rem;
}

.settings-dropdown-value {
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 400;
}


.settings-dropdown-wrapper.active .desktop-settings-btn {
    background: rgba(255, 255, 255, 0.18);
}

.user-dropdown-item:hover .balance-dropdown-currency {
    color: var(--primary-color);
}

.balance-dropdown-balance {
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.user-dropdown-item:hover .balance-dropdown-balance {
    color: var(--primary-color);
}

.wallet-section .user-dropdown-item:hover{
    background: rgba(255, 255, 255, 0.12);
}

.desktop-settings-btn {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.433125rem 0.5775rem;
    display: flex;
    align-items: center;
    gap: 0.5775rem;
    cursor: pointer;
    transition: all 0.3s ease;
}


.desktop-settings-icon {
    color: #929AAA;
    width: 1.38rem; /* 1.15 * 1.2 */
    height: 1.38rem; /* 1.15 * 1.2 */
}

/* Desktop Hamburger Menu - Hidden on mobile */
.desktop-hamburger-btn {
    display: none;
}

.desktop-ui-elements{
    display: none;
}

/* ========================================
   TABLET & DESKTOP STYLES
   ======================================== */
@media (min-width: 768px) {


    .main-nav.logged-in {
        padding: 1.155rem 1.7325rem;
    }

    .main-nav.logged-in .balance-btn {
        padding: 0.5rem 0.75rem;
    }

    .logo {
        padding-left: 0.5775rem;
    }

    .logo-img{
        width:10rem;
        height:auto;
    }

    .desktop-hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0.5775rem;
        transition: all 0.3s ease;
        margin-right: 1.155rem;
    }

    .desktop-hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 1.7325rem;
        height: 1.7325rem;
        cursor: pointer;
        gap: 0.28875rem;
    }

    .desktop-hamburger-line,
    .desktop-hamburger-middle {
        width: 100%;
        height: 0.125rem;
        background-color: #929AAA;
        transition: all 0.3s ease;
    }

    .desktop-hamburger-middle {
        background-color: var(--primary-color);
    }

    .desktop-hamburger-btn:hover .desktop-hamburger-line,
    .desktop-hamburger-btn:hover .desktop-hamburger-middle {
        background-color: var(--primary-color);
    }

    .main-nav, .main-nav.logged-in{
        padding:0.5775rem 0.35em;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 100;
    }

    .logo {
        height: 2.31rem;
        min-width: 4.62rem;
    }

    .login-btn {
        height: 2.4948rem; /* 2.772 * 0.9 */
        width: 6.237rem; /* 6.93 * 0.9 */
        font-size: 1.126125rem; /* 0.9384375 * 1.2 */
        padding: 0.693rem 1.0395rem; /* 0.5775 * 1.2, 0.86625 * 1.2 */
    }

    .join-btn {
        height: 2.24532rem; /* 2.4948 * 0.9 */
        width: 6.237rem; /* 6.93 * 0.9 */
        font-size: 1.126125rem; /* 0.9384375 * 1.2 */
        padding: 0.693rem 0; /* 0.5775 * 1.2 */
    }

    .main-nav.logged-in .deposit-btn{
        width: auto; /* 2.4948 * 0.9 */
        height: 2.24532rem; /* 2.4948 * 0.9 */
    }


    .desktop-ui-elements {
        display: flex;
        align-items: center;
        gap: 0.5775rem;
    }


    .desktop-divider {
        width: 1px;
        height: 0.8625rem;
        background-color: #354959;
    }

    .user-dropdown-arrow {
        display: flex;
    }
    
    .user-dropdown-menu {
        top: calc(100% + 0.75rem);
        right: 0;
        max-width: none;
    }

    .wallet-section .user-dropdown-menu {
        top: calc(100% + 0.75rem);
    }
   
}

/* Hide sidebar expand button on mobile */
@media (max-width: 767px) {
    .main-nav .sidebar-expand-btn-wrapper {
        display: none;
    }
}
