/* ===== USER MENU - PROFESSIONAL DESIGN ===== */

/* User Menu Container */
.user-menu {
    position: relative;
    margin-right: 15px;
}

/* User Avatar Button */
.user-avatar-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease;
}

.user-avatar-btn:hover {
    transform: scale(1.05);
}

.user-avatar-btn:active {
    transform: scale(0.95);
}

/* Avatar Wrapper */
.avatar-wrapper {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #e50914, #b20710);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
    transition: all 0.3s ease;
}

.user-avatar-btn:hover .avatar-wrapper {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

/* Avatar Image */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Avatar Letter (Fallback) */
.avatar-letter {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Online Status Indicator */
.avatar-status {
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: #28a745;
    border: 2px solid #0a0a0a;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
    }
    50% {
        box-shadow: 0 0 15px rgba(40, 167, 69, 0.9);
    }
}

/* ===== USER DROPDOWN ===== */
.user-dropdown {
    position: absolute;
    top: 58px;
    left: 0;
    width: 320px;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(25px);
    border-radius: 16px;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    overflow: hidden;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown Header */
.dropdown-header {
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.12), rgba(178, 7, 16, 0.08));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Header Avatar */
.header-avatar {
    position: relative;
    flex-shrink: 0;
}

.header-avatar-img,
.header-avatar-letter {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.header-avatar-letter {
    background: linear-gradient(135deg, #e50914, #b20710);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

/* Upload Avatar Button */
.upload-avatar-btn {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    background: rgba(229, 9, 20, 0.95);
    border: 2px solid #0f0f0f;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.upload-avatar-btn:hover {
    background: #e50914;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.6);
}

.upload-avatar-btn i {
    font-size: 11px;
}

/* Header Info */
.header-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User Badge */
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-badge i {
    font-size: 11px;
}

.user-badge.premium {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #000;
    border-color: #ffd700;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.user-badge.premium i {
    color: #000;
}

/* Subscription Info */
.subscription-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 184, 0, 0.1));
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.sub-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700, #ffb800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.sub-details {
    flex: 1;
}

.sub-type {
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
    margin: 0 0 4px 0;
}

.sub-expire {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sub-expire strong {
    color: #fff;
    font-weight: 700;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0;
}

/* Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: right;
    font-family: inherit;
    position: relative;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dropdown-item i {
    font-size: 16px;
    width: 22px;
    text-align: center;
    color: rgba(229, 9, 20, 0.9);
    transition: transform 0.3s ease;
}

.dropdown-item:hover i {
    transform: scale(1.1);
}

.dropdown-item span {
    flex: 1;
}

/* Item Arrow */
.item-arrow {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    width: auto !important;
    margin-right: auto;
}

/* Item Badge */
.item-badge {
    min-width: 22px;
    height: 22px;
    background: rgba(229, 9, 20, 0.9);
    border-radius: 11px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    margin-right: auto;
}

/* Logout Item */
.logout-item {
    color: rgba(255, 68, 68, 0.9);
}

.logout-item i {
    color: rgba(255, 68, 68, 0.9);
}

.logout-item:hover {
    background: rgba(255, 68, 68, 0.12);
    color: #ff4444;
}

.logout-item:hover i {
    color: #ff4444;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .user-dropdown {
        width: 280px;
        right: 0;
        left: auto;
    }
    
    .dropdown-header {
        padding: 20px 16px;
    }
    
    .header-avatar-img,
    .header-avatar-letter {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
    
    .user-name {
        font-size: 16px;
    }
    
    .user-email {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .user-menu {
        margin-right: 10px;
    }
    
    .avatar-wrapper {
        width: 38px;
        height: 38px;
    }
    
    .avatar-letter {
        font-size: 14px;
    }
    
    .user-dropdown {
        width: calc(100vw - 30px);
        max-width: 280px;
    }
}
