@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&family=Lilita+One&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Quicksand:wght@300..700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
:root{
    --main-colur: #533cae;
    --black-colur: rgb(27, 27, 27);
    --white-colur: rgb(255, 255, 255);
    --gray-colur: rgb(226, 226, 226);
    --main-transition: 0.3s;
}
*{
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    scroll-behavior: smooth;
    padding: 0;
    margin: 0;
    font-family: 'Cairo', sans-serif;
}
a{
    text-decoration: none;
}
li{
    list-style: none;
}
body{
  font-family: 'Cairo', sans-serif;
  padding-top: 80px;
}

/* IMPORTANT: Hide mobile profile section on desktop - must be !important */
.mobile-profile-section {
    display: none !important;
}

/* start header */
.header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 80px;
    line-height: 80px;
    z-index: 1000;
    /* Enhanced modern gradient background with glass effect */
    background: linear-gradient(135deg,
        rgba(83, 60, 174, 0.95) 0%,
        rgba(107, 79, 214, 0.95) 50%,
        rgba(139, 69, 255, 0.95) 100%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 8px 32px rgba(83, 60, 174, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 50px;
    transition: all 0.3s ease;
}

.nav-logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-shrink: 0;
    margin-right: 20px;
}

.nav-logo img{
    width: 130px;
    height: auto;
    z-index: 10001;
    position: relative;
    padding: 0;
    line-height: 80px;
    transition: all 0.3s ease;
    filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-logo a:hover img {
    transform: scale(1.05);
    filter: brightness(1.2) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}
.nav-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    margin: 0 20px;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    z-index: auto;
    padding: 0;
    overflow: visible;
}

.nav-menu ul{
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu ul li{
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.nav-menu ul li .link{
    text-decoration: none;
    font-weight: 500;
    color: var(--black-colur);
    padding: 0 16px;
    margin: 0;
    display: inline-block;
    line-height: 80px;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
}

.nav-menu ul li .link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--main-colur);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

@media (min-width: 1025px) {
    .nav-menu ul li .link::after {
        bottom: 20px;
    }
}
.nav-menu ul li .link:hover::after,
.nav-menu ul li .link.active::after{
    width: 100%;
}

.nav-menu ul li .link:hover,
.nav-menu ul li .link.active{
    color: var(--main-colur);
}
.nav-button {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
    order: 2;
}

.nav-button .btn{
    width: 115px;
    height: 40px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    line-height: 1;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.nav-button .btn:active {
    transform: translateY(0);
}

#registerBtn{
    margin-left: 0;
}

.btn.white-btn{
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn.white-btn:hover{
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Make Register button more prominent */
#registerBtn {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #533cae !important;
    font-weight: 700 !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
}

#registerBtn:hover {
    background: #ffffff !important;
    color: #533cae !important;
    border-color: #ffffff !important;
    transform: translateY(-2px) scale(1.02) !important;
}
.nav-menu-btn{
    display: none; /* Hidden by default, shown on mobile */
}
.profile-container{
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    margin-left: 30px;
    order: 3;
}

.profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #533cae;
    background-color: #afa8fd;
    line-height: 0 !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-pic:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(83, 60, 174, 0.5), 0 0 0 3px rgba(83, 60, 174, 0.1);
}

.profile-pic:active {
    transform: scale(0.95);
}

.profile-pic img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 80px;
    right: 0;
    box-shadow: 0 8px 24px rgba(83, 60, 174, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid rgba(83, 60, 174, 0.12);
    min-width: 260px;
    z-index: 10001;
    animation: dropdownSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-menu ul {
    list-style: none;
    padding: 8px;
    margin: 0;
}

.dropdown-menu ul li {
    padding: 0;
    margin: 4px 0;
    border-radius: 10px;
    overflow: hidden;
}

.dropdown-menu ul li a {
    text-decoration: none;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    font-weight: 500;
    padding: 14px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    position: relative;
}

.dropdown-menu ul li a i {
    font-size: 20px;
    color: #533cae;
    transition: all 0.3s ease;
    min-width: 24px;
}

.dropdown-menu ul li a .menu-label {
    flex: 1;
    color: #2c3e50 !important;
}

.dropdown-menu ul li a:hover {
    background: linear-gradient(135deg, rgba(83, 60, 174, 0.1) 0%, rgba(83, 60, 174, 0.05) 100%);
    transform: translateX(4px);
    padding-left: 20px;
}

.dropdown-menu ul li a:hover i {
    transform: scale(1.1);
    color: #6b4fd6;
}

/* Balance Item Styling */
.dropdown-menu ul li.balance-item a {
    background: linear-gradient(135deg, #533cae 0%, #6b4fd6 100%) !important;
    color: white !important;
    cursor: default;
    margin-bottom: 8px;
}

.dropdown-menu ul li.balance-item a:hover {
    transform: none !important;
    padding-left: 16px !important;
    background: linear-gradient(135deg, #533cae 0%, #6b4fd6 100%) !important;
}

.dropdown-menu ul li.balance-item a i {
    color: white !important;
}

.dropdown-menu ul li.balance-item a .menu-label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu ul li.balance-item a .balance-amount {
    color: #fff !important;
    font-size: 18px;
    font-weight: 700;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 4px 12px;
    border-radius: 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Logout Item Styling */
.dropdown-menu ul li.logout-item a {
    color: #e74c3c;
    border-top: 1px solid rgba(83, 60, 174, 0.1);
    margin-top: 8px;
    padding-top: 14px;
}

.dropdown-menu ul li.logout-item a i {
    color: #e74c3c;
}

.dropdown-menu ul li.logout-item a:hover {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
}

.dropdown-menu ul li.logout-item a:hover i {
    color: #c0392b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 240px;
        right: -10px;
    }

    .dropdown-menu ul li a {
        padding: 12px 14px;
        font-size: 14px;
    }

    .dropdown-menu ul li.balance-item a .balance-amount {
        font-size: 16px;
    }
}

/* Add subtle animation on hover */
.dropdown-menu ul li {
    transition: all 0.2s ease;
}

.dropdown-menu ul li:hover {
    transform: scale(1.02);
}

.dropdown-menu ul li.balance-item:hover {
    transform: none;
}

/* Add divider between sections */
.dropdown-menu ul li:not(.balance-item):not(.logout-item):not(:last-of-type)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50px;
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(83, 60, 174, 0.1), transparent);
}

/* Mobile Responsive Styles */
@media only screen and (max-width: 768px){
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
    }

    .nav-logo {
        order: 1;
        margin-right: auto;
    }

    .lang-switcher {
        order: 8;
        margin-left: 10px;
        margin-right: 10px;
    }

    .profile-container {
        order: 9;
        margin-left: 10px;
        margin-right: 10px;
    }

    .nav-button{
        display: none;
    }

    /* Hamburger Menu Button */
    .nav-menu-btn{
        display: block !important;
        z-index: 10001;
        position: relative;
        flex-shrink: 0;
        order: 10;
        margin-left: 15px;
        margin-right: 0;
    }

    .nav-menu-btn i{
        font-size: 28px;
        color: #ffffff;
        padding: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        line-height: 70px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-menu-btn i:hover{
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .nav-menu-btn i:active{
        transform: scale(0.95);
    }
    
    /* Mobile Menu Styles */
    .nav-menu{
        position: fixed;
        top: 80px;
        left: -100%;
        width: 85%;
        max-width: 400px;
        height: calc(100vh - 80px);
        /* Solid gradient background for mobile menu */
        background: linear-gradient(135deg,
            rgb(83, 60, 174) 0%,
            rgb(107, 79, 214) 50%,
            rgb(139, 69, 255) 100%) !important;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: 2px 0 30px rgba(83, 60, 174, 0.5);
        border-right: 1px solid rgba(255, 255, 255, 0.3);
        z-index: 10000;
        padding-top: 20px;
        overflow-y: auto;
        margin: 0;
        flex: none;
    }
    
    /* Active state - menu visible */
    .nav-menu.active{
        left: 0 !important;
        display: block !important;
    }
    
    /* Mobile Profile Section - Only visible on mobile when logged in */
    .mobile-profile-section {
        display: block !important;
        padding: 15px 20px;
        margin-bottom: 10px;
        border-bottom: 2px solid rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        margin: 15px 20px 20px 20px;
        padding: 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-user-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .mobile-user-avatar {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px;
        min-height: 50px;
        max-width: 50px;
        max-height: 50px;
        border-radius: 50%;
        border: 3px solid rgba(255, 255, 255, 0.5);
        object-fit: cover;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        flex-shrink: 0;
    }
    
    .mobile-user-details {
        flex: 1;
        overflow: hidden;
    }
    
    .mobile-user-balance {
        margin: 0;
        font-size: 15px;
        font-weight: 500;
        color: #ffffff;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-menu ul{
        flex-direction: column;
        text-align: left;
        padding: 15px 0 20px 0;
        line-height: normal;
        height: calc(100% - 70px);
        overflow-y: auto;
        list-style: none;
        margin: 0;
    }
    
    .nav-menu ul li{
        margin: 0;
        padding: 0;
    }
    
    .nav-menu ul li .link{
        display: flex;
        align-items: center;
        padding: 16px 20px;
        margin: 6px 12px;
        color: #ffffff;
        font-size: 15px;
        font-weight: 500;
        transition: all 0.3s ease;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
        line-height: 1.4;
        position: relative;
        overflow: hidden;
        text-decoration: none;
        min-height: 48px;
    }

    .nav-menu ul li .link i {
        margin-right: 14px;
        font-size: 17px;
        width: 18px;
        text-align: center;
        opacity: 0.95;
        flex-shrink: 0;
    }
    
    .nav-menu ul li .link:hover,
    .nav-menu ul li .link.active{
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        border-color: rgba(255, 255, 255, 0.25);
        transform: translateX(3px);
        box-shadow: 0 3px 15px rgba(255, 255, 255, 0.1);
    }

    .nav-menu ul li .link:hover i,
    .nav-menu ul li .link.active i{
        opacity: 1;
        transform: scale(1.1);
    }

    .nav-menu ul li .link:active{
        transform: translateX(2px) scale(0.98);
    }

    /* Add separator before user-specific items */
    .nav-menu ul li:nth-child(8)::before {
        content: '';
        display: block;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
        margin: 15px 12px 10px;
    }

    /* Ensure hamburger icon displays correctly */
    .nav-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 8px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-menu-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-menu-btn i {
        font-size: 24px;
        color: #ffffff;
        transition: all 0.3s ease;
    }

    .nav-menu-btn:hover i {
        transform: scale(1.1);
    }
    
    /* Overlay when menu is open - FIXED to only show small overlay */
    .nav-menu.active::before{
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(83, 60, 174, 0.4);
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
        z-index: -1;
    }
    
    /* Hide desktop profile pic on mobile */
    .profile-pic {
        display: none;
    }
    
    /* Improve logout/login button in mobile menu */
    .nav-menu ul li .logout{
        color: #d32f2f;
        font-weight: 600;
    }
    
    .nav-menu ul li .logout:hover{
        background: rgba(211, 47, 47, 0.1);
        border-left-color: #d32f2f;
    }
    
    /* Special styling for Add Balance link in mobile menu */
    .nav-menu ul li .link i.fa-plus-circle {
        margin-right: 8px;
        color: #533cae;
    }
}

/* Tablet adjustments */
@media only screen and (min-width: 769px) and (max-width: 1024px){
    .header {
        padding: 0 30px;
        height: 75px;
        line-height: 75px;
    }

    body {
        padding-top: 75px;
    }

    .nav-logo img {
        width: 110px;
    }

    .nav-menu {
        margin: 0 15px;
    }

    .nav-menu ul li .link{
        padding: 0 14px;
        font-size: 13px;
        line-height: 75px;
    }

    .nav-button .btn {
        width: 105px;
        height: 36px;
        font-size: 13px;
    }

    .profile-pic {
        width: 42px;
        height: 42px;
    }

    .profile-container {
        margin-left: 20px;
    }
}
/* end header */


/* Enhanced mobile menu text visibility */
@media only screen and (max-width: 768px){
    .nav-menu ul li .link {
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        font-weight: 600 !important;
    }
    
    .mobile-user-balance {
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        font-weight: 600 !important;
    }
}
