.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-bottom: 1px solid #e4e6eb;
    z-index: 1000;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 56px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #f58b1f;
    text-decoration: none;
}

.logo-mobile {
    display: none;
}

.logo-full {
    display: inline;
}

/* Mobile responsive logo */
@media (max-width: 768px) {
    .logo-mobile {
        display: inline;
    }
    
    .logo-full {
        display: none;
    }
}

.nav-menu {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    color: #65676b;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background-color: #f0f2f5;
    color: #f58b1f;
}

/* Navigation Dropdown */
.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown .nav-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100%);
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    min-width: 220px;
    z-index: 1001;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown.show .nav-dropdown-menu {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Style for active state (highlight only, doesn't show dropdown) */
.nav-item-dropdown.active .nav-item {
    background-color: #f0f2f5;
    color: #f58b1f;
}

.nav-dropdown-item {
    color: #1c1e21;
    text-decoration: none;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
    font-weight: 500;
    font-size: 15px;
}

.nav-dropdown-item:hover {
    background-color: #f0f2f5;
    color: #f58b1f;
}

.nav-dropdown-item.active {
    background-color: #f0f2f5;
    color: #f58b1f;
}

.nav-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: #1c1e21;
    font-weight: 500;
    white-space: nowrap;
}

.coins-badge-small {
    white-space: nowrap;
}

@media (max-width: 480px) {
    .user-name {
        font-size: 13px;
    }
    
    .coins-badge-small {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
    
    .level-badge-small {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
}

.logout-btn {
    background-color: #f58b1f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #e67e22;
}

/* Notifications */
.notifications-dropdown {
    position: relative;
    display: inline-block;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    outline: none;
    padding: 0;
    cursor: pointer;
    font-size: 20px;
    color: #65676b;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.notification-btn:focus {
    outline: none;
}

.notification-btn:hover {
    background-color: #f0f2f5;
}

.notification-btn.active {
    background-color: #f0f2f5;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #e41e3f;
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 0 5px;
    border: 2px solid white;
    box-sizing: border-box;
}

.notifications-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: calc(100vh - 80px);
    min-height: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
    box-sizing: border-box;
    max-width: calc(100vw - 20px);
}

.notifications-panel.show {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-header {
    padding: 16px;
    border-bottom: 1px solid #e4e6eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    flex-shrink: 0;
}

.notifications-header h5 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1c1e21;
    line-height: 1.2;
}

.mark-all-read {
    background: none;
    border: none;
    outline: none;
    color: #f58b1f;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
    font-family: inherit;
}

.mark-all-read:hover {
    background-color: #f0f2f5;
}

.mark-all-read:focus {
    outline: none;
    background-color: #f0f2f5;
}

.mark-all-read:active {
    background-color: #e4e6eb;
}

.notifications-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    background: white;
    min-height: 200px;
}

/* Custom scrollbar for notifications list */
.notifications-list::-webkit-scrollbar {
    width: 8px;
}

.notifications-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: #bcc0c4;
    border-radius: 4px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: #8a8d91;
}

.notification-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-bottom: 1px solid #f0f2f5;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f0f2f5;
}

.notification-item.unread {
    background-color: #e7f3ff;
}

.notification-item.unread:hover {
    background-color: #d4e7ff;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #1877f2;
}

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f58b1f 0%, #e67e22 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.notification-content {
    flex: 1;
    min-width: 0;
    padding-right: 8px;
}

.notification-message {
    color: #1c1e21;
    font-size: 15px;
    line-height: 1.3333;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.notification-item.unread .notification-message {
    font-weight: 600;
}

.notification-time {
    color: #65676b;
    font-size: 13px;
    margin-top: 2px;
}

.notifications-footer {
    padding: 12px 16px;
    border-top: 1px solid #e4e6eb;
    text-align: center;
    background: #f0f2f5;
    flex-shrink: 0;
}

.notifications-footer a {
    color: #f58b1f;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.notifications-footer a:hover {
    color: #e67e22;
    text-decoration: underline;
}

.no-notifications {
    padding: 60px 20px;
    text-align: center;
    color: #65676b;
    font-size: 15px;
    line-height: 1.5;
}

.loading-notifications {
    padding: 40px 20px;
    text-align: center;
    color: #65676b;
    font-size: 15px;
    line-height: 1.5;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary, #1c1e21);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
    background-color: #f0f2f5;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    visibility: hidden !important;
}

.mobile-menu-overlay.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Mobile Nav Menu */
.mobile-nav-menu,
#mobile-nav-menu {
    display: none !important;
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    right: 0 !important;
    background-color: white !important;
    border-bottom: 1px solid #e4e6eb !important;
    padding: 16px !important;
    transform: translateY(-100%) !important;
    transition: transform 0.3s ease !important;
    z-index: 1001 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 56px) !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.mobile-nav-menu.active,
#mobile-nav-menu.active {
    display: block !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-nav-menu .nav-item,
#mobile-nav-menu .nav-item {
    display: block;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    color: #1c1e21;
    text-decoration: none;
    transition: background-color 0.2s;
}

.mobile-nav-menu .nav-item:hover,
.mobile-nav-menu .nav-item.active,
#mobile-nav-menu .nav-item:hover,
#mobile-nav-menu .nav-item.active {
    background-color: #f0f2f5;
    color: #f58b1f;
}

/* Mobile Nav Dropdown */
.mobile-nav-dropdown {
    margin-bottom: 8px;
}

.mobile-nav-dropdown-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.mobile-dropdown-icon {
    transition: transform 0.3s ease;
}

.mobile-nav-dropdown.show .mobile-dropdown-icon {
    transform: rotate(180deg);
}

.mobile-nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-left: 16px;
    margin-top: 4px;
    border-left: 2px solid #e4e6eb;
    padding-left: 16px;
}

.mobile-nav-dropdown.show .mobile-nav-submenu {
    max-height: 300px;
}

.mobile-nav-submenu-item {
    display: block;
    padding: 10px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    color: #65676b;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-nav-submenu-item:hover {
    background-color: #f0f2f5;
    color: #f58b1f;
}

.mobile-nav-submenu-item.active {
    background-color: #f0f2f5;
    color: #f58b1f;
    font-weight: 600;
}

.mobile-nav-submenu-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu {
        display: none !important;
    }
    
    #mobile-nav-menu:not(.active) {
        display: none !important;
        transform: translateY(-100%) !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    #mobile-nav-menu.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        z-index: 1001 !important;
    }
    
    /* Mobile dropdown menu */
    .nav-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        padding: 0;
        margin-top: 8px;
        margin-left: 16px;
        border-left: 2px solid #e4e6eb;
        padding-left: 16px;
    }
    
    .nav-item-dropdown.show .nav-dropdown-menu {
        display: flex;
    }
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-nav-menu,
    #mobile-nav-menu {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .notifications-panel {
        position: fixed;
        top: 64px;
        right: 10px;
        left: auto;
        width: calc(100vw - 20px);
        max-width: 360px;
        transform: none;
    }
}

