.header {
    height: var(--header-height);
    width: 100%;
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: relative;
    z-index: 99;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Menu Toggle Button */
.menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Credit Display */
.credit-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: var(--text-primary);
    position: relative;
    cursor: pointer;
}

.credit-display:hover::before,
.credit-display:hover::after {
    display: none;
}

.credit-value {
    font-weight: 600;
}

/* Credits Tooltip */
.credits-tooltip {
    position: absolute;
    background: var(--bg-elevated);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: auto;
    min-width: 180px;
    font-size: 0.875rem;
    animation: tooltipFade 0.2s ease;
}

.credits-tooltip p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.4;
}

.credits-tooltip .tooltip-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

@keyframes tooltipFade {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdowns */
.dropdown-container {
    position: relative;
}

.dropdown-trigger {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-elevated);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-container.open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Notifications Panel */
#notificationsContainer {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.text-button {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 0.875rem;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.text-button:hover {
    color: var(--accent-secondary);
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.notification-item.unread {
    background: rgba(133, 65, 212, 0.05);
}

.notification-item.unread:hover {
    background: rgba(133, 65, 212, 0.08);
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(133, 65, 212, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon i {
    font-size: 1rem;
    color: var(--accent-primary);
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.4;
}

.notification-time {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.empty-notification {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-notification i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-notification p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Custom Scrollbar for Notifications */
#notificationsContainer::-webkit-scrollbar {
    width: 6px;
}

#notificationsContainer::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#notificationsContainer::-webkit-scrollbar-thumb {
    background: rgba(133, 65, 212, 0.3);
    border-radius: 3px;
}

#notificationsContainer::-webkit-scrollbar-thumb:hover {
    background: rgba(133, 65, 212, 0.5);
}

/* Notification Badge Animation */
@keyframes notification-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-primary);
    color: white;
    border-radius: 10px;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: notification-pulse 2s infinite;
}

/* Avatar */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Menu Items */
.menu-list {
    padding: 0.5rem 0;
}

/* Colorful menu icons */
.menu-item i,
.menu-button i {
    width: 1.25rem;
    text-align: center;
}

.menu-item i.fa-download,
.menu-button i.fa-download {
    color: #3b82f6;  /* Blue */
}

.menu-item i.fa-heart,
.menu-button i.fa-heart {
    color: #ef4444;  /* Red */
}

.menu-item i.fa-cog,
.menu-button i.fa-cog {
    color: #8b5cf6;  /* Purple */
}

.menu-item i.fa-question-circle,
.menu-button i.fa-question-circle {
    color: #10b981;  /* Green */
}

.menu-item i.fa-sign-out-alt,
.menu-button i.fa-sign-out-alt {
    color: #f59e0b;  /* Orange */
}

.menu-item i.fa-bell {
    color: #f59e0b;  /* Orange */
}

/* Add hover animation for menu icons */
.menu-item:hover i,
.menu-button:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.menu-item i {
    width: 1.25rem;
    text-align: center;
    color: var(--text-secondary);
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.menu-button {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.menu-button:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Profile Trigger */
.profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Username Display */
.username-display {
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .credit-display {
        padding: 0.5rem;
    }

    .credit-display span:not(.credit-icon) {
        display: none;
    }

    .username-display {
        display: none;
    }
}